/* ==========================================================================
   Nifty Signals · clean view + Light mode
   VIEW ONLY: no data, calculation, signal or chart logic is changed.
   (1) tidier layout for both themes   (2) html[data-theme=light] palette
   Remove the <link> to this file (and the theme block in the page script) to restore the old view.
   ========================================================================== */

/* ── 1. clean layout (both themes) ─────────────────────────────────────── */
:root{--rad:16px;--gap:14px}
body{font-feature-settings:"tnum" 1,"ss01" 1;letter-spacing:-.003em}
header{padding:9px 18px;gap:10px}
header a.brand{font-size:15px;letter-spacing:-.01em}
.spot b{font-size:26px;letter-spacing:-.03em}
.chip{background:rgba(255,255,255,.03);font-weight:600}
main{gap:var(--gap);padding:18px}
.card{border-radius:var(--rad);padding:16px;box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 14px 34px -22px rgba(0,0,0,.7)}
.card h3{font-size:10.5px;letter-spacing:.16em;margin-bottom:12px}

/* toolbar: only the controls that matter; every overlay switch lives in ☰ Options (same switches, same logic) */
#chartCard>.toolbar>[data-ov]:not(#riseQuick),#chartCard>.toolbar>#oiMode,#chartCard>.toolbar>#flowWin{display:none!important}
.toolbar{gap:8px;margin-bottom:12px}
.seg{border-radius:12px;box-shadow:0 0 0 1px var(--line) inset}
.seg button,.tog{padding:8px 14px;font-size:12px;letter-spacing:.01em;transition:background .15s,color .15s}
.tog{border-radius:99px}
#expandOptions{font-weight:800}

/* notices: compact, calm */
.dayline{font-size:12.5px;padding:8px 14px;border-radius:12px;border-style:solid;background:rgba(255,255,255,.02)}
.cond{padding:8px 14px;font-size:12.5px;gap:10px;border-radius:12px;margin-bottom:8px;line-height:1.45}
.cond b{font-size:13px}
.cond>span:first-child{font-size:16px}
@media(min-width:981px){.meter{width:150px}}

/* chart + legends */
#chart{border-radius:14px}
.legend{gap:6px 14px;font-size:10.5px;line-height:1.5;opacity:.85;padding-top:2px}
.oflabel{margin-top:2px}
#ofWrap{padding-top:10px}

/* right-hand panels */
.sig{border-radius:var(--rad);border-width:1px;padding:18px}
.sig h2{font-size:26px}
.coach{border-width:1px;border-radius:var(--rad)}
.stat div,.plan div{border-radius:12px}
.row,.fac{padding:8px 0}
.warn{border-radius:12px}

@media(max-width:980px){main{padding:10px;gap:10px}.card{padding:12px}.sig{padding:14px}header{padding:8px 10px}.spot b{font-size:22px}}

/* theme switch (injected next to "Show details") */
#themeBtn{background:#0d2033;color:var(--tx);border:1px solid var(--line);border-radius:99px;padding:6px 12px;font:700 12px inherit;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
#themeBtn:hover{border-color:var(--b)}

