/* ========================================================================
   Sortex License Manager Premium UI Foundation
   Stage 13E preview: full Dark + Light runtime theme
   ======================================================================== */

:root,
html[data-theme="dark"]{
    color-scheme:dark;
    --premium-bg:#050d18;
    --premium-bg-soft:#081522;
    --premium-sidebar:#07131f;
    --premium-panel:#0d1b2b;
    --premium-panel-2:#0a1725;
    --premium-panel-3:#102238;
    --premium-border:rgba(119,151,180,.18);
    --premium-border-soft:rgba(255,255,255,.065);
    --premium-text:#eef6ff;
    --premium-muted:#8ca2b7;
    --premium-muted-2:#637c94;
    --premium-accent:#34d4ca;
    --premium-accent-strong:#25bfc1;
    --premium-good:#5be0ae;
    --premium-warn:#f0c56c;
    --premium-bad:#ff8791;
    --premium-shadow:0 24px 70px rgba(0,0,0,.28);
}

html[data-theme="light"]{
    color-scheme:light;
    --premium-bg:#f2f6fb;
    --premium-bg-soft:#eef4fa;
    --premium-sidebar:#ffffff;
    --premium-panel:#ffffff;
    --premium-panel-2:#f8fbfe;
    --premium-panel-3:#edf5fa;
    --premium-border:rgba(35,74,104,.14);
    --premium-border-soft:rgba(35,74,104,.09);
    --premium-text:#10263a;
    --premium-muted:#607a91;
    --premium-muted-2:#7a91a5;
    --premium-accent:#119a9b;
    --premium-accent-strong:#087f86;
    --premium-good:#16875f;
    --premium-warn:#a3690c;
    --premium-bad:#c44854;
    --premium-shadow:0 22px 55px rgba(29,60,88,.11);
}

html,body{transition:background-color .18s ease,color .18s ease;}

body{
    background:
        radial-gradient(circle at 88% 3%,color-mix(in srgb,var(--premium-accent) 8%, transparent),transparent 28%),
        radial-gradient(circle at 12% 92%,color-mix(in srgb,#4384b8 6%, transparent),transparent 30%),
        var(--premium-bg) !important;
    color:var(--premium-text) !important;
}

.sidebar{
    background:linear-gradient(180deg,color-mix(in srgb,var(--premium-sidebar) 96%,var(--premium-accent) 4%),var(--premium-sidebar)) !important;
    border-color:var(--premium-border) !important;
    box-shadow:8px 0 34px rgba(0,0,0,.07);
}

.sidebar-brand{color:var(--premium-text) !important;}
.nav-title{color:var(--premium-muted-2) !important;}
.sidebar-nav a{color:var(--premium-muted) !important;}
.sidebar-nav a:hover{
    color:var(--premium-text) !important;
    background:color-mix(in srgb,var(--premium-accent) 7%,var(--premium-panel-2)) !important;
}
.sidebar-nav a.active{
    color:var(--premium-text) !important;
    border-color:color-mix(in srgb,var(--premium-accent) 24%,transparent) !important;
    background:linear-gradient(135deg,color-mix(in srgb,var(--premium-accent) 13%,transparent),color-mix(in srgb,var(--premium-accent) 5%,transparent)) !important;
    box-shadow:inset 3px 0 0 var(--premium-accent),0 8px 24px rgba(0,0,0,.06);
}

.nav-icon.nav-icon-premium{
    color:var(--premium-muted) !important;
    background:color-mix(in srgb,var(--premium-panel-2) 92%,var(--premium-accent) 8%) !important;
    border-color:var(--premium-border) !important;
}
.sidebar-nav a.active .nav-icon-premium{
    color:var(--premium-accent) !important;
    border-color:color-mix(in srgb,var(--premium-accent) 32%,transparent) !important;
    background:color-mix(in srgb,var(--premium-accent) 11%,var(--premium-panel)) !important;
}

.topbar{
    background:color-mix(in srgb,var(--premium-panel) 93%,transparent) !important;
    border-color:var(--premium-border) !important;
    backdrop-filter:blur(18px);
}
.topbar-title,.profile-name{color:var(--premium-text) !important;}
.profile-role,.profile-action,.signout{color:var(--premium-muted) !important;}
.profile-action:hover,.signout:hover{color:var(--premium-accent) !important;}

.theme-toggle{
    display:inline-flex;
    align-items:center;
    gap:7px;
    height:34px;
    padding:0 10px;
    border:1px solid var(--premium-border);
    border-radius:10px;
    background:var(--premium-panel-2);
    color:var(--premium-muted);
    cursor:pointer;
    font:inherit;
    font-size:11px;
    transition:.18s ease;
}
.theme-toggle:hover{
    color:var(--premium-accent);
    border-color:color-mix(in srgb,var(--premium-accent) 30%,var(--premium-border));
    transform:translateY(-1px);
}
.theme-toggle-icon{
    width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}

.page-heading h1,.panel h3,.panel-header h3,.settings-section h2,.settings-section h3,
.registry-main-text,.product-cell strong,.health-name,.server-control-card-title{
    color:var(--premium-text) !important;
}
.page-heading p,.panel-header p,.kpi-meta,.settings-section-header p,.health-detail,
.server-control-card-copy,.server-control-stat small,.footer,.table-empty span{
    color:var(--premium-muted) !important;
}

.kpi,.panel,.registry-panel,.mini-stat,.settings-section,.health-item,.security-table-wrap,
.firewall-control-card,.server-control-card,.server-control-stat,.postboot-summary,
.database-admin-card,.database-admin-layer,.server-overview-metric,.server-overview-fact,
.security-summary-card,.security-listen-card,.profile-card,.user-card{
    background:var(--premium-panel) !important;
    border-color:var(--premium-border) !important;
    box-shadow:0 15px 42px rgba(0,0,0,.055);
}

.settings-section{
    background:linear-gradient(180deg,var(--premium-panel),color-mix(in srgb,var(--premium-panel) 94%,var(--premium-bg-soft) 6%)) !important;
}
.settings-section-header,.panel-header,.registry-toolbar{
    border-color:var(--premium-border-soft) !important;
}

input,select,textarea,.field input,.settings-field input,.settings-field select,
.registry-search input,.registry-toolbar select,.firewall-control-fields input,
.firewall-control-fields select,.server-restart-dialog input{
    background:var(--premium-panel-2) !important;
    border-color:var(--premium-border) !important;
    color:var(--premium-text) !important;
}
input::placeholder,textarea::placeholder{color:var(--premium-muted-2) !important;}
input:focus,select:focus,textarea:focus{
    border-color:color-mix(in srgb,var(--premium-accent) 72%,var(--premium-border)) !important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--premium-accent) 10%,transparent) !important;
}

.registry-table,.security-table{color:var(--premium-text) !important;}
.registry-table th,.security-table th{
    color:var(--premium-muted-2) !important;
    background:color-mix(in srgb,var(--premium-panel-2) 92%,var(--premium-accent) 8%) !important;
    border-color:var(--premium-border-soft) !important;
}
.registry-table td,.security-table td{
    border-color:var(--premium-border-soft) !important;
}
.registry-table tbody tr:hover,.security-table tbody tr:hover{
    background:color-mix(in srgb,var(--premium-accent) 4%,var(--premium-panel)) !important;
}

.primary-button,.login-button{
    border:1px solid color-mix(in srgb,var(--premium-accent) 55%,transparent) !important;
    background:linear-gradient(135deg,var(--premium-accent),var(--premium-accent-strong)) !important;
    color:#032022 !important;
    box-shadow:0 10px 25px color-mix(in srgb,var(--premium-accent) 18%,transparent);
}
.secondary-button,.icon-action,.clear-filter{
    border-color:var(--premium-border) !important;
    background:var(--premium-panel-2) !important;
    color:var(--premium-muted) !important;
}
.secondary-button:hover,.icon-action:hover,.clear-filter:hover{
    color:var(--premium-accent) !important;
    border-color:color-mix(in srgb,var(--premium-accent) 32%,var(--premium-border)) !important;
}

.status-pill,.health-badge,.status-badge,.code-pill,.customer-id-pill,.domain-pill{
    border-color:var(--premium-border) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.status-pill,.health-good,.status-active{
    color:var(--premium-good) !important;
    background:color-mix(in srgb,var(--premium-good) 8%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-good) 24%,var(--premium-border)) !important;
}
.health-bad,.status-blocked,.status-revoked,.status-expired{
    color:var(--premium-bad) !important;
    background:color-mix(in srgb,var(--premium-bad) 7%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-bad) 22%,var(--premium-border)) !important;
}

.success-banner,.settings-note{
    color:color-mix(in srgb,var(--premium-good) 72%,var(--premium-text)) !important;
    background:color-mix(in srgb,var(--premium-good) 6%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-good) 19%,var(--premium-border)) !important;
}
.error-banner,.security-helper-warning{
    background:color-mix(in srgb,var(--premium-bad) 6%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-bad) 19%,var(--premium-border)) !important;
}

.server-restart-dialog{
    background:linear-gradient(180deg,var(--premium-panel),var(--premium-panel-2)) !important;
    color:var(--premium-text) !important;
}

