.theme-switch{display:flex;align-items:center;gap:2px;border:1px solid var(--line);border-radius:5px;padding:2px;flex-shrink:0;height:34px;background:#eef2ef}
.theme-switch button{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:3px;background:transparent;color:#7d8c82}
.theme-switch button svg{width:15px;height:15px}
.theme-switch button:hover{color:#365d47;background:#e0e9e3}
.theme-switch button[aria-pressed="true"]{background:#fff;color:#286547;box-shadow:0 1px 3px #182a1e12}

html[data-theme="dark"]{color-scheme:dark;color:#e6eeee;background:#111617;--green:#b6df66;--line:#354143;--muted:#a1b0b1;--blue:#53cddd;--surface:#1a2021;--raised:#273233;--subsurface:#151b1c}
html[data-theme="dark"] .topbar{background:#151b1c;border-color:var(--line)}
html[data-theme="dark"] .brand-icon{background:#2a4033;color:#8dd4ac}
html[data-theme="dark"] .brand-divider{color:#63766a}
html[data-theme="dark"] .monitor-link{color:#b1c7ba}
html[data-theme="dark"] .eyebrow{color:#9bb09f}
html[data-theme="dark"] .connection{color:#adbbb1}
html[data-theme="dark"] .section-label h2{color:#b4c7b9}
html[data-theme="dark"] .button{background:var(--raised);border-color:#46574b;color:#e2e8e3}
html[data-theme="dark"] .button:hover{background:#38483c}
html[data-theme="dark"] .button.quiet{background:transparent;border-color:transparent}
html[data-theme="dark"] .button.quiet:hover{background:var(--raised)}
html[data-theme="dark"] .button.primary{background:#2b7657;border-color:#4b9874;color:#fff}
html[data-theme="dark"] .button.primary:hover{background:#358765}
html[data-theme="dark"] .button.danger{background:#963f3c;border-color:#b86761;color:#fff}
html[data-theme="dark"] .icon-button{color:#a0b4a7}
html[data-theme="dark"] .icon-button:hover{background:#344237;color:#deede2}
html[data-theme="dark"] .theme-switch{background:#19221c}
html[data-theme="dark"] .theme-switch button{color:#9bae9f}
html[data-theme="dark"] .theme-switch button:hover{background:#2e4033;color:#d7e9dc}
html[data-theme="dark"] .theme-switch button[aria-pressed="true"]{background:#3b5142;color:#b1f0c9;box-shadow:none}
html[data-theme="dark"] .machine,html[data-theme="dark"] .catalog-item{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .machine-name>svg{color:#9db5a5}
html[data-theme="dark"] .machine-name small,html[data-theme="dark"] .metric-label{color:#a0b3a5}
html[data-theme="dark"] .metric-value small{color:#a5b7ab}
html[data-theme="dark"] .meter{background:#354139}
html[data-theme="dark"] .meter span{background:#6cb38c}
html[data-theme="dark"] .meter.memory span{background:#83aace}
html[data-theme="dark"] .machine-foot{background:var(--subsurface);border-color:var(--line);color:#a0b6a7}
html[data-theme="dark"] .skeleton{background:#28322b}
html[data-theme="dark"] .badge{color:#9bd8b5;background:#284636}
html[data-theme="dark"] .badge.busy,html[data-theme="dark"] .badge.running,html[data-theme="dark"] .badge.preparing,html[data-theme="dark"] .badge.analyzing,html[data-theme="dark"] .badge.collecting{color:#a9cfee;background:#2c3e4c}
html[data-theme="dark"] .badge.offline,html[data-theme="dark"] .badge.cancelled{color:#b2bcb5;background:#353e37}
html[data-theme="dark"] .badge.queued,html[data-theme="dark"] .badge.waiting_gpu,html[data-theme="dark"] .badge.dispatching{color:#e8ca8a;background:#4b4028}
html[data-theme="dark"] .badge.failed,html[data-theme="dark"] .badge.unknown{color:#efb0a6;background:#503532}
html[data-theme="dark"] .tab{color:#9eb3a4}
html[data-theme="dark"] .tab.active{color:#a3dbb9;border-bottom-color:#7abe98}
html[data-theme="dark"] .count{color:#bdcfbf;background:#334037}
html[data-theme="dark"] .check-label{color:#abbdae}
html[data-theme="dark"] .search,html[data-theme="dark"] select{background:var(--surface);border-color:#455349;color:#dbe5dd}
html[data-theme="dark"] .search svg{color:#96ad9c}
html[data-theme="dark"] input::placeholder{color:#8b9e90}
html[data-theme="dark"] .job-meta,html[data-theme="dark"] .job-machine,html[data-theme="dark"] .job-machine small,html[data-theme="dark"] .progress-text{color:#a0b4a6}
html[data-theme="dark"] .job-meta .meta-dot{color:#718578}
html[data-theme="dark"] .progress-mini{background:#354238}
html[data-theme="dark"] .progress-mini span{background:#82b1d4}
html[data-theme="dark"] .empty-state>svg{color:#7f9c89}
html[data-theme="dark"] .empty-state span{color:#9db4a3}
html[data-theme="dark"] .tiny-label{color:#a7c1ae;border-color:#455b4b}
html[data-theme="dark"] .field,html[data-theme="dark"] .mode-field legend{color:#b1c7b8}
html[data-theme="dark"] .field>input,html[data-theme="dark"] .field>select,html[data-theme="dark"] .unit-input{background:var(--surface);border-color:#45584b;color:#e1e9e3}
html[data-theme="dark"] .field input::placeholder{color:#8c9f91}
html[data-theme="dark"] .field input[type=file]::file-selector-button{background:#35483b;color:#c0ddc9}
html[data-theme="dark"] .unit-input span{color:#a3b7a8}
html[data-theme="dark"] .segmented{background:#202c24}
html[data-theme="dark"] .segmented label span,html[data-theme="dark"] .auth-tabs button{color:#a6bbac}
html[data-theme="dark"] .segmented input:checked+span,html[data-theme="dark"] .auth-tabs button.selected{background:#3a5040;color:#d3ecdb;box-shadow:none}
html[data-theme="dark"] .file-drop{background:#1d2821;border-color:#52705c}
html[data-theme="dark"] .file-drop:hover,html[data-theme="dark"] .file-drop.dragging{background:#2b4132;border-color:#7ca68b}
html[data-theme="dark"] .upload-icon{color:#91bd9e}
html[data-theme="dark"] .file-drop strong{color:#bbd5c3}
html[data-theme="dark"] .submission-summary{color:#a1b6a8}
html[data-theme="dark"] .submission-summary>span:first-child{color:#b1cebb}
html[data-theme="dark"] .notice,html[data-theme="dark"] .form-error{background:#442f2b;border-color:#7e5047;color:#f1bbae}
html[data-theme="dark"] .catalog-icon{background:#2f424f;color:#a0c2df}
html[data-theme="dark"] .catalog-meta{color:#a6bcac}
html[data-theme="dark"] footer{color:#9bb4a3}
html[data-theme="dark"] .footer-divider{color:#637e6b}
html[data-theme="dark"] dialog{background:var(--surface);border-color:#4a5e50;color:#e2e8e3;box-shadow:0 20px 90px #0008}
html[data-theme="dark"] dialog::backdrop{background:#060d09ad}
html[data-theme="dark"] .fact small{color:#a4bcab}
html[data-theme="dark"] .stage{color:#91a89a;border-color:#3c4d41}
html[data-theme="dark"] .stage.current{color:#a3dfb9;border-color:#79c497}
html[data-theme="dark"] .stage.passed{color:#b0ccb9;border-color:#658f73}
html[data-theme="dark"] .log{background:#18241c;border-color:#3d5745;color:#bfd5c6}
html[data-theme="dark"] .detail-note{color:#b4cbbb}
html[data-theme="dark"] .figure-item a,html[data-theme="dark"] .figure-item img{background:#fff}
html[data-theme="dark"] .figure-item figcaption{background:var(--subsurface);color:#b4cabd}
html[data-theme="dark"] .file-row>svg,html[data-theme="dark"] .file-size{color:#a4c1af}
html[data-theme="dark"] .confirm-dialog p{color:#b5cabb}
html[data-theme="dark"] .toast{background:#375a44;color:#edf9f0;box-shadow:0 5px 25px #0006}
html[data-theme="dark"] :focus-visible{outline-color:#8ed7ae}

@media(max-width:470px){.topbar{height:auto;flex-wrap:wrap;gap:10px;padding-top:12px;padding-bottom:12px}.topbar .brand{flex-basis:100%}.top-actions{width:100%;gap:7px}.theme-switch{margin-right:auto}}