/* ── 2. LIGHT MODE ─────────────────────────────────────────────────────── */
html[data-theme=light]{
  color-scheme:light;
  --bg:#f2f5fa;--card:#ffffff;--card2:#f8fafd;--line:#d7e0ec;--tx:#0e1a2c;--mu:#5a6a80;
  --g:#07927a;--r:#d23a45;--a:#b2730a;--b:#2563eb;--p:#7440e8}
html[data-theme=light] body{background:radial-gradient(900px 500px at 90% -10%,rgba(37,99,235,.10),transparent 70%),radial-gradient(700px 400px at 0% 0%,rgba(7,146,122,.08),transparent 70%),var(--bg);color:var(--tx)}
html[data-theme=light] header{background:rgba(255,255,255,.86);box-shadow:0 1px 0 var(--line)}
html[data-theme=light] .card{background:#fff;box-shadow:0 1px 2px rgba(15,27,45,.06),0 16px 36px -26px rgba(30,60,110,.35)}
html[data-theme=light] .chip{background:#fff}
html[data-theme=light] .chip.live{color:#067a64;border-color:#9fd9cd}
html[data-theme=light] .chip.off{color:#9a5f00;border-color:#e9cf97}
html[data-theme=light] .seg button,html[data-theme=light] .tog{background:#edf2f9;color:#44566d}
html[data-theme=light] .seg button.on{background:#2563eb;color:#fff}
html[data-theme=light] .tog.on{background:#e3edff;border-color:#2563eb;color:#12307a}
html[data-theme=light] #expandChart{background:#e3edff;color:#12307a;border-color:#2563eb;box-shadow:none}
html[data-theme=light] #themeBtn{background:#fff;color:#0e1a2c}
html[data-theme=light] #expandOptionsMenu{background:#fffffff5;border-color:#c5d3e6;box-shadow:0 22px 56px -18px rgba(30,60,110,.45)}
html[data-theme=light] .opt-group{border-color:#e3eaf3}
html[data-theme=light] .opt-buttons button{background:#edf2f9;color:#44566d}
html[data-theme=light] .opt-buttons button.on{background:#e3edff;color:#12307a;border-color:#2563eb}
html[data-theme=light] .dayline{background:#fff}
html[data-theme=light] .cond.up{background:#e9f8f3;border-color:#9fd9cd}
html[data-theme=light] .cond.dn{background:#fdecee;border-color:#f0b3b9}
html[data-theme=light] .cond.sw{background:#fff6e1;border-color:#ecd18a}
html[data-theme=light] .cond{color:var(--tx)}
html[data-theme=light] .cond.up b{color:#067a64}html[data-theme=light] .cond.dn b{color:#c02a35}html[data-theme=light] .cond.sw b{color:#9a5f00}
html[data-theme=light] .meter s{background:#e4ebf4}
html[data-theme=light] .meter u{background:#0e1a2c}
html[data-theme=light] .flowbar{background:#e4ebf4}
html[data-theme=light] .chip.up{border-color:#9fd9cd}html[data-theme=light] .chip.dn{border-color:#f0b3b9}html[data-theme=light] .chip.sw{border-color:#ecd18a}
html[data-theme=light] .sig.buy{background:linear-gradient(160deg,#e6f8f1,#f4fcf9);border-color:#2bb894}
html[data-theme=light] .sig.sell{background:linear-gradient(160deg,#fdeaec,#fff6f7);border-color:#e0626b}
html[data-theme=light] .sig.watch{background:linear-gradient(160deg,#fff4d9,#fffaf0);border-color:#e0bf6a}
html[data-theme=light] .sig.block{background:#fdeef0;border-color:#e39aa2}
html[data-theme=light] .sig.block h2{color:#c02a35}
html[data-theme=light] .grade{background:#0e1a2c14}
html[data-theme=light] .plan div,html[data-theme=light] .stat div{background:#f3f7fc}
html[data-theme=light] .warn{background:#fff4d6;border-color:#e6c878;color:#7a4e00}
html[data-theme=light] .row,html[data-theme=light] .fac,html[data-theme=light] td,html[data-theme=light] .infobox th,html[data-theme=light] .infobox td{border-color:#e3eaf3}
html[data-theme=light] .fac i.y{background:#d7f3ea}html[data-theme=light] .fac i.n{background:#fbdfe2}html[data-theme=light] .fac i.z{background:#e8edf4}
html[data-theme=light] .tfc.buy{background:#e9f8f3;border-color:#9fd9cd}html[data-theme=light] .tfc.sell{background:#fdecee;border-color:#f0b3b9}
html[data-theme=light] .jrb{background:#2563eb;color:#fff}
html[data-theme=light] .jrbox.bad{background:#fdecee;border-color:#f0b3b9}html[data-theme=light] .jrbox.warn{background:#fff6e1;border-color:#ecd18a}html[data-theme=light] .jrbox.ok{background:#e9f8f3;border-color:#9fd9cd}
html[data-theme=light] label.f input,html[data-theme=light] .qty input,html[data-theme=light] #aiQ{background:#fff;color:#0e1a2c;border-color:#c5d3e6}
html[data-theme=light] .qty button,html[data-theme=light] .itabs button,html[data-theme=light] #aiChips button{background:#edf2f9;color:#33465d}
html[data-theme=light] .itabs button.on{background:#2563eb;color:#fff}
html[data-theme=light] .info{background:#e3edff;color:#12307a;border-color:#2563eb}
html[data-theme=light] #infoModal{background:#0e1a2c66}
html[data-theme=light] .infobox,html[data-theme=light] #aiPanel{background:#fff;color:#0e1a2c;border-color:#c5d3e6;box-shadow:0 30px 80px -24px rgba(30,60,110,.5)}
html[data-theme=light] .infobox .x,html[data-theme=light] #aiHead button{background:#edf2f9;color:#33465d}
html[data-theme=light] .infobox .tip{background:#eef4ff}
html[data-theme=light] .infobox .warnbox{background:#fff4d6;border-color:#e6c878;color:#7a4e00}
html[data-theme=light] .aim.a{background:#eef3fa;color:#0e1a2c}
html[data-theme=light] .aim.u{background:#2563eb;color:#fff}
html[data-theme=light] .aim.err{background:#fdecee;border-color:#f0b3b9;color:#a02430}
html[data-theme=light] .coach{background:#fff}
html[data-theme=light] .coach.buy{background:linear-gradient(160deg,#e6f8f1,#f4fcf9);border-color:#2bb894}
html[data-theme=light] .coach.sell{background:linear-gradient(160deg,#fdeaec,#fff6f7);border-color:#e0626b}
html[data-theme=light] .coach.watch{background:linear-gradient(160deg,#fff4d9,#fffaf0);border-color:#e0bf6a}
html[data-theme=light] .coach.hold{background:linear-gradient(160deg,#e6f8f1,#f4fcf9);border-color:#2bb894}
html[data-theme=light] .coach.book{background:linear-gradient(160deg,#fff1d6,#fffaf0);border-color:#e0a24a}
html[data-theme=light] .coach.exit{background:linear-gradient(160deg,#fdeaec,#fff6f7);border-color:#e0626b}
html[data-theme=light] .coach.hold .big{color:#067a64}html[data-theme=light] .coach.book .big{color:#a8620a}html[data-theme=light] .coach.exit .big{color:#c02a35}
html[data-theme=light] .coach .why{color:#3a4a60}
html[data-theme=light] .steps li{background:#f3f7fc}
html[data-theme=light] .cbtn{background:#fff;color:#0e1a2c;border-color:#c5d3e6}
html[data-theme=light] .cbtn.o{background:#edf2f9}

/* on-chart overlays in light mode */
html[data-theme=light] .zb.res{background:rgba(210,58,69,.10);border-color:rgba(210,58,69,.55);color:#b32832}
html[data-theme=light] .zb.sup{background:rgba(7,146,122,.10);border-color:rgba(7,146,122,.55);color:#06705c}
html[data-theme=light] .zb.mid{background:rgba(14,26,44,.05);border-color:rgba(14,26,44,.25);color:#33465d}
html[data-theme=light] .oibadge{background:#ffffffd9;color:#44566d}
html[data-theme=light] #zoneLayer [style*="#081521"]:not([style*="z-index:8"]),html[data-theme=light] #zoneLayer [style*="#06101a"]:not([style*="z-index:8"]){background:rgba(255,255,255,.93)!important;box-shadow:0 1px 4px rgba(14,26,44,.25)!important}
html[data-theme=light] #zoneLayer [style*="color:#ff9a9d"],html[data-theme=light] #zoneLayer [style*="#ff9a9d"]{color:#b32832!important}
html[data-theme=light] #zoneLayer [style*="color:#7be8d3"],html[data-theme=light] #zoneLayer [style*="#7be8d3"]{color:#06705c!important}
html[data-theme=light] #zoneLayer [style*="color:#f5b84b"]{color:#8a5a00!important}
html[data-theme=light] #zoneLayer [style*="color:#dbe8f5"]{color:#33465d!important}
html[data-theme=light] #zoneLayer [style*="color:#4da6ff"],html[data-theme=light] #zoneLayer [style*="color:#83bdff"]{color:#1d4ed8!important}
html[data-theme=light] #zoneLayer [style*="color:#ff7ad9"]{color:#b0197f!important}
html[data-theme=light] #zoneLayer [style*="color:#a3b6c9"],html[data-theme=light] #zoneLayer [style*="color:#8aa1b4"]{color:#5a6a80!important}
html[data-theme=light] #zoneLayer [style*="color:#d8e1eb"],html[data-theme=light] #zoneLayer [style*="color:#cfe0f0"]{color:#0e1a2c!important}
html[data-theme=light] #ohlcBar{background:rgba(255,255,255,.92)!important;color:#0e1a2c!important;box-shadow:0 1px 4px rgba(14,26,44,.2)}
html[data-theme=light] #ohlcBar span[style*="#8aa1b4"]{color:#5a6a80!important}
html[data-theme=light] .legend{opacity:1}

/* more light-mode fixes */
html[data-theme=light] #v2ResearchPanel>div{background:#eef4ff!important;border-color:#b6cdf3!important}
html[data-theme=light] #v2ResearchPanel b{color:#1d4ed8!important}
html[data-theme=light] #v2ResearchText{color:#0e1a2c!important}
html[data-theme=light] #v2ResearchPanel button{background:#fff!important;color:#0e1a2c!important;border-color:#b6cdf3!important}
html[data-theme=light] .legend span[style*="#ff9a9d"]{color:#b32832!important}
html[data-theme=light] .legend span[style*="#7be8d3"]{color:#06705c!important}
html[data-theme=light] .legend span[style*="#ff7ad9"]{color:#b0197f!important}
html[data-theme=light] .legend span[style*="#83bdff"]{color:#1d4ed8!important}
html[data-theme=light] .legend span[style*="#f4d35e"]{color:#8a6a00!important}
html[data-theme=light] #zoneLayer [style*="rgba(245,184,75,.10)"]{background:rgba(245,184,75,.05)!important}
html[data-theme=light] #zoneLayer [style*="rgba(34,195,166,.045)"]{background:rgba(7,146,122,.05)!important}
html[data-theme=light] #zoneLayer [style*="rgba(240,86,90,.04"]{background:rgba(210,58,69,.05)!important}
html[data-theme=light] #zoneLayer [style*="color:#dce8f4"]{color:#0e1a2c!important}
html[data-theme=light] .oitxt{text-shadow:none!important}
html[data-theme=light] #zoneLayer [style*="text-shadow"]{text-shadow:none!important}
html[data-theme=light] #chart{background:#fff}
html[data-theme=light] #v2ResearchPanel a{color:#12307a!important;background:#fff;border-color:#9db8ea!important}

/* ── 3. COLOURS: brighter, higher-contrast palette (dark) ──────────────── */
:root{--bg:#050c16;--card:#0f2134;--card2:#0b1a2b;--line:#2b4868;--tx:#f2f7ff;--mu:#a6bbd2;
  --g:#2ee6b6;--r:#ff5d6c;--a:#ffc233;--b:#5aa9ff;--p:#b18cff}
.card{background:linear-gradient(160deg,#112539,#0b1a2b);border-color:#2b4868}
.chip{border-color:#2f4f72;color:#b4c7dc}
.chip.live{color:#38f0c0;border-color:#1f9f84;background:rgba(46,230,182,.08)}
.chip.off{color:#ffc233;border-color:#8a6a1c;background:rgba(255,194,51,.08)}
.seg button,.tog{background:#12283f;color:#b4c7dc}
.seg button.on{background:#2f7ae0;color:#fff}
.tog.on{background:#16406f;border-color:#5aa9ff;color:#fff}
.opt-buttons button{background:#12283f;color:#b4c7dc}
.opt-buttons button.on{background:#1f5aa6;border-color:#5aa9ff}
.cond.up{background:#0c3a33;border-color:#23b596}
.cond.dn{background:#3a1520;border-color:#d44a5e}
.cond.sw{background:#3b3013;border-color:#c79a2a}
.cond.up b{color:#38f0c0}.cond.dn b{color:#ff7a89}.cond.sw b{color:#ffc233}
.zb.res{background:rgba(255,93,115,.17);border-color:rgba(255,93,115,.9);color:#ffb7c0}
.zb.sup{background:rgba(25,211,160,.17);border-color:rgba(25,211,160,.9);color:#8ff2d6}
.zb.mid{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.5);color:#eaf2ff}
.oib.ce{background:rgba(255,93,115,.88)}.oib.pe{background:rgba(25,211,160,.88)}
.oib.ce.neg{border-color:#ff5d73}.oib.pe.neg{border-color:#19d3a0}
.up{color:#38f0c0}.dn{color:#ff6b7b}.am{color:#ffc233}
.sig.buy{background:linear-gradient(160deg,#0d4a40,#0b2a31);border-color:#2ee6b6}
.sig.sell{background:linear-gradient(160deg,#4a1a26,#2a1220);border-color:#ff5d6c}
.sig.watch{background:linear-gradient(160deg,#3b3013,#1a1c22);border-color:#c79a2a}
.sig.block{background:#3a1a26;border-color:#d44a5e}
.legend{color:#b4c7dc}

/* ── light palette: bolder accents ─────────────────────────────────────── */
html[data-theme=light]{--g:#058a72;--r:#d92d45;--a:#a86400;--b:#1d63d6;--p:#6a3fd0;--line:#cbd7e6;--mu:#516178}
html[data-theme=light] .card{background:#fff;border-color:#d4dfec}
html[data-theme=light] .up{color:#058a72}html[data-theme=light] .dn{color:#d92d45}html[data-theme=light] .am{color:#a86400}
html[data-theme=light] .zb.res{background:rgba(217,45,69,.11);border-color:rgba(217,45,69,.7)}
html[data-theme=light] .zb.sup{background:rgba(5,138,114,.11);border-color:rgba(5,138,114,.7)}
html[data-theme=light] .oib.ce{background:rgba(217,45,69,.85)}html[data-theme=light] .oib.pe{background:rgba(5,138,114,.85)}
html[data-theme=light] .chip.live{background:rgba(5,138,114,.08)}

/* ── 5. TradingView-style colours: solid red / blue / black / orange, bold lines ───────────── */
.zb{border-top-width:2px;border-bottom-width:2px}
.zb.res{background:rgba(239,83,80,.10);border-color:#ef5350;color:#ff8a87}
.zb.sup{background:rgba(66,165,245,.10);border-color:#42a5f5;color:#90caf9}
.oib.ce{background:rgba(239,83,80,.88)}.oib.pe{background:rgba(38,166,154,.88)}
.oib.ce.neg{border-color:#ef5350}.oib.pe.neg{border-color:#26a69a}
html[data-theme=light] .zb.res{background:rgba(239,83,80,.09);border-color:#d32f2f;color:#c62828}
html[data-theme=light] .zb.sup{background:rgba(25,118,210,.08);border-color:#1565c0;color:#0d47a1}
html[data-theme=light] .oib.ce{background:rgba(239,83,80,.9)}html[data-theme=light] .oib.pe{background:rgba(38,166,154,.9)}
html[data-theme=light] #chart{background:#fff}

/* ── support zones = green (main chart + dual chart) ── */
.zb.sup{background:rgba(38,166,154,.13)!important;border-color:#26a69a!important;color:#6fe0d2!important}
html[data-theme=light] .zb.sup{background:rgba(8,145,120,.11)!important;border-color:#0a8f72!important;color:#066b57!important}
/* v10: checklist score colours + keep the Ask-AI button off the right-hand values */
html[data-theme=light] .fac .fv.fp{color:#0a8a4a}html[data-theme=light] .fac .fv.fm{color:#d1202f}html[data-theme=light] .fac .fv.f0{color:#6b7a8c}
.fac .fv{min-width:34px;text-align:right}
body{padding-bottom:84px}
/* v11: score values as solid pills so they are clearly visible in light + dark */
.fac .fv{display:inline-block;min-width:38px;text-align:center;padding:3px 9px;border-radius:99px;font:800 13px/1.2 'DM Mono',ui-monospace,Menlo,monospace;letter-spacing:.2px;opacity:1}
.fac .fv.fp{background:#16a34a!important;color:#fff!important}
.fac .fv.fm{background:#dc2626!important;color:#fff!important}
.fac .fv.f0{background:#64748b!important;color:#fff!important}
.fac small.mono:not(.fv){display:inline-block;padding:3px 9px;border-radius:99px;background:#64748b;color:#fff;font-weight:700;font-size:11px}
/* v12: "WAIT" card, step numbers and score ring – readable in light and dark */
.steps li b.n{background:#2563eb!important;color:#fff!important;font-weight:800;box-shadow:0 2px 6px -2px #2563eb99}
.steps li{border-color:rgba(100,130,170,.35)}
.ring b{font-weight:800}
html[data-theme=light] .coach.wait{background:linear-gradient(160deg,#eef3fb,#f8fafd);border-color:#9fb4d1}
html[data-theme=light] .coach.wait .big,html[data-theme=light] .coach .big{color:#1e293b}
html[data-theme=light] .coach.buy .big{color:#067a64}html[data-theme=light] .coach.sell .big{color:#c02a35}html[data-theme=light] .coach.watch .big{color:#a8620a}
html[data-theme=light] .coach .why{color:#334155}
html[data-theme=light] .steps li{background:#fff;border-color:#c5d3e6;color:#1e293b}
html[data-theme=light] .steps li b:not(.n){color:#0f172a}
html[data-theme=light] .ring circle:first-child{stroke:#dbe5ef!important}
html[data-theme=light] .ring circle[stroke="#22c3a6"]{stroke:#0d9f7f!important}
html[data-theme=light] .ring circle[stroke="#f0565a"]{stroke:#dc3545!important}
html[data-theme=light] .ring circle[stroke="#f5b84b"]{stroke:#e0a020!important}
html[data-theme=light] .ring b[style*="22c3a6"]{color:#067a64!important}
html[data-theme=light] .ring b[style*="f0565a"]{color:#c02a35!important}
html[data-theme=light] .ring b[style*="f5b84b"]{color:#a8620a!important}
html[data-theme=light] .ring small{color:#475569}
html[data-theme=light] .sig,html[data-theme=light] .sig-top{color:#1e293b}
/* v13: trend-quality meter no longer overlaps the banner text; order-flow banner wraps on phones; real buy/sell badge sits below the OHLC legend */
.cond .meter{width:176px;flex:none}
.cond .meter b{font-size:10px!important;left:0;right:0;text-align:right}
@media(max-width:700px){
  .cond b{white-space:normal}
  .cond .meter{width:100%}
  .oibadge{top:34px!important;left:6px!important;right:auto!important;max-width:calc(100% - 84px);white-space:normal;font-size:9px;line-height:1.3}
}
.cond .meter b{top:-4px}
