/* Overview v4: score cards, logos, warnings panels, full-width rows.
   Loaded last, so these rules win over the earlier desk pass. */

/* Logos */
.lg-av{flex:none;width:32px;height:32px;border-radius:50%;overflow:hidden;display:inline-grid;place-items:center;background:#0b0e13;box-shadow:0 0 0 1px #ffffff26}
.lg-av img{width:100%;height:100%;object-fit:cover;display:block}
.lg-av.txt{color:#fff;font-size:12px;font-weight:700;letter-spacing:.02em}
.lg-av.sm{width:24px;height:24px}.lg-av.sm.txt{font-size:10px}
.lg-av.lg{width:40px;height:40px}

/* Today at US open: open sections, no outer box */
.uo{background:none;border:0;border-radius:0;overflow:visible}
.uo-head{padding:0 0 var(--s4);border-bottom:0;flex-wrap:wrap;row-gap:var(--s2)}
.uo-head h2{font-size:18px}
.uo-sum span{font-size:12.5px;padding:3px 10px}
.uo-grp{padding:0;margin-bottom:28px}
.uo-grp+.uo-grp{border-top:0}
.uo-gh{font-size:16px;letter-spacing:0;text-transform:none;color:var(--text);font-weight:600;margin-bottom:var(--s3);gap:10px}
.uo-gh .dot{width:8px;height:8px}
.uo-grp.g-act .dot{background:var(--red)}.uo-grp.g-watch .dot{background:var(--amb)}.uo-grp.g-ok .dot{background:var(--gain)}
.uo-gh .n{font-size:12px;font-weight:600;padding:1px 8px;color:var(--mut)}
.uo-empty{padding:0 0 var(--s4)}
.uo-cards{gap:16px}

/* Score card, NVDA style */
.sc2{display:flex;flex-direction:column;gap:14px;height:100%;box-sizing:border-box;padding:20px 22px;border-radius:14px;
 background:linear-gradient(180deg,#141a24 0%,#0f131a 100%);border:1px solid var(--line2);border-top:3px solid var(--line2);cursor:pointer;transition:border-color .15s}
.sc2:hover{border-color:#3a4350}
.sc2.t-act{border-top-color:var(--red)}
.sc2.t-watch{border-top-color:var(--amb)}
.sc2.t-ok{border-top-color:var(--gain)}
.sc2-top{display:flex;align-items:center;gap:12px;min-width:0}
.sc2-top h3{margin:0;font-size:30px;font-weight:700;letter-spacing:-.02em;line-height:1}
.sc2-type{margin-left:auto;white-space:nowrap;font-size:12.5px;font-weight:600;padding:5px 11px;border-radius:99px;background:#1c2a44;color:#b9cdf5}
.sc2-type.cc{background:#2a1f44;color:#d2bff5}
.sc2-sub{margin:0;color:var(--mut);font-size:15px}
.sc2-chips{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.uo .sc2 .chip{font-size:12.5px;padding:4px 11px;border-bottom-width:1px}
.uo .sc2 .chip.hold{color:#c4cad3;background:#181d24}
.uo .sc2 .chip.earn{color:#b9cdf5;border-color:#2a3b5e;background:#121a2a}
.uo .sc2 .chip.earn.soon{color:var(--amb);border-color:var(--amb-line);background:var(--amb-bg)}
.sc2-nums{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.sc2-m{display:flex;flex-direction:column;min-width:0}
.sc2-l{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--mut);margin-bottom:6px}
.uo .sc2-m b{font-size:32px;line-height:1.1;font-weight:700;letter-spacing:-.02em;align-self:flex-start;border-bottom-color:transparent}
.uo .sc2-m b:hover{border-bottom-color:var(--acc)}
.uo .sc2-m b.amb{color:var(--amb)}
.sc2-m small{color:var(--mut);font-size:14px;margin-top:4px}
.sc2-bar{height:6px;border-radius:99px;background:#232a34;margin-top:10px;overflow:hidden}
.sc2-bar i{display:block;height:100%;border-radius:99px;background:var(--gain)}
.sc2-bar.neg i{background:var(--red)}
.sc2-time{margin-top:auto}
.sc2-tl{display:flex;justify-content:space-between;gap:12px;font-size:14px;color:var(--mut)}
.uo .sc2-tl b{color:var(--text);font-weight:700;border-bottom-color:transparent}
.uo .sc2-tl span[data-x]{font-weight:400;border-bottom-color:transparent}
.sc2-track{position:relative;height:5px;border-radius:99px;background:#232a34;margin:10px 6px 0 0}
.sc2-track i{display:block;height:100%;border-radius:99px;background:#5b8def}
.sc2-track em{position:absolute;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #0f131a}
.sc2-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border:1px solid var(--line2);border-radius:10px;background:#0c1016}
.sc2-foot span{font-size:12px;letter-spacing:.07em;text-transform:uppercase;color:var(--mut)}
.uo .sc2-foot b{font-size:20px;font-weight:700}

@media(max-width:700px){
 .uo-head{padding:0 0 var(--s3)}
 .uo-grp{padding:0}
 .sc2{padding:18px}
 .sc2-top h3{font-size:26px}
 .uo .sc2-m b{font-size:28px}
}

/* Warnings: three panels */
.wp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch}
.wp-stack{display:flex;flex-direction:column;gap:16px}
.wp-stack .wp{flex:1}
.wp{background:var(--panel);border:1px solid var(--line2);border-radius:14px;padding:18px 20px}
.wp-h{display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:15px;font-weight:600}
.wp-h .dot{width:7px;height:7px;border-radius:50%;background:var(--mut)}
.wp-h .dot.blue{background:#5b8def}.wp-h .dot.amb{background:var(--amb)}.wp-h .dot.gain{background:var(--gain)}
.wp-h .n{font-size:12px;color:var(--mut);background:var(--raise);border-radius:99px;padding:1px 8px}
.wp-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line);font-size:15px;min-width:0}
.wp-h+.wp-row{border-top:0}
.wp-row>b{font-weight:600}
.wp-row .chip{font-size:12px;padding:3px 9px;white-space:nowrap}
.wp-row>b{min-width:44px}
.uo .wp .chip.earn{color:#b9cdf5;border-color:#2a3b5e;background:#121a2a}
.wp-r{margin-left:auto;color:var(--mut);font-size:13.5px;white-space:nowrap}
.wp-r b.amb{color:var(--amb)}
.wp-none{margin:0;color:var(--mut);font-size:14px}
.wp-cal{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:10px;padding:8px 0;border-top:1px solid var(--line);font-size:14.5px;align-items:baseline}
.wp-h+.wp-cal{border-top:0}
.wp-d{color:var(--mut)}
.wp-t{display:flex;flex-wrap:wrap;gap:4px 14px}.wp-tk{display:inline-flex;align-items:center;gap:7px}.wp-tk>span:not(.lg-av){color:var(--mut)}.wp-tk b{font-weight:600}
.wp-cal{align-items:center}
.wp-s{color:var(--mut);font-size:13px;white-space:nowrap}
.wp-src{margin:10px 0 0;color:var(--dim);font-size:12.5px}
@media(max-width:1180px){.wp-grid{grid-template-columns:1fr 1fr}.wp-grid>.wp:last-child{grid-column:1/-1}}
@media(max-width:700px){.wp-grid{grid-template-columns:1fr}.wp-row{flex-wrap:wrap;row-gap:4px}.wp-r{margin-left:auto}.wp-row .chip+.wp-r{flex-basis:100%;margin-left:34px}}
.uo-sum{flex-wrap:wrap}.uo-sum span{white-space:nowrap}

/* Item 2: Active wheels full width, then Income gap and Performance side by side */
#v-overview.on{display:flex!important;flex-direction:column;gap:20px}
#v-overview>*{margin:0!important}
#ovMain{display:flex!important;flex-direction:column;gap:20px}
#v-overview .wcard{width:100%}
#v-overview .rcol{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch}
#v-overview .rcol .pseg{grid-column:1/-1;margin:0 0 -4px auto!important}
#v-overview .rcol>.card{margin:0!important;padding:22px 24px;border-radius:14px}
#gapCard,#perfCard{display:flex;flex-direction:column}
#gapCard .gl,#perfCard .ph h3{font-size:17px!important;font-weight:600;letter-spacing:0;text-transform:none;color:var(--text)}
#gapCard .g2s div{font-size:13.5px}
#gapCard .g2s b{font-size:18px}
#gapCard .capt>div{font-size:14.5px;padding:9px 0;border-top:1px solid var(--line)}
#gapCard .capt>div:first-child{border-top:0}
#gapCard .capt{margin-top:auto}
#perfCard .pk b{font-size:30px}
#perfCard .pk span{font-size:12px}
#perfCard .cal{gap:6px;flex:1}
#perfCard .cal .dh{font-size:12px}
#perfCard .cal>*:not(.dh){aspect-ratio:auto!important;min-height:58px;font-size:12.5px;border-radius:8px;align-items:flex-start;justify-content:flex-start!important;padding:7px 9px;background:#141920;border:1px solid var(--line)}
#perfCard .cal>div:empty{background:none;border:0}
#perfCard .cal .d b{font-size:12.5px;margin-top:auto}
#perfCard .cal .d.w{background:#0F2A1A;border-color:#1F5A36}
#perfCard .cal .d.l{background:#2A1214;border-color:#5A2226}
@media(max-width:900px){#v-overview .rcol{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){#perfCard .cal>*:not(.dh){min-height:44px;padding:5px;font-size:11px}#perfCard .cal .d b{font-size:10px}}
#gapCard .lnk{align-self:flex-start;margin:0 0 14px}
#gapCard .gv{margin:6px 0 8px}
#gapCard>p.mut{margin:0 0 6px;font-size:14px}

/* Item 3: Active wheels, logos and 15px+ text */
#v-overview .wcard{padding:22px 24px;border-radius:14px}
#v-overview .wcard h3{font-size:17px}
#v-overview .wtab th{font-size:12px;letter-spacing:.06em}
#v-overview .wtab td{height:auto;padding-top:14px;padding-bottom:14px}
#v-overview .wtab .tk{gap:12px}
#v-overview .wtab .tk .lg-av{width:36px;height:36px}
#v-overview .wtab .tk b{font-size:16px}
#v-overview .wtab .tk .lg{font-size:11px;padding:1px 6px}
#v-overview .wtab .tk small{font-size:13.5px;color:var(--mut);margin-top:2px}
#v-overview .wtab .bigv{font-size:16px}
#v-overview .wtab .n2{font-size:12.5px}
#v-overview .wtab .act .btn{font-size:13px;padding:5px 12px}
#v-overview .wfilt button{font-size:13px;padding:5px 13px}
#v-overview .wnote{font-size:13px}
#v-wheels h3 .lg-av{margin-right:8px;vertical-align:-6px}

/* Item 5: Closed trades */
.ctc{padding:20px 20px;border-radius:14px;container-type:inline-size}
.ct-h{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.ct-h h3{margin:0;font-size:17px}
.ct-h>.mut{margin-left:auto;font-size:13px}
.ct-note{margin:8px 0 14px;color:var(--mut);font-size:13.5px}
.ctt{width:100%;border-collapse:collapse}
.ctt th{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--mut);font-weight:600;padding:10px 5px;white-space:nowrap;cursor:pointer;text-align:left;border-bottom:1px solid var(--line)}
.ctt th.r,.ctt td.r{text-align:right}
.ctt th.s::after{content:" ↕";opacity:.45}
.ctt th.desc::after{content:" ↓";opacity:1}.ctt th.asc::after{content:" ↑";opacity:1}
.ctt td{padding:14px 5px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:middle;white-space:nowrap;font-variant-numeric:tabular-nums}
.ctt tbody tr{cursor:pointer}
.ctt tbody tr:hover td{background:#141920}
.ctt td small{display:block;color:var(--mut);font-size:12.5px;margin-top:2px}
.ctt td b{font-weight:600}
.ct-tk{display:flex;align-items:center;gap:10px}
.ct-tk .lg-av{width:30px;height:30px}
.ct-out{display:inline-block;font-size:12px;font-weight:600;padding:3px 9px;white-space:nowrap;border-radius:99px;background:#1c2a44;color:#b9cdf5}
.ct-out.ex{background:#0f2418;color:var(--gain)}
.ct-out.as,.ct-out.ca{background:#2a1f44;color:#d2bff5}
.ct-mute{color:var(--mut)}
.ctt .pos{color:var(--gain);font-weight:600}.ctt .neg{color:var(--red);font-weight:600}
.ctt [data-x]{cursor:pointer;border-bottom:1px dotted var(--line2)}
.ctt tfoot td{font-weight:700;border-bottom:0;padding-top:18px}
.ct-none{color:var(--mut);text-align:center!important}
@container (max-width:1090px){
 .ctt thead{display:none}
 .ctt,.ctt tbody,.ctt tfoot{display:block}
 .ctt tbody tr{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 16px;padding:16px;margin-bottom:12px;border:1px solid var(--line2);border-radius:12px;background:#0f131a}
 .ctt tbody td{display:block;padding:0;border:0;white-space:normal;text-align:left!important}
 .ctt tbody td::before{content:attr(data-label);display:block;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--mut);margin-bottom:3px}
 .ctt tbody td.c-stock{grid-column:1/3;grid-row:1}.ctt tbody td.c-stock::before,.ctt tbody td.c-outcome::before{display:none}
 .ctt tbody td.c-outcome{grid-column:-2/-1;grid-row:1;justify-self:end;align-self:center}
 .ctt tfoot tr{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px 16px;padding:16px;border:1px solid var(--line2);border-radius:12px}
 .ctt tfoot td{display:block;padding:0;text-align:left!important}
 .ctt tfoot td.c-total{grid-column:1/-1}
 .ctt tfoot td:not(.c-total)::before{content:attr(data-label);display:block;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--mut);font-weight:600;margin-bottom:3px}
 .ctt tfoot td:last-child{display:none}
}
@container (max-width:760px){.ctt tbody tr,.ctt tfoot tr{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container (max-width:520px){.ctt tbody tr,.ctt tfoot tr{grid-template-columns:1fr 1fr}.ctt tbody td.c-stock{grid-column:1}.ctt tbody td.c-outcome{grid-column:2}.ct-h>.mut{margin-left:0}}
.ctc .tw{overflow-x:auto}
.wp-row{flex-wrap:wrap;row-gap:4px}.wp-r{margin-left:auto}

/* Item 4: Income gap and Performance fill the row; Active wheels as a table; logos in Open positions */
#v-overview .rcol{align-self:stretch;width:100%}
#v-overview .wtab td{vertical-align:middle}
#v-overview .wtab td.r,#v-overview .wtab th.r{text-align:right}
#v-overview .wtab td[data-label="Contract"],#v-overview .wtab td[data-label="Days left"],#v-overview .wtab td[data-label="Contracts"]{font-size:14.5px;white-space:nowrap}
#v-overview .wtab td[data-label="Shares"]{font-size:14.5px;white-space:nowrap}
#v-overview .wtab .shc{display:inline-flex;flex-direction:column;align-items:flex-end}
#v-overview .wtab td[data-label="Shares"] .n2{display:block;margin-top:2px}
#v-overview .wtab .act{display:flex;flex-direction:column;align-items:flex-end;gap:6px;text-align:right}
.tkc{display:inline-flex;align-items:center;gap:8px;vertical-align:middle}
#ovPos td .tkc .lg-av{width:22px;height:22px}
@media(max-width:1024px){#v-overview .wtab td[data-label="Shares"] .n2{text-align:right}}
#v-overview .wtab th{white-space:normal;vertical-align:bottom;line-height:1.3}
#v-overview .wtab td[data-label="Shares"] .n2{white-space:normal;max-width:150px}

/* Item 5: frozen header, sidebar collapse */
/* The top bar, figures strip and tabs stay at the top while the page scrolls;
   the box-shadow paints the background out to the edges of main. */
.shead{position:sticky;top:0;z-index:13;background:#090B0E;box-shadow:0 0 0 100vmax #090B0E;clip-path:inset(0 -100vmax);border-bottom:1px solid var(--line)}
.shead .tbar{position:static}
.shead .tabs{margin:0;padding:10px 0}
html{scroll-padding-top:160px}
.scol{margin-top:auto;display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:8px;background:none;color:var(--mut);font:500 13px Inter,Arial,sans-serif;cursor:pointer;white-space:nowrap}
.scol:hover{background:#151920;color:var(--text)}
.scol svg{flex:none;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
.side{transition:width .15s}
.app.side-min .side{width:64px!important;padding-left:8px!important;padding-right:8px!important}
.app.side-min .logo{justify-content:center;padding-left:0!important;padding-right:0!important}
.app.side-min .logo span,.app.side-min .nav .lb,.app.side-min .nav .badge,.app.side-min .scol .lb{display:none}
.app.side-min .nav button,.app.side-min .scol{justify-content:center;padding-left:0;padding-right:0}
.app.side-min .scol svg{transform:rotate(180deg)}
@media(max-width:900px){.shead{position:static;box-shadow:none;clip-path:none;border-bottom:0}html{scroll-padding-top:70px}.scol{display:none}.app.side-min .side{width:auto!important}}

/* Cash for new puts on the Active wheels Cash row */
#v-overview .wtab .tk small .pcv{font-weight:700;color:var(--text)}#v-overview .wtab .tk small .pcv.pos{color:var(--acc)}#v-overview .wtab .tk small .pcv.neg{color:var(--red)}
#v-overview .wtab .tk small{white-space:normal;max-width:230px}

/* Item 6: one-row header, connection in the sidebar */
/* Top bar: last update and Refresh on the left; tabs and USD/MYR on the right. */
.shead .tbar .tabs{margin:0;padding:0;justify-content:flex-end}
.tbar .tabs div{padding:2px}
.tbar .tabs button{padding:5px 14px}
html{scroll-padding-top:72px}
/* The greeting is gone from Overview; other pages keep their titles. */
main[data-view="overview"] .top h1,main[data-view="overview"] #sub{display:none}
/* Connection status and Connect/Disconnect sit above Collapse in the sidebar. */
.sconn{margin-top:auto;display:flex;flex-direction:column;gap:8px;padding:12px 0 8px;border-top:1px solid var(--line)}
.sconn .conn{margin:0;padding:8px 10px;border-radius:10px;white-space:normal}
.scol{margin-top:2px}
.sbtn{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;font-size:12px;padding:4px 10px;color:var(--acc);border-color:#1F3A2A;background:#0F1A14}
.sbtn svg{flex:none;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.sbtn.danger{color:#FF6B6B;border-color:#5A2226;background:#2A1214}
.sbtn.danger:hover{color:#FF8A8A;background:#3A1719}
.app.side-min .sconn .conn{display:flex;justify-content:center;padding:8px 0}
.app.side-min .sconn .conn b{font-size:0;gap:0}
.app.side-min .sbtn{align-self:center;padding:6px}
.app.side-min .sbtn .lb{display:none}
@media(max-width:900px){.shead .tbar .tabs{justify-content:flex-start;max-width:100%}.sconn{margin:0 0 0 auto;padding:0;border-top:0;flex-direction:row}.sbtn .lb{display:none}.sbtn{padding:6px}html{scroll-padding-top:70px}}
/* The status box is a button that opens the connection popover. */
.sconn .conn{width:100%;text-align:left;font:inherit;cursor:pointer}
.sconn .conn:hover{border-color:var(--line2)}
.conn b #connT{flex:1}
.conn-i{flex:none;width:15px;height:15px;border-radius:50%;border:1px solid currentColor;font-size:10px;line-height:13px;font-weight:600;font-style:normal;text-align:center;color:var(--mut)}
.app.side-min .conn-i{display:none}
.cpop{position:fixed;z-index:45;width:380px;max-height:calc(100vh - 24px);overflow:auto;background:var(--raise);border:1px solid var(--line2);border-radius:var(--r);padding:var(--s5) var(--s6);box-shadow:var(--shadow-pop);font-size:13px}
.cpop[hidden]{display:none}
.cpop h3{display:flex;align-items:center;gap:8px;margin:0 24px 8px 0;font-size:15px}
.cpop>p{margin:0 0 10px;line-height:1.55}
.cpop .xc{position:absolute;top:10px;right:12px;background:none;border:0;color:var(--mut);cursor:pointer;font-size:18px}
.cpop-l>div{padding:7px 0;display:flex;justify-content:space-between;gap:12px}
.cpop #wdStayRow{margin-top:12px}
.cpop #wdStayNote{margin:6px 0 0;font-size:12px}
.cpop-b{margin-top:14px;gap:8px}
.cpop #wdEverywhere{margin-left:0}
.cpop.sheet{left:12px!important;right:12px;bottom:12px;width:auto}
/* Collapse sits at the top, beside the logo, as an icon only. */
.logo .scol{margin:0 0 0 auto;width:30px;height:30px;padding:0;justify-content:center;flex:none}
.logo .scol svg{width:18px;height:18px;transition:none}
.app.side-min .logo{flex-direction:column;gap:12px}
.app.side-min .logo .scol{margin:0}
.app.side-min .logo .scol svg{transform:scaleX(-1)}
/* ATM / OTM / ITM tag beside From strike. */
.mny{display:inline-block;margin-left:8px;padding:1px 7px;border-radius:99px;font-size:11px;line-height:1.5;font-weight:700;font-style:normal;letter-spacing:.04em;vertical-align:middle;border:1px solid}
.mny-otm{color:var(--gain);border-color:var(--acc-line);background:var(--acc-bg)}
.mny-atm{color:var(--amb);border-color:var(--amb-line);background:var(--amb-bg)}
.mny-itm{color:var(--red);border-color:#4a1f1f;background:#1f0d0d}
.sc2 .sc2-m:has(>.mny),.sc-tiles .sc-tile:has(>.mny){display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:0}
.sc2 .sc2-m:has(>.mny)>:not(b):not(.mny),.sc-tiles .sc-tile:has(>.mny)>:not(b):not(.mny){grid-column:1/-1}
.sc2 .sc2-m>.mny,.sc-tiles .sc-tile>.mny{justify-self:start}