.login-page{
    background:
        radial-gradient(circle at 76% 16%,color-mix(in srgb,var(--premium-accent) 10%,transparent),transparent 30%),
        radial-gradient(circle at 13% 88%,color-mix(in srgb,#4486bc 8%,transparent),transparent 31%),
        var(--premium-bg) !important;
}
.login-shell,.login-form-side{background:var(--premium-panel) !important;border-color:var(--premium-border) !important;}
.login-brand{
    background:linear-gradient(145deg,color-mix(in srgb,var(--premium-panel-2) 94%,var(--premium-accent) 6%),var(--premium-panel-2)) !important;
}
.login-form h2,.brand-copy h1,.brand-logo{color:var(--premium-text) !important;}
.brand-copy p,.form-subtitle,.brand-footer,.login-meta{color:var(--premium-muted) !important;}

html[data-theme="light"] .avatar{
    color:#075d64 !important;
    background:#c9f1ef !important;
}
html[data-theme="light"] .brand-mark{
    background:#e1f7f5 !important;
    border-color:#b8e9e5 !important;
    color:#0b8d8e !important;
}
html[data-theme="light"] .postboot-checklist,
html[data-theme="light"] .fingerprint-box,
html[data-theme="light"] .security-command{
    background:#f5f9fc !important;
    color:#516d84 !important;
    border-color:var(--premium-border) !important;
}
html[data-theme="light"] .server-danger-zone{
    background:#fff7f7 !important;
}
html[data-theme="light"] .server-restart-modal{
    background:rgba(33,55,74,.42) !important;
}

.table-wrap,.security-table-wrap,.postboot-checklist{
    scrollbar-width:thin;
    scrollbar-color:color-mix(in srgb,var(--premium-muted) 42%,transparent) transparent;
}

@media (max-width:780px){
    .theme-toggle span{display:none;}
    .theme-toggle{width:34px;padding:0;justify-content:center;}
}

.login-theme-toggle{
    position:fixed;
    top:20px;
    right:20px;
    z-index:50;
    box-shadow:var(--premium-shadow);
}
.postboot-summary strong{color:var(--premium-text)!important;}
.postboot-summary > div > div{color:var(--premium-muted)!important;}


/* ========================================================================
   Sortex License Manager Premium UI V3.1 Hotfix
   Global typography, light-mode contrast, pill/action icon alignment,
   Settings/Server Overview and Profile consistency.
   ======================================================================== */

/* ---------- GLOBAL TYPE SCALE ---------- */
body{
    font-size:14px !important;
    line-height:1.48;
}

.sidebar-brand{font-size:14px !important;}
.nav-title{font-size:11px !important;}
.sidebar-nav a{
    min-height:50px !important;
    font-size:14px !important;
    font-weight:520;
}
.topbar{height:74px !important;}
.topbar-title{font-size:13px !important;}
.profile-name{font-size:13px !important;}
.profile-role{font-size:11px !important;}
.profile-action,.signout{font-size:12px !important;}
.theme-toggle{height:38px !important;font-size:12px !important;padding:0 12px !important;}

.page-heading h1{font-size:29px !important;font-weight:620 !important;}
.page-heading p{font-size:13px !important;line-height:1.55;}

.kpi-label{font-size:11px !important;}
.kpi-value{font-size:30px !important;}
.kpi-value.online{font-size:24px !important;}
.kpi-meta{font-size:12px !important;}
.panel-header h3{font-size:15px !important;}
.panel-header p{font-size:12px !important;}
.event-message,.empty-state{font-size:13px !important;}
.event-meta{font-size:11px !important;}
.health-row{font-size:12px !important;}
.footer{font-size:11px !important;}

.primary-button,.secondary-button,.login-button{
    font-size:13px !important;
    font-weight:620;
}
.registry-toolbar input,.registry-toolbar select{
    height:43px !important;
    font-size:13px !important;
}
.clear-filter{font-size:12px !important;}
.mini-stat span{font-size:11px !important;}
.mini-stat strong{font-size:20px !important;font-weight:600 !important;}
.registry-table th,.security-table th{
    font-size:10.5px !important;
    font-weight:650 !important;
}
.registry-table td,.security-table td{
    font-size:12.5px !important;
    line-height:1.45;
}
.product-cell strong,.registry-main-text{font-size:13px !important;}
.product-cell small,.user-cell small{font-size:11px !important;}
.product-icon{font-size:10px !important;}

.settings-section-header h2{font-size:18px !important;}
.settings-section-header p{font-size:13px !important;}
.settings-field label{font-size:13px !important;}
.settings-field small{font-size:12px !important;}
.settings-field input,.settings-field select,.settings-field textarea{
    font-size:13.5px !important;
}
.health-name{font-size:13px !important;}
.health-detail{font-size:11.5px !important;}
.security-subsection-title h3{font-size:14px !important;}
.security-metric span{font-size:11px !important;}
.security-metric strong{font-size:16px !important;}

/* ---------- PREMIUM NAV ICONS ---------- */
.nav-icon.nav-icon-premium{
    width:32px !important;
    height:32px !important;
    flex-basis:32px !important;
    border-radius:10px !important;
}
.nav-svg-icon{width:16px !important;height:16px !important;stroke-width:1.8 !important;}

/* ---------- PILL FOUNDATION / ALIGNMENT ---------- */
.status-pill,
.status-badge,
.health-badge,
.server-health-badge,
.server-license-badge,
.role-pill,
.code-pill,
.customer-id-pill,
.domain-pill,
.masked-license{
    min-height:29px;
    align-items:center !important;
    justify-content:center;
    vertical-align:middle;
    line-height:1.1 !important;
}

.status-pill,
.status-badge,
.health-badge,
.server-health-badge,
.server-license-badge,
.role-pill{
    gap:6px !important;
    padding:6px 10px !important;
    font-size:11px !important;
    font-weight:620 !important;
    letter-spacing:.01em;
}

.code-pill,
.customer-id-pill,
.domain-pill,
.masked-license{
    padding:6px 10px !important;
    font-size:11px !important;
    font-weight:560;
    color:var(--premium-text) !important;
    background:var(--premium-panel-2) !important;
    border:1px solid var(--premium-border) !important;
}

.role-pill{
    color:var(--premium-text) !important;
    background:color-mix(in srgb,var(--premium-muted) 8%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-muted) 22%,var(--premium-border)) !important;
}

/* Explicit neutral states so light mode never inherits washed-out dark colors. */
.status-inactive,
.status-deactivated,
.status-archived,
.server-license-badge.status-inactive,
.server-license-badge.status-deactivated{
    color:var(--premium-muted) !important;
    background:color-mix(in srgb,var(--premium-muted) 8%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-muted) 22%,var(--premium-border)) !important;
}

.health-warn,
.status-grace,
.health-grace{
    color:var(--premium-warn) !important;
    background:color-mix(in srgb,var(--premium-warn) 9%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-warn) 26%,var(--premium-border)) !important;
}

.server-health-badge::before,
.server-license-badge::before{
    display:none !important;
}

.premium-pill-icon{
    width:14px !important;
    height:14px !important;
    flex:0 0 14px !important;
}

/* ---------- STANDARD REFRESH BUTTON ---------- */
.premium-refresh-button{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
    min-height:38px !important;
    padding:0 12px !important;
    border-radius:10px !important;
    text-decoration:none !important;
    white-space:nowrap;
}
.premium-refresh-button .premium-button-icon{
    width:15px;
    height:15px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.settings-section-actions{
    margin-left:auto;
    flex:0 0 auto;
    align-self:center;
    gap:10px !important;
}
.security-subsection-title{
    min-height:34px;
}
.security-subsection-title > .health-badge,
.server-control-card-head > .health-badge{
    flex:0 0 auto;
}

/* ---------- PREMIUM ACTION BUTTON ICONS ---------- */
.actions-cell{white-space:nowrap;}
.user-actions{
    align-items:center !important;
    gap:8px !important;
}
.icon-action{
    width:36px !important;
    height:36px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
    border-radius:10px !important;
    vertical-align:middle;
}
.action-svg-icon{
    width:16px;
    height:16px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
    pointer-events:none;
}
.registry-table th:last-child,
.registry-table td.actions-cell{
    text-align:right !important;
}

/* ---------- SERVER OVERVIEW / SETTINGS THEME CONSISTENCY ---------- */
.server-overview-metric,
.server-resource-card,
.server-overview-fact,
.security-metric,
.server-control-stat,
.server-control-card,
.postboot-summary{
    background:var(--premium-panel-2) !important;
    border-color:var(--premium-border) !important;
    color:var(--premium-text) !important;
}
.server-overview-metric span,
.server-overview-metric small,
.server-overview-fact span,
.server-resource-detail,
.security-metric span,
.server-control-stat span,
.server-control-stat small{
    color:var(--premium-muted) !important;
}
.server-overview-metric strong,
.server-overview-fact strong,
.server-resource-head span,
.server-resource-head strong,
.security-metric strong,
.server-control-stat strong{
    color:var(--premium-text) !important;
}
.server-resource-head span{font-size:13px !important;}
.server-resource-head strong{font-size:16px !important;}
.server-resource-detail{font-size:12px !important;}
.server-resource-track{
    background:color-mix(in srgb,var(--premium-muted) 16%,transparent) !important;
}
.server-control-card-title{font-size:14px !important;}
.server-control-card-copy{font-size:12px !important;}
.server-danger-button{font-size:12px !important;min-height:41px !important;}

/* ---------- PROFILE / ACCOUNT PAGE ---------- */
.account-card{
    background:linear-gradient(180deg,var(--premium-panel),color-mix(in srgb,var(--premium-panel) 95%,var(--premium-bg-soft) 5%)) !important;
    border-color:var(--premium-border) !important;
    box-shadow:var(--premium-shadow) !important;
}
.account-card-header,
.account-card-title,
.account-detail-row{
    border-color:var(--premium-border-soft) !important;
}
.account-card-header h2,
.account-card-title h2,
.account-card h3{
    color:var(--premium-text) !important;
    font-size:19px !important;
}
.account-card-header p,
.account-card-title p{
    color:var(--premium-muted) !important;
    font-size:13px !important;
}
.account-detail-row span{color:var(--premium-muted) !important;font-size:12px !important;}
.account-detail-row strong{color:var(--premium-text) !important;font-size:12.5px !important;}
.account-form-grid label,
.account-card .form-group label{
    color:var(--premium-muted) !important;
    font-size:12.5px !important;
}
.account-card input,
.account-card select,
.account-card textarea{
    color:var(--premium-text) !important;
    background:var(--premium-panel-2) !important;
    border-color:var(--premium-border) !important;
    font-size:13.5px !important;
}
.account-card .muted-text{color:var(--premium-muted) !important;}
.user-avatar-large{
    background:color-mix(in srgb,var(--premium-accent) 10%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-accent) 30%,var(--premium-border)) !important;
    color:var(--premium-accent) !important;
}

