/* =========================================================
   WORKPLANNER THEME - OPTIMIZED
   Cleaned up and consolidated from the current theme.
   Principles:
   - one source of truth per component
   - dark admin as default
   - popup/auth support preserved
   - legacy table aliases kept for compatibility
   ========================================================= */

/* =========================================================
   TOKENS
   ========================================================= */

:root{
    --wp-bg:#141414;
    --wp-bg-soft:#1b1b1b;
    --wp-dark:#1e1e1e;
    --wp-dark-2:#2a2a2a;

    --wp-surface:#ffffff;
    --wp-surface-soft:#f7f9fc;

    --wp-border:#e6e9ef;
    --wp-border-dark:rgba(255,255,255,.10);
    --wp-border-dark-soft:rgba(255,255,255,.08);
    --wp-divider-dark:rgba(255,255,255,.06);

    --wp-text:#1f2937;
    --wp-text-muted:#667085;
    --wp-text-inverse:#ffffff;
    --wp-text-inverse-muted:rgba(255,255,255,.72);
    --wp-text-inverse-soft:rgba(255,255,255,.58);

    --wp-accent:#ff2159;
    --wp-accent-hover:#cc1a47;
    --wp-pink:#ff2159;
    --wp-pink-hover:#cc1a47;

    --wp-success:#22a447;
    --wp-success-hover:#1b893a;
    --wp-warning:#ffc107;
    --wp-danger:#ff5271;
    --wp-info:#00c2ff;

    --wp-shadow:0 10px 30px rgba(0,0,0,.18);
    --wp-shadow-soft:0 6px 18px rgba(0,0,0,.08);
    --wp-shadow-dark:0 14px 34px rgba(0,0,0,.22);

    --wp-radius:12px;
    --wp-radius-sm:8px;
    --wp-radius-md:14px;
    --wp-radius-lg:22px;
    --wp-radius-xl:24px;

    --wp-control-height:48px;
    --wp-table-action-height:34px;
}

/* =========================================================
   GLOBAL
   ========================================================= */

html,
body{
    min-height:100%;
}

