/* Theme controls are available on every page, including login and MFA. */
:root { color-scheme: light; }
.theme-control { display: inline-flex; align-items: center; gap: 7px; margin: 0; flex-shrink: 0; color: var(--ink); font-size: 11px; font-weight: 500; }
.theme-control select { margin: 0; padding: 6px 8px; width: auto; font-size: 11px; cursor: pointer; }
.auth-theme { position: absolute; right: 25px; top: 20px; z-index: 3; }
.theme-logo-dark { display: none !important; }
html[data-theme="dark"] .theme-logo-light { display: none !important; }
html[data-theme="dark"] .theme-logo-dark { display: block !important; }
html[data-theme="dark"] .theme-logo-dark.mobile-login-logo { display: none !important; }
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5eee6; --muted: #a5b8ac; --line: #33483d;
  --green: #9dcca7; --pale: #20372b; --bg: #101a17; --white: #182620;
}
html[data-theme="dark"] :is(.sidebar,.topbar) { background: #14221c; color: #afc0b4; }
html[data-theme="dark"] :is(.panel,.stats a) { background: var(--white); }
html[data-theme="dark"] :is(.topbar strong,.stats strong,.profile,.approval strong,.calendar-item h2,.doc-card h2,h1,h2) { color: var(--ink); }
html[data-theme="dark"] :is(.muted,.eyebrow,.nav-label,.workspace small,.profile small,.secure-note small,.logout,.stats a>span,.stats small,.stats b,.panel-head p,.panel-head>a,.panel-head .subtle-icon,.record-id,.doc-list small,.doc-card>small,.doc-card p,.timeline small,.approval small,.calendar-item p,.fine,.empty,footer,.login-form .fine,.notification-link,.secret-output small) { color: var(--muted); }
html[data-theme="dark"] :is(.sidebar nav a,.secure-note,.doc-list strong,.timeline strong,td,td strong,label,h3,summary,.document-body,.preserve,.card-bottom) { color: #c1d4c3; }
html[data-theme="dark"] :is(.sidebar nav a:hover,.btn:hover) { background: #293f31; color: #ebf4e7; }
html[data-theme="dark"] .sidebar nav a.active { background: #2a4331; color: #d0e9bd; }
html[data-theme="dark"] :is(.avatar,.help,.doc-icon,.calendar-date) { background: #253b2c; color: #c8dfb6; border-color: #3c5541; }
html[data-theme="dark"] :is(input,textarea,select,.rich-editor) { background: #111f18; color: #e1ecdd; border-color: #425b47; }
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder { color: #92a58f; opacity: 1; }
html[data-theme="dark"] .search input { background: transparent; }
html[data-theme="dark"] .search kbd { border-color: #425b47; }
html[data-theme="dark"] :is(input,textarea,select,.rich-editor):focus { outline-color: #b4d897; }
html[data-theme="dark"] .btn { background: #23372a; border-color: #466148; color: #d7e9c9; }
html[data-theme="dark"] .btn.primary { background: #a8cd8b; border-color: #a8cd8b; color: #14220f; box-shadow: none; }
html[data-theme="dark"] .btn.primary:hover { background: #bcdda2; }
html[data-theme="dark"] :is(th,.document-body pre,.diff) { background: #13221a; color: #bad0b0; border-color: #344b37; }
html[data-theme="dark"] :is(th,td,.doc-list>a,.card-bottom,.approval,.calendar-item,.secret-output>div,.connection-foot) { border-color: #33483d; }
html[data-theme="dark"] :is(.badge,.pill,.live) { background: #263c2b; color: #c8deb9; border-color: #405a40; }
html[data-theme="dark"] :is(.badge.under_review,.badge.submitted) { background: #3e341d; color: #ead18e; border-color: #64522b; }
html[data-theme="dark"] :is(.badge.completed,.badge.approved) { background: #203e2a; color: #aee0b2; border-color: #3a6241; }
html[data-theme="dark"] :is(.badge.implementing,.badge.validating,.badge.scheduled) { background: #223344; color: #bad7f0; border-color: #3b5369; }
html[data-theme="dark"] :is(.badge.failed,.badge.rolled_back) { background: #422c29; color: #f0b6a9; border-color: #68483e; }
html[data-theme="dark"] .risk.low { color: #b3d997; }
html[data-theme="dark"] .risk.medium { color: #ebce86; }
html[data-theme="dark"] .risk.high { color: #f2b4a4; }
html[data-theme="dark"] .connection { background: #203321; border-color: #3c5135; }
html[data-theme="dark"] .connection h2 { color: #d3e7c4; }
html[data-theme="dark"] .connection p:not(.eyebrow),html[data-theme="dark"] .connection-foot { color: #afc39c; }
html[data-theme="dark"] .connection-icon { background: #293e26; border-color: #45613c; color: #c4dfaa; }
html[data-theme="dark"] .connection-icon span { color: #a9c393; }
html[data-theme="dark"] .connection .btn { background: #2b4127; border-color: #527048; color: #d1e9bc; }
html[data-theme="dark"] .timeline-dot { background: #96b47e; }
html[data-theme="dark"] .timeline>div:not(:last-child):after { background: #3c5135; }
html[data-theme="dark"] .notice { background: #352e1c; border-color: #66562c; color: #e9d49a; }
html[data-theme="dark"] .diff .added { background: #234329; color: #c4e9b6; }
html[data-theme="dark"] .diff .removed { background: #472c2a; color: #f1bdb2; }
html[data-theme="dark"] .login-art { background: #1c3021; }
html[data-theme="dark"] .login-art h1 { color: #d2e8be; }
html[data-theme="dark"] .login-art p:not(.eyebrow),html[data-theme="dark"] .login-art>small { color: #adbf9a; }
html[data-theme="dark"] a:hover :is(h2,strong) { color: #c5e5a7; }
@media(max-width:1100px) { .theme-label { display: none; } .topbar { gap: 15px; } .search { width: min(260px,35vw); } }
@media(max-width:800px) { .auth-theme { right: 18px; top: 14px; } .auth-shell .login-form { padding-top: 72px; } .theme-control { gap: 4px; } .theme-control select { max-width: 95px; } html[data-theme="dark"] .theme-logo-dark.mobile-login-logo { display: block !important; } }
