/* Hallmark: existing application adaptation; preserve the light theme and working controls. */
:root {
  --theme-focus: #159b86;
  --theme-dark-bg: #111b20;
  --theme-dark-surface: #1c2a2f;
  --theme-dark-raised: #24363a;
  --theme-dark-line: #3a5054;
  --theme-dark-text: #e4efeb;
  --theme-dark-muted: #a7bbb6;
  --theme-dark-accent: #9bd5c5;
  --theme-dark-heading: #d5eae3;
  --theme-control-bg: #f7faf9;
  --theme-control-text: #263e3a;
  --dashboard-fiber-bg: #e6f2ed;
  --dashboard-fiber-text: #193f35;
  --dashboard-fiber-muted: #476d60;
}
html, body { overflow-x: clip; }
:focus-visible { outline: 3px solid var(--theme-focus); outline-offset: 2px; }
.sidebar { position: relative; isolation: isolate; }
.sidebar > :not(.fiber-background) { position: relative; z-index: 1; }
.fiber-background { position: absolute; pointer-events: none; overflow: clip; }
.fiber-background-login { inset: 0; opacity: .5; }
.fiber-background-sidebar { inset: auto 0 0; height: 45%; opacity: .22; z-index: 0; }
/* 横幅仅在既有工作台标记生效时显示，不拦截任何操作。 */
.main > .topbar { order: 0; }
.main > .content { order: 2; }
.main > .compliance-footer { order: 3; }
.dashboard-fibers { display: none; order: 1; flex: none; height: 128px; position: relative; isolation: isolate; overflow: clip; background: var(--dashboard-fiber-bg); color: var(--dashboard-fiber-text); }
#viewRoot.dashboard-fibers-active + .dashboard-fibers { display: flex; align-items: center; }
.fiber-background-dashboard { inset: 0; opacity: .95; z-index: 0; }
.dashboard-fibers-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 32px; pointer-events: none; }
.dashboard-fibers-copy strong { font-size: 22px; line-height: 1.2; color: var(--dashboard-fiber-text); }
.dashboard-fibers-copy span { font-size: 13px; color: var(--dashboard-fiber-muted); }
.login-theme { position: absolute; top: 18px; right: 22px; z-index: 2; display: flex; gap: 8px; align-items: center; color: var(--theme-dark-text); font-size: 13px; }
.theme-control { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.theme-control select, .login-theme select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; color: var(--theme-control-text); background: var(--theme-control-bg); }
.theme-control select:active, .login-theme select:active { transform: translateY(1px); }
.page-head h1 { text-wrap: balance; }
[data-theme='dark'] { color-scheme: dark; --ink: var(--theme-dark-text); --gray: var(--theme-dark-muted); --line: var(--theme-dark-line); --bg: var(--theme-dark-bg); --white: var(--theme-dark-surface); --shadow: none; --dashboard-fiber-bg: #102d2d; --dashboard-fiber-text: #eef8f3; --dashboard-fiber-muted: #c7ded5; }
[data-theme='dark'] body, [data-theme='dark'] .main, [data-theme='dark'] .content { background: var(--theme-dark-bg); color: var(--theme-dark-text); }
[data-theme='dark'] .topbar, [data-theme='dark'] .card, [data-theme='dark'] .login-card,
[data-theme='dark'] .modal, [data-theme='dark'] .modal-content, [data-theme='dark'] .modal-box,
[data-theme='dark'] .ms-box { background: var(--theme-dark-surface); color: var(--theme-dark-text); border-color: var(--theme-dark-line); }
[data-theme='dark'] .topbar-title, [data-theme='dark'] .card-title, [data-theme='dark'] .page-head h1,
[data-theme='dark'] .kpi .num, [data-theme='dark'] .brand-name, [data-theme='dark'] .login-card h2 { color: var(--theme-dark-heading); }
[data-theme='dark'] input:not([type='checkbox']):not([type='radio']), [data-theme='dark'] select,
[data-theme='dark'] textarea, [data-theme='dark'] .topbar-period select { color: var(--theme-dark-text); background: var(--theme-dark-raised); border-color: var(--theme-dark-line); }
[data-theme='dark'] input::placeholder, [data-theme='dark'] textarea::placeholder { color: var(--theme-dark-muted); }
[data-theme='dark'] tr:nth-child(even) td { background: var(--theme-dark-surface); color: var(--theme-dark-text); }
[data-theme='dark'] tr:hover td { background: var(--theme-dark-raised); }
[data-theme='dark'] .plan-matrix th, [data-theme='dark'] .ms-tools { background: var(--theme-dark-raised); color: var(--theme-dark-text); }
[data-theme='dark'] .ms-item:hover { background: var(--theme-dark-raised); }
[data-theme='dark'] .home-ranking thead th, [data-theme='dark'] .home-ranking tfoot td,
[data-theme='dark'] .home-ranking thead .hr-name { background: var(--theme-dark-raised); color: var(--theme-dark-heading); }
[data-theme='dark'] .home-ranking .hr-name { background: var(--theme-dark-surface); color: var(--theme-dark-text); }
[data-theme='dark'] .home-ranking .hr-count, [data-theme='dark'] .home-ranking .hr-rank { background: var(--theme-dark-raised); color: var(--theme-dark-accent); }
[data-theme='dark'] .rank-item, [data-theme='dark'] .org-node, [data-theme='dark'] .org-person,
[data-theme='dark'] .task-card, [data-theme='dark'] .daily-entry-row { background: var(--theme-dark-surface); color: var(--theme-dark-text); border-color: var(--theme-dark-line); }
[data-theme='dark'] .org-node-body, [data-theme='dark'] .bulk-bar, [data-theme='dark'] .upload-zone { background: var(--theme-dark-raised); color: var(--theme-dark-text); border-color: var(--theme-dark-line); }
[data-theme='dark'] .rank-name, [data-theme='dark'] .rank-score, [data-theme='dark'] .org-node-head,
[data-theme='dark'] .task-title, [data-theme='dark'] .bar-val, [data-theme='dark'] .modal-head h3 { color: var(--theme-dark-heading); }
[data-theme='dark'] .compliance-footer { color: var(--theme-dark-muted); }
@media (max-width: 700px) { .topbar-right { gap: 8px; } .theme-control { font-size: 12px; } .login-theme { top: 12px; right: 12px; } }
@media (prefers-reduced-motion: reduce) { .fiber-background { display: none; } }
