/* V9.6.12 — Admin dark-mode unification & contrast polish.
   Loaded last so legacy light hard-codes cannot override the selected dark theme. */
html[data-admin-theme="dark"] body.app-body{
  --v9612-bg:#0b1017;--v9612-surface:#121923;--v9612-surface2:#17212d;--v9612-soft:#1b2634;
  --v9612-line:#29384a;--v9612-ink:#eef4fb;--v9612-muted:#95a5ba;--v9612-blue:#6ab0ff;
  background:var(--v9612-bg)!important;color:var(--v9612-ink)!important;color-scheme:dark;
}
html[data-admin-theme="dark"] body.app-body .app-shell,
html[data-admin-theme="dark"] body.app-body .app-main,
html[data-admin-theme="dark"] body.app-body .app-content{background:var(--v9612-bg)!important;color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body .app-header{background:rgba(18,25,35,.96)!important;border-color:var(--v9612-line)!important;color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body .icon-btn,
html[data-admin-theme="dark"] body.app-body .account-chip{background:var(--v9612-surface)!important;border-color:var(--v9612-line)!important;color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body .v29-global-search form{background:#101720!important;border-color:var(--v9612-line)!important;box-shadow:none!important}
html[data-admin-theme="dark"] body.app-body .v29-global-search input{background:transparent!important;color:var(--v9612-ink)!important}

/* Sidebar-only navigation */
html[data-admin-theme="dark"] body.app-body .app-sidebar{background:linear-gradient(180deg,#0a1828,#08131f)!important;border-color:#203043!important;color:#eaf2fc!important}
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav>.v9611-dashboard-link,
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav .v9611-group-toggle{color:#c5d2e3!important}
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav>.v9611-dashboard-link:hover,
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav .v9611-group-toggle:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav>.v9611-dashboard-link.active,
html[data-admin-theme="dark"] body.app-body .v9611-nav-group.active>.v9611-group-toggle{background:#17263a!important;color:#f7fbff!important;border-color:#28415f!important;box-shadow:none!important}
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav>.v9611-dashboard-link.active>i,
html[data-admin-theme="dark"] body.app-body .v9611-nav-group.active>.v9611-group-toggle>.v9611-group-icon{color:#7db9ff!important}
html[data-admin-theme="dark"] body.app-body .v9611-submenu{border-color:#29405b!important}
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav .v9611-submenu a{color:#96a9c1!important}
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav .v9611-submenu a:hover{background:#152235!important;color:#fff!important}
html[data-admin-theme="dark"] body.app-body .app-nav.v9611-admin-nav .v9611-submenu a.active{background:#17365d!important;color:#dcecff!important}
html[data-admin-theme="dark"] body.app-body .v968-sidebar-collapse{background:#172334!important;border-color:#34465d!important;color:#dbe7f5!important}

/* Dashboard */
html[data-admin-theme="dark"] body.app-body.v30-ui .app-main{background:var(--v9612-bg)!important}
html[data-admin-theme="dark"] body.app-body .v302-dashboard-head h1,
html[data-admin-theme="dark"] body.app-body .v302-widget-head h2,
html[data-admin-theme="dark"] body.app-body .v302-kpi>div>strong,
html[data-admin-theme="dark"] body.app-body .v302-kpi>div>span,
html[data-admin-theme="dark"] body.app-body .v302-billing-grid strong,
html[data-admin-theme="dark"] body.app-body .v302-list-row strong,
html[data-admin-theme="dark"] body.app-body .v302-admin-list strong,
html[data-admin-theme="dark"] body.app-body .v302-journal strong{color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body .v302-dashboard-head p,
html[data-admin-theme="dark"] body.app-body .v302-kicker,
html[data-admin-theme="dark"] body.app-body .v302-widget-head p,
html[data-admin-theme="dark"] body.app-body .v302-kpi>div>small,
html[data-admin-theme="dark"] body.app-body .v302-list-row small,
html[data-admin-theme="dark"] body.app-body .v302-admin-list small,
html[data-admin-theme="dark"] body.app-body .v302-journal small,
html[data-admin-theme="dark"] body.app-body .v302-journal time{color:var(--v9612-muted)!important}
html[data-admin-theme="dark"] body.app-body .v302-date-card,
html[data-admin-theme="dark"] body.app-body .v302-kpi,
html[data-admin-theme="dark"] body.app-body .v302-widget{background:var(--v9612-surface)!important;border-color:var(--v9612-line)!important;box-shadow:0 10px 28px rgba(0,0,0,.22)!important}
html[data-admin-theme="dark"] body.app-body .v302-kpi-blue,
html[data-admin-theme="dark"] body.app-body .v302-kpi-green,
html[data-admin-theme="dark"] body.app-body .v302-kpi-orange,
html[data-admin-theme="dark"] body.app-body .v302-kpi-purple{background:linear-gradient(135deg,var(--v9612-surface),#162130)!important}
html[data-admin-theme="dark"] body.app-body .v302-widget-head,
html[data-admin-theme="dark"] body.app-body .v302-auto-list>div,
html[data-admin-theme="dark"] body.app-body .v302-admin-list>div,
html[data-admin-theme="dark"] body.app-body .v302-journal>div,
html[data-admin-theme="dark"] body.app-body .v302-ticket-mini a{border-color:var(--v9612-line)!important}
html[data-admin-theme="dark"] body.app-body .v302-billing-grid>div,
html[data-admin-theme="dark"] body.app-body .v302-support-stats>div{background:var(--v9612-surface2)!important;border-color:var(--v9612-line)!important}
html[data-admin-theme="dark"] body.app-body .v302-billing-grid .green,
html[data-admin-theme="dark"] body.app-body .v302-billing-grid .purple,
html[data-admin-theme="dark"] body.app-body .v302-billing-grid .slate{background:var(--v9612-surface2)!important}
html[data-admin-theme="dark"] body.app-body .v302-billing-footer{background:#132a45!important;color:#a8d0ff!important}
html[data-admin-theme="dark"] body.app-body .v302-billing-footer>i:first-child{background:#18385e!important}
html[data-admin-theme="dark"] body.app-body .v302-timeline::before{background:#2b3b4f!important}
html[data-admin-theme="dark"] body.app-body .v302-list-row:hover{background:#172331!important}
html[data-admin-theme="dark"] body.app-body .v302-drag-handle:hover{background:#1d2b3b!important;color:#a9c7e8!important}

/* Generic cards / tables / forms / modals — catches old and new admin pages. */
html[data-admin-theme="dark"] body.app-body :is(.card,.panel,.widget,.section-card,.v2-section-card,.v25-card,.v26-card,.v27-card,.v28-card,.v29-card,.v30-card,.v31-card,.v32-card,.v34-card,.v35-card,.v36-card,.v37-card,.v38-card,.v39-card,.v40-card,.v41-card,.v42-card,.v43-card,.v44-card,.v50-card,.v54-card,.v60-card,.v61-card,.modal-card){background:var(--v9612-surface)!important;border-color:var(--v9612-line)!important;color:var(--v9612-ink)!important;box-shadow:0 8px 26px rgba(0,0,0,.2)!important}
html[data-admin-theme="dark"] body.app-body :is(input,select,textarea){background:#101720!important;border-color:#34465b!important;color:var(--v9612-ink)!important;box-shadow:none!important}
html[data-admin-theme="dark"] body.app-body :is(input,textarea)::placeholder{color:#71839a!important}
html[data-admin-theme="dark"] body.app-body select option{background:#101720!important;color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body :is(input,select,textarea):focus{border-color:#4f93e6!important;box-shadow:0 0 0 3px rgba(79,147,230,.14)!important}
html[data-admin-theme="dark"] body.app-body .table-wrap{background:var(--v9612-surface)!important;border-color:var(--v9612-line)!important}
html[data-admin-theme="dark"] body.app-body table thead th{background:#182331!important;color:#a9b7c9!important;border-color:var(--v9612-line)!important}
html[data-admin-theme="dark"] body.app-body table tbody td{background:transparent!important;color:#e7eef7!important;border-color:#263648!important}
html[data-admin-theme="dark"] body.app-body table tbody tr:hover td{background:#162231!important}
html[data-admin-theme="dark"] body.app-body :is(.btn-secondary,.btn-light){background:#17212d!important;border-color:#34465b!important;color:#dce6f2!important}
html[data-admin-theme="dark"] body.app-body :is(.btn-secondary,.btn-light):hover{background:#203043!important;color:#fff!important}
html[data-admin-theme="dark"] body.app-body .modal{background:rgba(0,0,0,.68)!important}

/* Settings + manual payment methods (V9.6.9). */
html[data-admin-theme="dark"] body.app-body .v969-settings-hero{background:linear-gradient(135deg,#131c27,#0f1721)!important;border-color:var(--v9612-line)!important;box-shadow:none!important}
html[data-admin-theme="dark"] body.app-body .v969-settings-hero h1{color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body .v969-settings-hero p,
html[data-admin-theme="dark"] body.app-body .v969-settings-eyebrow{color:var(--v9612-muted)!important}
html[data-admin-theme="dark"] body.app-body .v969-settings-current,
html[data-admin-theme="dark"] body.app-body .v969-settings-tabs,
html[data-admin-theme="dark"] body.app-body .v969-payment-summary article,
html[data-admin-theme="dark"] body.app-body .v969-payment-row,
html[data-admin-theme="dark"] body.app-body .v969-payment-presets{background:var(--v9612-surface)!important;border-color:var(--v9612-line)!important;color:var(--v9612-ink)!important;box-shadow:none!important}
html[data-admin-theme="dark"] body.app-body .v969-settings-tabs a{color:#9fb0c5!important}
html[data-admin-theme="dark"] body.app-body .v969-settings-tabs a:hover{background:#1b2838!important;color:#fff!important}
html[data-admin-theme="dark"] body.app-body .v969-settings-tabs a.active{background:#2c73c9!important;color:#fff!important}
html[data-admin-theme="dark"] body.app-body .v969-payment-summary strong,
html[data-admin-theme="dark"] body.app-body .v969-payment-copy strong{color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body .v969-payment-summary small,
html[data-admin-theme="dark"] body.app-body .v969-payment-copy p,
html[data-admin-theme="dark"] body.app-body .v969-payment-copy small{color:var(--v9612-muted)!important}
html[data-admin-theme="dark"] body.app-body .v969-payment-row:hover{background:#162230!important;border-color:#3a516c!important}
html[data-admin-theme="dark"] body.app-body .v969-payment-brand,
html[data-admin-theme="dark"] body.app-body .v969-payment-presets button{background:#172230!important;border-color:#34465b!important;color:#c5d4e6!important}
html[data-admin-theme="dark"] body.app-body .v969-danger{background:#341a20!important;border-color:#66313c!important;color:#ff9ca8!important}

/* KB dual editor + email studio (V9.6.8). */
html[data-admin-theme="dark"] body.app-body .v968-kb-modebar,
html[data-admin-theme="dark"] body.app-body .v968-token-box,
html[data-admin-theme="dark"] body.app-body .v968-email-compose,
html[data-admin-theme="dark"] body.app-body .v968-email-tabs,
html[data-admin-theme="dark"] body.app-body .v968-email-toolbar,
html[data-admin-theme="dark"] body.app-body .v968-email-text-fallback,
html[data-admin-theme="dark"] body.app-body .v968-email-preview{background:var(--v9612-surface)!important;border-color:var(--v9612-line)!important;color:var(--v9612-ink)!important;box-shadow:none!important}
html[data-admin-theme="dark"] body.app-body .v968-kb-modebar button,
html[data-admin-theme="dark"] body.app-body .v968-email-tabs button{color:#9fafc2!important}
html[data-admin-theme="dark"] body.app-body .v968-kb-modebar button.active,
html[data-admin-theme="dark"] body.app-body .v968-email-tabs button.active{background:#2c73c9!important;color:#fff!important}
html[data-admin-theme="dark"] body.app-body .v968-email-body>label,
html[data-admin-theme="dark"] body.app-body .v968-email-visual,
html[data-admin-theme="dark"] body.app-body .v968-preview-subject strong{color:var(--v9612-ink)!important}
html[data-admin-theme="dark"] body.app-body .v968-token-list button,
html[data-admin-theme="dark"] body.app-body .v968-email-toolbar button{background:#172230!important;border-color:#34465b!important;color:#c6d4e5!important}
html[data-admin-theme="dark"] body.app-body .v968-preview-canvas{background:#0b1119!important}
html[data-admin-theme="dark"] body.app-body .v968-preview-frame{background:#fff!important}
html[data-admin-theme="dark"] body.app-body .v968-preview-subject,
html[data-admin-theme="dark"] body.app-body .v968-email-tabs,
html[data-admin-theme="dark"] body.app-body .v968-email-toolbar,
html[data-admin-theme="dark"] body.app-body .v968-email-actions,
html[data-admin-theme="dark"] body.app-body .v968-preview-note{border-color:var(--v9612-line)!important}

/* Text / separators / scrollbar consistency. */
html[data-admin-theme="dark"] body.app-body :is(h1,h2,h3,h4,h5,h6,strong,label){color:var(--v9612-ink)}
html[data-admin-theme="dark"] body.app-body :is(p,small,.text-muted,.subline){color:var(--v9612-muted)}
html[data-admin-theme="dark"] body.app-body hr{border-color:var(--v9612-line)!important}
html[data-admin-theme="dark"] body.app-body *{scrollbar-color:#42546a #111923}
