/* The application uses one dark palette on every page. */
:root{color-scheme:dark}
@media(max-width:767px){.desktop-arrow{display:none}body[data-page="workspace"] summary{list-style:none}body[data-page="workspace"] summary::-webkit-details-marker{display:none}}
.nav-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
@media(max-width:380px){.nav-inner .brand{font-size:18px;gap:6px}.nav-actions{gap:8px}.nav-actions .text-link{font-size:13px}.nav-actions .nav-login{padding-inline:10px;gap:8px}}
html[data-theme="dark"]{color-scheme:dark;--bg:#15181e;--g-main:#15181e;--g-alt:#242c38;--ink:#edf0f6;--muted:#aab4c4;--line:#394251;--action:#8dacff;--action-gradient:#4369d4;--theme-surface:#1c222c;--theme-sidebar:#11151b;--theme-hover:#242c38;--theme-selected:#28354e;--theme-danger:#ffb1b9;--theme-danger-bg:#361f29;--theme-danger-line:#935563}
html[data-theme="dark"] body[data-page="workspace"]{--ink:inherit;--muted:inherit;--line:inherit;--action-gradient:inherit;background:var(--bg)}
html[data-theme="dark"] .nav,html[data-theme="dark"] .chat-main{background:var(--bg);border-color:var(--line)}
html[data-theme="dark"] .hero{background:linear-gradient(155deg,#15181e 40%,#192233 65%,#20304b 100%)}
html[data-theme="dark"] .login-page{background:linear-gradient(145deg,#15181e 35%,#1a263d 100%)}
html[data-theme="dark"] .workflow,html[data-theme="dark"] footer,html[data-theme="dark"] .project-sidebar,html[data-theme="dark"] .projects-dialog{background:var(--theme-sidebar)}
html[data-theme="dark"] .composer,html[data-theme="dark"] .chat-composer,html[data-theme="dark"] .workspace-dialog,html[data-theme="dark"] #delete-dialog{background:var(--theme-surface);border-color:var(--line);color:var(--ink);box-shadow:0 8px 32px #00000018}
html[data-theme="dark"] .composer:focus-within,html[data-theme="dark"] .chat-composer:focus-within{border-color:#8dacff;box-shadow:0 0 0 3px #8dacff20}
html[data-theme="dark"] input,html[data-theme="dark"] textarea{background:var(--theme-surface);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .composer textarea,html[data-theme="dark"] .chat-composer textarea,html[data-theme="dark"] .chat-composer input{background:transparent}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#99a6b9;opacity:1}
html[data-theme="dark"] input:-webkit-autofill{-webkit-text-fill-color:var(--ink);box-shadow:0 0 0 1000px var(--theme-surface) inset}
html[data-theme="dark"] .suggestions button,html[data-theme="dark"] .tool-button,html[data-theme="dark"] .icon-button,html[data-theme="dark"] .new-messages{background:var(--theme-surface);border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .new-project{background:var(--theme-surface)!important}
html[data-theme="dark"] .suggestions button:hover,html[data-theme="dark"] .tool-button:hover:not(:disabled):not([aria-disabled="true"]),html[data-theme="dark"] .icon-button:hover:not(:disabled),html[data-theme="dark"] .chat-project:hover{background:var(--theme-hover)}
html[data-theme="dark"] .chat-project[aria-current="page"]{background:var(--theme-selected)}
html[data-theme="dark"] .message-user{background:#252d39}
html[data-theme="dark"] .chat-proposal{border-color:#566c9e}
html[data-theme="dark"] .job-result{background:#1b2029;border-color:var(--line)}
html[data-theme="dark"] .job-result[data-status="failed"]{background:var(--theme-danger-bg);border-color:var(--theme-danger-line)}
html[data-theme="dark"] .form-error{background:var(--theme-danger-bg);color:var(--theme-danger)}
html[data-theme="dark"] .danger-button{background:var(--theme-surface);border-color:var(--theme-danger-line);color:var(--theme-danger)}
html[data-theme="dark"] .danger-button:hover:not(:disabled){background:var(--theme-danger-bg);border-color:var(--theme-danger)}
html[data-theme="dark"] .stage-note,html[data-theme="dark"] .scroll-link,html[data-theme="dark"] .step-number,html[data-theme="dark"] .composer-hint{color:var(--muted)}
html[data-theme="dark"] .button.primary,html[data-theme="dark"] .chat-shell .button.primary,html[data-theme="dark"] .workspace-dialog .button.primary,html[data-theme="dark"] .send-button{background:#4369d4!important;color:#fff;box-shadow:none!important}
html[data-theme="dark"] .button.primary:hover,html[data-theme="dark"] .chat-shell .button.primary:hover,html[data-theme="dark"] .workspace-dialog .button.primary:hover,html[data-theme="dark"] .send-button:hover:not(:disabled){background:#3d60c3!important}
html[data-theme="dark"] .send-button:disabled{background:#303a4a!important;color:#aab4c4}
html[data-theme="dark"] .workspace-dialog::backdrop,html[data-theme="dark"] .projects-dialog::backdrop,html[data-theme="dark"] #delete-dialog::backdrop{background:#05080dc9}
html[data-theme="dark"] :focus-visible{outline-color:#9cb6ff}
html[data-theme="dark"] .skip:focus{background:var(--theme-surface)}
html[data-theme="dark"] ::selection{background:#3e5683;color:#fff}

/* Keep native scrolling with a slim, rounded thumb and no contrasting track. */
:root{--scrollbar-thumb:#abb3c0;--scrollbar-hover:#7e8a9b}
html[data-theme="dark"]{--scrollbar-thumb:#485464;--scrollbar-hover:#6b7b90;--composer-focus:#8dacff}
html,*{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) transparent}
@supports selector(::-webkit-scrollbar){
  html,*{scrollbar-width:auto;scrollbar-color:auto}
  ::-webkit-scrollbar{width:10px;height:10px}
  ::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:transparent}
  ::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border:2px solid transparent;background-clip:padding-box;border-radius:10px}
  ::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-hover)}
  ::-webkit-scrollbar-button{display:none;width:0;height:0}
}
@media(forced-colors:active){
  html,*{scrollbar-width:auto;scrollbar-color:auto}
  ::-webkit-scrollbar,::-webkit-scrollbar-track,::-webkit-scrollbar-corner,::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-button{all:revert}
}
