:root{color-scheme:dark}dialog{background:var(--paper);color:var(--ink)}.stock-picker-content{background:var(--paper)}input,select,textarea{color-scheme:inherit}.theme-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);background:var(--paper);border-radius:6px}.theme-switch button{display:grid;place-items:center;width:32px;height:30px;padding:0;background:transparent;color:var(--muted)}.theme-switch .icon{width:17px;height:17px}.theme-switch button.active{background:#21354a;color:#c3e5ef}.mail-recipients textarea{color-scheme:inherit}#mail-dialog,#quote-dialog,#detail{background:var(--paper)}
:root[data-theme="light"]{color-scheme:light;--bg:#f5f7fa;--paper:#fff;--ink:#223248;--muted:#5f7189;--line:#e2e8f0;--accent:#375a83;--navy:#15263e}
[data-theme="light"] ::selection{background:#d6e3f3;color:#20354f}
[data-theme="light"] .rail{background:var(--navy);color:#e5edf8}[data-theme="light"] .brand-mark{background:#253d5c;border-color:#435c7b;color:#e7edf7;box-shadow:none}[data-theme="light"] .nav{color:#afc0d8}[data-theme="light"] .nav.selected{background:#2c4361;color:#f2f6fd;border-color:transparent}[data-theme="light"] .rail-bottom{color:#afc0d8}[data-theme="light"] .local-dot{background:#a9c6e6}
[data-theme="light"] .primary{background:#375a83;color:white;border-color:#31537a}[data-theme="light"] .secondary{background:white;color:#48617f;border-color:#d3ddea}[data-theme="light"] .text-button{color:#486b95}[data-theme="light"] .panel{background:white;box-shadow:none}[data-theme="light"] .stock-picker-content{background:white;border-color:#d5dfea;box-shadow:0 9px 28px #1b335018}
[data-theme="light"] input,[data-theme="light"] select,[data-theme="light"] .mail-recipients textarea{background:white;color:#3b5473;border-color:#d7e1ed}[data-theme="light"] input::placeholder,[data-theme="light"] textarea::placeholder{color:#65778e}[data-theme="light"] .config-field input{background:#fcfdff}
[data-theme="light"] .stats strong,[data-theme="light"] .live-summary strong,[data-theme="light"] .portfolio-summary strong{color:#2d4766}[data-theme="light"] .stats article>span,[data-theme="light"] .live-summary span,[data-theme="light"] .portfolio-summary span,[data-theme="light"] #clock{color:var(--muted)}
[data-theme="light"] .mode-label{color:#586e8a;background:#edf1f6;border-color:#dce3ed}[data-theme="light"] .market-scope{color:#7c6739;background:#f8f3e8;border-color:#e5d8b9}
[data-theme="light"] .table-tools .tabs{border-color:#e6ebf2}[data-theme="light"] .tabs{background:#f0f3f7}[data-theme="light"] .tab{color:#62768f}[data-theme="light"] .tab.active{background:white;color:#375779}[data-theme="light"] th{background:#f8fafe;color:#5f738d;border-color:var(--line)}[data-theme="light"] td{border-color:#eaf0f6}[data-theme="light"] td strong,[data-theme="light"] .stock-quote-button{color:#2b435f}
[data-theme="light"] .badge{color:#5e738c;background:#eef2f7}[data-theme="light"] .badge.pass{color:#3e7057;background:#edf4f0}[data-theme="light"] .badge.fail{color:#8e6236;background:#faf1e8}[data-theme="light"] .badge.hit{color:#3d64a0;background:#eaf1fc}[data-theme="light"] .badge.ban{color:#a5685b;background:#faeeec}
[data-theme="light"] #notice{background:#fff9ee;border-color:#eadfc9;color:#8a6837}[data-theme="light"] .config-field label,[data-theme="light"] .backtest-controls>label,[data-theme="light"] .data-options,[data-theme="light"] .broker-controls,[data-theme="light"] .mail-fields>label,[data-theme="light"] .mail-actions,[data-theme="light"] .mail-recipients>label{color:#536c89}
[data-theme="light"] .reason-row{color:#526e8e;border-color:#eaf0f6}[data-theme="light"] .reason-row strong{color:#38597f}[data-theme="light"] .signal-item{border-color:#eaf0f6}[data-theme="light"] .signal-item p{color:var(--muted)}[data-theme="light"] .check-row{color:#536d8f;border-color:#eaf0f6}
[data-theme="light"] .quote-summary>strong{color:#223248}[data-theme="light"] .quote-summary>span{color:#52779b}[data-theme="light"] .quote-summary>div{color:var(--muted)}[data-theme="light"] .strategy-options>summary,[data-theme="light"] .broker-panel>summary{color:#3b5473}[data-theme="light"] .theme-switch button.active{background:#e8eef7;color:#375779}[data-theme="light"] .table-scroll{scrollbar-color:#cdd8e5 transparent}
@media(hover:hover) and (pointer:fine){[data-theme="light"] .nav:hover{background:#243b59;color:#e9f0fa}[data-theme="light"] .primary:hover{background:#2c4d74}[data-theme="light"] .secondary:hover{background:#f7faff;border-color:#b7c8df}[data-theme="light"] .text-button:hover,[data-theme="light"] .tab:hover{background:#f0f5fb;color:#3c5e87}[data-theme="light"] tbody tr:hover{background:#f7faff}[data-theme="light"] .stock-quote-button:hover{color:#486b95}}
@media(max-width:767px){.header-right{flex-direction:row;flex-wrap:wrap;justify-content:flex-end;gap:7px 9px;max-width:170px}#clock{order:3;flex-basis:100%;text-align:right}.theme-switch button{width:32px;height:32px}.theme-switch{padding:2px}.mode-label{font-size:10px}.mail-actions .primary,.mail-actions .secondary{min-height:37px}}
#sector-dialog{background:var(--paper);color:var(--ink)}[data-theme="light"] .rise{color:#b65b61}[data-theme="light"] .fall{color:#3c8b70}[data-theme="light"] .market-breadth>div:first-child strong,[data-theme="light"] .market-breadth>div:nth-child(4) strong{color:#b65b61}[data-theme="light"] .market-breadth>div:nth-child(2) strong,[data-theme="light"] .market-breadth>div:nth-child(5) strong{color:#3c8b70}[data-theme="light"] .sector-button:hover{color:#486b95}