/* ---------- LIGHT MODE CONTRAST FIXES ---------- */
html[data-theme="light"] .status-pill,
html[data-theme="light"] .status-active,
html[data-theme="light"] .health-good,
html[data-theme="light"] .health-online{
    color:#087452 !important;
    background:#edf9f4 !important;
    border-color:#a8d9c8 !important;
}
html[data-theme="light"] .health-warn,
html[data-theme="light"] .health-grace,
html[data-theme="light"] .status-grace{
    color:#8a5908 !important;
    background:#fff8e8 !important;
    border-color:#e7c879 !important;
}
html[data-theme="light"] .health-bad,
html[data-theme="light"] .health-blocked,
html[data-theme="light"] .health-offline,
html[data-theme="light"] .status-blocked,
html[data-theme="light"] .status-revoked,
html[data-theme="light"] .status-expired{
    color:#aa3542 !important;
    background:#fff2f3 !important;
    border-color:#e7b5ba !important;
}
html[data-theme="light"] .status-inactive,
html[data-theme="light"] .status-deactivated,
html[data-theme="light"] .status-archived,
html[data-theme="light"] .role-pill{
    color:#4c667d !important;
    background:#f2f6fa !important;
    border-color:#cedbe6 !important;
}
html[data-theme="light"] .code-pill,
html[data-theme="light"] .customer-id-pill,
html[data-theme="light"] .domain-pill,
html[data-theme="light"] .masked-license{
    color:#24465f !important;
    background:#eef5f9 !important;
    border-color:#c9dbe6 !important;
    box-shadow:none !important;
}
html[data-theme="light"] .server-overview-metric,
html[data-theme="light"] .server-resource-card,
html[data-theme="light"] .server-overview-fact,
html[data-theme="light"] .security-metric,
html[data-theme="light"] .server-control-stat,
html[data-theme="light"] .server-control-card,
html[data-theme="light"] .postboot-summary,
html[data-theme="light"] .account-card{
    background:#ffffff !important;
    border-color:#d7e2ea !important;
    box-shadow:0 10px 30px rgba(33,67,93,.06) !important;
}
html[data-theme="light"] .server-danger-zone{
    background:#fff7f7 !important;
    border-color:#ecc7cb !important;
}
html[data-theme="light"] .server-resource-track{
    background:#e3edf3 !important;
}
html[data-theme="light"] .account-card input,
html[data-theme="light"] .account-card select,
html[data-theme="light"] .account-card textarea{
    background:#f8fbfd !important;
    color:#153149 !important;
    border-color:#ccdae5 !important;
}

/* Keep table data comfortably legible in light mode. */
html[data-theme="light"] .registry-table td,
html[data-theme="light"] .security-table td{
    color:#365269 !important;
}
html[data-theme="light"] .registry-main-text,
html[data-theme="light"] .product-cell strong,
html[data-theme="light"] .user-cell strong{
    color:#142f45 !important;
}

@media(max-width:780px){
    .topbar{height:68px !important;padding:0 18px !important;}
    .page-heading h1{font-size:26px !important;}
}

/* V3.1 supplementary form/modal + server status refinements */
.form-group label,.field label{font-size:13px !important;color:var(--premium-muted) !important;}
.form-group input,.form-group select,.form-group textarea,.field input{
    font-size:13.5px !important;
}
.modal-header h2,.modal-header h3{font-size:18px !important;color:var(--premium-text) !important;}
.modal-header p,.modal-subtitle{font-size:12.5px !important;color:var(--premium-muted) !important;}
.modal-card{color:var(--premium-text) !important;}

.health-deactivated{
    color:var(--premium-muted) !important;
    background:color-mix(in srgb,var(--premium-muted) 8%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-muted) 22%,var(--premium-border)) !important;
}
.license-active{
    color:var(--premium-good) !important;
    background:color-mix(in srgb,var(--premium-good) 8%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-good) 22%,var(--premium-border)) !important;
}
.license-suspended,.license-expired{
    color:var(--premium-warn) !important;
    background:color-mix(in srgb,var(--premium-warn) 8%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-warn) 22%,var(--premium-border)) !important;
}
.license-revoked{
    color:var(--premium-bad) !important;
    background:color-mix(in srgb,var(--premium-bad) 8%,var(--premium-panel)) !important;
    border-color:color-mix(in srgb,var(--premium-bad) 22%,var(--premium-border)) !important;
}
html[data-theme="light"] .health-deactivated{
    color:#4c667d !important;background:#f2f6fa !important;border-color:#cedbe6 !important;
}
html[data-theme="light"] .license-active{
    color:#087452 !important;background:#edf9f4 !important;border-color:#a8d9c8 !important;
}
html[data-theme="light"] .license-suspended,
html[data-theme="light"] .license-expired{
    color:#8a5908 !important;background:#fff8e8 !important;border-color:#e7c879 !important;
}
html[data-theme="light"] .license-revoked{
    color:#aa3542 !important;background:#fff2f3 !important;border-color:#e7b5ba !important;
}

/* ========================================================================
   Sortex License Manager Premium UI V3.2
   Global light-mode contrast, modal normalization, premium header/footer,
   and registry table alignment standardization.
   ======================================================================== */

/* ---------- LEGACY TOKEN BRIDGE ----------
   A number of older page-local styles still reference the original app.css
   variables. Re-map them to the active premium theme so every legacy block
   inherits the correct Dark/Light palette without page-by-page overrides.
   ------------------------------------------------------------------------ */
html[data-theme="dark"]{
    --bg:var(--premium-bg);
    --bg-soft:var(--premium-bg-soft);
    --sidebar:var(--premium-sidebar);
    --panel:var(--premium-panel);
    --panel-2:var(--premium-panel-2);
    --border:var(--premium-border);
    --border-soft:var(--premium-border-soft);
    --text:var(--premium-text);
    --text-primary:var(--premium-text);
    --text-secondary:var(--premium-muted);
    --text-muted:var(--premium-muted);
    --muted:var(--premium-muted);
    --muted-2:var(--premium-muted-2);
}

html[data-theme="light"]{
    --bg:var(--premium-bg);
    --bg-soft:var(--premium-bg-soft);
    --sidebar:var(--premium-sidebar);
    --panel:var(--premium-panel);
    --panel-2:var(--premium-panel-2);
    --border:var(--premium-border);
    --border-soft:var(--premium-border-soft);
    --text:var(--premium-text);
    --text-primary:var(--premium-text);
    --text-secondary:var(--premium-muted);
    --text-muted:var(--premium-muted);
    --muted:var(--premium-muted);
    --muted-2:var(--premium-muted-2);
    --teal:var(--premium-accent);
    --green:var(--premium-good);
    --red:var(--premium-bad);
}

/* ---------- GLOBAL READABILITY ---------- */
body{
    font-size:14.5px !important;
    line-height:1.52 !important;
}

.page-heading p,
.settings-section-header p,
.panel-header p,
.security-message,
.server-control-card-copy,
.health-detail,
.footer{
    line-height:1.55 !important;
}

.page-heading p{font-size:13.5px !important;}
.registry-table td,.security-table td{font-size:13px !important;}
.registry-main-text,.product-cell strong,.user-cell strong{font-size:13.5px !important;}
.product-cell small,.user-cell small,.security-subtext{font-size:11.5px !important;}
.health-detail,.server-resource-detail,.settings-field small{font-size:12px !important;}

/* ---------- PREMIUM TOPBAR / HEADER ---------- */
.topbar{
    min-height:76px !important;
    height:76px !important;
    padding:0 30px !important;
    border-bottom:1px solid var(--premium-border) !important;
    background:color-mix(in srgb,var(--premium-panel) 95%,transparent) !important;
    box-shadow:0 10px 32px rgba(0,0,0,.055);
}
.topbar-title{
    font-size:13.5px !important;
    font-weight:560 !important;
    letter-spacing:.005em;
    color:var(--premium-muted) !important;
}
.admin-profile{gap:12px !important;}
.avatar{
    width:38px !important;
    height:38px !important;
    font-size:13px !important;
    border:1px solid color-mix(in srgb,var(--premium-accent) 24%,var(--premium-border));
    box-shadow:0 8px 20px color-mix(in srgb,var(--premium-accent) 10%,transparent);
}
.profile-name{font-size:13.5px !important;font-weight:600 !important;}
.profile-role{font-size:11.5px !important;}
.profile-action,.signout{font-size:12.5px !important;}
.theme-toggle{height:38px !important;min-width:74px;justify-content:center;}

html[data-theme="light"] .topbar{
    background:rgba(255,255,255,.92) !important;
    box-shadow:0 9px 30px rgba(31,67,96,.075);
}

/* ---------- PREMIUM FOOTER ---------- */
.footer{
    min-height:54px;
    margin-top:30px !important;
    padding:18px 2px 12px !important;
    display:flex;
    align-items:center;
    color:var(--premium-muted) !important;
    border-top:1px solid var(--premium-border-soft);
    font-size:12px !important;
    letter-spacing:.005em;
}