body{
    margin:0;
    background:var(--wp-bg);
    color:var(--wp-text);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

a{
    transition:all .15s ease;
}

*{
    box-sizing:border-box;
}

img{
    max-width:100%;
}

/* =========================================================
   ADMIN TOPBAR
   ========================================================= */

.wp-admin-topbar{
    background:linear-gradient(135deg,var(--wp-dark) 0%, var(--wp-dark-2) 55%, var(--wp-pink) 100%);
    color:#fff;
    height:76px;
    padding:0 28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    box-shadow:var(--wp-shadow);
}

.wp-admin-topbar-left,
.wp-admin-topbar-right{
    display:flex;
    align-items:center;
    gap:14px;
}

.wp-admin-topbar-logo{
    display:block;
    width:auto;
    height:30px;
}

.wp-admin-logout{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 18px;
    border-radius:12px;
    background:rgba(255,255,255,.12);
    color:#fff !important;
    text-decoration:none !important;
    font-weight:600;
    font-size:14px;
}

.wp-admin-logout:hover{
    background:rgba(255,255,255,.20);
    color:#fff !important;
}

/* =========================================================
   ADMIN LAYOUT
   ========================================================= */

.wp-admin-layout{
    display:flex;
    align-items:stretch;
    min-height:calc(100vh - 76px);
}

.wp-admin-sidebar{
    width:280px;
    min-width:280px;
    padding:24px 0;
    background:linear-gradient(180deg,#101010 0%, #171717 100%);
    border-right:1px solid rgba(255,255,255,.06);
}

.wp-sidebar-logo{
    padding:0 24px 24px 24px;
    text-align:left;
}

.wp-sidebar-menu{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:0 12px;
}

.wp-admin-content{
    flex:1 1 auto;
    min-width:0;
    padding:22px 28px 28px 28px;
}

/* =========================================================
   MENU
   ========================================================= */

.wp-menu{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.wp-menu-group{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.wp-menu-section{
    display:block;
    margin-top:18px;
    margin-bottom:4px;
    padding:0 18px;
    font-size:12px;
    font-weight:700;
    line-height:1.4;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:rgba(255,255,255,.48);
}

.wp-menu-section:first-child{
    margin-top:0;
}

.wp-menu-item{
    display:block;
    padding:12px 18px;
    border-radius:12px;
    color:#fff !important;
    text-decoration:none !important;
    font-size:15px;
    font-weight:600;
    line-height:1.4;
    background:transparent;
    transition:background .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.wp-menu-item:hover{
    background:rgba(255,255,255,.05);
}

.wp-menu-item--active{
    background:linear-gradient(135deg,var(--wp-accent-hover) 0%, var(--wp-accent) 100%);
    box-shadow:0 14px 30px rgba(255,33,89,.18);
}

.wp-menu-sub{
    display:flex;
    flex-direction:column;
    gap:4px;
    margin-left:14px;
    padding-left:12px;
    border-left:1px solid rgba(255,255,255,.08);
}

.wp-menu-sub .wp-menu-item,
.wp-menu-sub .wp-menu-item--active{
    padding:8px 16px;
    font-size:13px;
    font-weight:500;
    opacity:.88;
}

/* =========================================================
   PAGE / CARDS
   ========================================================= */

.wp-page-card,
.page-card{
    background:var(--wp-surface);
    border-radius:28px;
    box-shadow:var(--wp-shadow-soft);
    overflow:hidden;
}

.wp-page-card{
    max-width:none;
    margin:0 0 24px 0;
}

.wp-popup-card{
    width:95%;
    max-width:1200px;
    margin:0 auto 24px auto;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    border-radius:var(--wp-radius-lg);
    overflow:hidden;
    box-shadow:var(--wp-shadow);
}

.wp-page-header{
    display:flex;
    align-items: center;
    justify-content:space-between;
    gap:24px;
    margin:0 0 24px 0;
    padding:28px 34px;
    border-bottom:1px solid var(--wp-border-dark-soft);
}

.wp-page-header > div:first-child{
    min-width:0;
}

.wp-page-header-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    margin-left:auto;
}

.wp-page-title{
    margin:0 0 6px 0;
    font-size:34px;
    line-height:1.1;
    font-weight:800;
    letter-spacing:-0.02em;
    color:#ffffff;
}

.wp-page-subtitle{
    margin:0;
    font-size:17px;
    line-height:1.5;
    color:var(--wp-text-inverse-muted);
    font-weight: normal;
}

.wp-page-body{
    padding:16px 48px;
}

.wp-panel,
.wp-card{
    background:rgba(255,255,255,.04);
    border:2px solid rgba(255,255,255,.08);
    border-radius:22px;
    box-shadow:var(--wp-shadow-dark);
}

.wp-panel{
    margin:0 0 20px 0;
    padding:20px;
}

.wp-card{
    padding:18px 20px;
}

a.wp-card,
a.wp-card:hover,
a.wp-card:visited{
    display:block;
    text-decoration:none;
}

.wp-card.is-success{ border-color:rgba(58,201,109,.55); }
.wp-card.is-warning{ border-color:rgba(255,193,7,.55); }
.wp-card.is-danger{ border-color:rgba(255,82,113,.55); }
.wp-card.is-info{ border-color:rgba(0,194,255,.55); }

/* =========================================================
   TYPOGRAPHY / METRICS / HELPERS
   ========================================================= */

.wp-kicker{
    margin:0 0 10px 0;
    font-size:13px;
    color:rgba(255,255,255,.62);
}

.wp-metric{
    margin:0 0 8px 0;
    font-size:clamp(22px, 2.4vw, 32px);
    line-height:.95;
    font-weight:800;
    color:#ffffff;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:clip;
    font-variant-numeric:tabular-nums;
}

.wp-metric-label{
    font-size:16px;
    color:#ffffff;
}

.wp-text-muted,
small,
.help{
    color:rgba(255,255,255,.58);
}

small,
.help{
    display:block;
    margin-top:8px;
    font-size:13px;
}

.wp-empty,
.wp-empty-state{
    padding:30px 18px;
    text-align:center;
    color:rgba(255,255,255,.58);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.wp-btn,
.wp-auth-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    min-height:var(--wp-control-height);
    height:var(--wp-control-height);
    padding:0 18px;
    border-radius:14px;
    border:1px solid transparent;
    text-decoration:none !important;
    font-size:15px;
    font-weight:700;
    line-height:1;
    cursor:pointer;
    transition:transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.wp-btn.wp-btn-small{
    min-height:34px;
    height:34px;
    padding:0 12px;
    border-radius:12px;
    font-size:12px;
}

.wp-btn:hover,
.wp-auth-button:hover{
    transform:translateY(-1px);
}

.wp-btn-primary,
.wp-auth-button{
    background:linear-gradient(90deg, var(--wp-accent-hover) 0%, var(--wp-accent) 100%);
    color:#ffffff !important;
    box-shadow:0 12px 26px rgba(255,33,89,.20);
}

.wp-btn-primary:visited{
    color:#ffffff !important;
}

.wp-btn-primary:hover,
.wp-auth-button:hover{
    color:#ffffff !important;
    box-shadow:0 14px 30px rgba(255,33,89,.26);
}

.wp-btn-secondary{
    background:rgba(255,255,255,.08);
    color:#ffffff !important;
    border-color:rgba(255,255,255,.10);
}

.wp-btn-secondary:visited{
    color:#ffffff !important;
}

.wp-btn-secondary:hover,
.wp-btn-ghost:hover,
.wp-btn-dark:hover{
    color:#ffffff !important;
    background:rgba(255,255,255,.12);
}

.wp-btn-success{
    background:rgba(34,164,71,.16);
    color:#d9ffe8;
    border-color:rgba(34,164,71,.35);
}

.wp-btn-success:hover{
    color:#d9ffe8 !important;
    background:rgba(34,164,71,.24);
}

.wp-btn-ghost,
.wp-btn-dark{
    background:rgba(255,255,255,.04);
    color:#ffffff;
    border-color:rgba(255,255,255,.10);
}

.wp-btn-icon{
    padding-left:16px;
    padding-right:16px;
    gap:8px;
}

.wp-btn-icon-mark{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:18px;
    height:18px;
    font-size:16px;
    line-height:1;
}

/* =========================================================
   FILTERS / FORM CONTROLS
   ========================================================= */

.wp-toolbar{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.wp-toolbar-left,
.wp-toolbar-right{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.wp-filters{
    display:flex;
    flex-direction:column;
    gap:18px;
    padding:24px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:24px;
    background:rgba(255,255,255,.03);
}

.wp-filters-row{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    align-items:center;
}

.wp-filters-group{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-width:220px;
    flex:0 1 220px;
}

.wp-filters-group--sm{
    min-width:140px;
    flex-basis:140px;
}

.wp-filters-group--checkbox{
    min-width:280px;
    justify-content:flex-end;
}

.wp-filters-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
}

.wp-label{
    font-size:13px;
    font-weight:600;
    line-height:1.4;
    color:rgba(255,255,255,.72);
    margin-bottom:6px;
}

.wp-form-row{
    margin-bottom:10px;
}

.wp-form-row .wp-readonly-label{
    font-size:11px;
    font-weight:400;
    text-transform:uppercase;
    letter-spacing:0.06em;
    color:rgba(255,255,255,0.60);
    margin-bottom:6px;
}

.wp-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px 28px;
}

.wp-control,
.wp-input,
.wp-select,
.wp-search-input,
.wp-auth-input,
.wp-popup-card input:not([type="checkbox"]):not([type="radio"]),
.wp-popup-card select,
.wp-popup-card textarea,
.wp-page-card input:not([type="checkbox"]):not([type="radio"]),
.wp-page-card select,
.wp-page-card textarea{
    width:100%;
    height:var(--wp-control-height);
    min-height:var(--wp-control-height);
    padding:0 14px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:12px;
    background:rgba(255,255,255,.04);
    color:#fff;
    font-size:15px;
    line-height:1.2;
    outline:none;
    transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

textarea.wp-control,
.wp-popup-card textarea,
.wp-page-card textarea{
    height:auto;
    min-height:140px;
    padding:14px;
    resize:vertical;
}

.wp-input{
    min-width:280px;
}

.wp-control::placeholder,
.wp-input::placeholder,
.wp-search-input::placeholder,
.wp-auth-input::placeholder{
    color:rgba(255,255,255,.38);
}

.wp-control:focus,
.wp-input:focus,
.wp-select:focus,
.wp-search-input:focus,
.wp-auth-input:focus,
.wp-popup-card input:not([type="checkbox"]):not([type="radio"]):focus,
.wp-popup-card select:focus,
.wp-popup-card textarea:focus,
.wp-page-card input:not([type="checkbox"]):not([type="radio"]):focus,
.wp-page-card select:focus,
.wp-page-card textarea:focus{
    border-color:rgba(255,255,255,.22);
    background:rgba(255,255,255,.06);
    box-shadow:0 0 0 3px rgba(255,255,255,.05);
}

select.wp-control,
.wp-select,
.wp-popup-card select,
.wp-page-card select{
    padding-right:40px;
    color:#ffffff;
}

select.wp-control option,
select.wp-control optgroup,
.wp-select option,
.wp-select optgroup{
    color:#ffffff;
    background:var(--wp-dark-2);
}

select.wp-control option:hover,
select.wp-control option:checked,
.wp-select option:hover,
.wp-select option:checked{
    background:rgba(255,255,255,.10);
}

.wp-popup-card label,
.wp-page-card label,
.wp-auth-field label{
    display:block;
    margin:0 0 10px 0;
    font-size:16px;
    font-weight:800;
}

.wp-popup-card .wp-readonly-label,
.wp-page-card .wp-readonly-label{
    font-size:11px;
    font-weight:400;
    text-transform:uppercase;
    letter-spacing:0.06em;
    color:rgba(255,255,255,0.60);
    margin:0 0 6px 0;
}

.wp-popup-card label,
.wp-page-card label{
    color:#ffffff;
}

.wp-auth-field label{
    color:#fff;
}

.wp-popup-card h2,
.wp-page-card h2{
    margin:0 0 8px 0;
    font-size:22px;
    font-weight:800;
    color:#FFFFFF;
}

.wp-check,
.wp-checkbox-row{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:46px;
    font-size:14px;
    line-height:1.4;
}

.wp-check{
    color:#fff;
}

.wp-checkbox-row{
    justify-content:flex-start;
    margin:24px 0 18px 0;
    text-align:left !important;
}

.wp-check input[type="checkbox"],
.wp-table input[type="checkbox"]{
    width:18px;
    height:18px;
    cursor:pointer;
    accent-color:#ff2f7d;
}

.wp-checkbox-row input[type="checkbox"]{
    appearance:auto;
    -webkit-appearance:checkbox;
    width:20px !important;
    height:20px !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    box-shadow:none !important;
    background:transparent !important;
    flex:0 0 auto;
    display:inline-block !important;
    vertical-align:middle;
}

.wp-checkbox-row label{
    margin:0 !important;
    display:inline-block !important;
    font-size:16px;
    font-weight:800;
    line-height:1.3;
}

.wp-section-text{
    color:rgba(255,255,255,.75);
    font-size:13px;
    margin-top:4px;
}
/* =========================================================
   ALERTS / BADGES
   ========================================================= */

.wp-alert{
    margin:0 0 20px 0;
    padding:16px 18px;
    border-radius:18px;
    font-size:14px;
    line-height:1.5;
}

.wp-alert.is-success{
    background:rgba(46,204,113,.18);
    color:#6ee7a2;
    border:1px solid rgba(46,204,113,.35);
}

.wp-alert.is-warning{
    background:rgba(255,193,7,.14);
    color:#ffe59a;
    border:1px solid rgba(255,193,7,.30);
}

.wp-alert.is-danger{
    background:rgba(255,82,113,.14);
    color:#ffd5dd;
    border:1px solid rgba(255,82,113,.35);
    font-weight:700;
}

.wp-alert.is-info{
    background:rgba(0,194,255,.12);
    color:#c8f3ff;
    border:1px solid rgba(0,194,255,.28);
}

.wp-badge{
    display:inline-flex;
    align-items:center;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.wp-badge.is-danger{
    background:rgba(255,82,113,.18);
    color:#ffe2e8;
    border:1px solid rgba(255,82,113,.28);
}

.wp-badge.is-success{
    background:rgba(46,204,113,.18);
    color:#dfffea;
    border:1px solid rgba(46,204,113,.28);
}

.wp-badge.is-warning{
    background:rgba(255,193,7,.18);
    color:#fff4cc;
    border:1px solid rgba(255,193,7,.28);
}

/* =========================================================
   TABLES
   Modern system + legacy aliases (.table-wrap / .demo-table-wrap)
   ========================================================= */

.wp-table-wrap,
.table-wrap,
.demo-table-wrap{
    width:100%;
    overflow-x:auto;
    max-width:100%;
}

.wp-table,
.table-wrap table,
.demo-table-wrap table{
    width:100%;
    min-width:0;
    border-collapse:collapse;
    table-layout:auto;
}

.wp-table thead th,
.table-wrap thead th,
.demo-table-wrap thead th{
    padding:14px 16px;
    text-align:left;
    font-size:13px;
    font-weight:700;
    color:rgba(255,255,255,.68);
    border-bottom:1px solid rgba(255,255,255,.08);
}

.wp-table tbody td,
.table-wrap td,
.demo-table-wrap td{
    padding:14px 16px;
    vertical-align:top;
    color:#ffffff;
    border-bottom:1px solid rgba(255,255,255,.06);
}

.wp-table tfoot td,
.table-wrap tfoot td,
.demo-table-wrap tfoot td{
    padding:14px 16px;
    vertical-align:top;
    color:#ffffff;
    border-bottom:1px solid rgba(255,255,255,.06);
}

.wp-table tbody tr:hover,
.table-wrap tbody tr:hover,
.demo-table-wrap tbody tr:hover{
    background:rgba(255,255,255,.03);
}

.wp-table a,
.table-wrap a,
.demo-table-wrap a{
    color:inherit;
    text-decoration:none;
}

.wp-table a:hover,
.table-wrap a:hover,
.demo-table-wrap a:hover{
    text-decoration:underline;
}

.wp-table .wp-input{
    min-width:0;
}

/* Compact form tables (order edit popup) */
#wpOrderLinesTable thead th{
    padding:10px 12px;
}

#wpOrderLinesTable tbody td{
    padding:10px 12px;
    vertical-align:middle;
}

/* Compact tables (customer economy) */
#wpCustEcoLicensesTable thead th,
#wpCustEcoLicensesTable tbody td,
#wpCustEcoLicensesTable tfoot td,
#wpCustEcoLicenseHistoryTable thead th,
#wpCustEcoLicenseHistoryTable tbody td{
    padding:8px 10px;
}

/* Compact tables (subscription license edit) */
#wpSubLicensesPm1Table thead th,
#wpSubLicensesPm1Table tbody td,
#wpSubLicensesPm1Table tfoot td{
    padding:10px 12px;
    vertical-align:middle;
}

#wpSubLicensesPm1TableWrap{
    overflow-x:auto;
    overflow-y:visible;
}

/* Compact tables (subscription license edit - old model) */
#wpSubLicensesPm0Table thead th,
#wpSubLicensesPm0Table tbody td,
#wpSubLicensesPm0Table tfoot td{
    padding:10px 12px;
    vertical-align:middle;
}

#wpSubLicensesPm0TableWrap{
    overflow-x:auto;
    overflow-y:visible;
}

