html{color-scheme:dark}
.theme-toggle{display:inline-flex;align-items:center;gap:9px;border:1px solid #405332;border-radius:10px;min-height:40px;padding:8px 12px;color:#dce9d1;background:#172010;font:600 12px 'Manrope',sans-serif;cursor:pointer}
.theme-track{display:block;width:32px;height:18px;border-radius:20px;background:#425332;padding:3px;box-sizing:border-box}
.theme-track:before{content:'';display:block;width:12px;height:12px;border-radius:50%;background:#c6ff82;transition:transform .2s}
.theme-toggle[aria-checked="true"] .theme-track:before{transform:translateX(14px);background:white}
.theme-toggle:focus-visible{outline:2px solid #6caa26;outline-offset:3px}
html[data-theme="light"]{color-scheme:light;--green:#397b12;--muted:#5c6b55;--line:#d5dfcd;--text:#1c2c17;--bg:#f3f6f0;--panel:#ffffff;--panel2:#edf4e5;--red:#b73942}
html[data-theme="light"] .breadcrumb b,html[data-theme="light"] .metrics-sync-row,html[data-theme="light"] #metrics-sync,html[data-theme="light"] .sync-period{color:#526746}
html[data-theme="light"] .chart-grid text{fill:#64745a;stroke:none}
html[data-theme="light"] .chart-grid path{stroke:#d5dfcd}
html[data-theme="light"] .bot-stop:disabled{background:#e2e7dc;color:#67745e;border-color:#cdd6c3}
html[data-theme="light"] body{background:#f3f6f0;color:#1c2c17}
html[data-theme="light"] .app{background:linear-gradient(#68923505 1px,transparent 1px),linear-gradient(90deg,#68923505 1px,transparent 1px),#f3f6f0;background-size:48px 48px}
html[data-theme="light"] .sidebar,html[data-theme="light"] #app .sidebar{background:#f8faf5f7;border-color:#d5dfcd;box-shadow:8px 0 30px #32441f08}
html[data-theme="light"] .topbar{background:#f8faf5ed;border-color:#d5dfcd}
html[data-theme="light"] .panel,html[data-theme="light"] .metric,html[data-theme="light"] .admin-user-card,html[data-theme="light"] .system-card,html[data-theme="light"] .maintenance-dialog{background:linear-gradient(135deg,#fff,#f8fbf5);border-color:#cddbc1;box-shadow:0 5px 22px #30471d07;color:#1c2c17}
html[data-theme="light"] .metric-number,html[data-theme="light"] .chart-summary strong,html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3,html[data-theme="light"] .instrument b,html[data-theme="light"] .admin-summary strong,html[data-theme="light"] .setting-row b{color:#1c2c17}
html[data-theme="light"] .green,html[data-theme="light"] .metric-number.green{color:#397b12}
html[data-theme="light"] .red,html[data-theme="light"] .metric-number.red{color:#b73942}
html[data-theme="light"] .nav-item{color:#5b6953}
html[data-theme="light"] .nav-item.active,html[data-theme="light"] #app .sidebar .nav-item.active{background:linear-gradient(100deg,#dcedc8,#eef5e7);border-color:#a7c586;color:#326a13;box-shadow:none}
html[data-theme="light"] .nav-item:hover{background:#e9f1e0;color:#326a13}
html[data-theme="light"] .sidebar .sidebar-profile{background:#fff;border-color:#cddbc1;box-shadow:0 4px 16px #30471d06}
html[data-theme="light"] .sidebar .sidebar-profile #profile-name{color:#1c2c17}
html[data-theme="light"] .metric-label,html[data-theme="light"] .metric-foot>span:last-child,html[data-theme="light"] .metric-number small,html[data-theme="light"] .metric-number>span,html[data-theme="light"] .chart-footer,html[data-theme="light"] .panel-heading p,html[data-theme="light"] .profile small,html[data-theme="light"] .system-card p,html[data-theme="light"] .system-card small,html[data-theme="light"] .nav-key,html[data-theme="light"] .breadcrumb-root,html[data-theme="light"] .instrument small,html[data-theme="light"] .risk-note,html[data-theme="light"] .bot-bottom,html[data-theme="light"] .setting-row p,html[data-theme="light"] .settings-panel>p,html[data-theme="light"] .admin-user-card dt,html[data-theme="light"] .admin-user-header small,html[data-theme="light"] .user-history-hint,html[data-theme="light"] .legal-footer,html[data-theme="light"] .maintenance-dialog p,html[data-theme="light"] .maintenance-dialog small{color:#5c6b55}
html[data-theme="light"] .theme-toggle,html[data-theme="light"] .lang,html[data-theme="light"] .periods,html[data-theme="light"] .trade-tabs button,html[data-theme="light"] .user-history-tabs button,html[data-theme="light"] .mobile-menu-toggle,html[data-theme="light"] .mobile-menu-close{background:#fff;color:#395729;border-color:#c9d7bd}
html[data-theme="light"] .theme-track{background:#548e27}
html[data-theme="light"] .periods .selected,html[data-theme="light"] .trade-tabs .selected,html[data-theme="light"] .user-history-tabs .selected{background:#dcedc8;color:#285c10;border-color:#a7c586}
html[data-theme="light"] .button{background:linear-gradient(110deg,#b6ff46,#91df37);color:#17270d;box-shadow:none}
html[data-theme="light"] .bot-stop,html[data-theme="light"] .admin-stop{background:#f7e6de;color:#8d442a;border-color:#d9b7a5}
html[data-theme="light"] button:disabled{opacity:.5}
html[data-theme="light"] .risk-console{background:#eff5e8;border-color:#c2d2b3}
html[data-theme="light"] .risk-console-top,html[data-theme="light"] .risk-console-bottom,html[data-theme="light"] .loss-limit>div>span{color:#536a43}
html[data-theme="light"] .bot-power{background:#eaf2df;border-color:#b5cba2;color:#698557}
html[data-theme="light"] .bot-power.running{color:#397b12;box-shadow:0 0 25px #73bb362d}
html[data-theme="light"] td{color:#31442a}
html[data-theme="light"] td.red{color:#b73942}
html[data-theme="light"] td.green{color:#397b12}
html[data-theme="light"] td:before,html[data-theme="light"] th{color:#64745a}
html[data-theme="light"] tbody tr,html[data-theme="light"] .admin-user-card details,html[data-theme="light"] .panel-heading,html[data-theme="light"] .trade-tabs,html[data-theme="light"] .admin-filters{border-color:#d5dfcd!important}
html[data-theme="light"] .notice{background:#edf4e5;color:#4c663a;border-color:#cfddc0}
html[data-theme="light"] .settings-panel input,html[data-theme="light"] .admin-filters input,html[data-theme="light"] .admin-filters select{background:#fff;border-color:#bdcfae;color:#24361c}
html[data-theme="light"] .status-pill,html[data-theme="light"] .demo-badge,html[data-theme="light"] .direction{background:#edf4e5;color:#456b2e;border-color:#c3d4b1}
html[data-theme="light"] .direction.sell{background:#f8e8e5;color:#a83d39;border-color:#e6c7bf}
html[data-theme="light"] .chart-grid{fill:#64745a;stroke:#d5dfcd}
html[data-theme="light"] #chart-line,html[data-theme="light"] .spark path{stroke:#548e27}
html[data-theme="light"] #chart-dot{fill:#548e27}
html[data-theme="light"] .mini-progress{background:#d9e4cf}
html[data-theme="light"] .mini-progress i,html[data-theme="light"] .win-bars i{background:#6b9f39}
html[data-theme="light"] .admin-emergency{background:#fff5e9;border-color:#d7bea0}
html[data-theme="light"] .admin-emergency p,html[data-theme="light"] .admin-summary span,html[data-theme="light"] .admin-filters label{color:#665f4d}
html[data-theme="light"] .admin-user-actions button{border-color:#becfac}
html[data-theme="light"] .maintenance-toggle{background:#e5efd9;color:#3e6128;border-color:#b2c898}
html[data-theme="light"] .maintenance-toggle.enabled{background:#fae4b6;color:#79571f;border-color:#dbbd7b}
html[data-theme="light"] .login,html[data-theme="light"] #boot{background:radial-gradient(ellipse at 75% 45%,#cde6ac66,transparent 60%),#f3f6f0}
html[data-theme="light"] .login-copy>p,html[data-theme="light"] .login-footer,html[data-theme="light"] #boot small{color:#5c6b55}
html[data-theme="light"] .wordmark{color:#22351a}
html[data-theme="light"] .boot-line{background:#d5dfcd}
html[data-theme="light"] .text-button,html[data-theme="light"] .demo-link{color:#456b2e}
@media(max-width:760px){.theme-toggle{min-width:44px;min-height:40px;padding:8px}.theme-label{display:none}html[data-theme="light"] #app tbody tr{background:#fff}html[data-theme="light"] .mobile-menu-backdrop.open{background:#23361e55}}
@media(prefers-reduced-motion:reduce){.theme-track:before{transition:none}}