/* ---------- STANDARD REGISTRY / SECURITY TABLE GEOMETRY ---------- */
.registry-table,
.security-table{
    width:100%;
    border-collapse:collapse;
    table-layout:auto;
}

.registry-table thead th,
.security-table thead th{
    height:46px !important;
    padding:0 16px !important;
    vertical-align:middle !important;
    text-align:left !important;
    font-size:11px !important;
    font-weight:700 !important;
    line-height:1 !important;
    letter-spacing:.055em !important;
    text-transform:uppercase;
    white-space:nowrap;
}

.registry-table tbody td,
.security-table tbody td{
    padding:15px 16px !important;
    vertical-align:middle !important;
}

.registry-table th:last-child,
.registry-table td.actions-cell,
.security-table th:last-child,
.security-table td:last-child{
    text-align:center !important;
}

.registry-table td.actions-cell .user-actions,
.registry-table td.actions-cell > div{
    justify-content:center !important;
}

.registry-table tbody tr,
.security-table tbody tr{
    min-height:58px;
}

/* ---------- UNIVERSAL LIGHT-MODE CONTENT CONTRAST ---------- */
html[data-theme="light"] .settings-section,
html[data-theme="light"] .panel,
html[data-theme="light"] .registry-panel,
html[data-theme="light"] .security-table-wrap,
html[data-theme="light"] .health-item,
html[data-theme="light"] .firewall-control-card,
html[data-theme="light"] .server-control-card,
html[data-theme="light"] .database-admin-card,
html[data-theme="light"] .postboot-summary{
    color:#1b3950 !important;
}

html[data-theme="light"] .security-message,
html[data-theme="light"] .event-message,
html[data-theme="light"] .health-name,
html[data-theme="light"] .server-control-card-title,
html[data-theme="light"] .database-admin-security-step strong,
html[data-theme="light"] .settings-note strong{
    color:#1b3950 !important;
}

html[data-theme="light"] .security-subtext,
html[data-theme="light"] .event-meta,
html[data-theme="light"] .health-detail,
html[data-theme="light"] .database-admin-security-step span,
html[data-theme="light"] .database-admin-security-step small,
html[data-theme="light"] .server-resource-detail,
html[data-theme="light"] .settings-note{
    color:#607a91 !important;
}

html[data-theme="light"] .security-event-type{
    color:#365269 !important;
    background:#f1f6fa !important;
    border-color:#d1dee8 !important;
}

html[data-theme="light"] .security-details summary{
    color:#087f86 !important;
}

html[data-theme="light"] .security-details-panel{
    color:#29485f !important;
    background:#f7fafc !important;
    border-color:#d5e1e9 !important;
}

html[data-theme="light"] .database-admin-security-step{
    background:#f7fafc !important;
    border-color:#d5e1e9 !important;
    box-shadow:0 8px 22px rgba(30,67,94,.045);
}

html[data-theme="light"] .severity-info{
    color:#1675a3 !important;
    background:#edf8fd !important;
    border-color:#b9dff0 !important;
}
html[data-theme="light"] .severity-warning{
    color:#875a0a !important;
    background:#fff8e8 !important;
    border-color:#e7c879 !important;
}
html[data-theme="light"] .severity-critical{
    color:#aa3542 !important;
    background:#fff2f3 !important;
    border-color:#e7b5ba !important;
}

/* ---------- ALL MODALS MUST FOLLOW THE ACTIVE THEME ---------- */
.modal-card,
.customer-modal-card,
.license-modal-card,
.user-modal-card{
    background:var(--premium-panel) !important;
    color:var(--premium-text) !important;
    border-color:var(--premium-border) !important;
    box-shadow:var(--premium-shadow) !important;
}
.modal-header,
.modal-footer{
    border-color:var(--premium-border-soft) !important;
}
.modal-footer{
    background:var(--premium-panel-2) !important;
}
.modal-header h2,
.modal-header h3{
    color:var(--premium-text) !important;
}
.modal-header p,
.modal-subtitle,
.modal-body small{
    color:var(--premium-muted) !important;
}
.modal-close{
    color:var(--premium-muted) !important;
    background:var(--premium-panel-2) !important;
    border:1px solid var(--premium-border) !important;
}
.modal-close:hover{
    color:var(--premium-accent) !important;
    border-color:color-mix(in srgb,var(--premium-accent) 32%,var(--premium-border)) !important;
}

html[data-theme="light"] .modal-backdrop{
    background:rgba(27,46,63,.44) !important;
}
html[data-theme="light"] .modal-card,
html[data-theme="light"] .customer-modal-card,
html[data-theme="light"] .license-modal-card,
html[data-theme="light"] .user-modal-card{
    background:#ffffff !important;
    border-color:#d3dfe8 !important;
    box-shadow:0 30px 80px rgba(27,58,82,.22) !important;
}
html[data-theme="light"] .modal-footer{
    background:#f7fafc !important;
}
html[data-theme="light"] .modal-header h2,
html[data-theme="light"] .modal-header h3{
    color:#17364f !important;
}
html[data-theme="light"] .modal-header p,
html[data-theme="light"] .modal-subtitle,
html[data-theme="light"] .modal-body small,
html[data-theme="light"] .form-group label{
    color:#607a91 !important;
}
html[data-theme="light"] .modal-close{
    color:#567289 !important;
    background:#f2f7fa !important;
    border-color:#d2dfe8 !important;
}

/* ---------- LIGHT TABLE HEADER / ROW STANDARD ---------- */
html[data-theme="light"] .registry-table thead th,
html[data-theme="light"] .security-table thead th{
    color:#526f86 !important;
    background:#eaf5f8 !important;
    border-bottom-color:#cbdde6 !important;
}
html[data-theme="light"] .registry-table tbody td,
html[data-theme="light"] .security-table tbody td{
    color:#29485f !important;
}
html[data-theme="light"] .registry-table tbody tr:hover,
html[data-theme="light"] .security-table tbody tr:hover{
    background:#f6fafc !important;
}

/* ---------- ACTION BUTTON / CELL CONSISTENCY ---------- */
.icon-action{
    width:38px !important;
    height:38px !important;
    border-radius:10px !important;
}
.action-svg-icon{width:16px !important;height:16px !important;}

/* ---------- SMALL SCREEN HEADER/TABLE ---------- */
@media(max-width:780px){
    .topbar{min-height:68px !important;height:68px !important;padding:0 18px !important;}
    .footer{font-size:11.5px !important;}
    .registry-table thead th,.security-table thead th{padding:0 13px !important;}
    .registry-table tbody td,.security-table tbody td{padding:13px !important;}
}


/* =========================================================
   V3.3 SHARED SHELL + CUSTOMER MODAL FINAL STANDARDIZATION
   ========================================================= */

