.topbar-actions{display:flex;align-items:center;gap:10px;min-width:0}
.bridge-status{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:13px 0 9px;border-bottom:1px solid #dce6e1;font-size:12px;color:#60746b}.bridge-status strong{font-size:13px;color:#26443a}.bridge-indicator{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#899892}.bridge-status.online .bridge-indicator{background:#19a66e}.bridge-status.offline .bridge-indicator{background:#d39827}.cluster-route-switch{display:inline-flex;align-items:center;border:1px solid #cbd7d3;border-radius:5px;overflow:hidden;flex:0 0 auto}.cluster-route-option{height:34px;padding:0 9px;border:0;background:transparent;color:#4a6559;font-size:12px;white-space:nowrap}.cluster-route-option+.cluster-route-option{border-left:1px solid #cbd7d3}.cluster-route-option.active{background:#dcefe6;color:#145b45;font-weight:700}.cluster-route-option:hover:not(.active):not(:disabled){background:#eef6f2}.cluster-test{min-height:34px;padding:0 10px;font-size:12px}.cluster-test .lucide{width:14px;height:14px}
@media(max-width:1040px){.cluster-row{grid-template-columns:30px minmax(0,1fr)}.cluster-actions{grid-column:2;flex-wrap:wrap;padding-bottom:10px}}
@media(max-width:480px){.cluster-actions{gap:6px}.cluster-route-switch{width:100%}.cluster-route-option{flex:1}.cluster-actions .secondary{margin-right:0}}
.theme-toggle{width:36px;height:36px;flex:0 0 36px;border:1px solid #d7e3dd;color:#31584a}
.theme-toggle:focus-visible{outline:2px solid #147963;outline-offset:2px}
@media(max-width:720px){.topbar-actions{gap:6px}.topbar-actions .status-pill{max-width:150px;overflow:hidden;text-overflow:ellipsis}.theme-toggle{width:34px;height:34px;flex-basis:34px}}

html[data-theme="dark"]{color-scheme:dark;background:#141c1a;color:#e5eee9}
html[data-theme="dark"] .auth-screen,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .chat-view,
html[data-theme="dark"] .chat-active,
html[data-theme="dark"] .messages,
html[data-theme="dark"] .content-view{background:#19221f;color:#e5eee9}
html[data-theme="dark"] .auth-form,
html[data-theme="dark"] .topbar{background:#202b27;border-color:#35453d;box-shadow:none}
html[data-theme="dark"] .auth-brand{color:#d5eade}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .sidebar-footer{background:#111a17;border-color:#304238}
html[data-theme="dark"] .sidebar nav{border-color:#304238}
html[data-theme="dark"] .nav-button,
html[data-theme="dark"] .conversation-button{color:#c2d4c9}
html[data-theme="dark"] .nav-button:hover,
html[data-theme="dark"] .conversation-button:hover,
html[data-theme="dark"] .sidebar .icon-button:hover{background:#294336;color:#f5faf7}
html[data-theme="dark"] .nav-button.active,
html[data-theme="dark"] .conversation-button.active{background:#24523f;color:#fff}
html[data-theme="dark"] .muted,
html[data-theme="dark"] .side-heading,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .cluster-row small,
html[data-theme="dark"] .cluster-row .number{color:#a9c1b3}
html[data-theme="dark"] .chat-context{background:#202b27;border-color:#35453d}
html[data-theme="dark"] .cluster-report{border-color:#35453d;background:#222d29}
html[data-theme="dark"] .cluster-report.healthy{background:#193629}
html[data-theme="dark"] .cluster-report.warning{background:#3a301e}
html[data-theme="dark"] .cluster-report.critical{background:#422523}
html[data-theme="dark"] .cluster-report.unknown{background:#272f2c}
html[data-theme="dark"] .report-status small,
html[data-theme="dark"] .report-metric span,
html[data-theme="dark"] .report-headline{color:#c0d0c5}
html[data-theme="dark"] .cluster-report.warning .report-headline{color:#f2d19a}
html[data-theme="dark"] .cluster-report.critical .report-headline{color:#ffb4aa}
html[data-theme="dark"] .report-metric{border-color:#4a5b50}
html[data-theme="dark"] .message.assistant{color:#e5eee9}
html[data-theme="dark"] .message.user{background:#244438;border-color:#37634d;color:#f0f8f3}
html[data-theme="dark"] .message.notice{background:#29372c;border-color:#709b72;color:#e3efdf}
html[data-theme="dark"] .message.error{background:#402422;border-color:#a95b55;color:#ffd0c9}
html[data-theme="dark"] .message.evidence,
html[data-theme="dark"] .evidence-group,
html[data-theme="dark"] .tool-details summary{color:#afc9bb}
html[data-theme="dark"] .evidence-group[open],
html[data-theme="dark"] .message.evidence{border-color:#597f69}
html[data-theme="dark"] .message.assistant code{background:#2e4036;color:#e4f4e9}
html[data-theme="dark"] .message.assistant pre,
html[data-theme="dark"] .tool-result{background:#25322d;border-color:#3d5145;color:#dcece1}
html[data-theme="dark"] .message.assistant pre code{background:transparent;color:inherit}
html[data-theme="dark"] .message.assistant a,
html[data-theme="dark"] .device-flow a,
html[data-theme="dark"] .port-forward a{color:#81d8b2}
html[data-theme="dark"] .composer,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{background:#26332e;border-color:#486054;color:#edf5ef}
html[data-theme="dark"] .composer textarea{background:transparent}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#a8bdb0}
html[data-theme="dark"] .composer:focus-within,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{border-color:#69bc92;box-shadow:0 0 0 3px #69bc922b}
html[data-theme="dark"] .primary,
html[data-theme="dark"] .send-button{background:#188562;border-color:#188562;color:#fff}
html[data-theme="dark"] .primary:hover,
html[data-theme="dark"] .send-button:hover{background:#209a73}
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .upload-control,
html[data-theme="dark"] .jump-latest,
html[data-theme="dark"] .code-copy{background:#26372e;border-color:#496453;color:#d9f2e1}
html[data-theme="dark"] .secondary:hover,
html[data-theme="dark"] .upload-control:hover,
html[data-theme="dark"] .jump-latest:hover,
html[data-theme="dark"] .code-copy:hover{background:#345343}
html[data-theme="dark"] .topbar .icon-button:hover{background:#345044}
html[data-theme="dark"] .theme-toggle{border-color:#496453;color:#e5d591}
html[data-theme="dark"] .status-pill{background:#483b25;color:#f1d69d}
html[data-theme="dark"] .status-pill.connected{background:#244a37;color:#b7ebcc}
html[data-theme="dark"] .notice,
html[data-theme="dark"] .chat-provider-notice{background:#3c321f;border-color:#625335;color:#f2d49a}
html[data-theme="dark"] .approval,
html[data-theme="dark"] .knowledge-draft,
html[data-theme="dark"] .device-flow,
html[data-theme="dark"] .port-forward{background:#21382b;border-color:#4a7657;color:#e4efe6;box-shadow:none}
html[data-theme="dark"] .approval strong,
html[data-theme="dark"] .approval .muted{color:#c6e5ce}
html[data-theme="dark"] .approval.expired{background:#3b311f;border-color:#9c7940}
html[data-theme="dark"] .approval.expired strong{color:#f1d49a}
html[data-theme="dark"] .approval.destructive{background:#402523;border-color:#a8534f}
html[data-theme="dark"] .approval.destructive strong{color:#ffbbb2}
html[data-theme="dark"] .approval.high-risk{background:#3b311f;border-color:#b88640}
html[data-theme="dark"] .approval .manifest-resource{border-color:#42604e}
html[data-theme="dark"] .manifest-details summary{color:#b8e0c4}
html[data-theme="dark"] .manifest-details pre{background:#172a20;border-color:#41664d;color:#e4efe6}
html[data-theme="dark"] .knowledge-entry,
html[data-theme="dark"] .provider-account,
html[data-theme="dark"] .inline-toolbar,
html[data-theme="dark"] .cluster-row,
html[data-theme="dark"] .import-section{border-color:#35483d}
html[data-theme="dark"] .provider-state{color:#b7c7bc}
html[data-theme="dark"] .provider-state.connected{color:#88d8ab}
html[data-theme="dark"] .provider-state.active{background:#244a37;color:#c9efd7}
html[data-theme="dark"] .cluster-actions .icon-button{color:#aed3bd}
html[data-theme="dark"] .cluster-actions .icon-button.danger{color:#ffa39b}
html[data-theme="dark"] .cluster-actions .icon-button.danger:hover{background:#50302c}
html[data-theme="dark"] .bridge-status{border-color:#35483d;color:#b0c4b7}
html[data-theme="dark"] .bridge-status strong{color:#e5eee9}
html[data-theme="dark"] .cluster-route-switch,html[data-theme="dark"] .cluster-route-option+.cluster-route-option{border-color:#51695c}
html[data-theme="dark"] .cluster-route-option{color:#c5d9ca}
html[data-theme="dark"] .cluster-route-option.active{background:#285b49;color:#fff}
html[data-theme="dark"] .cluster-route-option:hover:not(.active):not(:disabled){background:#30453a}
html[data-theme="dark"] .messages{scrollbar-color:#546e5c #202b26}
html[data-theme="dark"] .messages::-webkit-scrollbar-track{background:#202b26}
html[data-theme="dark"] .messages::-webkit-scrollbar-thumb{background:#546e5c;border-color:#202b26}
html[data-theme="dark"] .chat-route{border-color:#4e6357;color:#b6c9bc}
html[data-theme="dark"] .chat-route.windows{background:#244b39;border-color:#3d7e5b;color:#bce9cc}
html[data-theme="dark"] .backup-points,html[data-theme="dark"] .backup-point{border-color:#35483d}
html[data-theme="dark"] .backup-point time{color:#adbeaf}
html[data-theme="dark"] .backup-status.complete{color:#93d9ae}
html[data-theme="dark"] .backup-status.failed{color:#ffaaa2}