#wpSubLicensesPm0Table .wp-input{
    height:38px;
    min-height:38px;
    padding:0 12px;
    border-radius:10px;
    font-size:14px;
}

#wpCustEcoFixedPriceAlert{
    font-size:11px;
    margin:10px 0 12px 0;
}


#wpCustEcoLicenseHistoryScroll{
    max-height:260px;
    overflow:auto;
}

#wpCustEcoPendingOrderlinesScroll{
    max-height:220px;
    overflow:auto;
}


#wpOrderLinesTable .wp-input,
#wpOrderLinesTable .wp-control,
#wpOrderLinesTable .wp-select{
    height:34px;
    min-height:34px;
    padding:0 10px;
    border-radius:10px;
    font-size:13px;
}

#wpOrderLinesTable input[type="number"]::-webkit-outer-spin-button,
#wpOrderLinesTable input[type="number"]::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}

#wpOrderLinesTable input[type="number"]{
    -moz-appearance:textfield;
}

.wp-ta-center{
    text-align:center !important;
}

.wp-ta-right{
    text-align:right !important;
}

/* =========================================================
   TABLE ACTION BUTTONS
   Shared by orders / demo accounts / subscriptions
   ========================================================= */

.table-actions,
.actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:6px;
    white-space:normal;
    min-width:0;
}

