.theme-toggle{position:fixed;right:18px;bottom:18px;z-index:1000;min-width:98px;min-height:44px;padding:10px 14px;border:1px solid #c6d1dc;border-radius:999px;background:#fff;color:#17243a;box-shadow:0 5px 20px #10243a26;font:600 14px/1 Arial,sans-serif;cursor:pointer}.theme-toggle:hover{border-color:#175bd8;color:#175bd8}.theme-toggle:focus-visible{outline:3px solid #efb900;outline-offset:3px}

:root[data-theme="dark"]{color-scheme:dark;--blue:#8ab4ff;--line:#34465c;--muted:#a9b8c9;background:#0f1724;color:#e8eef7}
:root[data-theme="dark"] body{background:#0f1724;color:#e8eef7}
:root[data-theme="dark"] header,
:root[data-theme="dark"] .organizer-header{background:#151f2e}
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .page-tabs a{color:#e8eef7}
:root[data-theme="dark"] .brand img{filter:brightness(0) invert(1)}
:root[data-theme="dark"] p,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .small,
:root[data-theme="dark"] footer,
:root[data-theme="dark"] .heading p,
:root[data-theme="dark"] .access p,
:root[data-theme="dark"] .task-meta,
:root[data-theme="dark"] .stream-head span:last-child,
:root[data-theme="dark"] .sales-body p,
:root[data-theme="dark"] .legend,
:root[data-theme="dark"] .organizer-resources{color:var(--muted)}
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .approval,
:root[data-theme="dark"] .signup-metric,
:root[data-theme="dark"] .coverage-table,
:root[data-theme="dark"] .signup-person,
:root[data-theme="dark"] .admin-approvals,
:root[data-theme="dark"] .backlog,
:root[data-theme="dark"] .sales,
:root[data-theme="dark"] .progress-panel,
:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .sales-comparison,
:root[data-theme="dark"] .use-case,
:root[data-theme="dark"] .access,
:root[data-theme="dark"] dialog{background:#172333;color:#e8eef7;border-color:var(--line)}
:root[data-theme="dark"] button,
:root[data-theme="dark"] .button,
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .filters input,
:root[data-theme="dark"] .filters select,
:root[data-theme="dark"] .edit-grid input,
:root[data-theme="dark"] .edit-grid select,
:root[data-theme="dark"] .task-detail textarea,
:root[data-theme="dark"] .inbox-fields input,
:root[data-theme="dark"] .inbox-fields select,
:root[data-theme="dark"] .inbox-fields textarea,
:root[data-theme="dark"] .sales-comparison select{background:#111c2a;color:#e8eef7;border-color:#43566d}
:root[data-theme="dark"] .button:hover,
:root[data-theme="dark"] button:hover{background:#1c2b3e}
:root[data-theme="dark"] .primary,
:root[data-theme="dark"] body:not(.welcome) .button.primary{background:#3378e8;color:#fff;border-color:#3378e8}
:root[data-theme="dark"] .primary:hover,
:root[data-theme="dark"] body:not(.welcome) .button.primary:hover{background:#2867ca;color:#fff}
:root[data-theme="dark"] .workspace-nav a:hover,
:root[data-theme="dark"] .page-tabs a:hover,
:root[data-theme="dark"] .task-row:hover,
:root[data-theme="dark"] .conversation-row:hover,
:root[data-theme="dark"] .metric:hover{background:#1c2b3e}
:root[data-theme="dark"] .workspace-nav a[aria-current="page"],
:root[data-theme="dark"] nav .active,
:root[data-theme="dark"] .page-tabs a.active{background:#233a60;color:#a9c9ff}
:root[data-theme="dark"] .task-row,
:root[data-theme="dark"] .conversation-row{background:#172333;color:#e8eef7;border-color:var(--line)}
:root[data-theme="dark"] .count,
:root[data-theme="dark"] .badge,
:root[data-theme="dark"] .signup-count,
:root[data-theme="dark"] .status,
:root[data-theme="dark"] .task-row .priority{background:#26364a;color:#c6d3e2}
:root[data-theme="dark"] .blue,
:root[data-theme="dark"] .status.in-progress{background:#203b66;color:#b7d1ff}
:root[data-theme="dark"] .status.blocked,
:root[data-theme="dark"] .task-row .p0{background:#562d31;color:#ffb9b0}
:root[data-theme="dark"] .status.done{background:#1f4939;color:#9de0bd}
:root[data-theme="dark"] .status.needs-review{background:#514522;color:#f5d98d}
:root[data-theme="dark"] .status.draft-ready{background:#3c3557;color:#d3c5ff}
:root[data-theme="dark"] .task-row .p1{background:#263e67;color:#b8d0ff}
:root[data-theme="dark"] .notice{background:#1c3458;color:#bed4ff;border-color:#345988}
:root[data-theme="dark"] .coverage-head{background:#223249;color:#c6d3e2}
:root[data-theme="dark"] .coverage-track{background:#29384b}
:root[data-theme="dark"] .signup-metric small,
:root[data-theme="dark"] .coverage-row small,
:root[data-theme="dark"] .signup-assignment span{color:var(--muted)}
:root[data-theme="dark"] #message.error,
:root[data-theme="dark"] .error{background:#4a292d;color:#ffc1ba}
:root[data-theme="dark"] .empty{background:#141f2e;border-color:#52667f;color:var(--muted)}
:root[data-theme="dark"] .track,
:root[data-theme="dark"] .comparison-track{background:#29384b}
:root[data-theme="dark"] .legend h3,
:root[data-theme="dark"] .conversation-next,
:root[data-theme="dark"] .task-detail p{color:#c1cedd}
:root[data-theme="dark"] .trend-grid{stroke:#3d4f64}
:root[data-theme="dark"] .trend-label{fill:#a9b8c9}
:root[data-theme="dark"] .trend-dot,
:root[data-theme="dark"] .comparison-point{stroke:#172333}
:root[data-theme="dark"] .trend-dates,
:root[data-theme="dark"] .trend-legend{color:#a9b8c9}
:root[data-theme="dark"] .theme-toggle{background:#223249;color:#edf4ff;border-color:#526a84;box-shadow:0 5px 24px #0008}
:root[data-theme="dark"] .theme-toggle:hover{background:#2b405c;color:#fff;border-color:#8ab4ff}

@media(max-width:650px){.theme-toggle{right:12px;bottom:12px;min-width:90px}}
@media(prefers-reduced-motion:no-preference){.theme-toggle{transition:background-color .15s,color .15s,border-color .15s,transform .15s}.theme-toggle:active{transform:scale(.97)}}
