/* V81: shared player theme control and complete admin dark surfaces. */
#profile-menu #admin-dark-toggle{display:flex;align-items:center;gap:10px}
.moon-symbol{color:#395cf6;font-size:22px;line-height:20px}
.theme-switch{margin-left:auto;display:block;width:36px;height:20px;border-radius:20px;background:#e6e7ed;padding:3px;flex:0 0 36px}
.theme-switch>span{display:block;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .15s}
#admin-dark-toggle[aria-checked=true] .theme-switch{background:#3b6bff}
#admin-dark-toggle[aria-checked=true] .theme-switch>span{transform:translateX(16px);background:#0c0d10}
body.dark{color-scheme:dark;background:#10151e;color:#e1e7f0;--brand-blue-soft:#24324a}
body.dark .sidebar,body.dark .admin-header,body.dark #profile-menu,body.dark .panel,body.dark dialog,body.dark .announcement-bar,body.dark .banking-card,body.dark .banking-site,body.dark .banking-footer,body.dark #timezone-page .card{background:#1e2430;border-color:#354052;color:#e1e7f0}
body.dark #profile-menu button{color:#c5cfde}
body.dark #profile-menu button:hover,body.dark .nav-link:hover,body.dark .nav-link.selected{background:#2c3545;color:#fff}
body.dark :is(input,select,textarea){background:#17202c;border-color:#3d485c;color:#e1e7f0}
body.dark input::placeholder,body.dark textarea::placeholder{color:#8998ae}
body.dark :is(.outline,.action,.avatar,.menu-toggle,.modal-close){background:#202a39;border-color:#3d485c;color:#c5cfde}
body.dark :is(.summaries>div,th,th:last-child,.crumb.current,.crumb:hover,.timezone-account-info,.site-edit-identity,.site-platform-note,.site-domain small,.timezone-badge,.account-security-note,.account-identity-tag,.settings-section-icon,.account-heading-icon,.account-avatar,.login-emblem){background:#263247;border-color:#3d485c;color:#c5d4ef}
body.dark :is(td:last-child,.breadcrumbs,.account-identity,.account-form-section,.site-settings-section,.site-settings-section summary,.site-settings-section[open] summary,.site-image-control,.image-control-row img,.unified-dialog .account-banking-settings,.unified-dialog .timezone-account-info,#announcement-detail-dialog #announcement-detail){background:#1e2430;border-color:#354052;color:#e1e7f0}
body.dark :is(.account-dialog .dialog-heading,.site-settings-dialog .dialog-heading,.account-dialog-footer,.site-settings-footer){background:#1e2430;border-color:#354052;color:#e1e7f0}
body.dark :is(.account-dialog-body,.site-settings-body,#announcement-detail-dialog .account-dialog-body){background:#151d29;color:#e1e7f0}
body.dark :is(.account-dialog-footer .outline,.site-settings-actions .outline,.settings-section-content .upload-button,.settings-section-content [data-add-domain]){background:#263247;border-color:#3d485c;color:#c5cfde}
body.dark :is(.account-dialog input[readonly],.settings-options label:has(input:disabled)){background:#202630;color:#9facbf}
body.dark :is(.site-settings-section,.site-settings-section summary,.settings-section-content,.account-form-section,.account-identity,.account-dialog-footer,.site-settings-footer,td,th,.profile-account){border-color:#354052}
body.dark :is(.muted,.summary-note,.account-form-section label,.settings-section-content label,.account-identity small,.account-dialog small,.site-settings-dialog small,.banking-card p){color:#a3b0c4}
body.dark :is(.account-identity strong,.account-form-section h3,.site-settings-section summary strong,.banking-expand,.banking-card h2,.downline-account-name,.username,.site-domain,.transfer-party strong){color:#e1e7f0}
body.dark .table-prefix-tile{background:linear-gradient(145deg,#263754,#1e2b43);border-color:#435579;color:#b5c6ff}
body.dark .downline-prefix{background:#24324a;border-color:#3d485c;color:#adc0ff}
body.dark .role-chip.role-0,body.dark .crumb-role.role-0{background:#382c50;color:#cdb7ff}
body.dark .role-chip.role-1,body.dark .crumb-role.role-1{background:#203d50;color:#9bd7ef}
body.dark .role-chip.role-2,body.dark .crumb-role.role-2{background:#213e30;color:#9bd9b4}
body.dark .role-chip.role-3,body.dark .crumb-role.role-3{background:#3a4023;color:#d7df94}
body.dark .role-chip.role-4,body.dark .crumb-role.role-4{background:#482b3b;color:#f0accd}
body.dark .role-chip.role-5,body.dark .crumb-role.role-5{background:#46391f;color:#ebce91}
body.dark :is(.status,.transaction-type.deposit,.password-self,#settings-state[data-status=active],.account-banking-switches label:has(input:checked),.settings-options label:has(input[value=active]:checked)){background:#173b2e;border-color:#2c664d;color:#80dfad}
body.dark :is(.status.suspended,.transaction-type.withdraw,#settings-state[data-status=suspended],.account-banking-switches label:has(input:not(:checked)),.settings-options label:has(input[value=suspended]:checked)){background:#42252e;border-color:#71404a;color:#ff9da9}
body.dark :is(.status.locked,#settings-state[data-status=locked],.settings-options label:has(input[value=locked]:checked),#account-warning){background:#40361f;border-color:#6b582e;color:#efd292}
body.dark :is(.unified-dialog .banking-alert,.settings-section-content .site-platform-note,#timezone-form .banking-alert,#announcement-toolbar){background:#24324a;border-color:#3a5177;color:#dbe7ff}
body.dark #wallet-banking-preview.banking-alert[data-enabled=false]{background:#40301f;border-color:#715033;color:#f2cda5}
body.dark .unified-dialog .settings-options label{background:#202a39;border-color:#3d485c}
body.dark .primary{background:#395cf6;color:white}
body.dark .primary:hover:not(:disabled){background:#2f50df}
body.dark.login-body{background:radial-gradient(ellipse at top,#253452 0,#10151e 65%)}
body.dark .login-card{background:#1e2430;border-color:#354052;color:#e1e7f0}
body.dark dialog::backdrop{background:#050a14a8}
body.dark label,body.dark .sidebar summary,body.dark #profile-name{color:#c5cfde}
body.dark .sidebar summary::after{background:#2c3545;color:#c5cfde}
body.dark .site-prefix-label{color:#adc0ff}
body.dark .sidebar details,body.dark .profile-account-info{border-color:#354052}
/* V82: last-loaded theme rules cover submenu state and semantic actions. */
body.dark{--brand-blue:#9bb2ff;--brand-blue-soft:#27364f}
body.dark .sidebar .site-configuration>summary{color:#d2dbea;background:transparent}
body.dark .sidebar .site-configuration>summary:hover,body.dark .sidebar .site-configuration.is-selected>summary,body.dark .sidebar .site-configuration.is-selected>summary:hover{background:#2c3545;color:#fff}
body.dark .sidebar .configuration-submenu{color:#c5cfde}
body.dark .sidebar .configuration-submenu.selected,body.dark .sidebar .configuration-submenu.nav-active,body.dark .sidebar .configuration-submenu.selected:hover{background:#29364c;color:#f2f5ff;box-shadow:inset 3px 0 #9bb2ff}
body.dark .sidebar .configuration-submenu:not(.selected):hover{background:#273247;color:#fff}
body.dark .sidebar .configuration-chevron,body.dark .sidebar .site-configuration.is-selected>summary .configuration-chevron{background:#354258;color:#d2dbea}
body.dark .configuration-submenus{border-color:#46546b}
body.dark .site-configuration summary svg circle{fill:#1e2430}
body.dark #members .action{background:#263247;border-color:#46546b;color:#dce6f5}
body.dark #members .deposit{background:#173b2e;border-color:#34694f;color:#80dfad}
body.dark #members .withdraw{background:#42252e;border-color:#754450;color:#ff9da9}
body.dark #members .deposit:hover,body.dark #members .deposit.selected{background:#246447;border-color:#80dfad;color:#fff}
body.dark #members .withdraw:hover,body.dark #members .withdraw.selected{background:#843546;border-color:#ff9da9;color:#fff}
body.dark #members [data-settings]{color:#adc0ff}
body.dark #members [data-future="Profile"]{color:#e2ebf8}
body.dark .avatar,body.dark .avatar:hover,body.dark .avatar[aria-expanded=true]{background:#2c3b52;border-color:#647b9e;color:#f0f5ff}
body.dark .announcement-track button{color:#d9e3f2}
body.dark .announcement-symbol{background:#293b5a;color:#adc0ff}
body.dark .announcement-track strong,body.dark .announcement-title-button,body.dark #announcement-title,body.dark #announcement-link,body.dark .announcement-rich a{color:#adc0ff}
body.dark .announcement-editor-shell,body.dark #announcement-toolbar button{background:#1e2430;border-color:#46546b;color:#e1e7f0}
body.dark #announcement-toolbar,body.dark #announcement-toolbar button:hover{background:#29364c;border-color:#46546b}
body.dark .announcement-card{border-color:#46546b}
body.dark #announcement-editor,body.dark .announcement-rich{color:#e1e7f0}
body.dark #profile-menu .profile-menu-identity strong{color:#e1e7f0}
body.dark #profile-menu .profile-menu-identity{border-color:#46546b}
body.dark #profile-menu #logout{color:#ff9da9}
body.dark :is(.account-security-note strong,.account-security-note p,.summary-note,.summaries small,.summaries span,.announcement-card small,#profile-joined,.profile-menu-caption){color:#aebdd2}
body.dark .history-card.deposit,body.dark .deposit-heading{background:#173b2e;color:#80dfad}
body.dark .history-card.withdraw,body.dark .withdraw-heading{background:#42252e;color:#ff9da9}
body.dark .form-status,body.dark [id$="-notice"],body.dark #notice,body.dark [id$="-error"]{color:#ff9da9}
body.dark [data-message-kind="success"]{color:#80dfad!important}
body.dark [data-message-kind="error"]{color:#ff9da9!important}
body.dark .banking-switch input:checked{background:#395cf6}
body.dark .settings-options label:has(input:checked){border-color:#9bb2ff}
body.dark .announcement-editor-note{background:#24324a;border-color:#3a5177;color:#bccde7}
body.dark .banking-alert-grid small{color:#b7c5db}
body.dark .banking-expand svg,body.dark .settings-section-icon,body.dark .account-heading-icon{color:#adc0ff}
body.dark .banking-alert-grid b,body.dark .banking-alert>strong{color:#e1eafa}
body.dark .sidebar .site-configuration .configuration-chevron{stroke:currentColor}
body.dark #banking-form .primary,body.dark .banking-card .primary,body.dark .banking-rule-editor .primary,body.dark .site-settings-footer .primary,body.dark .account-dialog-footer .primary{background:#395cf6;border-color:#395cf6;color:#fff}
body.dark #banking-form .primary:hover:not(:disabled),body.dark .banking-card .primary:hover:not(:disabled){background:#2f50df}
body.dark .eye-button,body.dark .password-toggle{color:#aebdd2}

/* V83: creation actions match dialog submit buttons in both themes. */
.page-heading>button.primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 18px;border:0;border-radius:9px;background:#2f5bff;color:#fff;font-size:13px;font-weight:600;line-height:1.4;white-space:nowrap;box-shadow:none;flex-shrink:0}
.page-heading>button.primary:hover:not(:disabled){background:#254ddd}
.button-plus{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
body.dark .page-heading>button.primary{background:#2f5bff;color:#fff;border:0}
body.dark .page-heading>button.primary:hover:not(:disabled){background:#254ddd}
body.dark #timezone-form #timezone-offset{background:#17202c;color:#e1e7f0;border:1px solid #46546b;color-scheme:dark;min-height:44px}
body.dark #timezone-offset option{background:#17202c;color:#e1e7f0}
body.dark #timezone-form label{color:#c5cfde}

/* V84: separate timezone input, explanation and fixed-offset note. */
#timezone-dialog #timezone-form .banking-alert{margin-top:16px;margin-bottom:12px}
#timezone-dialog #timezone-form .banking-alert + .muted{margin-top:0;line-height:1.6}

/* V85: initial server markup uses nav-active before navigation initializes. */
body.dark .sidebar .nav-active,body.dark .sidebar .nav-active:hover{background:#2c3545;color:#fff}

/* V86: persisted admin theme applies to login as well. */
body.dark .login-card .login-intro,body.dark .login-card .login-help,body.dark .login-card .muted{color:#aebdd2}
body.dark .login-card .primary{background:#2f5bff;color:#fff}
body.dark .login-card a{color:#adc0ff}
body.dark .login-card .login-emblem{background:#293b5a;color:#adc0ff}
body.dark .site-seo-block{background:#1d2939;border-color:#35465e}body.dark .site-seo-block h3{color:#edf3fc}
body.dark .header-right .admin-header-icon{background:transparent;color:#e2e9f4;border-color:#354153}body.dark .header-right .admin-header-icon:hover{background:#263244}

.login-session-pending .login-card{visibility:hidden}

.admin-route-pending .workspace>main{visibility:hidden}.admin-route-pending .header-identity{visibility:hidden}.admin-route-pending #downline-nav{background:transparent!important}

/* Neutral fallback for badges without an account category. */
body.dark .role-chip:not(.role-0):not(.role-1):not(.role-2):not(.role-3):not(.role-4):not(.role-5){background:#29364a;color:#c4d2ea}