/* Shared premium shell details */
.sidebar-brand .brand-copy{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.sidebar-health-icon,
.topbar-action-icon{
    width:16px;
    height:16px;
    flex:0 0 16px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.profile-action,
.signout{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:7px !important;
}
.premium-system-footer{
    display:flex !important;
    align-items:center !important;
    flex-wrap:wrap;
    gap:8px !important;
}
.footer-separator{opacity:.48;}

/* Customer modal: header/footer and scroll area must follow theme */
.customer-modal-card .modal-header{
    background:var(--premium-panel) !important;
    border-bottom-color:var(--premium-border-soft) !important;
}
.customer-modal-card .modal-footer{
    background:var(--premium-panel-2) !important;
    border-top-color:var(--premium-border-soft) !important;
}
.customer-modal-card .modal-body{
    background:var(--premium-panel) !important;
    scrollbar-width:thin;
    scrollbar-color:color-mix(in srgb,var(--premium-muted) 56%,transparent) var(--premium-panel-2);
}
.customer-modal-card .modal-body::-webkit-scrollbar{
    width:8px;
}
.customer-modal-card .modal-body::-webkit-scrollbar-track{
    background:var(--premium-panel-2) !important;
    border-radius:999px;
}
.customer-modal-card .modal-body::-webkit-scrollbar-thumb{
    background:color-mix(in srgb,var(--premium-muted) 56%,transparent) !important;
    border:2px solid var(--premium-panel-2);
    border-radius:999px;
}
.customer-modal-card .modal-body::-webkit-scrollbar-thumb:hover{
    background:color-mix(in srgb,var(--premium-accent) 58%,var(--premium-muted)) !important;
}

html[data-theme="light"] .customer-modal-card .modal-header,
html[data-theme="light"] .customer-modal-card .modal-body{
    background:#ffffff !important;
}
html[data-theme="light"] .customer-modal-card .modal-footer{
    background:#f7fafc !important;
}
html[data-theme="light"] .customer-modal-card .modal-body{
    scrollbar-color:#8ba7bb #edf3f7;
}
html[data-theme="light"] .customer-modal-card .modal-body::-webkit-scrollbar-track{
    background:#edf3f7 !important;
}
html[data-theme="light"] .customer-modal-card .modal-body::-webkit-scrollbar-thumb{
    background:#8ba7bb !important;
    border-color:#edf3f7 !important;
}
html[data-theme="light"] .customer-modal-card .modal-body::-webkit-scrollbar-thumb:hover{
    background:#668aa3 !important;
}

/* ========================================================================
   SORTEX LICENSE MANAGER — PREMIUM UI 4.0 (APPROVED / LOCKED)
   Visual baseline: Command Dashboard, License Registry, Server & Security.
   Presentation layer only: no database, API, authentication or control logic.
   ======================================================================== */

:root,
html[data-theme="dark"]{
    --premium-bg:#06101b;
    --premium-bg-soft:#081421;
    --premium-sidebar:#06121f;
    --premium-panel:#0b1827;
    --premium-panel-2:#091522;
    --premium-panel-3:#102033;
    --premium-border:rgba(126,159,190,.18);
    --premium-border-soft:rgba(126,159,190,.105);
    --premium-text:#f1f7ff;
    --premium-muted:#94a8bc;
    --premium-muted-2:#637b92;
    --premium-accent:#24d7ed;
    --premium-accent-strong:#16b8d2;
    --premium-good:#45db9c;
    --premium-warn:#f5af2f;
    --premium-bad:#ff666f;
    --premium-violet:#a75df5;
    --premium-blue:#5f9fff;
    --premium-shadow:0 22px 60px rgba(0,0,0,.24);
    --premium-shadow-soft:0 12px 32px rgba(0,0,0,.16);
}

html[data-theme="light"]{
    --premium-bg:#f3f7fb;
    --premium-bg-soft:#edf4f8;
    --premium-sidebar:#ffffff;
    --premium-panel:#ffffff;
    --premium-panel-2:#f7fafc;
    --premium-panel-3:#edf4f8;
    --premium-border:rgba(31,72,104,.15);
    --premium-border-soft:rgba(31,72,104,.09);
    --premium-text:#10263b;
    --premium-muted:#5f7890;
    --premium-muted-2:#8499ac;
    --premium-accent:#089db8;
    --premium-accent-strong:#087f98;
    --premium-good:#15845d;
    --premium-warn:#a46b0e;
    --premium-bad:#c34855;
    --premium-violet:#7853c8;
    --premium-blue:#3e70c7;
    --premium-shadow:0 20px 52px rgba(24,61,91,.11);
    --premium-shadow-soft:0 10px 28px rgba(24,61,91,.08);
}

html{background:var(--premium-bg);}
body{
    min-width:320px;
    background:
        radial-gradient(circle at 85% -8%,color-mix(in srgb,var(--premium-accent) 9%,transparent),transparent 31%),
        radial-gradient(circle at 16% 105%,color-mix(in srgb,var(--premium-blue) 5%,transparent),transparent 30%),
        var(--premium-bg) !important;
    letter-spacing:-.005em;
}

/* ---------- Shell ---------- */
.admin-shell{
    grid-template-columns:240px minmax(0,1fr) !important;
    min-height:100vh;
}
.sidebar{
    width:240px !important;
    padding:20px 14px 16px !important;
    background:
        radial-gradient(circle at 30% 3%,color-mix(in srgb,var(--premium-accent) 5%,transparent),transparent 25%),
        linear-gradient(180deg,color-mix(in srgb,var(--premium-sidebar) 98%,#0c2940 2%),var(--premium-sidebar)) !important;
    border-right:1px solid var(--premium-border-soft) !important;
    box-shadow:12px 0 38px rgba(0,0,0,.08) !important;
    overflow:hidden;
    transition:width .24s ease,padding .24s ease;
    z-index:30;
}
.admin-main{min-width:0;transition:margin .24s ease;}

.sidebar-brand{
    min-height:58px;
    padding:0 9px 18px !important;
    gap:12px !important;
    letter-spacing:0 !important;
}
.premium-brand-mark{
    width:42px !important;
    height:42px !important;
    min-width:42px;
    border:0 !important;
    border-radius:13px !important;
    background:linear-gradient(145deg,#37dffc,#18a8c7) !important;
    color:#032638 !important;
    font-size:27px !important;
    font-weight:900 !important;
    font-style:italic;
    letter-spacing:-.13em;
    box-shadow:0 12px 30px rgba(35,209,232,.20),inset 0 1px 0 rgba(255,255,255,.35);
}
.premium-brand-copy{
    max-width:145px;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    line-height:1.08;
    font-size:15px !important;
    font-weight:700;
    letter-spacing:-.015em;
    color:var(--premium-text) !important;
}

.nav-title{
    margin:2px 0 6px !important;
    padding:6px 12px !important;
    color:var(--premium-muted-2) !important;
    font-size:9px !important;
    font-weight:700;
    letter-spacing:.14em !important;
}
.nav-title-system{margin-top:13px !important;}
.sidebar-nav a{
    min-height:46px !important;
    margin:3px 0 !important;
    padding:0 11px !important;
    gap:11px !important;
    border:1px solid transparent !important;
    border-radius:10px !important;
    color:#a1b1c2 !important;
    font-size:13px !important;
    font-weight:500 !important;
    letter-spacing:0;
    transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease !important;
}
.sidebar-nav a:hover{
    transform:translateX(1px);
    color:var(--premium-text) !important;
    background:color-mix(in srgb,var(--premium-panel-2) 88%,var(--premium-accent) 12%) !important;
    border-color:var(--premium-border-soft) !important;
}
.sidebar-nav a.active{
    color:#e8fcff !important;
    border-color:color-mix(in srgb,var(--premium-accent) 36%,transparent) !important;
    background:linear-gradient(90deg,color-mix(in srgb,var(--premium-accent) 18%,transparent),color-mix(in srgb,var(--premium-accent) 8%,transparent)) !important;
    box-shadow:inset 2px 0 0 var(--premium-accent),0 8px 22px rgba(0,0,0,.10),0 0 24px color-mix(in srgb,var(--premium-accent) 5%,transparent) !important;
}
.nav-icon.nav-icon-premium{
    width:28px !important;
    height:28px !important;
    min-width:28px;
    display:grid !important;
    place-items:center;
    border:0 !important;
    border-radius:8px !important;
    background:transparent !important;
    color:#9bb0c4 !important;
}
.sidebar-nav a.active .nav-icon-premium{
    color:var(--premium-accent) !important;
    background:transparent !important;
    border:0 !important;
}
.nav-svg-icon{width:18px !important;height:18px !important;}

.sidebar-footer{
    margin-top:auto !important;
    padding:14px 9px 1px !important;
    border-top:1px solid var(--premium-border-soft) !important;
}
.sidebar-footer-meta{
    display:grid;
    gap:5px;
    margin-bottom:13px;
    color:var(--premium-muted-2);
    font-size:9px;
    line-height:1.3;
}
.sidebar-footer-row{display:flex;align-items:center;gap:8px;justify-content:space-between;}
.system-online{min-width:0;color:#7890a7 !important;font-size:10px !important;}
.system-online span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sidebar-collapse-button{
    width:30px;height:30px;flex:0 0 30px;
    display:grid;place-items:center;
    border:1px solid var(--premium-border);
    border-radius:50%;
    background:var(--premium-panel-2);
    color:var(--premium-muted);
    cursor:pointer;
    transition:.18s ease;
}
.sidebar-collapse-button:hover{color:var(--premium-accent);border-color:color-mix(in srgb,var(--premium-accent) 38%,var(--premium-border));transform:translateY(-1px);}

/* Sidebar collapsed mode */
.admin-shell.sidebar-collapsed{grid-template-columns:78px minmax(0,1fr) !important;}
.admin-shell.sidebar-collapsed .sidebar{width:78px !important;padding-left:10px !important;padding-right:10px !important;}
.admin-shell.sidebar-collapsed .premium-brand-copy,
.admin-shell.sidebar-collapsed .nav-title,
.admin-shell.sidebar-collapsed .sidebar-nav a > span:last-child,
.admin-shell.sidebar-collapsed .sidebar-footer-meta,
.admin-shell.sidebar-collapsed .system-online span:last-child{display:none !important;}
.admin-shell.sidebar-collapsed .sidebar-brand{justify-content:center;padding-left:0 !important;padding-right:0 !important;}
.admin-shell.sidebar-collapsed .sidebar-nav a{justify-content:center;padding:0 !important;}
.admin-shell.sidebar-collapsed .sidebar-nav a.active{box-shadow:inset 2px 0 0 var(--premium-accent) !important;}
.admin-shell.sidebar-collapsed .sidebar-footer-row{justify-content:center;}
.admin-shell.sidebar-collapsed .system-online{display:none;}
.admin-shell.sidebar-collapsed .sidebar-collapse-button span{display:inline-block;transform:rotate(180deg);}

/* ---------- Topbar ---------- */
.topbar{
    height:68px !important;
    padding:0 24px 0 32px !important;
    background:color-mix(in srgb,var(--premium-bg) 86%,transparent) !important;
    border-bottom:1px solid var(--premium-border-soft) !important;
    backdrop-filter:blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter:blur(20px) saturate(140%) !important;
    box-shadow:0 8px 28px rgba(0,0,0,.055);
}
.topbar-search-wrap{
    width:min(480px,46vw);
    height:38px;
    position:relative;
    display:flex;
    align-items:center;
}
.topbar-search{
    width:100%;height:38px !important;
    padding:0 55px 0 42px !important;
    border:1px solid var(--premium-border) !important;
    border-radius:10px !important;
    background:color-mix(in srgb,var(--premium-panel-2) 93%,transparent) !important;
    color:var(--premium-text) !important;
    outline:none;
    font-size:12px !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.015);
}
.topbar-search:focus{border-color:color-mix(in srgb,var(--premium-accent) 50%,var(--premium-border)) !important;box-shadow:0 0 0 3px color-mix(in srgb,var(--premium-accent) 8%,transparent) !important;}
.topbar-search-icon{
    width:17px;height:17px;position:absolute;left:14px;z-index:2;
    fill:none;stroke:var(--premium-muted);stroke-width:1.8;stroke-linecap:round;
}
.topbar-shortcut{
    position:absolute;right:9px;
    min-width:38px;height:24px;
    display:grid;place-items:center;
    border:1px solid var(--premium-border-soft);
    border-radius:7px;
    background:var(--premium-panel-3);
    color:var(--premium-muted-2);
    font-size:9px;
    font-weight:650;
}
.admin-profile{gap:10px !important;}
.topbar-notification{
    position:relative;
    width:38px;height:38px;
    display:grid;place-items:center;
    color:var(--premium-muted);
    border:1px solid transparent;
    border-radius:10px;
    text-decoration:none;
    transition:.16s ease;
}
.topbar-notification:hover{color:var(--premium-accent);background:var(--premium-panel-2);border-color:var(--premium-border);}
.topbar-notification svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.notification-dot{position:absolute;top:7px;right:7px;width:6px;height:6px;border-radius:50%;background:var(--premium-accent);box-shadow:0 0 10px color-mix(in srgb,var(--premium-accent) 80%,transparent);}

.profile-menu{position:relative;}
.profile-menu > summary{list-style:none;}
.profile-menu > summary::-webkit-details-marker{display:none;}
.profile-summary{
    min-height:48px;
    display:flex;align-items:center;gap:10px;
    padding:5px 8px;
    border:1px solid transparent;
    border-radius:11px;
    cursor:pointer;
    user-select:none;
    transition:.16s ease;
}
.profile-summary:hover,.profile-menu[open] .profile-summary{background:var(--premium-panel-2);border-color:var(--premium-border-soft);}
.avatar{
    width:37px !important;height:37px !important;flex:0 0 37px;
    border-radius:50% !important;
    color:#67f6f2 !important;
    background:linear-gradient(145deg,#0c3e48,#0b2f3b) !important;
    border:1px solid rgba(36,215,237,.22);
    box-shadow:inset 0 0 18px rgba(36,215,237,.07);
    font-size:12px !important;
}
.profile-copy{min-width:100px;}
.profile-name{font-size:12px !important;font-weight:620;color:var(--premium-text) !important;}
.profile-role{margin-top:3px;color:var(--premium-muted-2) !important;font-size:10px !important;}
.profile-chevron{color:var(--premium-muted);font-size:14px;transition:.16s ease;}
.profile-menu[open] .profile-chevron{transform:rotate(180deg);}
.profile-dropdown{
    position:absolute;right:0;top:56px;width:220px;z-index:80;
    padding:8px;
    border:1px solid var(--premium-border);
    border-radius:13px;
    background:linear-gradient(180deg,var(--premium-panel),var(--premium-panel-2));
    box-shadow:0 24px 55px rgba(0,0,0,.28);
}
.profile-dropdown-head{display:grid;gap:4px;padding:9px 10px 11px;margin-bottom:5px;border-bottom:1px solid var(--premium-border-soft);}
.profile-dropdown-head strong{font-size:12px;color:var(--premium-text);}.profile-dropdown-head span{font-size:10px;color:var(--premium-muted-2);}
.profile-action,.signout{
    min-height:38px;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:9px !important;
    margin:2px 0 !important;
    padding:0 10px !important;
    border-radius:9px;
    color:var(--premium-muted) !important;
    text-decoration:none;
    font-size:11px !important;
}
.profile-action:hover,.signout:hover{background:color-mix(in srgb,var(--premium-accent) 7%,var(--premium-panel));color:var(--premium-text) !important;}
.theme-toggle{
    width:38px !important;height:38px !important;min-width:38px;
    padding:0 !important;justify-content:center !important;
    border-color:transparent !important;background:transparent !important;
}
.theme-toggle span{display:none !important;}
.theme-toggle:hover{border-color:var(--premium-border) !important;background:var(--premium-panel-2) !important;}
.theme-toggle-icon{width:17px !important;height:17px !important;}

/* ---------- Main page spacing ---------- */
.page{
    padding:25px 32px 28px !important;
    max-width:1720px;
    width:100%;
    margin:0 auto;
}
.page-heading{
    align-items:center !important;
    margin-bottom:20px !important;
    min-height:52px;
}
.page-heading h1{
    margin:0 !important;
    color:var(--premium-text) !important;
    font-size:27px !important;
    line-height:1.08;
    font-weight:680 !important;
    letter-spacing:-.03em !important;
}
.page-heading p{
    margin:7px 0 0 !important;
    max-width:830px;
    color:#8ca3b9 !important;
    font-size:12px !important;
    line-height:1.5 !important;
}
.heading-actions{display:flex;align-items:center;gap:10px;}
.premium-window-chip{
    height:38px;
    display:inline-flex;align-items:center;gap:8px;
    padding:0 12px;
    border:1px solid var(--premium-border);
    border-radius:10px;
    background:var(--premium-panel-2);
    color:var(--premium-muted);
    font-size:11px;
}
.premium-window-chip svg,.premium-button-icon{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}

/* ---------- Buttons ---------- */
.primary-button,.secondary-button,.clear-filter,.button-link{
    min-height:38px !important;
    height:auto;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px;
    padding:0 14px !important;
    border-radius:9px !important;
    text-decoration:none !important;
    font-size:11px !important;
    font-weight:650 !important;
    letter-spacing:0;
    transition:transform .16s ease,filter .16s ease,border-color .16s ease,background .16s ease !important;
}
.primary-button{
    background:linear-gradient(135deg,#24d7ed,#13b3d0) !important;
    border:1px solid rgba(85,235,248,.5) !important;
    color:#04242e !important;
    box-shadow:0 10px 24px rgba(24,193,220,.15),inset 0 1px 0 rgba(255,255,255,.24) !important;
}
.primary-button:hover,.secondary-button:hover,.clear-filter:hover{transform:translateY(-1px);filter:brightness(1.04);}
.secondary-button,.clear-filter,.button-link{
    background:var(--premium-panel-2) !important;
    border:1px solid var(--premium-border) !important;
    color:var(--premium-muted) !important;
    box-shadow:none !important;
}
.secondary-button:hover,.clear-filter:hover,.button-link:hover{color:var(--premium-accent) !important;border-color:color-mix(in srgb,var(--premium-accent) 33%,var(--premium-border)) !important;}
.compact-button{min-height:32px !important;padding:0 11px !important;font-size:10px !important;}

/* ---------- KPI / registry stat language ---------- */
.kpi-grid,.registry-stats{
    gap:14px !important;
}
.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr)) !important;margin:0 0 16px !important;}
.registry-stats{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    margin:0 0 16px !important;
}
.kpi,.mini-stat{
    position:relative;
    min-width:0;
    min-height:110px !important;
    overflow:hidden;
    border:1px solid var(--premium-border) !important;
    border-radius:12px !important;
    background:
        radial-gradient(circle at 93% 6%,color-mix(in srgb,var(--premium-accent) 4%,transparent),transparent 35%),
        linear-gradient(145deg,color-mix(in srgb,var(--premium-panel) 98%,white 2%),var(--premium-panel-2)) !important;
    box-shadow:var(--premium-shadow-soft) !important;
}
.kpi{padding:18px !important;}
.mini-stat{padding:18px 18px 16px 78px !important;display:flex !important;flex-direction:column;justify-content:center;}
.kpi:hover,.mini-stat:hover{border-color:color-mix(in srgb,var(--premium-accent) 24%,var(--premium-border)) !important;}
.kpi-label,.mini-stat > span:first-of-type{
    color:#a6b4c5 !important;
    font-size:11px !important;
    font-weight:560 !important;
    letter-spacing:0 !important;
    text-transform:none !important;
}
.kpi-value,.mini-stat strong{
    color:var(--premium-text) !important;
    font-size:28px !important;
    line-height:1 !important;
    font-weight:700 !important;
    letter-spacing:-.03em !important;
}
.kpi-meta,.mini-stat small,.mini-stat > span:not(:first-of-type){
    color:var(--premium-muted) !important;
    font-size:10px !important;
}
.kpi-meta strong{color:var(--premium-good);font-weight:650;}
.kpi-value.online{color:var(--premium-good) !important;font-size:24px !important;}
.premium-stat-icon{
    position:absolute;left:18px;top:50%;transform:translateY(-50%);
    width:46px;height:46px;
    display:grid;place-items:center;
    border-radius:50%;
    color:var(--premium-accent);
    background:color-mix(in srgb,var(--premium-accent) 10%,transparent);
    border:1px solid color-mix(in srgb,var(--premium-accent) 24%,transparent);
}
.premium-stat-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;}
.mini-stat.stat-good .premium-stat-icon{color:var(--premium-good);background:color-mix(in srgb,var(--premium-good) 10%,transparent);border-color:color-mix(in srgb,var(--premium-good) 23%,transparent);}
.mini-stat.stat-warn .premium-stat-icon{color:var(--premium-warn);background:color-mix(in srgb,var(--premium-warn) 10%,transparent);border-color:color-mix(in srgb,var(--premium-warn) 22%,transparent);}
.mini-stat.stat-bad .premium-stat-icon{color:var(--premium-bad);background:color-mix(in srgb,var(--premium-bad) 9%,transparent);border-color:color-mix(in srgb,var(--premium-bad) 21%,transparent);}

/* Dashboard icon cards */
.premium-dashboard-kpis .kpi{display:flex;align-items:center;gap:16px;padding:17px 18px !important;}
.premium-kpi-icon{
    width:58px;height:58px;flex:0 0 58px;
    display:grid;place-items:center;
    border-radius:50%;
    color:var(--premium-accent);
    background:color-mix(in srgb,var(--premium-accent) 10%,transparent);
    border:1px solid color-mix(in srgb,var(--premium-accent) 27%,transparent);
}
.premium-kpi-icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round;}
.premium-kpi-copy{display:grid;gap:5px;min-width:0;}
.premium-dashboard-kpis .kpi-value{font-size:27px !important;}
.kpi-licenses .premium-kpi-icon{color:var(--premium-blue);background:color-mix(in srgb,var(--premium-blue) 11%,transparent);border-color:color-mix(in srgb,var(--premium-blue) 25%,transparent);}
.kpi-activations .premium-kpi-icon{color:var(--premium-violet);background:color-mix(in srgb,var(--premium-violet) 11%,transparent);border-color:color-mix(in srgb,var(--premium-violet) 24%,transparent);}
.kpi-server .premium-kpi-icon{color:#26dfc0;background:rgba(38,223,192,.09);border-color:rgba(38,223,192,.22);}
.kpi-live-dot{position:absolute;top:17px;right:17px;width:8px;height:8px;border-radius:50%;background:var(--premium-good);box-shadow:0 0 11px color-mix(in srgb,var(--premium-good) 80%,transparent);}

/* ---------- Panels ---------- */
.panel,.registry-panel,.settings-section,.account-card,.modal-card,.reveal-card{
    border:1px solid var(--premium-border) !important;
    border-radius:12px !important;
    background:linear-gradient(180deg,var(--premium-panel),color-mix(in srgb,var(--premium-panel-2) 96%,var(--premium-panel) 4%)) !important;
    box-shadow:var(--premium-shadow-soft) !important;
}
.panel-header,.registry-toolbar,.settings-section-header,.account-card-header,.modal-header,.modal-footer{
    border-color:var(--premium-border-soft) !important;
}
.panel-header{padding:17px 18px !important;}
.panel-header h3{margin:0 !important;color:var(--premium-text) !important;font-size:14px !important;font-weight:650 !important;letter-spacing:-.01em;}
.panel-header p{margin:5px 0 0 !important;color:var(--premium-muted) !important;font-size:10px !important;}
.premium-panel-heading-row{display:flex !important;align-items:center !important;justify-content:space-between !important;gap:18px;}

/* ---------- Dashboard approved layout ---------- */
.dashboard-command-grid{
    display:grid;
    grid-template-columns:minmax(0,1.85fr) minmax(290px,.72fr);
    gap:16px;
    margin-bottom:16px;
}
.activation-activity-panel{min-height:330px;}
.dashboard-health-panel{min-height:330px;}
.activity-total-block{display:grid;grid-template-columns:auto auto;column-gap:13px;row-gap:1px;align-items:end;min-width:145px;}
.activity-total-block span{grid-column:1/-1;color:var(--premium-muted);font-size:9px;}.activity-total-block strong{font-size:23px;color:var(--premium-text);line-height:1;}.activity-total-block small{color:var(--premium-good);font-size:9px;align-self:center;}
.premium-activity-chart{display:grid;grid-template-columns:38px minmax(0,1fr);gap:7px;padding:16px 18px 14px 15px;}
.chart-y-labels{height:220px;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;padding:4px 0 17px;color:var(--premium-muted-2);font-size:9px;}
.chart-stage{min-width:0;}
.chart-stage svg{display:block;width:100%;height:220px;overflow:visible;}
.chart-grid-line{stroke:var(--premium-border-soft);stroke-width:1;vector-effect:non-scaling-stroke;}
.chart-area{fill:url(#activationArea);}
.chart-line{fill:none;stroke:#25d8ef;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 5px rgba(37,216,239,.16));}
.chart-last-point{fill:#50e7f8;stroke:#0c7f90;stroke-width:2;vector-effect:non-scaling-stroke;}
.chart-x-labels{display:flex;justify-content:space-between;gap:6px;margin-top:4px;color:var(--premium-muted-2);font-size:9px;}
.premium-health-list{padding:8px 15px;}
.premium-health-item{min-height:60px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--premium-border-soft);}
.premium-health-item:last-child{border-bottom:0;}
.health-item-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;color:#27e2d2;background:rgba(39,226,210,.09);border:1px solid rgba(39,226,210,.16);}
.health-item-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.premium-health-item div{display:grid;gap:3px;min-width:0;}.premium-health-item strong{font-size:10.5px;color:var(--premium-text);font-weight:620;}.premium-health-item small{font-size:9px;color:var(--premium-muted-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.premium-health-item .health-good{font-size:10px;font-weight:650;}
.dashboard-health-footer{display:flex;align-items:center;gap:8px;padding:8px 16px 14px;color:var(--premium-good);font-size:10px;}
.dashboard-security-panel{margin-bottom:10px;}
.dashboard-security-table th,.dashboard-security-table td{white-space:nowrap;}
.dashboard-security-table th:nth-child(1){width:185px}.dashboard-security-table th:nth-child(2){width:225px}.dashboard-security-table th:nth-child(3){width:155px}.dashboard-security-table th:nth-child(4){width:110px}.dashboard-security-table td:last-child{white-space:normal;min-width:260px;}
.dashboard-timezone{display:block;margin-top:3px;color:var(--premium-muted-2);font-size:8px;}.dashboard-event-type{font-weight:560;color:var(--premium-text);}.dashboard-ip{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#a6bbce;font-size:10px;}.dashboard-event-detail{color:#afbdca;font-size:10px;}
.dashboard-severity{display:inline-flex;align-items:center;justify-content:center;min-width:62px;height:24px;padding:0 9px;border-radius:6px;font-size:9px;font-weight:650;border:1px solid transparent;}.severity-low{color:var(--premium-good);background:rgba(69,219,156,.09);border-color:rgba(69,219,156,.12);}.severity-medium{color:var(--premium-warn);background:rgba(245,175,47,.10);border-color:rgba(245,175,47,.14);}.severity-high{color:var(--premium-bad);background:rgba(255,102,111,.10);border-color:rgba(255,102,111,.14);}
.dashboard-admin-note{display:flex;justify-content:flex-end;gap:8px;color:var(--premium-muted-2);font-size:8.5px;padding:2px 3px 0;}

/* ---------- Registry toolbar/table ---------- */
.registry-panel{overflow:hidden !important;}
.registry-toolbar{
    min-height:64px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:10px !important;
    padding:13px 15px !important;
    background:color-mix(in srgb,var(--premium-panel) 96%,var(--premium-panel-2) 4%) !important;
}
.registry-search{margin-right:auto;min-width:260px;max-width:430px;flex:1 1 370px;}
.registry-search input,
.registry-toolbar select,
.field input,
.form-group input,.form-group select,.form-group textarea,
.settings-field input,.settings-field select,.settings-field textarea{
    border:1px solid var(--premium-border) !important;
    border-radius:8px !important;
    background:var(--premium-panel-2) !important;
    color:var(--premium-text) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.015) !important;
}
.registry-search input{height:38px !important;padding:0 13px !important;font-size:11px !important;}
.registry-toolbar select{height:38px !important;min-width:125px;padding:0 30px 0 11px !important;font-size:10px !important;}
.registry-table,.security-table{width:100%;border-collapse:collapse;color:var(--premium-text) !important;}
.registry-table thead th,.security-table thead th{
    height:42px !important;
    padding:0 14px !important;
    border-bottom:1px solid var(--premium-border-soft) !important;
    background:color-mix(in srgb,var(--premium-panel-3) 44%,var(--premium-panel) 56%) !important;
    color:#879db2 !important;
    font-size:9px !important;
    font-weight:650 !important;
    letter-spacing:.015em !important;
    text-transform:none !important;
    white-space:nowrap;
}
.registry-table tbody td,.security-table tbody td{
    min-height:50px;
    height:50px !important;
    padding:10px 14px !important;
    border-bottom:1px solid var(--premium-border-soft) !important;
    color:#b5c3d0 !important;
    font-size:10px !important;
    vertical-align:middle !important;
}
.registry-table tbody tr:last-child td,.security-table tbody tr:last-child td{border-bottom:0 !important;}
.registry-table tbody tr:hover,.security-table tbody tr:hover{background:color-mix(in srgb,var(--premium-accent) 3.5%,transparent) !important;}
.registry-main-text,.product-cell strong{color:#e2edf7 !important;font-weight:560 !important;}
.product-cell small,.table-secondary,.muted-text{color:var(--premium-muted-2) !important;}
.product-icon{border-radius:8px !important;color:var(--premium-accent) !important;background:rgba(36,215,237,.075) !important;border-color:rgba(36,215,237,.17) !important;}
.code-pill,.customer-id-pill,.domain-pill,.masked-license,.role-pill{
    border-radius:6px !important;
    background:color-mix(in srgb,var(--premium-panel-3) 62%,var(--premium-panel-2)) !important;
    border:1px solid var(--premium-border-soft) !important;
    color:#a9becf !important;
    font-size:9px !important;
}
.masked-license{display:inline-flex;padding:5px 8px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#41dff0 !important;}
.status-badge,.server-health-badge,.server-license-badge,.health-badge,.status-pill{
    min-height:24px !important;
    border-radius:6px !important;
    padding:0 8px !important;
    font-size:9px !important;
    font-weight:650 !important;
    gap:5px !important;
}
.premium-pill-icon{width:12px !important;height:12px !important;}
.icon-action,.icon-action-link{
    width:32px !important;height:32px !important;
    display:inline-grid !important;place-items:center;
    border:1px solid var(--premium-border) !important;
    border-radius:8px !important;
    background:var(--premium-panel-2) !important;
    color:var(--premium-muted) !important;
}
.icon-action:hover,.icon-action-link:hover{color:var(--premium-accent) !important;border-color:color-mix(in srgb,var(--premium-accent) 35%,var(--premium-border)) !important;background:color-mix(in srgb,var(--premium-accent) 5%,var(--premium-panel-2)) !important;}

/* ---------- Settings / controls ---------- */
.settings-layout{gap:16px !important;}
.settings-section{overflow:hidden;}
.settings-section-header{padding:18px 20px !important;background:color-mix(in srgb,var(--premium-panel) 97%,var(--premium-panel-3) 3%) !important;}
.settings-section-header h2,.settings-section-header h3{font-size:15px !important;font-weight:650 !important;letter-spacing:-.015em !important;}
.settings-section-body{padding:20px !important;}
.settings-form-grid{gap:16px !important;}
.settings-field label,.form-group label{color:#9fb1c2 !important;font-size:10px !important;font-weight:560 !important;}
.settings-field small,.form-group small{color:var(--premium-muted-2) !important;font-size:9px !important;line-height:1.5 !important;}
.health-item,.firewall-control-card,.server-control-card,.server-control-stat,.postboot-summary,.database-admin-card,.database-admin-layer,.server-overview-metric,.server-overview-fact,.security-summary-card,.security-listen-card,.server-resource-card{
    border-radius:10px !important;
    background:var(--premium-panel-2) !important;
    border:1px solid var(--premium-border-soft) !important;
    box-shadow:none !important;
}
.health-grid,.server-control-grid,.server-overview-summary,.server-resource-grid{gap:12px !important;}
.security-table-wrap{border:1px solid var(--premium-border-soft) !important;border-radius:10px !important;overflow:auto !important;}
.server-danger-zone{border-radius:10px !important;}

/* ---------- Modals ---------- */
.modal-backdrop{
    background:rgba(1,7,12,.72) !important;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}
.modal-card{
    border-radius:14px !important;
    border-color:color-mix(in srgb,var(--premium-border) 90%,transparent) !important;
    box-shadow:0 30px 80px rgba(0,0,0,.38) !important;
}
.modal-header{padding:19px 21px !important;}.modal-header h2{font-size:18px !important;font-weight:670 !important;letter-spacing:-.02em !important;}.modal-header p{font-size:10px !important;color:var(--premium-muted) !important;}.modal-body{padding:20px 21px !important;}.modal-footer{padding:14px 21px !important;background:var(--premium-panel-2) !important;}
.modal-close{width:34px !important;height:34px !important;border-radius:9px !important;color:var(--premium-muted) !important;background:var(--premium-panel-2) !important;border:1px solid var(--premium-border) !important;}
.modal-close:hover{color:var(--premium-bad) !important;border-color:color-mix(in srgb,var(--premium-bad) 35%,var(--premium-border)) !important;}

/* ---------- Profile / reset ---------- */
.account-layout{gap:16px !important;}.account-card{overflow:hidden;}.account-card-header{padding:18px 20px !important;}.account-card-title{font-weight:650 !important;}.account-detail-row{border-color:var(--premium-border-soft) !important;}.user-avatar-large{background:linear-gradient(145deg,#103c48,#0a2d3a) !important;color:#56edf0 !important;border-color:rgba(36,215,237,.20) !important;}

/* ---------- Login ---------- */
.login-page{
    background:
        radial-gradient(circle at 77% 13%,rgba(36,215,237,.11),transparent 30%),
        radial-gradient(circle at 13% 88%,rgba(95,159,255,.08),transparent 31%),
        var(--premium-bg) !important;
}
.login-shell{border-radius:22px !important;border-color:var(--premium-border) !important;box-shadow:0 32px 90px rgba(0,0,0,.34) !important;overflow:hidden;}
.login-brand{background:radial-gradient(circle at 20% 18%,rgba(36,215,237,.12),transparent 38%),linear-gradient(145deg,#061520,#091a2a) !important;}
.login-brand .brand-mark{width:48px !important;height:48px !important;border-radius:14px !important;background:linear-gradient(145deg,#36defb,#18a7c5) !important;color:#032738 !important;border:0 !important;font-size:28px !important;font-weight:900 !important;font-style:italic;}
.login-form-side{background:color-mix(in srgb,var(--premium-panel) 97%,transparent) !important;}.login-form h2{font-size:28px !important;font-weight:680 !important;letter-spacing:-.025em !important;}.field input{height:48px !important;border-radius:9px !important;}.login-button{height:48px !important;border-radius:9px !important;background:linear-gradient(135deg,#24d7ed,#13b3d0) !important;color:#04242e !important;font-weight:700 !important;box-shadow:0 12px 26px rgba(24,193,220,.15);}
.login-theme-toggle{top:18px !important;right:18px !important;background:var(--premium-panel) !important;border-color:var(--premium-border) !important;}

/* ---------- Footer ---------- */
.premium-system-footer{
    margin-top:18px !important;
    padding:12px 2px 2px !important;
    border-top:1px solid var(--premium-border-soft) !important;
    color:var(--premium-muted-2) !important;
    font-size:9px !important;
}

/* ---------- Light-mode refinements ---------- */
html[data-theme="light"] body{
    background:radial-gradient(circle at 85% -8%,rgba(8,157,184,.055),transparent 31%),var(--premium-bg) !important;
}
html[data-theme="light"] .premium-brand-mark,
html[data-theme="light"] .login-brand .brand-mark{color:#04323c !important;}
html[data-theme="light"] .sidebar-nav a.active{color:#0d5361 !important;background:linear-gradient(90deg,rgba(8,157,184,.12),rgba(8,157,184,.045)) !important;}
html[data-theme="light"] .avatar{background:#dff5f7 !important;color:#087b8d !important;border-color:#c5e9ed !important;}
html[data-theme="light"] .topbar{background:rgba(255,255,255,.88) !important;}
html[data-theme="light"] .profile-dropdown{box-shadow:0 22px 48px rgba(25,65,96,.16) !important;}
html[data-theme="light"] .dashboard-event-detail,
html[data-theme="light"] .registry-table tbody td,
html[data-theme="light"] .security-table tbody td{color:#526b82 !important;}
html[data-theme="light"] .dashboard-ip{color:#3f647d !important;}
html[data-theme="light"] .modal-backdrop{background:rgba(35,56,75,.42) !important;}

/* ---------- Responsive ---------- */
@media (max-width:1250px){
    .kpi-grid,.registry-stats{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
    .dashboard-command-grid{grid-template-columns:1fr;}
    .dashboard-health-panel{min-height:auto;}
    .premium-health-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px;}
    .topbar-search-wrap{width:min(430px,42vw);}
}
@media (max-width:980px){
    .admin-shell{grid-template-columns:78px minmax(0,1fr) !important;}
    .sidebar{width:78px !important;padding-left:10px !important;padding-right:10px !important;}
    .premium-brand-copy,.nav-title,.sidebar-nav a > span:last-child,.sidebar-footer-meta,.system-online{display:none !important;}
    .sidebar-brand,.sidebar-nav a{justify-content:center;padding-left:0 !important;padding-right:0 !important;}
    .sidebar-footer-row{justify-content:center;}
    .topbar{padding-left:20px !important;padding-right:18px !important;}
    .topbar-search-wrap{width:min(420px,55vw);}
    .profile-copy{display:none;}.profile-summary{min-height:44px;padding:3px 5px;}.profile-chevron{display:none;}
    .page{padding:22px 20px 26px !important;}
    .registry-toolbar{flex-wrap:wrap !important;}.registry-search{max-width:none;min-width:100%;flex-basis:100%;}
}
@media (max-width:700px){
    .admin-shell{display:block !important;}
    .sidebar{position:fixed !important;left:-82px !important;}
    .admin-main{grid-column:auto !important;}
    .topbar{padding:0 12px !important;}.topbar-search-wrap{width:calc(100vw - 132px);}.topbar-shortcut{display:none;}.topbar-search{padding-right:12px !important;}
    .page{padding:18px 12px 22px !important;}
    .page-heading{align-items:flex-start !important;flex-direction:column !important;}.page-heading > .primary-button,.page-heading > .secondary-button,.heading-actions{width:100%;}.heading-actions{justify-content:flex-start;flex-wrap:wrap;}
    .kpi-grid,.registry-stats{grid-template-columns:1fr !important;}
    .premium-dashboard-kpis .kpi{min-height:104px !important;}
    .premium-health-list{grid-template-columns:1fr;}
    .registry-toolbar select,.registry-toolbar .secondary-button,.registry-toolbar .clear-filter{flex:1 1 auto;}
    .table-wrap{overflow-x:auto !important;}.registry-table{min-width:820px;}.dashboard-security-table{min-width:980px;}
    .premium-activity-chart{grid-template-columns:30px minmax(0,1fr);padding-left:8px;padding-right:10px;}.chart-x-labels span:nth-child(even){display:none;}
}

.mobile-sidebar-button{
    display:none;
    width:38px;height:38px;flex:0 0 38px;
    align-items:center;justify-content:center;flex-direction:column;gap:4px;
    border:1px solid var(--premium-border);
    border-radius:9px;
    background:var(--premium-panel-2);
    color:var(--premium-muted);
    cursor:pointer;
}
.mobile-sidebar-button span{display:block;width:15px;height:1.5px;border-radius:2px;background:currentColor;}
@media (max-width:700px){
    .mobile-sidebar-button{display:flex;}
    .topbar{gap:10px !important;}
    .admin-shell.mobile-sidebar-open .sidebar{left:0 !important;box-shadow:18px 0 48px rgba(0,0,0,.38) !important;}
    .admin-shell.mobile-sidebar-open .premium-brand-copy,
    .admin-shell.mobile-sidebar-open .sidebar-nav a > span:last-child,
    .admin-shell.mobile-sidebar-open .sidebar-footer-meta,
    .admin-shell.mobile-sidebar-open .system-online{display:initial !important;}
    .admin-shell.mobile-sidebar-open .sidebar{width:240px !important;padding:20px 14px 16px !important;}
    .admin-shell.mobile-sidebar-open .sidebar-brand{justify-content:flex-start !important;padding:0 9px 18px !important;}
    .admin-shell.mobile-sidebar-open .sidebar-nav a{justify-content:flex-start !important;padding:0 11px !important;}
    .admin-shell.mobile-sidebar-open .system-online{display:flex !important;}
    .admin-shell.mobile-sidebar-open .sidebar-footer-row{justify-content:space-between !important;}
}
