:root { color-scheme: light; }
.theme-toggle { display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;border:1px solid var(--line);border-radius:9px;background:transparent;color:var(--ink); }
.theme-toggle:hover { background:var(--sage); }
.theme-sun { display:none; }
html[data-theme="dark"] .theme-moon { display:none; }
html[data-theme="dark"] .theme-sun { display:block; }
/* Warm charcoal surfaces match NEWCP's dark palette. */
html[data-theme="dark"] {
  color-scheme:dark; --paper:#231f1f; --white:#302d2d; --ink:#f0eeee; --muted:#b7b2b2;
  --line:rgba(255,255,255,.16); --sage:#393636; --lime:#46513d;
  --green:#b9cda3; --green-dark:#cbdcb9;
  --panel:#302d2d; --field:#393636; --head:#413e3e;
}
html[data-theme="dark"] :is(.app-shell,.workspace-main,.chat-panel) { background:var(--paper); }
html[data-theme="dark"] :is(.sidebar,.chat-list,.workspace-top,.top-nav) { background:#292525; }
html[data-theme="dark"] :is(.transfer-card,.auth-card,.download-card,.workspace-tile,.transfer-row,.task-row,.board-card,.member-card,.paper,dialog,.attachment,.composer) { background:var(--panel);border-color:var(--line);box-shadow:none; }
html[data-theme="dark"] :is(input,textarea,select,.copy-box input) { background:var(--field);border-color:var(--line);color:var(--ink); }
html[data-theme="dark"] .composer textarea { background:transparent; }
html[data-theme="dark"] :is(input,textarea)::placeholder { color:#a9a3a3; }
html[data-theme="dark"] :is(.card-tabs,.view-tabs,.board-column,.quiet-banner,.chat-tip,.save-prompt,.demo-box,.workspace-switch,.file-icon,.selected-file button) { background:var(--field);border-color:var(--line); }
html[data-theme="dark"] :is(.card-tabs .selected,.view-tabs .active,.task-table-head,.files-table-head) { background:var(--head);color:var(--ink);box-shadow:none; }
html[data-theme="dark"] :is(.drop-zone,.add-tile) { background:#343130;border-color:#686960; }
html[data-theme="dark"] :is(.drop-zone:hover,.drop-zone.dragging) { background:#404039;border-color:#b9cda3; }
html[data-theme="dark"] :is(.outline,.send-shortcut,.feature-icon,.task-check,.orbit,.composer-bottom,.chat-header,.chat-tip,.file-row,.task-row,.add-task-row) { border-color:var(--line); }
html[data-theme="dark"] :is(.outline:hover,.task-row:hover,.add-task-row:hover,.side-nav a:hover,.chat-link:hover,.attachment:hover,.workspace-tile:hover) { background:#3c3838;border-color:#6f7469; }
html[data-theme="dark"] :is(.side-nav a.active,.chat-link.selected) { background:#41473c;color:#d9e9c7; }
html[data-theme="dark"] :is(.workspace-symbol,.workspace-symbol.small,.channel-icon,.success-icon,.tag,.task-check.checked,.side-nav a small,.round-check,.file-mini) { background:#424b3b;color:#d0dfbd;border-color:#59634f; }
html[data-theme="dark"] .primary { background:#b9cda3;color:#242b21; }
html[data-theme="dark"] .primary:hover { background:#ccdfb7; }
html[data-theme="dark"] :is(.brand-n,.text-link,.context-link,.space-nav a.current,.top-nav nav a.active,.top-nav nav a:hover,.dashboard-tabs .active) { color:#c2d6ac; }
html[data-theme="dark"] :is(.eyebrow,.top-nav nav,.free-pill,.hero-copy>p,.hero-proof,.drop-zone p,.upload-limit,.transfer-foot,.bottom-intro p,.feature p,.home-footer,.legal-page p,.tile-footer,.workspace-switch small,.workspace-switch>span:last-child,.sidebar-label,.side-nav a,.space-nav a,.send-shortcut,.storage>div,.storage small,.account small,.breadcrumb a,.breadcrumb>span,.chat-link,.chat-link small,.chat-tip b,.chat-tip p,.chat-header p,.chat-welcome h3,.chat-welcome p,.date-divider,.message-meta time,.message-content>p,.attachment small,.attachment>span:last-child,.composer-bottom .small-text,.attach-button,.chat-footer,.chat-files-preview,.view-tabs button,.assignee,.priority,.add-task-row,.table-foot,.file-name small,.member-card p,.mini-label,.paper-back>span,.paper-front small,.floating-note,.icon-button) { color:var(--muted); }
html[data-theme="dark"] :is(.tiny-star,.spark,.feature-icon,.file-icon,.check-circle,.chat-tip>span,.chat-welcome>span) { color:#bccca9; }
html[data-theme="dark"] .avatar { background:#454d3e;color:#dfebd3; }
html[data-theme="dark"] .tone-1 { background:#59473a;color:#efccb0; }
html[data-theme="dark"] .tone-2 { background:#3c4857;color:#c7d7ed; }
html[data-theme="dark"] .tone-3 { background:#514253;color:#e4cbe8; }
html[data-theme="dark"] .avatar-stack .avatar { border-color:#292525; }
html[data-theme="dark"] .status { background:#454141;color:#ded9d9; }
html[data-theme="dark"] .status.progress { background:#54482e;color:#efd28a; }
html[data-theme="dark"] .status.done { background:#3d4d36;color:#c8dfa9; }
html[data-theme="dark"] .priority.high { color:#e8b59c; }
html[data-theme="dark"] .form-error { color:#f2aa9c; }
html[data-theme="dark"] .google-g { color:#91b9ed; }
html[data-theme="dark"] .message:target { background:#434d36;box-shadow:0 0 0 10px #434d36; }
html[data-theme="dark"] .date-divider:before, html[data-theme="dark"] .date-divider:after { background:var(--line); }
html[data-theme="dark"] progress::-webkit-progress-bar { background:#454141; }
html[data-theme="dark"] progress::-webkit-progress-value { background:#b9cda3; }
html[data-theme="dark"] progress::-moz-progress-bar { background:#b9cda3; }
html[data-theme="dark"] dialog::backdrop { background:#0009; }
html[data-theme="dark"] #toast { background:#484f40;color:#f0f4eb;border:1px solid #69745b; }
@media(max-width:800px) { .nav-end { gap:12px; } }
@media(max-width:640px) { .nav-end { gap:8px; }.theme-toggle { width:32px;height:32px; }.top-members { gap:8px; } }
html[data-theme="dark"] .mobile-chat-picker { background:#292525; }
html[data-theme="dark"] .mobile-chat-picker label { color:var(--muted); }
