/* Theme preferences are local to this browser. */
#themeQuick{font-size:21px;line-height:1;min-width:34px}
.theme-mode-switch{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:22px 22px 0}
.theme-mode-switch .active{border-color:var(--cyan);background:#55d9cf18;color:var(--cyan)}
.account-role{font-size:12px;color:var(--cyan)}
.account-grid{grid-template-columns:minmax(270px,.85fr) minmax(340px,1.4fr);align-items:start}
.permission-user{padding:16px 0;border-top:1px solid var(--line)}
.permission-user .admin-user{border:0;padding:0 0 15px}.permission-user fieldset{padding:12px 0 6px;margin:0;border:0;min-width:0}
.admin-presence{display:inline-flex;align-items:center;gap:4px;color:#7c8f9e!important;font-style:normal}.admin-presence i{width:6px;height:6px;border-radius:50%;display:inline-block;background:#8393a0;box-shadow:0 0 0 3px #8393a018}.admin-presence.is-online{color:#36c99d!important}.admin-presence.is-online i{background:#2bd79b;box-shadow:0 0 0 3px #2bd79b22}.admin-presence.is-offline{color:#8495a4!important}
.permission-user legend{font-size:11px;color:var(--muted);margin-bottom:4px}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.permission-grid label{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.5;min-height:34px;color:var(--text);cursor:pointer}
.permission-grid input{accent-color:var(--cyan);width:15px;height:15px}.permission-actions{display:flex;gap:18px;align-items:center;margin-top:14px}.permission-actions .primary-btn{margin-left:auto}
.permission-feedback{color:var(--cyan);font-size:12px;line-height:1.7}.permission-feedback:empty{display:none}
body[data-theme="light"]{color-scheme:light;--bg:#edf3f8;--panel:#fff;--line:rgba(42,72,107,.16);--text:#23374d;--muted:#566e85;--cyan:#007f76;--violet:#6953c2;--amber:#996117;--rose:#b53e69;background:radial-gradient(ellipse at 85% 5%,#d7edf566,transparent 65%),#edf3f8!important;color:var(--text)}
body[data-theme="light"]::before{opacity:.08}body[data-theme="light"]::after{opacity:.035}
body[data-theme="light"] .sidebar{background:#f9fcff;color:#23374d;box-shadow:3px 0 18px #28486a08}
body[data-theme="light"] .sidebar .nav-group summary{background:#e8f0f7;color:#253e56}
body[data-theme="light"] .sidebar .nav-item{color:#4d657a}
body[data-theme="light"] .sidebar .nav-item.active,body[data-theme="light"] .sidebar .nav-item:hover{color:#006e68;background:#dcefed}
body[data-theme="light"] :is(.sidebar .nav-item i,.sidebar .nav-item em,.sidebar .side-label,.sidebar .nav-common-label,.sidebar .brand small,.sidebar .side-bottom small,.side-bottom,.sidebar-guide b,.sidebar-guide p){color:#506a80}
body[data-theme="light"] .sidebar-guide{background:#e7f1f6;border-color:var(--line)}
body[data-theme="light"] :is(.panel,.setting-card,.metric-card,.model-card,.server-metric,.status-management-card,.handling-record,.handling-card,.account-panel,.status-category,.rack-card,.alert-config,.alert-table-panel){background:linear-gradient(135deg,#fff,#f8fbfe);box-shadow:0 4px 18px #28486a06;border-color:var(--line)}
body[data-theme="light"] :is(.topbar,.toolbar,.server-toolbar,.search-box,.bulk-selection,.selection-bar,.handling-selection,.handling-progress,.handling-batch-picker,.handling-toolbar,.server-selection){background:transparent;color:#354e64}
body[data-theme="light"] :is(.crumb,.crumb strong,.clock,.kicker,.eyebrow,.page-head p:not(.eyebrow),.welcome p:not(.eyebrow),.subtle,.appearance-help,.setting-card p,.empty,.source-line,footer,.metric-head,.metric-foot,.model-foot,.server-note,.server-metric>span,.server-metric>small,.form-grid label,.account-form label,.confirm-label){color:#506a80}
body[data-theme="light"] :is(.metric-value,.model-name strong,.model-number,.scene-headline strong,.scene-stats strong,.activity-copy b,.asset-ip,.server-ip,.issue-line b,.count-num,.rack-card-head strong,.rack-plan-head h3,.handling-device,.handling-name){color:#1c3b54}
body[data-theme="light"] :is(.icon-btn,.ghost-btn,.row-action,.pagination button,.text-btn,.more-btn,.filter-chip,.handling-status-btn){color:#355d74;border-color:#c4d4df;background:#f3f8fb}
body[data-theme="light"] :is(.primary-btn,.auth-submit){background:#007f76;color:#fff}
body[data-theme="light"] .primary-btn:hover:not(:disabled){background:#006b65}
body[data-theme="light"] :is(.ghost-btn:hover,.filter-chip.active,.theme-mode-switch .active){color:#006c65;background:#d8efec;border-color:#71aea7}
body[data-theme="light"] .danger-btn{color:#ad254f;background:#faeaf0;border-color:#e5adc0}
body[data-theme="light"] .danger-btn.solid{color:#fff;background:#b43558}
body[data-theme="light"] :is(input:not([type=checkbox]):not([type=color]),textarea,select,#rackHistory,#serverPageSize,.rack-plan select){background:#fff;color:#223a51;border-color:#b9cdda}
body[data-theme="light"] ::placeholder{color:#72869a}
body[data-theme="light"] .modal{color:#23374d;background:#fafdff;box-shadow:0 25px 90px #15344b33;border-color:#c3d4df}
body[data-theme="light"] .modal-close{background:#e5edf3;color:#30495d}
body[data-theme="light"] :is(th,.server-table th){background:#eaf1f7;color:#455f76}
body[data-theme="light"] :is(td,.server-table td){color:#29465f;border-color:var(--line)}
body[data-theme="light"] :is(.server-table th:first-child,.server-table td:first-child,.asset-table th:first-child,.asset-table td:first-child){background:#f6faff}
body[data-theme="light"] :is(tbody tr:hover,tbody tr.selected-row){background:#e8f4f4}
body[data-theme="light"] :is(td small,.server-table small,.log-actor,.log-client,.audit-line,.audit-line p,.audit-line time,.handling-record small,.handling-record p,.handling-frequency-row,.rack-help,.rack-card p,.rack-card small,.rack-plan-head p,.rack-confirm,.server-source-details,.server-preview-rows){color:#546e84}
body[data-theme="light"] :is(.status-tag,.server-status){color:var(--status-fg,#475569)!important;background:var(--status-bg,#f1f5f9)!important;border:1px solid var(--status-border,#94a3b8);font-weight:600}
body[data-theme="light"] :is(.status-role,.status-management-foot,.status-management-card p,.status-management-note,.online-status-help,.status-help){color:#47647a}
body[data-theme="light"] :is(.status-management-note,.danger-zone,.handling-progress,.rack-notice){background:#f7fbff;border-color:#c9dbe7}
body[data-theme="light"] .danger-zone h3,body[data-theme="light"] .danger-zone p{color:#873e54}
body[data-theme="light"] .donut-hole{background:#fff;color:#223b50}
body[data-theme="light"] :is(.issue-line,.health-box>div:first-child,.health-box p,.chart-key,.chart-foot,.scene-bottom,.scene-coordinate,.scene-headline>span,.scene-stats span,.activity-copy small,.model-number span){color:#547288}
body[data-theme="light"] .health-box strong{color:#00796f}
body[data-theme="light"] .scene-wrap{background:radial-gradient(ellipse at 50% 75%,#deeff3,transparent 75%)}
body[data-theme="light"] .skin-option{background:#f7fbff;border-color:#c4d5e1;color:#29465c}
body[data-theme="light"] .skin-option small{color:#566e82}
body[data-theme="light"] .skin-option.active{border-color:#168a82;background:#e7f5f2}
body[data-theme="light"] .rack-source{background:#fff3e1;border-color:#c79240}body[data-theme="light"] .rack-target{background:#e0f5f0;border-color:#269e8b}
body[data-theme="light"] .rack-card-head span{color:#007b71}body[data-theme="light"] .rack-warning{color:#855b17!important}
body[data-theme="light"] :is(.auth-layout,.auth-panel){background:#f4f8fc;color:#23374d}
body[data-theme="light"] .auth-intro{background:radial-gradient(ellipse at 50% 56%,#cfe5ee,transparent 60%),#e8f1f7;border-color:#cbdce7}
body[data-theme="light"] :is(.auth-brand,.auth-intro h1){color:#213e53}
body[data-theme="light"] :is(.auth-brand small,.intro-copy,.intro-features,.auth-footer,.muted,.auth-help,.auth-links,label,label small){color:#49657c}
body[data-theme="light"] .auth-tabs{background:#e3edf5}body[data-theme="light"] .auth-tabs button{color:#49657c}body[data-theme="light"] .auth-tabs button.active{background:#fff;color:#006e68}
body[data-theme="light"] :is(.auth-error,.form-error){color:#a5294c}body[data-theme="light"] :is(.auth-notice,.permission-feedback){color:#00756c}
body[data-theme="light"] .toast{background:#f8fffd;color:#164b45;border-color:#89bcb3;box-shadow:0 8px 30px #2a4a672b}
body[data-theme="light"] :is(.admin-user b,.handling-record strong,.handling-frequency-row>strong,.status-management-note strong,.status-management-card>p strong){color:#234258}
body[data-theme="light"] :is(.admin-user small,.admin-user>span,.handling-record-check,.handling-bulk,.handling-bulk>span,.handling-badge,.handling-import-foot p,.handling-notice,.handling-notice span:last-child,.handling-batch-picker label,.handling-frequency-row>small,.status-management-note p,.status-management-foot>span){color:#536f83}
body[data-theme="light"] :is(.handling-badge b,.handling-frequency-row>span){color:#00776d}
body[data-theme="light"] .handling-name{color:#24485c!important}
body[data-theme="light"] :is(.table-card th.edit-cell,.table-card td.edit-cell,.table-card tr:hover td.edit-cell){background:#f4f9fc}
/* Light mode: legacy data tables keep dark hard-coded surfaces unless explicitly overridden. */
body[data-theme="light"] .table-card,
body[data-theme="light"] .issue-board{background:#ffffff;color:#29465f}
body[data-theme="light"] .table-card tbody,
body[data-theme="light"] .table-card tr,
body[data-theme="light"] .table-card td{background:#ffffff;color:#29465f}
body[data-theme="light"] .table-card tr:hover td{background:#eaf6f5}
body[data-theme="light"] .table-card td.edit-cell{background:#f4f9fc;color:#355d74}
body[data-theme="light"] .table-card tr:hover td.edit-cell{background:#e1f2f0}
body[data-theme="light"] .table-card .ip-text{color:#1d4057}
body[data-theme="light"] .table-card td small{color:#58748a}
body[data-theme="light"] .table-card .rack-badge{background:#eaf2f7;border-color:#cbdbe5;color:#4e6b80}
body[data-theme="light"] .table-card .row-action{color:#007a70}
body[data-theme="light"] .alert-table-wrap,
body[data-theme="light"] .alert-table{background:#ffffff}
body[data-theme="light"] .alert-table td{background:#ffffff;color:#29465f}
body[data-theme="light"] .alert-table tr:hover td{background:#eaf6f5}
body[data-theme="light"] .import-numbers{background:#f0f6fa;color:#29465f}
body[data-theme="light"] .import-numbers strong{color:#1b6f68}
body[data-theme="light"] .import-numbers span{color:#58748a}
/* Keep the dashboard warning banner readable over the light video skin. */
body[data-theme="light"] .alert-metric{background:linear-gradient(135deg,#fff7e8,#fffdf8);border-color:#e2bd78;color:#3a4c5c;box-shadow:0 5px 20px rgba(125,86,20,.12)}
body[data-theme="light"] .alert-metric:hover{border-color:#c99539;background:linear-gradient(135deg,#fff2d7,#fffdf8)}
body[data-theme="light"] .alert-metric-icon{background:#fbe8bd;color:#8b5b16}
body[data-theme="light"] .alert-metric small{color:#855617}
body[data-theme="light"] .alert-metric strong{color:#70430d}
body[data-theme="light"] .alert-metric em{color:#53697b}
body[data-theme="light"] .alert-metric>b{color:#996117}
body[data-theme="light"] .issue-bulk-action{background:#e8f5f4;color:#197d76;border-color:#b7d4d0}
@media(max-width:900px){.account-grid{grid-template-columns:1fr}}
@media(max-width:600px){.permission-grid{grid-template-columns:1fr}.theme-mode-switch{padding:16px 16px 0}.permission-grid label{min-height:40px;font-size:13px}}

/* Self-hosted iPhone ambient background. The WebM travels with the site, so it does not rely on an expiring hotlink. */
body{isolation:isolate}
body::before,body::after{z-index:-1}
.site-background-video{position:fixed;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:0;pointer-events:none;opacity:.42;filter:saturate(.9) contrast(1.06) brightness(.82);background:#071321;will-change:transform}
.site-background-overlay{position:fixed;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,#06111d55 0%,#071525a6 100%),radial-gradient(circle at 52% 24%,#1c607933,transparent 62%)}
.app-shell,.auth-layout{position:relative;z-index:2}
.login-loading{position:relative;z-index:3}
.auth-intro{background:radial-gradient(ellipse at 50% 56%,#123b4e88 0,transparent 58%),#0b182780}
.auth-panel{background:#08121fcc}
body:not(.video-background-off) .auth-cabinets{opacity:.08}
body[data-theme="light"] .site-background-video{opacity:.18;filter:saturate(.68) contrast(1.02) brightness(1.22)}
body[data-theme="light"] .site-background-overlay{background:linear-gradient(180deg,#eef5f5e8,#edf3f8f5),radial-gradient(circle at 52% 24%,#8fc8c833,transparent 62%)}
body[data-theme="light"] .auth-intro{background:radial-gradient(ellipse at 50% 56%,#cfe5ee88 0,transparent 60%),#e8f1f780}
body[data-theme="light"] .auth-panel{background:#f4f8fccc}
body.video-background-off .site-background-video{display:none}
body.video-background-off .site-background-overlay{display:none}
@media(prefers-reduced-motion:reduce){.site-background-video{display:none!important}.site-background-overlay{display:none!important}}
.background-video-setting{display:flex;align-items:center;gap:8px;margin:14px 22px 0;color:#86a6b7;font-size:11px;cursor:pointer}
.background-video-setting input{width:15px;height:15px;accent-color:var(--cyan)}
.background-video-setting small{color:#5d7f95;font-size:9px}

/* v2.9.7: readable, distinct status colors in light mode only. */
body[data-theme="light"] #handlingPage :is([data-handling-status],#handlingStatus,#handlingFilter,.handling-badge){color:var(--status-fg,#475569)!important;background:var(--status-bg,#f1f5f9)!important;border:1px solid var(--status-border,#94a3b8);font-weight:600}
body[data-theme="light"] #handlingPage select option{color:var(--status-fg,#334155);background:var(--status-bg,#fff);font-weight:500}
body[data-theme="light"] #handlingPage .handling-badge b{color:inherit}
body[data-theme="light"] #handlingPage .handling-badge i{background:var(--status-fg,#475569)}
body[data-theme="light"] #handlingPage [data-handling-status]{box-shadow:inset 3px 0 0 var(--status-border,#94a3b8)}
body[data-theme="light"] #handlingPage [data-handling-status]:disabled{opacity:.75}
@media(max-width:600px){.handling-actions{gap:8px}.handling-actions button{min-height:40px}.handling-actions #exportHandlingPng{flex-basis:100%}}
.handling-toolbar{position:relative}
.handling-toolbar>.sr-only{left:0;top:0}
.handling-toolbar>label.sr-only{left:-9999px!important;right:auto!important}
#handlingPage label.sr-only{left:-9999px!important;right:auto!important}
