/* A single palette drives the interface and the canvas in every appearance mode. */
body{--chart-bg:#202a3e;--chart-grid:#ffffff16;--chart-axis:#aab7cc;--chart-map:#91a6c042;--chart-line:#dce5f2;--chart-up:#35bd74;--chart-down:#df5b51;--chart-trend:#f3be55;--chart-ma:#f2bc56;--chart-price-line:#acb9ce80}
body[data-theme="dark"]{--bg:#192235;--panel:#202b40;--panel2:#2a364e;--line:#3a4964;--text:#edf2fa;--muted:#9cabc2}
body[data-theme="graphite"]{--bg:#000000;--panel:#060606;--panel2:#121212;--line:#292929;--text:#f0f0f0;--muted:#a7a7a7;--chart-bg:#000000;--chart-grid:#ffffff10;--chart-axis:#b8b8b8;--chart-map:#ffffff30;--chart-up:#27c193;--chart-down:#ed5e6d;--chart-line:#eff3fa}
body[data-theme="orange"]{--bg:#1c1815;--panel:#27211b;--panel2:#342c23;--line:#514334;--text:#f7eee2;--muted:#c0aa92;--chart-bg:#201b16;--chart-grid:#e6c79b19;--chart-axis:#c8b396;--chart-map:#c9a36b40;--chart-up:#d5a451;--chart-down:#df6554;--chart-line:#efba68;--chart-trend:#f2d49c;--chart-ma:#d1b5ed;--chart-price-line:#d6b78580}
body[data-theme="light"]{--bg:#edf1f6;--panel:#ffffff;--panel2:#e9eef5;--line:#c8d1de;--text:#25334a;--muted:#5e6f86;--chart-bg:#f8fafc;--chart-grid:#52687e1c;--chart-axis:#536780;--chart-map:#657b9842;--chart-line:#344d71;--chart-up:#078a55;--chart-down:#ca414b;--chart-trend:#996600;--chart-ma:#8551aa;--chart-price-line:#52687e80}
body[data-theme] .terminal{background:var(--chart-bg)}
body[data-theme] header,body[data-theme] footer,body[data-theme] .trade-panel,body[data-theme] .portfolio-dock,body[data-theme] .settings,body[data-theme] .asset-browser,body[data-theme] .profile-menu,body[data-theme] dialog,body[data-theme] .side-panel{background:var(--panel);color:var(--text);border-color:var(--line)}
body[data-theme] .settings{position:relative}
body[data-theme] .settings-nav,body[data-theme] .settings-nav .active,body[data-theme] .asset-tab.active,body[data-theme] .value-step,body[data-theme] .expiry-button,body[data-theme] .expiry-menu,body[data-theme] .line-palette,body[data-theme] .asset-filter input,body[data-theme] .asset-filter select,body[data-theme] .asset-card,body[data-theme] .settings select,body[data-theme] .dialog-form input{background:var(--panel2);color:var(--text);border-color:var(--line)}
body[data-theme] .asset-card strong,body[data-theme] .asset-card small,body[data-theme] .asset-categories button,body[data-theme] .asset-categories button.active,body[data-theme] .settings-nav button,body[data-theme] .trade-panel label,body[data-theme] .portfolio-dock>button,body[data-theme] .chart-tools button{color:var(--text);background:var(--panel2);border-color:var(--line)}
body[data-theme] .asset-filter input::placeholder{color:var(--muted)}
body[data-theme] nav{background:var(--bg);border-color:var(--line)}
body[data-theme] nav button{color:var(--muted)}
body[data-theme] nav button:hover,body[data-theme] nav button.active{color:var(--text);background:var(--panel2)}
body[data-theme] .chart-head small,body[data-theme] .setting-row,body[data-theme] .line-palette small,body[data-theme] .panel-card small,body[data-theme] .dialog-form label,body[data-theme] footer,body[data-theme] .market-disclosure{color:var(--muted)}
body[data-theme] .line-palette strong,body[data-theme] .line-palette button,body[data-theme] .buy-time,body[data-theme] .price-tag{color:var(--text)}
body[data-theme] .price-tag,body[data-theme] #toast{background:var(--panel2);color:var(--text);border-color:var(--line)}
body[data-theme] .line-palette button:hover{background:var(--panel)}
body[data-theme] .trade,body[data-theme] .dialog-action{color:#fff}
body[data-theme] .settings-close,body[data-theme] .panel-close,body[data-theme] .dialog-close{display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;flex:none;padding:0;line-height:1;font:26px/1 Arial,sans-serif;border:1px solid var(--line);border-radius:9px;background:var(--panel2);color:var(--text);transform:none;z-index:45}
body[data-theme] .dialog-close{float:right;margin:-12px -12px 4px 10px}
body[data-theme] .settings-close:hover,body[data-theme] .panel-close:hover,body[data-theme] .dialog-close:hover{border-color:var(--muted)}
body[data-theme] button:focus-visible{outline:2px solid #c9994d;outline-offset:3px}
.themes .theme-card{display:flex;align-items:end;justify-content:center;gap:8px;padding:12px 5px;height:98px;border-radius:10px;position:relative;font-size:12px;font-weight:600}
.themes .theme-card[data-theme="dark"]{background:linear-gradient(145deg,#25354e,#111c2e);color:#edf2fa}
.themes .theme-card[data-theme="graphite"]{background:linear-gradient(145deg,#171717,#000000);color:#f0f2f8}
.themes .theme-card[data-theme="orange"]{background:linear-gradient(145deg,#54412a,#211a13);color:#efd4a7}
.themes .theme-card[data-theme="light"]{background:linear-gradient(145deg,#ffffff,#e0e8f1);color:#28364c}
.themes .theme-card.active{border-color:#c9994d;box-shadow:0 0 0 1px #c9994d}
.themes .theme-card.active::before{content:'✓';position:absolute;right:9px;top:7px;color:inherit}
body[data-theme] .check{border-color:var(--line);background:var(--panel2)}
body[data-theme] .check.on{background:#27884f;border-color:#27884f}
body[data-theme] .scale-options button{border:1px solid var(--line);background:var(--panel2);color:var(--text)}
body[data-theme] .scale-options button.active{border-color:#c9994d}
@media(max-width:650px){.themes{grid-template-columns:repeat(2,minmax(0,1fr))}.themes .theme-card{height:82px}body[data-theme] .settings-close{top:15px;left:13px}.settings-nav{gap:4px}.settings-nav button{width:auto}}
body[data-theme] .signup-strip,body[data-theme] .signup-strip button{color:#fff}
body[data-theme] .buy-time{background:var(--panel2);color:var(--text);border:1px solid var(--line)}
body[data-theme] .buy-time strong{color:var(--text)}
body[data-theme] .value-step>div button{background:var(--panel2);color:var(--text);border-color:var(--line)}
body[data-theme] .asset-tab i{display:grid;place-items:center;width:20px;height:20px;font-style:normal;font-size:16px;line-height:1;color:var(--text);top:2px;right:3px}
body[data-theme] .asset-card{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:68px}
.asset-card-payout{font-size:16px;font-weight:700;color:var(--chart-up);white-space:nowrap;flex-shrink:0}
#soundToggle{min-width:28px;min-height:28px;padding:3px;line-height:1;border-radius:5px}
