/* V4.77.2 — Quant dark theme. Visual layer only; no application data or JS changes. */
html[data-theme="quant-dark"] {
 color-scheme:dark;
 --ink:#e8eef7;--muted:#95a4b9;--line:#293a50;--bg:#080f19;--card:#142033;
 --accent:#4cb7d3;--gold:#c8a36c;
 --wg-bg:#080f19;--wg-surface:#142033;--wg-soft:#0d1828;--wg-text:#e8eef7;--wg-muted:#9aabc0;--wg-line:#2a3b51;--wg-green:#3caac1;--wg-green-hover:#2b8ba3;--wg-green-soft:#122f41;
 --warm-bg:#080f19;--warm-card:#142033;--warm-line:#2a3b51;--warm-text:#e8eef7;--warm-muted:#a2b0c2;--warm-green:#3caac1;--warm-green-dark:#2b8ba3;--warm-green-soft:#122e40;
}
html[data-theme="quant-dark"],html[data-theme="quant-dark"] body{background:#080f19!important;color:#e8eef7!important}
html[data-theme="quant-dark"] body{background-image:radial-gradient(ellipse at 85% -10%,#16324a 0%, transparent 45%)!important;-webkit-font-smoothing:antialiased}
html[data-theme="quant-dark"] main{max-width:1260px}
html[data-theme="quant-dark"] .brand{color:#f4f7fc!important;letter-spacing:.04em}
html[data-theme="quant-dark"] .brand small{color:#89a2b9!important;letter-spacing:.17em}
html[data-theme="quant-dark"] :is(.top,.footer){color:#bdcbda!important;border-color:#293a50!important}
html[data-theme="quant-dark"] :is(.panel,.operation-center,.operation-card,.hero,.historyfold,details,.historyfold-content,.position-omission,.omission-ranking,.position-blindspot-panel,.sum-rule-panel,.sum-choice-panel,.shape-filters,.shape-grid,.customrules,.filterstats,.windowstats,.result-rule-help,.backtest-lab,.backtest-metrics,.backtest-metric,.detailcell,.filterstat,.statbox,.pair-history-scroll,.fm-content,.fm-scroll,.fm-test,.fm-metrics>div,.backup-tools,.data-integrity,.daily-panel,.advdetails,#sumRulePanel,#sumChoicePanel,#shapeFilters,#historyFold,#positionBlindspotPanel,#calculator,#trend,#results,#fullstats,#simulator,#formation){background-color:#142033!important;background-image:none!important;color:#e8eef7!important;border-color:#2b3d54!important;box-shadow:0 6px 20px #00000022!important}
html[data-theme="quant-dark"] .hero{background:linear-gradient(130deg,#15283e,#101b2b 78%)!important;border:1px solid #37546a!important;box-shadow:0 14px 32px #02070f77!important;overflow:hidden}
html[data-theme="quant-dark"] .hero::after{border-color:#b9986339!important}
html[data-theme="quant-dark"] .hero :is(.digit,.issue){color:#f2f6fc!important}
html[data-theme="quant-dark"] .hero .total{color:#d8b576!important}
html[data-theme="quant-dark"] .hero :is(.eyebrow,.meta,.countbox small){color:#9baec3!important}
html[data-theme="quant-dark"] :is(h1,h2,h3,h4,h5,h6,strong,.heading h2,.operation-head h2,.hero .countbox strong,.detailcell strong,.filterstat strong){color:#f2f6fc!important}
html[data-theme="quant-dark"] :is(.info,.meta,.eyebrow,.labnote,.advnote,.daily-hint,.shape-hint,.footer,.fb-note,.operation-note,.result-rule-help,.fs-compare-note){color:#9aaac0!important}
html[data-theme="quant-dark"] :is(p,li,label,legend,summary){border-color:#2b3d54}
html[data-theme="quant-dark"] :is(.status,.hero .tag,.hero .countbox,.omit-badge,.record-rule-chip){background:#0e1b2c!important;color:#d5e1ef!important;border-color:#30485d!important}
html[data-theme="quant-dark"] .status.ok{background:#0d302d!important;color:#54d8b8!important;border-color:#296254!important}
html[data-theme="quant-dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.customrules input){background:#0b1727!important;color:#edf3fb!important;-webkit-text-fill-color:#edf3fb!important;border:1px solid #35485f!important;box-shadow:none!important}
html[data-theme="quant-dark"] :is(input,textarea)::placeholder{color:#8093a9!important;-webkit-text-fill-color:#8093a9!important;opacity:1}
html[data-theme="quant-dark"] :is(input,select,textarea):focus-visible{outline:2px solid #53bdd6!important;outline-offset:1px!important;box-shadow:0 0 0 3px #46a7c32c!important}
html[data-theme="quant-dark"] :is(button,.lightbtn,.sum-presets button,.customrules button,.fb-action){background:#1a2a40!important;color:#dfe9f6!important;border:1px solid #34506b!important;box-shadow:none!important}
html[data-theme="quant-dark"] :is(button,.lightbtn,.sum-presets button,.customrules button,.fb-action):hover{background:#243c56!important;color:#fff!important;border-color:#4b8aa7!important}
html[data-theme="quant-dark"] :is(#refresh,#applySumRule,#applyrules,#save,#backtestRun,#simSubmit,#botStart,#dailyExtraApply,#calcGo,#advRun,#batchGo,#cloudUpload,button.primary){background:#247e9d!important;color:#fff!important;border-color:#3da7c5!important}
html[data-theme="quant-dark"] :is(#refresh,#applySumRule,#applyrules,#save,#backtestRun,#simSubmit,#botStart,#dailyExtraApply,#calcGo,#advRun,#batchGo,#cloudUpload,button.primary):hover{background:#319bbb!important}
html[data-theme="quant-dark"] nav.tabs{background:#0d1827f5!important;border:1px solid #2d4056!important;box-shadow:0 8px 20px #0004!important;backdrop-filter:blur(18px)}
html[data-theme="quant-dark"] nav.tabs>.tab{background:transparent!important;color:#a6b7ca!important;border:1px solid transparent!important}
html[data-theme="quant-dark"] nav.tabs>.tab.active{background:#173950!important;color:#79dcf0!important;border-color:#387c96!important;box-shadow:inset 0 -2px 0 #54bbd3!important}
html[data-theme="quant-dark"] :is(.tabs .tab,button,.lightbtn){transition:background-color .15s,color .15s,border-color .15s}
html[data-theme="quant-dark"] :is(.draw-table,.unified-records,.fm-table,.fm-heat,table){color:#dbe6f3!important;border-color:#304157!important}
html[data-theme="quant-dark"] :is(.draw-table,.unified-records,.fm-table,.fm-heat) :is(th,td){background:#132238!important;color:#dde8f5!important;border-color:#2c425b!important}
html[data-theme="quant-dark"] :is(.draw-table,.unified-records,.fm-table,.fm-heat) th{background:#0c1829!important;color:#a3b9cf!important}
html[data-theme="quant-dark"] :is(.draw-table,.unified-records) tbody tr:nth-child(even) td{background:#101e31!important}
html[data-theme="quant-dark"] :is(.draw-table,.unified-records) tr.row-disabled>td{background:#38232b!important;color:#ffb4b5!important}
html[data-theme="quant-dark"] :is(.sum-btn-wrapper>button,button[data-sum-value],#calcSumGrid.calc-sum-grid>button){background:#101d30!important;background-image:none!important;color:#d1e1f1!important;-webkit-text-fill-color:#d1e1f1!important;border:1px solid #34475f!important;box-shadow:none!important}
html[data-theme="quant-dark"] :is(.sum-btn-wrapper>button.selected,button[data-sum-value].selected,button[data-sum-value][aria-pressed="true"],#calcSumGrid.calc-sum-grid>button[aria-pressed="true"]){background:#167d9f!important;background-image:none!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#59c1d9!important;box-shadow:inset 0 0 0 1px #59c1d9!important}
html[data-theme="quant-dark"] :is(.sum-btn-wrapper>button:focus-visible,button[data-sum-value]:focus-visible,#calcSumGrid.calc-sum-grid>button:focus-visible){outline:2px solid #bcdbe3!important}
html[data-theme="quant-dark"] :is(.sum-btn-wrapper>button:not(.selected):not([aria-pressed="true"]),#calcSumGrid.calc-sum-grid>button[aria-pressed="false"]){background:#101d30!important;color:#d1e1f1!important;-webkit-text-fill-color:#d1e1f1!important;border-color:#34475f!important}
html[data-theme="quant-dark"] :is(.result-rule-help,.sum-choice-panel .info,#sumRulePanel .info,#sumChoicePanel .info,.fs-landscape-tip,.fs-picked,#fullstats .fs-gridpanel,.fs-hundred-grid,.fs-advanced-tools,.fs-compare,.fs-modes,.fs-view-switch,.fs-pages,.fs-daily,.fs-range,.fs-quick-actions,.fb-lists,.fb-plan-output){background:#101e30!important;color:#dce7f5!important;border-color:#2e4158!important}
html[data-theme="quant-dark"] #fullstats :is(.fs-view-switch button,.fs-modes button,.fs-pages button,.fs-code-cell,.fs-hundred-bar select,#fsHundred){background:#14253a!important;color:#e8eef8!important;border-color:#354b65!important}
html[data-theme="quant-dark"] #fullstats :is(.fs-view-active,.fs-active){background:#16445c!important;color:#8fe6f5!important;border-color:#4eb2cd!important}
html[data-theme="quant-dark"] #fullstats #fsHeatmap{border-color:#354a60!important;background:#eef1f2!important} /* Keep meaningful 5-color pixels, including white zero cells */
html[data-theme="quant-dark"] #fullstats .fs-picked{background:#172940!important}
html[data-theme="quant-dark"] :is(.fs-grid-legend,.fs-gridhead span){color:#bbc8d7!important}
html[data-theme="quant-dark"] :is(.fs-zero,.fs-low,.fs-high){border:1px solid #587084!important}
html[data-theme="quant-dark"] :is(.fm-pill,.fb-note,.fs-metric,.fs-summary,.fs-card,.fm-table-wrap,.info-card,.soft-card){background:#101d2f!important;color:#d9e6f4!important;border-color:#30465d!important}
html[data-theme="quant-dark"] :is(.success,.ok,.positive){color:#56cdb6}
html[data-theme="quant-dark"] :is(.error,.negative){color:#ff8591}
html[data-theme="quant-dark"] :is(.hero .tag.good,.record-rule-chip.hit){background:#153833!important;color:#76e1bc!important;border-color:#2d7560!important}
html[data-theme="quant-dark"] :is(.hero .tag.bad,.status-badge-error){background:#442630!important;color:#ffa6ab!important;border-color:#8b4e57!important}
html[data-theme="quant-dark"] :is(.compact-draw,.compact-draw-bar,.compact-draw-banner,.compact-result,.draw-compact){background:#0c1828!important;color:#e6f0fa!important;border-color:#30475d!important}
html[data-theme="quant-dark"] :is(.compact-draw,.compact-draw-bar,.compact-draw-banner) *{border-color:#32495e}
html[data-theme="quant-dark"] :is(.help,.filter-description,.record-description,.result-rule-help){background:#101e30!important;color:#bbcbdd!important}
html[data-theme="quant-dark"] :is(.status,.tag,.badge,.statbox,.filterstat,.detailcell){border-radius:11px}
html[data-theme="quant-dark"] input[type="checkbox"],html[data-theme="quant-dark"] input[type="radio"]{accent-color:#4cb7d3}
html[data-theme="quant-dark"] :is(.hidden,[hidden]){display:none!important}
@media(max-width:600px){html[data-theme="quant-dark"] main{padding:20px 12px 96px}html[data-theme="quant-dark"] .panel{padding:16px!important;border-radius:18px!important}html[data-theme="quant-dark"] .hero{padding:23px 19px!important}html[data-theme="quant-dark"] .top{gap:8px}html[data-theme="quant-dark"] .brand{font-size:19px!important}html[data-theme="quant-dark"] nav.tabs{gap:3px!important}}
@media(prefers-reduced-motion:reduce){html[data-theme="quant-dark"] *{transition-duration:0s!important;animation-duration:0s!important}}
