/* BiaTraders LIGHT theme. Active when <html data-theme="light"> (toggle in the header).
   Dark remains the default; everything here only overrides colours. */
html[data-theme="light"]{
  color-scheme:light;
  --pro-bg:#f2f5f9; --pro-panel:#ffffff; --pro-panel-2:#f7f9fc; --pro-line:#d7e0ea; --pro-line-soft:#e7edf3;
  --pro-text:#11263a; --pro-text-2:#46607a; --pro-muted:#6c8196; --pro-gold:#a8740f; --pro-gold-2:#8a5f0a;
  --pro-green:#0b8f63; --pro-red:#cf3048; --pro-blue:#2468c9; --pro-amber:#b8730f;
  --pro-shadow:0 1px 2px rgba(16,38,58,.06),0 6px 18px rgba(16,38,58,.06);
  --navy-0:#f2f5f9; --navy-1:#eef2f7; --navy-2:#e6edf4; --navy-3:#dfe7ef; --panel:#ffffff; --panel-2:#f7f9fc;
  --gold:#b07d16; --gold-light:#8a5f0a; --gold-dark:#c99a3c; --green:#0b8f63; --green-2:#0b8f63; --red:#cf3048; --blue:#2468c9;
  --text:#11263a; --muted:#6c8196; --line:rgba(176,125,22,.35); --line-blue:rgba(36,104,201,.22);
}
html[data-theme="light"] body,html[data-theme="light"] .terminal-shell{background:#f2f5f9;color:#11263a}

/* header + sidebar */
html[data-theme="light"] .terminal-header{background:linear-gradient(105deg,#ffffff 0%,#f6f8fb 60%,#ffffff 100%);border-bottom:1px solid #e3c98f;box-shadow:0 1px 0 rgba(16,38,58,.04)}
html[data-theme="light"] .header-wave{opacity:.35}
html[data-theme="light"] .control-title-main{color:#8a5f0a;text-shadow:none}
html[data-theme="light"] .control-title-sub{color:#5d7488}
html[data-theme="light"] .market-clock,html[data-theme="light"] .client-chip{background:#fff;border-color:#e3c98f;color:#8a5f0a}
html[data-theme="light"] .client-chip strong{color:#11263a}
html[data-theme="light"] .header-status-dot{background:#0b8f63;box-shadow:none}
html[data-theme="light"] .terminal-sidebar{background:#ffffff;border-right:1px solid #e2e8ef}
html[data-theme="light"] .nav-item{color:#2b4257}
html[data-theme="light"] .nav-item:hover{background:#fbf3e2;border-color:#f0dcae}
html[data-theme="light"] .nav-icon{color:#a8740f}
html[data-theme="light"] .sidebar-session{background:#f7f9fc;border-color:#e3c98f}
html[data-theme="light"] .session-subtitle{color:#6c8196}
html[data-theme="light"] .terminal-main{background:#f2f5f9}
html[data-theme="light"] .view-switch{background:#fff;border-color:#e3c98f}
html[data-theme="light"] .view-switch select,html[data-theme="light"] .filter-bar input,html[data-theme="light"] .filter-bar select,
html[data-theme="light"] .set-field input,html[data-theme="light"] .set-field select{background:#fff;color:#11263a;border-color:#cfd9e4;color-scheme:light}

/* pro pages */
html[data-theme="light"] .pro-head h1,html[data-theme="light"] .pro-panel-head h2,html[data-theme="light"] .kpi-value,
html[data-theme="light"] .stat strong,html[data-theme="light"] .cell-strong,html[data-theme="light"] .strategies-table .strat-name,
html[data-theme="light"] .perf-name{color:#11263a}
html[data-theme="light"] .pro-table th{background:#eef3f8;color:#46607a}
html[data-theme="light"] .pro-table tbody tr:hover td{background:#fbf6ea}
html[data-theme="light"] .pro-table .mono,html[data-theme="light"] .mono{color:#21384d}
html[data-theme="light"] .kpi{background:linear-gradient(180deg,#ffffff,#fbfcfe)}
html[data-theme="light"] .chip.live{background:#fdecef;border-color:#f1b6c0;color:#a8233a}
html[data-theme="light"] .pill.sim,html[data-theme="light"] .mini-tag.sim{background:#e8f1fd;color:#1f5fb8;border-color:#bcd4f5}
html[data-theme="light"] .pill.live,html[data-theme="light"] .mini-tag.live{background:#fdecef;color:#b0263d;border-color:#f1b6c0}
html[data-theme="light"] .pill.run{background:#e4f6ee;color:#0a7a54;border-color:#a8dcc5}
html[data-theme="light"] .pill.off,html[data-theme="light"] .mini-tag.off{background:#eef2f6;color:#5c7286;border-color:#d3dce5}
html[data-theme="light"] .pill.err{background:#fdecef;color:#b0263d;border-color:#f1b6c0}
html[data-theme="light"] .pill.warn{background:#fdf3df;color:#8a5f0a;border-color:#ecd08f}
html[data-theme="light"] .event-tag{background:#f3f6fa}
html[data-theme="light"] .event-tag.ev-ce_entry,html[data-theme="light"] .event-tag.ev-pe_entry{color:#0a7a54;border-color:#a8dcc5}
html[data-theme="light"] .event-tag.ev-position_closed{color:#8a5f0a;border-color:#ecd08f}
html[data-theme="light"] .chart-tip{background:#fff;box-shadow:0 8px 20px rgba(16,38,58,.15)}
html[data-theme="light"] .perf-track{background:#edf2f7}
html[data-theme="light"] .perf-mid{background:#b9c7d4}
html[data-theme="light"] .ghost-btn{background:#fff;color:#11263a;border-color:#cfd9e4}
html[data-theme="light"] .set-hint code,html[data-theme="light"] .set-switch{background:#f7f9fc}
html[data-theme="light"] .set-flash.ok,html[data-theme="light"] .set-field em.ok{background:#e4f6ee;border-color:#a8dcc5;color:#0a6b4a}
html[data-theme="light"] .set-flash.err,html[data-theme="light"] .set-field em.bad{background:#fdecef;border-color:#f1b6c0;color:#a8233a}
html[data-theme="light"] .pnl-split small{color:#6c8196}

/* dashboard market overview (dashboard.css) */
html[data-theme="light"] .panel,html[data-theme="light"] .kpi-card,html[data-theme="light"] .pro-page .market-panel{background:#ffffff;border-color:#e3c98f;box-shadow:var(--pro-shadow)}
html[data-theme="light"] .panel-title-row h2{color:#8a5f0a}
html[data-theme="light"] .exchange-card{background:#f7f9fc;border-color:#d7e0ea}
html[data-theme="light"] .exchange-card strong,html[data-theme="light"] .exchange-title-row strong{color:#11263a}
html[data-theme="light"] .exchange-price strong,html[data-theme="light"] .exchange-sub strong,html[data-theme="light"] .market-meta strong{color:#8a5f0a}
html[data-theme="light"] .exchange-symbol,html[data-theme="light"] .exchange-price span,html[data-theme="light"] .exchange-sub span,
html[data-theme="light"] .market-meta div,html[data-theme="light"] .market-message,html[data-theme="light"] .small-label{color:#5d7488}
html[data-theme="light"] .event-row{color:#46607a}

/* strategies page (strategy_pages.css) */
html[data-theme="light"] .strategy-page{background:transparent;color:#11263a}
html[data-theme="light"] .strategy-page h1,html[data-theme="light"] .strategy-runtime-head h2,html[data-theme="light"] .configure-head h2,
html[data-theme="light"] .settings-section h3,html[data-theme="light"] .strategy-runtime-stats strong,html[data-theme="light"] .mode-option span{color:#11263a}
html[data-theme="light"] .strategy-page-head p,html[data-theme="light"] .strategy-desc,html[data-theme="light"] .strategy-id,
html[data-theme="light"] .configure-head p,html[data-theme="light"] .settings-hint,html[data-theme="light"] .runtime-notes{color:#46607a}
html[data-theme="light"] .strategy-runtime-card,html[data-theme="light"] .configure-card{background:#fff;border-color:#d7e0ea;box-shadow:var(--pro-shadow)}
html[data-theme="light"] .personalize-card{background:#fffaf0;border-color:#e3c98f}
html[data-theme="light"] .personalize-head h2{color:#8a5f0a}
html[data-theme="light"] .personalize-head p{color:#46607a}
html[data-theme="light"] .strategy-runtime-stats>div,html[data-theme="light"] .mode-option{background:#f7f9fc;border-color:#d7e0ea}
html[data-theme="light"] .strategy-runtime-stats span,html[data-theme="light"] .mode-switch-label,html[data-theme="light"] .mode-option small,
html[data-theme="light"] .strategy-runtime-stats small{color:#6c8196}
html[data-theme="light"] .strategy-tab,html[data-theme="light"] .strategy-page .strategy-tab{background:#fff!important;color:#2b4257!important;border-color:#d7e0ea!important;box-shadow:none!important}
html[data-theme="light"] .strategy-tab.active,html[data-theme="light"] .strategy-page .strategy-tab.active{background:linear-gradient(180deg,#f6c56a,#e3a23c)!important;color:#071d3a!important;border-color:#e0a03a!important}
html[data-theme="light"] .strategy-tab .tab-tag{background:#fdf3df;color:#8a5f0a;border-color:#ecd08f}
html[data-theme="light"] .settings-grid label,html[data-theme="light"] .personalize-form label{color:#2b4257}
html[data-theme="light"] .settings-grid input,html[data-theme="light"] .settings-grid select,
html[data-theme="light"] .personalize-form input,html[data-theme="light"] .personalize-form select,html[data-theme="light"] .confirm-box input{background:#fff;color:#11263a;border-color:#cfd9e4;color-scheme:light}
html[data-theme="light"] .settings-grid input:disabled{background:#eef2f6;color:#8396a8}
html[data-theme="light"] .strategy-actions,html[data-theme="light"] .configure-actions{border-color:#e2e8ef}
html[data-theme="light"] .dark-btn,html[data-theme="light"] .cancel-btn{background:#eef2f6;color:#2b4257;border-color:#cfd9e4}
html[data-theme="light"] .runtime-badge.stopped{background:#eef2f6;color:#5c7286;border-color:#d3dce5}
html[data-theme="light"] .runtime-badge.running{background:#e4f6ee;color:#0a7a54;border-color:#a8dcc5}
html[data-theme="light"] .mode-pill.sim{background:#e8f1fd;color:#1f5fb8;border-color:#bcd4f5}
html[data-theme="light"] .mode-pill.live{background:#fdecef;color:#b0263d;border-color:#f1b6c0}
html[data-theme="light"] .mode-option.live:has(input:checked){background:#fdecef}
html[data-theme="light"] .live-lock{color:#8a5f0a}
html[data-theme="light"] .runtime-notes div{border-left-color:#d7e0ea}
html[data-theme="light"] .live-orders{background:#fff6f7;border-color:#f1b6c0}
html[data-theme="light"] .order-row{color:#11263a;border-top-color:#f6d5da}
html[data-theme="light"] .strategy-message.success{background:#e4f6ee;color:#0a6b4a;border-color:#a8dcc5}
html[data-theme="light"] .strategy-message.error{background:#fdecef;color:#a8233a;border-color:#f1b6c0}
html[data-theme="light"] .strategy-message.warning{background:#fdf3df;color:#7a5408;border-color:#ecd08f}
html[data-theme="light"] .confirm-box{background:#fff;color:#11263a}
html[data-theme="light"] .confirm-box p,html[data-theme="light"] .confirm-box li,html[data-theme="light"] .confirm-box label{color:#2b4257}
html[data-theme="light"] .profit{color:#0b8f63!important}
html[data-theme="light"] .loss{color:#cf3048!important}

/* theme toggle button */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:9px;border:1px solid rgba(229,180,71,.46);
  background:rgba(4,25,38,.80);color:#ffd979;font-size:17px;cursor:pointer;margin-right:6px;user-select:none}
html[data-theme="light"] .theme-toggle{background:#fff!important;color:#8a5f0a!important;border-color:#e3c98f!important}

/* runtime card (strategies page) */
html[data-theme="light"] .rt-tile,html[data-theme="light"] .side-card,html[data-theme="light"] .rt-pos{background:#f7f9fc;border-color:#d7e0ea}
html[data-theme="light"] .side-card.ce{border-top-color:#0b8f63}html[data-theme="light"] .side-card.pe{border-top-color:#cf3048}
html[data-theme="light"] .side-card.holding.ce{background:#eaf7f1}html[data-theme="light"] .side-card.holding.pe{background:#fdeef0}
html[data-theme="light"] .rt-tile strong,html[data-theme="light"] .side-card header strong,html[data-theme="light"] .sc-row b,
html[data-theme="light"] .rt-pos-head b,html[data-theme="light"] .rt-hl td{color:#11263a}
html[data-theme="light"] .side-card.ce header strong{color:#0a7a54}html[data-theme="light"] .side-card.pe header strong{color:#b0263d}
html[data-theme="light"] .rt-tile span,html[data-theme="light"] .rt-tile small,html[data-theme="light"] .sc-row span,html[data-theme="light"] .sc-row em,
html[data-theme="light"] .rt-hl th,html[data-theme="light"] .rt-hl td small,html[data-theme="light"] .rt-pos.empty-pos,html[data-theme="light"] .rt-pos-head{color:#5d7488}
html[data-theme="light"] .sc-row,html[data-theme="light"] .rt-hl td,html[data-theme="light"] .rt-hl th{border-color:#e2e8ef}
html[data-theme="light"] .pos-sym{color:#8a5f0a}
html[data-theme="light"] .dot{background:#d7e0ea}
html[data-theme="light"] .idle-badge{color:#6c8196;border-color:#d3dce5}
html[data-theme="light"] .side-tag.ce{background:#e4f6ee;color:#0a7a54;border-color:#a8dcc5}
html[data-theme="light"] .side-tag.pe{background:#fdecef;color:#b0263d;border-color:#f1b6c0}
html[data-theme="light"] .rt-trades .rt-hl td.reason{color:#5d7488}
html[data-theme="light"] .rt-trades .open-row td{background:#fff8ea}
html[data-theme="light"] .rt-trades .sess-row td{background:#fdf6e6;border-top-color:#ecd08f;color:#7a5408}
html[data-theme="light"] .rt-trades .sess-row b{color:#7a5408}
html[data-theme="light"] .sess-time{color:#46607a}
html[data-theme="light"] .sess-badge.run{background:#e4f6ee;color:#0a7a54;border-color:#a8dcc5}
html[data-theme="light"] .sess-badge.end{background:#eef2f6;color:#2b4257;border-color:#d3dce5}
