.theme-toggle {
  width:40px; height:40px; flex:0 0 40px; display:grid; place-items:center;
  border:1px solid var(--border2); border-radius:50%; background:transparent;
  color:var(--txt); font:17px/1 "Segoe UI Symbol",sans-serif; cursor:pointer;
  min-width:40px; min-height:40px;
}
@media (min-width: 768px) {
  .theme-toggle { width:34px; height:34px; flex-basis:34px; min-width:34px; min-height:34px; }
}
.theme-toggle:hover { border-color:var(--grn); color:var(--grn); background:color-mix(in srgb,var(--grn) 8%,transparent); }
.theme-toggle:focus-visible { outline:2px solid var(--grn); outline-offset:2px; }

html[data-theme="light"] {
  --bg:#f4f6f6; --bg2:#ffffff; --panel:#ffffff; --panel2:#eef2f1;
  --border:#dfe5e3; --border2:#cbd5d2; --txt:#17211e; --mut:#84908c; --mut2:#5f6e69;
  --grn:#168f78; --grn2:#0f7d68; --red:#d94f5a; --red2:#c43f4a;
  --pur:#168f78; --pur2:#0f7d68;
}
html[data-theme="light"] body { background:var(--bg); color:var(--txt); }
html[data-theme="light"] .header { background:#fff; box-shadow:0 1px 4px #17211e0a; }
html[data-theme="light"] .main-tabs { background:transparent; }
html[data-theme="light"] input,
html[data-theme="light"] select { background:#fff; color:var(--txt); }
html[data-theme="light"] select option { background:#fff!important; color:var(--txt)!important; }
html[data-theme="light"] .wallet-account-menu,
html[data-theme="light"] .app-toast { background:#fff; box-shadow:0 12px 34px #17211e18; }
html[data-theme="light"] .wallet-account-menu button:hover { background:#f1f5f4; }

html[data-theme="light"] .trade-terminal,
html[data-theme="light"] .strategy-workbench,
html[data-theme="light"] .strategy-monitor-column,
html[data-theme="light"] .strategy-chart-panel { background:var(--bg); }
html[data-theme="light"] .terminal-marketbar,
html[data-theme="light"] .orderbook-panel,
html[data-theme="light"] .order-entry,
html[data-theme="light"] .terminal-bottom,
html[data-theme="light"] .strategy-exchange-tabs,
html[data-theme="light"] .strategy-status-panel,
html[data-theme="light"] .strategy-config-column { background:#fff; }
html[data-theme="light"] .product-switch,
html[data-theme="light"] .side-switch { background:#eef2f1; }
html[data-theme="light"] .product-switch button.active,
html[data-theme="light"] .terminal-tabs button.active,
html[data-theme="light"] .timeframe-tabs button.active,
html[data-theme="light"] .order-type-tabs button.active { background:#e3ebe8; }
html[data-theme="light"] .terminal-symbol .coin-mark,
html[data-theme="light"] .market-list-logo { background:#e8edeb; }
html[data-theme="light"] .order-field,
html[data-theme="light"] .market-search,
html[data-theme="light"] .strategy-settings-panel .risk-preview { background:#fff; }
html[data-theme="light"] .market-picker-dialog { background:#fff; box-shadow:0 24px 80px #17211e24; }
html[data-theme="light"] .market-picker-backdrop { background:#17211e42; }
html[data-theme="light"] .market-list-row { background:#fff; }
html[data-theme="light"] .market-list-row:hover { background:#eef4f2; }
html[data-theme="light"] .book-row.ask::before { --depth-color:#d94f5a12!important; }
html[data-theme="light"] .book-row.bid::before { --depth-color:#168f7812!important; }

html[data-theme="light"] #tab-ai-managed { background:var(--bg); }
html[data-theme="light"] .aim-topbar,
html[data-theme="light"] .aim-table-wrap th { background:#f8faf9; }
html[data-theme="light"] .aim-plan-grid span,
html[data-theme="light"] .aim-amount-field { background:#fff; }
html[data-theme="light"] .aim-amount-field input:-webkit-autofill { box-shadow:0 0 0 1000px #fff inset; }
html[data-theme="light"] .aim-progress-ring { background:conic-gradient(var(--grn) var(--progress),#e1e7e5 0); }
html[data-theme="light"] .aim-table-wrap tbody tr:hover td,
html[data-theme="light"] .assets-table th { background:#17211e05; }
html[data-theme="light"] .aim-bot-shell { stroke:#7f9da6; }
html[data-theme="light"] .aim-bot-screen { stroke:#41635a; }

html[data-theme="light"] .assets-icon-btn:hover,
html[data-theme="light"] .assets-text-btn:hover,
html[data-theme="light"] .assets-secondary-action:hover,
html[data-theme="light"] .assets-back-button:hover { background:#17211e08; }
html[data-theme="light"] .assets-allocation-track { background:#17211e12; }

html[data-theme="light"] .portal-page { background:var(--bg); color:var(--txt); }
html[data-theme="light"] .portal-heading p,
html[data-theme="light"] .portal-metric span,
html[data-theme="light"] .portal-metric small,
html[data-theme="light"] .portal-section-head span,
html[data-theme="light"] .portal-table th,
html[data-theme="light"] .portal-muted,
html[data-theme="light"] .portal-gate span,
html[data-theme="light"] .earn-item dt,
html[data-theme="light"] .staking-form label,
html[data-theme="light"] .staking-form>div>span,
html[data-theme="light"] .staking-summary span { color:var(--mut2); }
html[data-theme="light"] .portal-button,
html[data-theme="light"] .portal-metrics,
html[data-theme="light"] .portal-section,
html[data-theme="light"] .portal-gate,
html[data-theme="light"] .earn-item { border-color:var(--border); background:#fff; color:var(--txt); }
html[data-theme="light"] .portal-metric,
html[data-theme="light"] .portal-section-head,
html[data-theme="light"] .portal-table th,
html[data-theme="light"] .portal-table td,
html[data-theme="light"] .staking-summary p { border-color:var(--border); }
html[data-theme="light"] .portal-table tbody tr:hover { background:#eef4f2; }
html[data-theme="light"] .staking-form>div:first-of-type { border-color:var(--border2); background:#fff; }
html[data-theme="light"] .staking-form input { color:var(--txt); }
html[data-theme="light"] .portal-loading i { background:linear-gradient(90deg,#edf1f0,#dfe7e4,#edf1f0); background-size:200% 100%; }

@media (max-width:900px) { .theme-toggle { width:38px; height:38px; flex-basis:38px; min-width:38px; min-height:38px; font-size:15px; } }
@media (max-width:480px) { .theme-toggle { width:38px; height:38px; flex-basis:38px; min-width:38px; min-height:38px; } }