.btn-table,
.btn-action,
.btn-edit,
.btn-close{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:26px;
    padding:0 8px;
    border-radius:6px;
    border:1px solid rgba(255,255,255,.14);
    text-decoration:none !important;
    font-size:12px;
    font-weight:600;
    line-height:1;
    cursor:pointer;
    transition:all .12s ease;
    background:transparent;
    box-sizing:border-box;
}

.btn-table:hover,
.btn-action:hover,
.btn-edit:hover,
.btn-close:hover{
    background:rgba(255,255,255,.06);
    color:#ffffff !important;
}

.btn-table-edit,
.btn-edit{
    background:transparent;
    color:#8fb0ff;
    border-color:rgba(73,112,255,.42);
}

.btn-table-edit:hover,
.btn-edit:hover{
    background:rgba(73,112,255,.10);
    color:#cfd8ff;
    border-color:rgba(73,112,255,.58);
}

.btn-table-danger,
.btn-close{
    background:transparent;
    color:#ff9aa8;
    border-color:rgba(255,82,113,.42);
}

.btn-table-danger:hover,
.btn-close:hover{
    background:rgba(255,82,113,.10);
    color:#ffd5dd;
    border-color:rgba(255,82,113,.58);
}

.btn-table-success{
    background:transparent;
    color:#86efac;
    border-color:rgba(46,204,113,.45);
}

.btn-table-success:hover{
    background:rgba(46,204,113,.12);
    color:#dfffea;
    border-color:rgba(46,204,113,.60);
}

/* =========================================================
   POPUP SCOPE
   ========================================================= */

.wp-popup-scope{
    padding:32px;
    background:var(--wp-bg);
}

.wp-popup-scope .wp-page-card{
    max-width:1100px;
    margin:0 auto;
    background:#fff;
    border-radius:var(--wp-radius);
    overflow:hidden;
    box-shadow:var(--wp-shadow);
}

.wp-popup-scope .wp-popup-card{
    margin:0 auto;
}

.wp-popup-scope .wp-page-header{
    background:linear-gradient(135deg,var(--wp-dark) 0%, #444444 55%, var(--wp-accent) 100%);
    color:#fff;
    border-bottom:none;
    padding:24px 28px;
}

.wp-popup-scope .wp-page-title{
    margin-bottom:14px;
    font-size:44px;
    color:#fff;
}

.wp-popup-scope .wp-page-subtitle{
    max-width:820px;
    font-size:17px;
    line-height:1.45;
    color:rgba(255,255,255,.82);
}

.wp-popup-scope .wp-page-body,
.wp-popup-scope .wp-form-wrap,
.wp-popup-scope .wp-form-section{
    padding:28px 56px;
}

.wp-popup-scope .wp-section-title{
    margin-top:10px;
}

.wp-form-actions{
    display:flex;
    justify-content:flex-start;
    gap:12px;
    margin-top:32px;
    padding-top:24px;
    border-top:1px solid var(--wp-border);
}

.wp-form-actions .wp-btn{
    min-width:190px;
}

.wp-page-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
    margin:0 0 20px 0;
}

.wp-page-actions--between{
    justify-content:space-between;
}

.wp-page-actions-group{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;
}

/* =========================================================
   SELECT OVERLAY (STANDARD COMPONENT)
   ========================================================= */

.wp-select-overlay{
    position:absolute;
    right:0;
    top:-10px;
    padding:14px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(20,20,20,.98);
    box-shadow:0 18px 40px rgba(0,0,0,.35);
    z-index:20;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    min-height:0;
}

.wp-select-overlay-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:10px;
    flex:0 0 auto;
}

.wp-select-overlay-body{
    overflow:auto;
    flex:1 1 auto;
    min-height:0;
    height:100%;
}

.wp-btn.wp-select-overlay-close{
    height:36px;
    min-height:36px;
    padding:0 14px;
    border-radius:12px;
    min-width:auto;
}

/* =========================================================
   AUTH PAGES
   ========================================================= */

.wp-auth-page{
    min-height:100vh;
    margin:0;
    background:linear-gradient(180deg, #0f0f0f 0%, #1b1b1b 100%);
    color:#fff;
}

.wp-auth-wrap{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:32px 16px;
}

.wp-auth-card{
    width:100%;
    max-width:460px;
    padding:32px;
    border-radius:28px;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.08);
    box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.wp-auth-logo{
    margin-bottom:24px;
    text-align:center;
}

.wp-auth-logo img{
    display:inline-block;
    width:100%;
    max-width:220px;
    height:auto;
}

.wp-auth-title{
    margin:0 0 10px 0;
    font-size:48px;
    line-height:1.05;
    font-weight:800;
    color:#fff;
}

.wp-auth-text{
    margin:0 0 28px 0;
    font-size:18px;
    line-height:1.5;
    color:rgba(255,255,255,.72);
}

.wp-auth-field{
    margin-bottom:18px;
}

.wp-auth-actions{
    margin-top:24px;
}

.wp-auth-footer{
    margin-top:18px;
    text-align:center;
}

.wp-auth-footer a{
    color:#fff;
    text-decoration:none;
    font-weight:700;
}

.wp-auth-footer a:hover{
    text-decoration:underline;
}

.wp-auth-message{
    margin-bottom:18px;
    padding:14px 16px;
    border-radius:14px;
    font-size:14px;
}

.wp-auth-message-error{
    background:rgba(255,90,90,.10);
    border:1px solid rgba(255,90,90,.25);
    color:#ffd7d7;
}

.wp-auth-message-success{
    background:rgba(54,193,114,.10);
    border:1px solid rgba(54,193,114,.25);
    color:#d9ffe8;
}

/* =========================================================
   LAYOUT / UTILITIES
   ========================================================= */

.wp-grid{
    display:grid;
    gap:18px;
}

.wp-grid-5{
    grid-template-columns:repeat(5, minmax(0, 1fr));
}

.wp-stack-lg > * + *{
    margin-top:24px;
}

.wp-stack-xl > * + *{
    margin-top:32px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px){
    .wp-grid-5{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px){
    .wp-page-header{
        align-items:flex-start;
    }

    .wp-page-header-actions{
        width:100%;
        margin-left:0;
        justify-content:flex-start;
    }
}

@media (max-width: 640px){
    .wp-grid-5{
        grid-template-columns:1fr;
    }

    .wp-admin-content{
        padding:18px 16px 22px 16px;
    }

    .wp-page-header{
        padding:22px 20px;
    }

    .wp-page-title{
        font-size:28px;
    }

    .wp-panel,
    .wp-card,
    .wp-filters{
        padding:16px;
    }

    .wp-page-body,
    .wp-popup-scope .wp-page-body,
    .wp-popup-scope .wp-form-wrap,
    .wp-popup-scope .wp-form-section{
        padding:24px 20px;
    }

    .wp-popup-scope{
        padding:16px;
    }

    .wp-auth-card{
        padding:24px 20px;
        border-radius:22px;
    }

    .wp-auth-title{
        font-size:34px;
    }

    .wp-auth-text{
        font-size:16px;
    }
}


/* =========================================================
   TABS MENU
   ========================================================= */

.wp-page-tabs {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    margin-bottom: 0px;
    padding-left: 56px;
}

.wp-page-tabs .wp-tab,
.wp-page-tabs .wp-tab:visited {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    opacity: 0.75;
    text-decoration: none;
    padding-bottom: 10px;
    border-bottom: 3px solid transparent;
}

.wp-page-tabs .wp-tab:hover {
    opacity: 1;
    border-bottom: 3px solid #ff2c7d;
}

.wp-page-tabs .wp-tab-active {
    opacity: 1;
    border-bottom: 3px solid #ff2c7d;
}

/* =========================================================
   READONLY LABEL / VALUES
   ========================================================= */

.wp-readonly-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
}

.wp-readonly {
    padding: 0 0 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.wp-readonly-label {
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}

.wp-readonly-value {
    color: #ffffff;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 500;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.wp-section-title {
    margin: 20px 0 18px 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
}
