:root{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#18181b;background:#fafaf9;color-scheme:light;
  /* v2 palette — cooler, cleaner neutral base (was a warm cream/beige), pure-white
     cards, refined status colors. Approved via the "Quanti — Nova Paleta" design proposal. */
  --bg:#fafaf9;--bg-soft:#f7f7f6;--surface:#ffffff;--surface-2:#f4f4f5;
  --ink:#18181b;--ink-2:#3f3f46;--muted:#71717a;--muted-2:#52525b;
  --line:#e4e4e7;--line-soft:#ededed;--black:#18181b;
  --green:#16a34a;--green-bg:#ecfdf3;--green-line:#bbf0cd;
  --red:#dc2626;--red-bg:#fef2f2;--red-line:#fecaca;
  --terracotta:#c2410c;--terracotta-bg:#fff2e8;--terracotta-line:#fdc89b;
  --amber:#d97706;--amber-bg:#fffbeb;--amber-line:#fde3ab;
  --accent-day:#6366f1;--accent-day-glow:rgba(99,102,241,.22);--accent-day-bg:rgba(99,102,241,.12);--accent-day-line:rgba(99,102,241,.28);
  --accent-swing:#ea580c;--accent-swing-glow:rgba(234,88,12,.22);--accent-swing-bg:rgba(234,88,12,.12);--accent-swing-line:rgba(234,88,12,.28);
  --accent-intra:#0891b2;--accent-intra-glow:rgba(8,145,178,.15);--accent-intra-bg:rgba(8,145,178,.08);--accent-intra-line:rgba(8,145,178,.35);
  --blue-live:#0284c7;--blue-live-glow:rgba(2,132,199,.22);--blue-live-bg:rgba(2,132,199,.12);--blue-live-line:rgba(2,132,199,.32);
  --dot-neutral:#94a3b8;--dot-neutral-glow:rgba(148,163,184,.25);
  --sr-strong:#047857;--sr-strong-bg:rgba(4,120,87,.10);--sr-strong-line:rgba(4,120,87,.30);
  --sr-forming:#0e7490;--sr-forming-bg:rgba(14,116,144,.10);--sr-forming-line:rgba(14,116,144,.30);
  --sr-monitor:#b45309;--sr-monitor-bg:rgba(180,83,9,.10);--sr-monitor-line:rgba(180,83,9,.30);
  --sr-avoid:#64748b;--sr-avoid-bg:rgba(100,116,139,.10);--sr-avoid-line:rgba(100,116,139,.28);
  --sr-neg:#dc2626;--sr-neg-bg:rgba(220,38,38,.09);--sr-neg-line:rgba(220,38,38,.28);
  --sr-pos:#059669;
  --sr-ai:#6366f1;--sr-ai-bg:rgba(99,102,241,.10);--sr-ai-line:rgba(99,102,241,.30);
  --sr-track:rgba(32,32,29,.08);--sr-row-hover:rgba(32,32,29,.035);
  /* Type scale — deliberate steps instead of ad-hoc 0.5px increments. Existing
     component rules keep their own font-size for now unless migrated below;
     this scale is what new/migrated rules reference going forward. */
  --fs-2xs:10px;--fs-xs:11px;--fs-sm:12px;--fs-base:13px;--fs-md:14px;--fs-lg:16px;--fs-xl:20px;--fs-2xl:24px;--fs-3xl:32px;
  /* Radius scale — complements the pre-existing --radius(18px)/--radius-sm(12px) */
  --radius-xs:8px;--radius-full:999px;
  --shadow:0 18px 50px rgba(55,48,38,.06);--radius:18px;--radius-sm:12px;
  --shadow-sm:0 1px 3px rgba(20,18,14,.05),0 1px 2px rgba(20,18,14,.04);
  /* Aliases fixing genuinely undefined vars found in later Backtests/diagnostics
     CSS (var(--card)/var(--panel)/var(--text-soft) were referenced but never
     declared anywhere — those rules were silently rendering with no background/
     color at all). Point them at the existing equivalent tokens. */
  --card:var(--surface);--panel:var(--surface);--text-soft:var(--muted);
}
*{box-sizing:border-box}
html,body{margin:0;min-width:320px;min-height:100%;width:100%;max-width:100%;background:var(--bg);overflow-x:hidden;overscroll-behavior-x:none}
@supports (overflow:clip){html,body{overflow-x:clip}}
body{min-height:100vh;color:var(--ink);position:relative}
img,svg,canvas,video{max-width:100%}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}
.hidden{display:none!important}
.info-tip{display:inline-grid;place-items:center;width:16px;height:16px;border:1px solid var(--line);border-radius:50%;font-size:var(--fs-2xs);font-weight:600;font-style:normal;color:var(--muted);margin-left:4px;vertical-align:1px;position:relative;cursor:help;background:var(--bg-soft)}
/* Tooltip bubble text/arrow is rendered by a single shared floating element (#globalTooltipBubble,
   positioned via JS with getBoundingClientRect + viewport clamping) instead of a CSS :after/:before
   anchored to each icon. The anchored approach got clipped by any ancestor with overflow:hidden and
   could render off-screen or under other panels near viewport edges — this floating element avoids
   both by being position:fixed on <body> with a very high z-index. */
#globalTooltipBubble{position:fixed;z-index:99999;max-width:240px;padding:9px 10px;border-radius:9px;background:#24231f;color:#fffdf9;font-size:10.5px;font-weight:400;line-height:1.45;letter-spacing:0;box-shadow:0 10px 25px rgba(0,0,0,.28);opacity:0;visibility:hidden;pointer-events:none;text-align:left;transition:opacity .1s ease}
#globalTooltipBubble.visible{opacity:1;visibility:visible}
.dashboard-market-row{display:flex;justify-content:flex-start;align-items:center;margin:4px 0 10px}.dashboard-market-row .market-ticker{min-width:320px;grid-template-columns:auto auto auto;column-gap:10px}.dashboard-market-row .market-ticker>span{font-size:10px}.dashboard-market-row .market-ticker>strong{font-size:15px}.dashboard-market-row .market-ticker>small{font-size:9px}.market-change{font-size:11px;font-weight:600;text-align:right;white-space:nowrap}
.risk-summary-inline{margin:2px 0 18px;padding:12px 14px;border:1px solid var(--line-soft);border-radius:12px;background:var(--bg-soft);display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap}.risk-summary-inline strong{font-size:14px}.risk-summary-inline span{font-size:10px;color:var(--muted)}
.strategy-description{font-size:12px;line-height:1.7;color:var(--ink-2);margin:0}.strategy-description strong{color:var(--ink);font-weight:650}


/* AUTH */
.auth-screen{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr);background:var(--bg)}
.auth-visual{padding:54px 58px;display:flex;flex-direction:column;position:relative;overflow:hidden;border-right:1px solid var(--line)}
.auth-visual:before{content:"";position:absolute;width:520px;height:520px;border-radius:50%;border:1px solid #ded5c8;right:-180px;bottom:-180px}
.auth-visual:after{content:"";position:absolute;width:290px;height:290px;border-radius:50%;border:1px solid #e7dfd4;right:-70px;bottom:-70px}
.auth-brand{display:flex;align-items:center;gap:12px;position:relative;z-index:1}.logo-mark{width:42px;height:42px;border-radius:13px;background:var(--black);color:#f5f1e8;display:grid;place-items:center;font-weight:650;letter-spacing:-.03em}.auth-brand strong{font-size:14px;font-weight:650}.auth-brand small{display:block;margin-top:2px;font-size:11px;color:var(--muted)}
.auth-spacer{flex:1}
.auth-copy{margin:auto 0 12vh;max-width:620px;position:relative;z-index:1}.auth-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.18em;color:var(--terracotta);font-weight:650}.auth-copy h1{font-size:clamp(42px,5vw,72px);font-weight:500;line-height:1.02;letter-spacing:-.055em;margin:20px 0 22px}.auth-copy p{font-size:15px;line-height:1.7;color:var(--ink-2);max-width:510px}.auth-security{display:flex;gap:26px;flex-wrap:wrap;font-size:11px;color:var(--muted);position:relative;z-index:1}.auth-security span{display:flex;align-items:center;gap:7px}.auth-security i{width:7px;height:7px;border-radius:50%;background:var(--green);display:inline-block}
.auth-panel{display:grid;place-items:center;padding:48px;background:#faf8f3}.login-card{width:min(100%,430px);background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:38px;box-shadow:var(--shadow)}.login-card h2{font-size:26px;letter-spacing:-.035em;font-weight:550;margin:0}.login-card>.intro{font-size:13px;color:var(--muted);line-height:1.55;margin:10px 0 28px}.auth-field{margin-bottom:13px}.auth-field input{height:52px;border-radius:13px;background:#fbfaf7;border:1px solid var(--line);padding:0 15px;font-size:14px;color:var(--ink);outline:none;transition:.15s}.auth-field input::placeholder{color:#706a60}.auth-field input:focus{border-color:#8e8a80;box-shadow:0 0 0 3px rgba(118,112,101,.08)}
.login-button{width:100%;height:52px;border:0;border-radius:13px;background:var(--black);color:#fffdf9;font-weight:600;margin-top:6px;transition:.15s}.login-button:hover{transform:translateY(-1px);background:#11110f}.forgot-button{border:0;background:transparent;padding:0;margin:16px auto 0;display:block;color:var(--ink-2);font-size:12px;text-decoration:underline;text-underline-offset:4px;text-decoration-color:#c7c1b6}.forgot-button:hover{color:var(--black)}
.auth-message{font-size:12px;line-height:1.5;border-radius:11px;padding:11px 12px;margin:14px 0 0;display:none}.auth-message.show{display:block}.auth-message.error{background:var(--red-bg);border:1px solid var(--red-line);color:#82483f}.auth-message.success{background:var(--green-bg);border:1px solid var(--green-line);color:#46604d}.local-note{margin-top:24px;padding-top:18px;border-top:1px solid var(--line-soft);font-size:10px;color:var(--muted);line-height:1.5;text-align:center}.local-note strong{color:var(--ink-2)}
.reset-panel{display:none}.reset-panel.active{display:block}.login-panel.hidden-panel{display:none}.reset-title-row{display:flex;align-items:center;gap:10px}.back-link{border:0;background:transparent;color:var(--muted);padding:3px;font-size:18px}

/* APP */
.app-shell{min-height:100vh;display:none;flex-direction:column;width:100%;max-width:100%;overflow-x:hidden}.app-shell.visible{display:flex}
.top-navbar{position:sticky;top:0;width:100%;height:auto;min-height:73px;box-sizing:border-box;padding:10px 24px;border-bottom:1px solid var(--line);background:var(--surface);display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:16px;z-index:50}
html[data-theme="dark"] .top-navbar{background:#121418;border-bottom-color:var(--line)}
.top-nav-brand{display:flex;align-items:center;gap:10px;flex-shrink:0}
.top-nav-brand .logo-mark{width:34px;height:34px;border-radius:10px;flex:0 0 auto}
.top-nav-links{display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important;overflow-x:auto;scrollbar-width:none;padding:2px 0;flex:1;justify-content:center}
@media(min-width:901px){
  /* Two-row nav: row 1 is the product switcher (Crypto Bot / Forex Bot / Stock Radar),
     row 2 is the active product's own submenu. Without this the submenu buttons sat
     inline right after their header in the same row, which read as one flat list with
     no visible hierarchy between "product" and "section". flex-wrap + flex-basis:100%
     on the items row forces it onto its own line below the headers row. */
  .top-nav-links{position:fixed!important;top:0!important;left:0!important;right:0!important;transform:none!important;min-height:73px!important;flex-direction:row!important;flex-wrap:wrap!important;row-gap:4px!important;z-index:51!important;background:transparent!important;box-shadow:none!important;border:none!important;overflow:visible!important;padding:8px 0!important;width:100%!important;max-width:100%!important;justify-content:center!important;pointer-events:none!important;}
  .top-nav-links button{pointer-events:auto!important;}
  .nav-product-headers{flex:0 0 auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:6px!important}
  .nav-product-items-row{flex-basis:100%!important;display:flex!important;flex-direction:row!important;justify-content:center!important;}
  /* Room for the now-taller (two-row) fixed nav overlay, which no longer matches the
     sticky top-navbar's own 73px reserved height (25% taller banner) — without this the
     second row would draw over the top of the page's first panel. */
  main{padding-top:58px}
}
.top-nav-links::-webkit-scrollbar{display:none}
.top-nav-links button{border:0;background:transparent;color:var(--muted);display:inline-flex;align-items:center;gap:7px;padding:7px 13px;border-radius:9px;font-size:12px;font-weight:600;white-space:nowrap;transition:all .15s ease;cursor:pointer;flex-shrink:0}
.top-nav-links button:hover{background:var(--bg-soft);color:var(--ink)}
.top-nav-links button.active{color:var(--ink);background:var(--bg-soft);box-shadow:inset 0 0 0 1px var(--line)}
html[data-theme="dark"] .top-nav-links button{color:#94a3b8}
html[data-theme="dark"] .top-nav-links button:hover{background:rgba(255,255,255,.07);color:#ffffff}
html[data-theme="dark"] .top-nav-links button.active{color:#ffffff;background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.nav-product-items{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px}
.nav-product-header{font-weight:650!important;border-radius:9px!important;transition:all .18s ease!important}
.nav-product-header .nav-group-chevron{font-size:9px;margin-left:2px;transition:transform .15s ease;opacity:.65}
.nav-product-header.active .nav-group-chevron{transform:rotate(180deg);opacity:.9}
.nav-soon-badge{font-size:7px!important;padding:1px 5px!important;margin-left:2px;font-weight:650!important;letter-spacing:.03em}

/* System sub-view items icon consistency */
#navSystem button[data-system-view="crypto"] .nav-icon{color:#b45309!important}
#navSystem button[data-system-view="stock"] .nav-icon{color:#2563eb!important}
#navSystem button[data-system-view="forex"] .nav-icon{color:#7c3aed!important}
html[data-theme="dark"] #navSystem button[data-system-view="crypto"] .nav-icon{color:#fbbf24!important}
html[data-theme="dark"] #navSystem button[data-system-view="stock"] .nav-icon{color:#60a5fa!important}
html[data-theme="dark"] #navSystem button[data-system-view="forex"] .nav-icon{color:#a78bfa!important}

.top-nav-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
.brand{display:flex;gap:10px;align-items:center;min-width:0}
.brand .logo-mark{width:34px;height:34px;border-radius:10px;flex:0 0 auto}
.brand strong{display:block;font-size:13px;font-weight:650}
.brand small{display:block;color:#817d74;margin-top:2px;font-size:9.5px}
.nav-icon{width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;color:inherit;flex:0 0 auto;transition:color .15s ease}
.nav-icon svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.user-row{display:flex;align-items:center;gap:9px}
.user-avatar{width:30px;height:30px;border-radius:50%;background:#d8d2c7;color:#5f5b53;display:grid;place-items:center;font-size:11px;font-weight:650}
.user-meta{min-width:0;flex:1}
.user-email{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#615e57;font-size:10px}
.logout{border:0;background:transparent;color:#625d54;font-size:11px;padding:4px 8px;cursor:pointer;border-radius:6px}
.logout:hover{color:var(--red);background:var(--bg-soft)}
main{min-width:0;max-width:100%;width:100%;background:var(--bg);overflow-x:hidden;flex:1}
.tab,.content,.content>*{min-width:0;max-width:100%}
.content{padding:20px 28px 48px;display:flex;flex-direction:column;gap:16px;max-width:100%!important;margin:0!important;box-sizing:border-box}
.alert{border:1px solid #d8d1c4;background:#eee9df;color:#555149;border-radius:14px;padding:13px 15px;display:flex;gap:10px;align-items:flex-start;font-size:11.5px;line-height:1.55}
.alert strong{color:#3f3c37}
.alert-dot{width:8px;height:8px;background:var(--green);border-radius:50%;margin-top:4px;flex:0 0 auto}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.metric-card,.panel{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);box-shadow:0 10px 30px rgba(70,60,45,.025)}.metric-card{padding:18px 19px}.metric-card span{color:var(--muted);font-size:10px;display:block}.metric-card strong{display:block;font-size:23px;margin-top:10px;font-weight:550;letter-spacing:-.035em}.metric-card small{display:block;color:#a09b92;margin-top:5px;font-size:10px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}.panel{padding:20px}.panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}.title-wrap{display:flex;align-items:flex-start;gap:10px}.title-mark{width:8px;height:8px;border-radius:50%;background:#c1baae;margin-top:5px}.title-mark.green{background:var(--green)}.title-mark.terra{background:var(--terracotta)}.title-mark.red{background:var(--red)}.title-mark.day,.live-dot.day{background:var(--accent-day)!important;box-shadow:0 0 0 3px var(--accent-day-glow)!important}.title-mark.swing,.live-dot.swing{background:var(--accent-swing)!important;box-shadow:0 0 0 3px var(--accent-swing-glow)!important}.title-mark.intra,.live-dot.intra{background:var(--accent-intra)!important;box-shadow:0 0 0 3px var(--accent-intra-glow)!important}.title-mark.neutral,.live-dot.neutral{background:var(--dot-neutral)!important;box-shadow:0 0 0 3px var(--dot-neutral-glow)!important}.card-accent-day{border:1.5px solid var(--accent-day)!important;background:var(--accent-day-bg)!important;box-shadow:0 4px 16px var(--accent-day-glow)!important}.card-accent-swing{border:1.5px solid var(--accent-swing)!important;background:var(--accent-swing-bg)!important;box-shadow:0 4px 16px var(--accent-swing-glow)!important}.card-accent-intra{border:1.5px solid var(--accent-intra)!important;background:var(--accent-intra-bg)!important;box-shadow:0 4px 16px var(--accent-intra-glow)!important}.card-accent-white,.card-accent-neutral,.card-accent-grey{border:1.5px solid #94a3b8!important;background:#ffffff!important;box-shadow:0 4px 16px rgba(0,0,0,.04)!important}.panel-title h2{margin:0;font-size:14px;font-weight:600;letter-spacing:-.015em}.panel-title p{margin:5px 0 0;font-size:10px;color:var(--muted)}
.strategy-flow{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.strategy-flow>div{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:12px;padding:14px}.strategy-flow small,.strategy-flow span{display:block;color:var(--muted);font-size:9px}.strategy-flow strong{display:block;margin:9px 0 5px;font-size:15px;font-weight:600}.muted{margin-top:13px;color:var(--muted);font-size:10px;line-height:1.55}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:17px}.field{display:flex;flex-direction:column;gap:7px}.field label{font-size:10px;color:#625f58;font-weight:550}.hint{color:#706a60;font-size:9px;line-height:1.45}input,select{width:100%;background:#fbfaf7;color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:10px 11px;outline:none;font-size:12px}input:focus,select:focus{border-color:#999388;box-shadow:0 0 0 3px rgba(130,122,110,.07)}input:disabled{color:#979188;background:#f2eee7}.kv{display:grid}.kv div{display:flex;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid var(--line-soft)}.kv div:last-child{border-bottom:0}.kv span{color:var(--muted);font-size:10px}.kv strong{font-size:10px;text-align:right}.protection-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.protection-grid div{padding:14px;border:1px solid var(--line-soft);background:var(--bg-soft);border-radius:11px}.protection-grid .check{color:var(--green);font-size:11px}.protection-grid strong,.protection-grid span{display:block}.protection-grid strong{font-size:10px;margin:8px 0 4px}.protection-grid span{color:var(--muted);font-size:9px}.mode-cards{display:grid;grid-template-columns:1fr 1fr;gap:13px}.mode-card{border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:17px}.mode-card header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.mode-card h3{margin:0;font-size:13px;font-weight:600}.mode-card p{margin:5px 0 0;color:var(--muted);font-size:9px}.mode-card .numbers{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:15px}.mode-card .numbers div{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:10px;padding:10px}.mode-card .numbers span{display:block;color:var(--muted);font-size:8px}.mode-card .numbers strong{display:block;margin-top:5px;font-size:11px}.switch-row{display:flex;align-items:center;gap:8px}.switch{position:relative;width:40px;height:22px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;inset:0;background:#d4cfc6;border-radius:999px;transition:.15s}.slider:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:#f8f6f1;border-radius:50%;transition:.15s;box-shadow:0 1px 3px rgba(0,0,0,.08)}.switch input:checked+.slider{background:var(--green)}.switch input:checked+.slider:before{transform:translateX(18px);background:white}.locked{margin:0;padding-left:18px;color:#716d65;font-size:10px;line-height:1.8}.danger-note{border:1px solid var(--red-line);color:#855047;background:var(--red-bg);border-radius:11px;padding:12px;font-size:10px;margin-top:14px;line-height:1.5}.save-note{font-size:10px;color:var(--muted);margin-top:12px}.architecture{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.architecture span{background:var(--bg-soft);border:1px solid var(--line-soft);padding:9px 11px;border-radius:9px;color:#56524c;font-size:10px}.architecture b{color:#b7b1a7}.empty{min-height:260px;display:grid;place-items:center;align-content:center;text-align:center;color:var(--muted)}.empty .empty-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--line);font-size:14px;color:#777168}.empty h2{color:var(--ink-2);font-size:15px;margin:14px 0 6px}.empty p{max-width:620px;margin:0;line-height:1.55;font-size:11px}.tab{display:none}.tab.active{display:block}.tag{display:inline-flex;border:1px solid var(--line);background:var(--bg-soft);border-radius:7px;padding:4px 7px;font-size:9px;color:#77736c}.note-list{margin:0;padding-left:18px;color:#625d54;font-size:10px;line-height:1.75}.calc-box{border:1px solid var(--line-soft);background:var(--surface-2);border-radius:11px;padding:14px;margin-top:14px}.calc-box strong{font-size:11px}.calc-box p{margin:6px 0 0;color:var(--muted);font-size:9px;line-height:1.55}


/* READABILITY PASS v0.5.1 — tokens merged into the single :root at the top of
   this stylesheet; only the non-variable rules from this pass remain here. */
body{font-size:14px}
.auth-brand strong{font-size:15px}.auth-brand small{font-size:12px;color:var(--muted)}
.login-card>.intro{font-size:14px;color:var(--ink-2)}
.auth-field input{font-size:15px}.auth-field input::placeholder{color:#817d75}
.forgot-button{font-size:13px;color:#514e48}.auth-message{font-size:13px}.local-note{font-size:11px;color:#68645d}
.brand strong{font-size:14px}.brand small{font-size:11px;color:#68645d}
.nav-label{font-size:10.5px;color:#625d54}.nav-icon{color:#5f5b54}
nav button{font-size:14px;color:#55524c}nav button.child{font-size:13px}
.user-email,.safe,.logout{font-size:11.5px}.user-email{color:#514e48}.logout{color:#625e57}
.topbar h1{font-size:23px}.topbar p{font-size:12.5px;color:#625f58}
.pill{border:1px solid var(--line);color:#625d54;background:#f9f7f2;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;line-height:1}
.pill.ok{border-color:var(--green-line)!important;color:var(--green)!important;background:var(--green-bg)!important}
.pill.warn{border-color:var(--amber-line)!important;color:var(--amber)!important;background:var(--amber-bg)!important}
.pill.off,.pill.fail{border-color:var(--red-line)!important;color:var(--red)!important;background:var(--red-bg)!important}
.pill.terra{border-color:var(--terracotta-line)!important;color:var(--terracotta)!important;background:var(--terracotta-bg)!important}
.pill.neutral{border-color:var(--line-soft)!important;color:var(--muted)!important;background:var(--bg-soft)!important}
.pill.live-mode,.pill.mode-live{border-color:var(--blue-live-line)!important;color:var(--blue-live)!important;background:var(--blue-live-bg)!important;font-weight:600!important}
.live-mode-text{color:var(--blue-live)!important;font-weight:600}
.validation-item strong.pass{color:var(--green)!important}
.validation-item strong.fail{color:var(--red)!important}
.validation-item strong.pending{color:var(--muted)!important}

.emergency-pause-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:5px 10px;border-radius:999px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:11px;font-weight:600;letter-spacing:.02em;border:1px solid var(--green-line);background:var(--green-bg);color:var(--green);transition:all .2s ease;cursor:pointer;user-select:none;box-shadow:0 1px 3px rgba(0,0,0,.04);white-space:nowrap;flex:1 1 0;min-width:0;height:30px;box-sizing:border-box}
.emergency-pause-btn:hover{filter:brightness(.96);transform:translateY(-1px);box-shadow:0 3px 8px rgba(0,0,0,.08)}
.quick-pause-dot{width:7px;height:7px;min-width:7px;border-radius:50%;background:var(--green);display:inline-block;box-shadow:0 0 0 2px var(--green-line);animation:pulseDot 2s infinite ease-in-out;flex-shrink:0}
@keyframes pulseDot{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.65}}
.emergency-pause-btn.paused{border-color:var(--red-line)!important;background:var(--red-bg)!important;color:var(--red)!important}
.emergency-pause-btn.paused .quick-pause-dot{background:var(--red)!important;box-shadow:0 0 0 3px var(--red-line)!important;animation:pulseDotFast 1s infinite ease-in-out}
@keyframes pulseDotFast{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.35);opacity:.6}}
.countdown-badge{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:5px 10px;border-radius:999px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:11px;font-weight:600;letter-spacing:.02em;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);box-shadow:0 1px 3px rgba(0,0,0,.03);user-select:none;white-space:nowrap;flex:1 1 0;min-width:0;height:30px;box-sizing:border-box}
#nextScanCountdownLabel,#quickEmergencyPauseLabel{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;font-size:11px!important;font-weight:600!important;line-height:1}
.countdown-pulse{width:7px;height:7px;min-width:7px;border-radius:50%;background:var(--accent-day);display:inline-block;animation:pulseDot 2.2s infinite ease-in-out;flex-shrink:0}
.countdown-badge.scanning{border-color:var(--accent-day-line);background:var(--accent-day-bg);color:var(--accent-day)}
.countdown-badge.scanning .countdown-pulse{background:var(--accent-day);box-shadow:0 0 0 3px var(--accent-day-line);animation:pulseDotFast 1s infinite ease-in-out}
.alert{font-size:12.5px;color:#555149}
.metric-card span{font-size:var(--fs-xs);color:var(--muted)}.metric-card strong{font-size:var(--fs-2xl)}.metric-card small{font-size:var(--fs-xs);color:var(--muted)}
.panel-title h2{font-size:15px}.panel-title p{font-size:11.5px;color:#69655e}
.strategy-flow small{font-size:9.5px!important;color:#69655e;line-height:1.2}.strategy-flow span{font-size:10px!important;color:#69655e;line-height:1.3}.strategy-flow strong{font-size:13px!important;margin:4px 0 2px!important;line-height:1.25}.strategy-flow>div{padding:8px 10px!important;border-radius:10px!important}
.muted{font-size:11.5px;color:#69655e}.field label{font-size:11.5px;color:#514e48}.hint{font-size:10.5px;color:#625d54}
input,select{font-size:13.5px;padding:11px 12px}.kv span,.kv strong{font-size:11.5px}.kv span{color:#69655e}
.protection-grid .check{font-size:12px}.protection-grid strong{font-size:11.5px}.protection-grid span{font-size:10.5px;color:#69655e}
.protection-grid.compact{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.protection-grid.compact>div{padding:8px 10px;border:1px solid var(--line-soft);background:var(--bg-soft);border-radius:9px;display:flex;flex-direction:column;justify-content:center}
.protection-grid.compact strong{font-size:11px!important;margin:0 0 2px 0!important;display:flex;align-items:center;gap:5px;letter-spacing:-.01em}
.protection-grid.compact strong .check{font-size:10px!important;color:var(--green);flex-shrink:0}
.protection-grid.compact span{font-size:9.5px!important;color:var(--muted);line-height:1.3}
.compact-rules-panel{box-shadow:0 4px 16px rgba(0,0,0,.02)}
.mode-card h3{font-size:14px}.mode-card p{font-size:11px;color:#69655e}.mode-card .numbers span{font-size:10.5px;color:#69655e}.mode-card .numbers strong{font-size:12px}
.locked,.danger-note,.save-note{font-size:11.5px}.locked{color:#5f5b54}.save-note{color:#69655e}
.architecture span{font-size:11.5px}.empty p{font-size:12px}.tag{font-size:10.5px;color:#625f58}.note-list{font-size:11.5px;color:#5f5b54}.calc-box strong{font-size:12px}.calc-box p{font-size:11px;color:#69655e}

/* DARK MODE & THEME STYLES v0.9.82.0 */
.theme-toggle-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;font-size:11px;font-weight:600;letter-spacing:.02em;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer;transition:all .18s ease;user-select:none;box-shadow:0 1px 3px rgba(0,0,0,.03)}
.theme-toggle-btn:hover{filter:brightness(.95);transform:translateY(-1px)}
.pos-gauge-be-notch{position:absolute;top:-5px;width:2px;height:22px;background:var(--amber);z-index:3;border-radius:1px}
.pos-gauge-be-label{position:absolute;top:22px;transform:translateX(-50%);font-size:9.5px;color:var(--amber);white-space:nowrap;font-weight:600}
html[data-theme="dark"]{
  color-scheme:dark;
  /* v2 palette (dark) — matching light's cooler neutral base, see the light :root
     block above for the design-proposal note. */
  --bg:#0a0a0b;--bg-soft:#141416;--surface:#18181b;--surface-2:#212124;
  --ink:#ffffff;--ink-2:#f8fafc;--muted:#cbd5e1;--muted-2:#94a3b8;
  --line:#27272a;--line-soft:#2c2c30;--black:#0a0a0b;
  --green:#4ade80;--green-bg:rgba(74,222,128,.12);--green-line:rgba(74,222,128,.28);
  --red:#f87171;--red-bg:rgba(248,113,113,.16);--red-line:rgba(248,113,113,.36);
  --terracotta:#fb923c;--terracotta-bg:rgba(251,146,60,.12);--terracotta-line:rgba(251,146,60,.28);
  --amber:#fbbf24;--amber-bg:rgba(251,191,36,.12);--amber-line:rgba(251,191,36,.28);
  --accent-day:#818cf8;--accent-day-glow:rgba(129,140,248,.28);--accent-day-bg:rgba(129,140,248,.18);--accent-day-line:rgba(129,140,248,.38);
  --accent-swing:#f97316;--accent-swing-glow:rgba(249,115,22,.28);--accent-swing-bg:rgba(249,115,22,.18);--accent-swing-line:rgba(249,115,22,.38);
  --accent-intra:#06b6d4;--accent-intra-glow:rgba(6,182,212,.28);--accent-intra-bg:rgba(6,182,212,.18);--accent-intra-line:rgba(6,182,212,.38);
  --blue-live:#38bdf8;--blue-live-glow:rgba(56,189,248,.28);--blue-live-bg:rgba(56,189,248,.18);--blue-live-line:rgba(56,189,248,.40);
  --dot-neutral:#94a3b8;--dot-neutral-glow:rgba(148,163,184,.25);
  --sr-strong:#34d399;--sr-strong-bg:rgba(52,211,153,.14);--sr-strong-line:rgba(52,211,153,.38);
  --sr-forming:#22d3ee;--sr-forming-bg:rgba(34,211,238,.13);--sr-forming-line:rgba(34,211,238,.36);
  --sr-monitor:#fbbf24;--sr-monitor-bg:rgba(251,191,36,.13);--sr-monitor-line:rgba(251,191,36,.36);
  --sr-avoid:#94a3b8;--sr-avoid-bg:rgba(148,163,184,.12);--sr-avoid-line:rgba(148,163,184,.30);
  --sr-neg:#ff6b6b;--sr-neg-bg:rgba(255,107,107,.14);--sr-neg-line:rgba(255,107,107,.36);
  --sr-pos:#4ade80;
  --sr-ai:#a5b4fc;--sr-ai-bg:rgba(129,140,248,.16);--sr-ai-line:rgba(129,140,248,.40);
  --sr-track:rgba(255,255,255,.10);--sr-row-hover:rgba(255,255,255,.035);
  --shadow:0 18px 50px rgba(0,0,0,.45);
  --shadow-sm:0 1px 3px rgba(0,0,0,.28),0 1px 2px rgba(0,0,0,.22);
}
html[data-theme="dark"] .card-accent-day{border:1.5px solid var(--accent-day)!important;background:rgba(129,140,248,.08)!important;box-shadow:0 4px 16px var(--accent-day-glow)!important}
html[data-theme="dark"] .card-accent-swing{border:1.5px solid var(--accent-swing)!important;background:rgba(249,115,22,.08)!important;box-shadow:0 4px 16px var(--accent-swing-glow)!important}
html[data-theme="dark"] .card-accent-intra{border:1.5px solid var(--accent-intra)!important;background:rgba(6,182,212,.08)!important;box-shadow:0 4px 16px var(--accent-intra-glow)!important}
html[data-theme="dark"] .card-accent-white,html[data-theme="dark"] .card-accent-neutral,html[data-theme="dark"] .card-accent-grey{border:1.5px solid #64748b!important;background:rgba(100,116,139,.06)!important;box-shadow:0 4px 16px rgba(0,0,0,.25)!important}
html[data-theme="dark"] .radar-card.day-radar{border-color:var(--accent-day)!important;background:rgba(129,140,248,.08)!important}
html[data-theme="dark"] .radar-card.swing-radar{border-color:var(--accent-swing)!important;background:rgba(249,115,22,.08)!important}
html[data-theme="dark"] .pill{border-color:var(--line);background:var(--surface);color:var(--muted)}
html[data-theme="dark"] .pill.ok{border-color:var(--green-line)!important;color:var(--green)!important;background:var(--green-bg)!important}
html[data-theme="dark"] .pill.warn{border-color:var(--amber-line)!important;color:var(--amber)!important;background:var(--amber-bg)!important}
html[data-theme="dark"] .pill.off,html[data-theme="dark"] .pill.fail{border-color:rgba(255,123,114,.55)!important;color:#ff7b72!important;background:rgba(255,123,114,.22)!important;font-weight:650!important}
html[data-theme="dark"] .attempt-chip.fail{border-color:rgba(255,123,114,.55)!important;color:#ff7b72!important;background:rgba(255,123,114,.22)!important;font-weight:600!important}
html[data-theme="dark"] .attempt-direction-short{color:#ff7b72!important;font-weight:650!important}
html[data-theme="dark"] .pill.terra{border-color:var(--terracotta-line)!important;color:var(--terracotta)!important;background:var(--terracotta-bg)!important}
html[data-theme="dark"] .pill.neutral{border-color:var(--line-soft)!important;color:var(--muted)!important;background:var(--bg-soft)!important}
html[data-theme="dark"] .pill.live-mode,html[data-theme="dark"] .pill.mode-live{border-color:var(--blue-live-line)!important;color:var(--blue-live)!important;background:var(--blue-live-bg)!important}
html[data-theme="dark"] .source-badge.real{background:var(--blue-live-bg);color:var(--blue-live);border-color:var(--blue-live-line)}
html[data-theme="dark"] .live-mode-text{color:var(--blue-live)!important;font-weight:600}
html[data-theme="dark"] .validation-item strong.pass{color:var(--green)!important}
html[data-theme="dark"] .validation-item strong.fail{color:var(--red)!important}
html[data-theme="dark"] .validation-item strong.pending{color:var(--muted)!important}
html[data-theme="dark"] .countdown-badge{background:#1a1c22!important;border-color:#2a2e38!important;color:#cbd5e1!important}
html[data-theme="dark"] #nextScanCountdownLabel{color:#cbd5e1!important;font-weight:600}
html[data-theme="dark"] .countdown-pulse{background:var(--accent-day)!important}
html[data-theme="dark"] .emergency-pause-btn{background:rgba(74,222,128,.14)!important;border-color:rgba(74,222,128,.35)!important;color:var(--green)!important}
html[data-theme="dark"] .emergency-pause-btn .quick-pause-dot{background:var(--green)!important;box-shadow:0 0 0 2px rgba(74,222,128,.35)!important}
html[data-theme="dark"] .emergency-pause-btn.paused{background:rgba(255,123,114,.18)!important;border-color:rgba(255,123,114,.4)!important;color:var(--red)!important}
html[data-theme="dark"] .emergency-pause-btn.paused .quick-pause-dot{background:var(--red)!important;box-shadow:0 0 0 3px rgba(255,123,114,.35)!important}
html[data-theme="dark"] .alert .pill.ok,html[data-theme="dark"] .panel .pill.ok{color:var(--green)!important}
html[data-theme="dark"] .alert .pill.warn,html[data-theme="dark"] .panel .pill.warn{color:var(--amber)!important}
html[data-theme="dark"] .alert .pill.off,html[data-theme="dark"] .alert .pill.fail,html[data-theme="dark"] .panel .pill.off,html[data-theme="dark"] .panel .pill.fail{color:var(--red)!important}
html[data-theme="dark"] .alert .pill.live-mode,html[data-theme="dark"] .panel .pill.live-mode{color:var(--blue-live)!important}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .sidebar{background:#121316;border-right-color:var(--line)}
html[data-theme="dark"] .sidebar-head-top .brand strong{color:#ffffff}
html[data-theme="dark"] .sidebar-head-top .brand small{color:#ffffff;opacity:.9}
html[data-theme="dark"] .topbar{background:rgba(17,18,21,.92);border-bottom-color:var(--line)}

/* Sidebar Navigation - Pure White Text & High Contrast in Dark Mode */
html[data-theme="dark"] .nav-group-toggle,
html[data-theme="dark"] .root-nav-toggle{color:#ffffff!important;font-weight:600!important}
html[data-theme="dark"] .sub-nav-toggle{color:#ffffff!important;font-weight:650!important}
html[data-theme="dark"] #navStocks > button,
html[data-theme="dark"] #navStock > button[data-tab],
html[data-theme="dark"] #navCrypto > button[data-tab],
html[data-theme="dark"] #navSystem > button[data-tab],
html[data-theme="dark"] #navAnalysis > button[data-tab],
html[data-theme="dark"] nav button{color:#ffffff!important;font-weight:500!important}
html[data-theme="dark"] nav button .nav-icon,
html[data-theme="dark"] .nav-group-toggle .nav-icon{color:#ffffff!important}
html[data-theme="dark"] .nav-chevron{color:#e2e8f0!important}

/* Hover & Active States for Navigation - Elegant Dark Elevation */
html[data-theme="dark"] nav button:hover,
html[data-theme="dark"] #navStocks > button:hover,
html[data-theme="dark"] #navStock > button[data-tab]:hover,
html[data-theme="dark"] #navCrypto > button[data-tab]:hover,
html[data-theme="dark"] #navSystem > button[data-tab]:hover,
html[data-theme="dark"] #navAnalysis > button[data-tab]:hover{background:rgba(255,255,255,.09)!important;color:#ffffff!important}
html[data-theme="dark"] nav button:hover .nav-icon{color:#ffffff!important}
html[data-theme="dark"] #navStock > button[data-tab].active,
html[data-theme="dark"] #navCrypto > button[data-tab].active,
html[data-theme="dark"] #navSystem > button[data-tab].active,
html[data-theme="dark"] #navAnalysis > button[data-tab].active,
html[data-theme="dark"] nav button.active{
  background:#262a34!important;
  color:#ffffff!important;
  font-weight:650!important;
  box-shadow:inset 0 0 0 1px #3f4556, 0 2px 8px rgba(0,0,0,.35)!important;
}
html[data-theme="dark"] nav button.active .nav-icon{color:#ffffff!important}

/* Sidebar Footer */
html[data-theme="dark"] .sidebar-footer{border-top-color:var(--line)}
html[data-theme="dark"] .user-avatar{background:#262a34;color:#ffffff}
html[data-theme="dark"] .user-email{color:#c4c1b9}
html[data-theme="dark"] .logout{color:#969186}
html[data-theme="dark"] .logout:hover{color:var(--red)}

/* Comparison & Backtest Cards - Clean Dark Elevation */
html[data-theme="dark"] .comparison-card,
html[data-theme="dark"] .comparison-card.variant-a,
html[data-theme="dark"] .comparison-card.variant-b,
html[data-theme="dark"] .comparison-card.variant-c{
  background:#181a20!important;
  border-color:#2a2e38!important;
  color:#f5f4f0!important;
}
html[data-theme="dark"] .comparison-card h4{color:#ffffff!important}
html[data-theme="dark"] .comparison-card .eyebrow{color:var(--terracotta)!important}
html[data-theme="dark"] .comparison-metrics div{
  background:#20232b!important;
  border-color:#2a2e38!important;
}
html[data-theme="dark"] .comparison-metrics span{color:#ffffff!important;font-weight:500}
html[data-theme="dark"] .comparison-metrics strong{color:#ffffff!important}
html[data-theme="dark"] .validation-item{
  background:#20232b!important;
  border-color:#2a2e38!important;
  color:#ffffff!important;
}
html[data-theme="dark"] .card-fold{
  background:#242732!important;
  border-color:#363b48!important;
  color:#ffffff!important;
}
html[data-theme="dark"] .card-fold:hover{
  background:#323746!important;
  border-color:#4a5163!important;
}
html[data-theme="dark"] .backtest-method>div,
html[data-theme="dark"] .backtest-summary>div{
  background:#181a20!important;
  border-color:#2a2e38!important;
}
html[data-theme="dark"] .backtest-method span,
html[data-theme="dark"] .backtest-summary span{color:#ffffff!important;font-weight:500}
html[data-theme="dark"] .backtest-method strong,
html[data-theme="dark"] .backtest-summary strong{color:#ffffff!important}

/* Buttons, Segmented & Controls */
html[data-theme="dark"] .action-button{
  background:#22252e!important;
  border-color:#383c48!important;
  color:#ffffff!important;
}
html[data-theme="dark"] .action-button:hover{
  background:#2d323e!important;
  border-color:#4b5162!important;
  color:#ffffff!important;
}
html[data-theme="dark"] .action-button.primary{
  background:#ffffff!important;
  color:#111215!important;
  border-color:#ffffff!important;
}
html[data-theme="dark"] .action-button.primary:hover{
  background:#f1f5f9!important;
}
html[data-theme="dark"] .action-button:disabled,
html[data-theme="dark"] .action-button[disabled],
html[data-theme="dark"] .action-button.primary:disabled,
html[data-theme="dark"] .action-button.primary[disabled]{
  background:#1e222b!important;
  color:#64748b!important;
  border-color:#2e3340!important;
  opacity:0.6!important;
  cursor:not-allowed!important;
  pointer-events:none!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .pass-summary-badge.has-pass{color:#4ade80!important}
html[data-theme="dark"] .pass-summary-badge.no-pass{color:#f87171!important}
html[data-theme="dark"] .no-pass-notice{
  background:#161922!important;
  border:1px dashed rgba(255,255,255,0.14)!important;
  box-shadow:0 4px 16px rgba(0,0,0,0.3)!important;
}
html[data-theme="dark"] .no-pass-notice h4{color:#ffffff!important}
html[data-theme="dark"] .no-pass-notice p{color:#cbd5e1!important}
html[data-theme="dark"] .segmented{
  background:#14161b!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] .segmented button{
  background:transparent!important;
  border-color:transparent!important;
  color:#ffffff!important;
  font-weight:500;
}
html[data-theme="dark"] .segmented button.active{
  background:#252832!important;
  border:1px solid #3d4352!important;
  color:#ffffff!important;
  font-weight:600!important;
  box-shadow:0 1px 4px rgba(0,0,0,.4)!important;
}
html[data-theme="dark"] .theme-toggle-btn{
  background:#22252e!important;
  border-color:#383c48!important;
  color:#ffffff!important;
}
html[data-theme="dark"] .emergency-pause-btn{
  background:#22252e!important;
  border-color:#383c48!important;
  color:#ffffff!important;
}

/* Headings, Dashboard Panels, Box Titles & Sections - Pure White in Dark Mode */
html[data-theme="dark"] :is(
  .dashboard-heading h2, .dashboard-heading h3,
  .panel-title h2, .panel-title h3, .panel-title h4,
  .active-trades-head h2, .active-trades-head h3,
  .stats-section-title h2, .stats-section-title h3,
  .stats-card-head h2, .stats-card-head h3, .stats-card-head .eyebrow,
  .risk-panel-header h2, .risk-panel-header h3,
  .crypto-section-header h2, .crypto-section-header h3,
  .overview-hero-title-group h2, .overview-hero-title-group h3,
  .pillar-head h3, .pillar-title-wrap h3,
  .fin-sec-h h2, .fin-sec-h h3,
  .fin-card h3, .fin-card h4,
  .fin-unified-box h3, .sr-unified-box h3,
  .sr-hero-title h2, .sr-hero-title h3,
  .sr-section-t, .sr-where-head h3, .sr-card-h strong, .sr-card-h h3,
  .sr-modal-head h3, .sr-form-head strong, .sr-form-head h3,
  .radar-head strong, .radar-card-head h3, .radar-card h3,
  .comparison-card h4,
  .position-title strong,
  .sys-card-t strong,
  .fa-name,
  .fa-row.head,
  .metric-card-title,
  .compact-rules-panel h3,
  .mode-card h3,
  #pageTitle
){color:#ffffff!important}

html[data-theme="dark"] :is(
  .dashboard-heading p,
  .panel-title p,
  .active-trades-head p,
  .stats-section-title p,
  .risk-panel-header p,
  .crypto-section-header p,
  .overview-hero-title-group p,
  .mode-card p,
  .strategy-description,
  .diagnostic-note,
  .analytics-note,
  .bt-status-copy,
  .topbar p,
  .sr-hero p,
  .sr-where-head p,
  .fin-card p,
  .fin-sec-h p,
  .fin-ai-desc,
  .fin-ai-text,
  .fin-sub,
  .sr-sub,
  .fin-note,
  .sr-ledger-note,
  .live-account-note,
  .no-pass-notice p
){color:#cbd5e1!important}

html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .panel{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .market-ticker,
html[data-theme="dark"] .countdown-badge,
html[data-theme="dark"] .book-status-item{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .alert{background:#181c24!important;border-color:#334155!important;color:#f8fafc!important}
html[data-theme="dark"] .alert strong{color:#ffffff!important;font-weight:600!important}
html[data-theme="dark"] .alert div{color:#f8fafc!important}
html[data-theme="dark"] .alert span{color:#e2e8f0!important}
html[data-theme="dark"] .alert em{color:#94a3b8!important}
html[data-theme="dark"] #servicesHealthAlert,
html[data-theme="dark"] #diagResultAlert,
html[data-theme="dark"] .alert.alert-success{background:#0d2318!important;border-color:#1c5936!important;color:#d1fae5!important}
html[data-theme="dark"] #servicesHealthAlert strong,
html[data-theme="dark"] #diagResultAlert strong,
html[data-theme="dark"] .alert.alert-success strong{color:#ffffff!important;font-weight:600!important}
html[data-theme="dark"] #servicesHealthAlert div,
html[data-theme="dark"] #diagResultAlert div,
html[data-theme="dark"] .alert.alert-success div{color:#d1fae5!important}
html[data-theme="dark"] #servicesHealthAlert em,
html[data-theme="dark"] #diagResultAlert em,
html[data-theme="dark"] .alert.alert-success em{color:#6ee7b7!important}
html[data-theme="dark"] .alert.alert-error,
html[data-theme="dark"] #servicesHealthAlert.alert-error,
html[data-theme="dark"] #diagResultAlert.alert-error{background:#2a1212!important;border-color:#6c2222!important;color:#fee2e2!important}
html[data-theme="dark"] .alert.alert-error strong,
html[data-theme="dark"] #servicesHealthAlert.alert-error strong,
html[data-theme="dark"] #diagResultAlert.alert-error strong{color:#ffffff!important;font-weight:600!important}
html[data-theme="dark"] .alert.alert-error div,
html[data-theme="dark"] #servicesHealthAlert.alert-error div,
html[data-theme="dark"] #diagResultAlert.alert-error div{color:#fee2e2!important}
html[data-theme="dark"] .calc-box{background:var(--surface-2);border-color:var(--line-soft)}
html[data-theme="dark"] .risk-panel{background:var(--surface)!important;border-color:var(--line)!important}
html[data-theme="dark"] .risk-kpi{background:var(--surface-2)!important;border-color:var(--line-soft)!important}
html[data-theme="dark"] .risk-kpi span{color:#ffffff!important;font-weight:500}
html[data-theme="dark"] .risk-kpi strong{color:#ffffff!important}
html[data-theme="dark"] .risk-mode-card{background:var(--surface)!important;border-color:var(--line)!important}
html[data-theme="dark"] .stats-card{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .stats-metrics div{border-top-color:var(--line)!important}
html[data-theme="dark"] .stats-metrics strong:not(.positive):not(.negative){color:#ffffff!important}
html[data-theme="dark"] .stats-metrics span{color:#ffffff!important;font-weight:500}
html[data-theme="dark"] .stats-detail-grid>div{background:var(--surface-2)!important;border-color:var(--line-soft)!important}
html[data-theme="dark"] .stats-detail-grid strong{color:#ffffff!important}

/* Positions & Tables */
html[data-theme="dark"] .pos-gauge-track{background:#22252d;border-color:var(--line)}
html[data-theme="dark"] .pos-gauge-entry-notch{background:#8c877f}
html[data-theme="dark"] .pos-gauge{background:var(--surface-2)!important;border-color:var(--line-soft)!important}
html[data-theme="dark"] .pos-gauge-level strong{color:#ffffff!important}
html[data-theme="dark"] .position-card{background:var(--surface)!important;border-color:var(--line)!important}
html[data-theme="dark"] .position-card-head{background:#1e2128!important;border-color:var(--line-soft)!important}
html[data-theme="dark"] .position-title strong{color:#ffffff!important}
html[data-theme="dark"] .position-pnl strong{color:#ffffff!important}
html[data-theme="dark"] .distance-box{background:var(--surface-2)!important;border-color:var(--line-soft)!important}
html[data-theme="dark"] .distance-box strong{color:#ffffff!important}
html[data-theme="dark"] .position-metric strong{color:#ffffff!important}
html[data-theme="dark"] .position-metric span{color:#ffffff!important;font-weight:500}
html[data-theme="dark"] .trade-table th,
html[data-theme="dark"] .analytics-table th{background:#1e2128!important;color:#ffffff!important;font-weight:600!important;border-bottom-color:var(--line-soft)!important}
html[data-theme="dark"] .trade-table td,
html[data-theme="dark"] .analytics-table td{border-bottom-color:var(--line-soft)!important;color:#ffffff!important}
.analytics-table .positive,.analytics-table td.positive,.analytics-table strong.positive{color:#059669!important;font-weight:400!important}
.analytics-table .negative,.analytics-table td.negative,.analytics-table strong.negative{color:#dc2626!important;font-weight:400!important}
html[data-theme="dark"] .analytics-table .positive,html[data-theme="dark"] .analytics-table td.positive,html[data-theme="dark"] .analytics-table strong.positive{color:#4ade80!important;font-weight:400!important;text-shadow:none!important}
html[data-theme="dark"] .analytics-table .negative,html[data-theme="dark"] .analytics-table td.negative,html[data-theme="dark"] .analytics-table strong.negative{color:#ff6b6b!important;font-weight:400!important;text-shadow:none!important}
.stats-metrics strong.positive,.stats-metrics span.stat-metric-val.positive,#stats .stats-metrics strong.positive,#stats .stats-metrics span.stat-metric-val.positive,#stats .stats-card .stats-metrics strong.positive,#stats .stats-card .stats-metrics span.stat-metric-val.positive,#stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.positive{color:#059669!important;font-weight:400!important}
.stats-metrics strong.negative,.stats-metrics span.stat-metric-val.negative,#stats .stats-metrics strong.negative,#stats .stats-metrics span.stat-metric-val.negative,#stats .stats-card .stats-metrics strong.negative,#stats .stats-card .stats-metrics span.stat-metric-val.negative,#stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.negative{color:#dc2626!important;font-weight:400!important}
html[data-theme="dark"] .stats-metrics strong.positive,html[data-theme="dark"] .stats-metrics span.stat-metric-val.positive,html[data-theme="dark"] #stats .stats-metrics strong.positive,html[data-theme="dark"] #stats .stats-metrics span.stat-metric-val.positive,html[data-theme="dark"] #stats .stats-card .stats-metrics strong.positive,html[data-theme="dark"] #stats .stats-card .stats-metrics span.stat-metric-val.positive,html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.positive{color:#4ade80!important;font-weight:400!important;text-shadow:none!important}
html[data-theme="dark"] .stats-metrics strong.negative,html[data-theme="dark"] .stats-metrics span.stat-metric-val.negative,html[data-theme="dark"] #stats .stats-metrics strong.negative,html[data-theme="dark"] #stats .stats-metrics span.stat-metric-val.negative,html[data-theme="dark"] #stats .stats-card .stats-metrics strong.negative,html[data-theme="dark"] #stats .stats-card .stats-metrics span.stat-metric-val.negative,html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.negative{color:#ff6b6b!important;font-weight:400!important;text-shadow:none!important}
html[data-theme="dark"] .history-row{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .history-row.header{background:#1e2128;border-color:var(--line-soft);color:#ffffff!important}
html[data-theme="dark"] .history-cell strong{color:#ffffff!important}
html[data-theme="dark"] .history-reason{background:var(--surface-2)!important;border-color:var(--line-soft)!important}
html[data-theme="dark"] .history-reason strong{color:#ffffff!important}
html[data-theme="dark"] .attempt-row{background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] .attempt-row.header{background:#1e2128;border-color:var(--line-soft);color:#ffffff!important}
html[data-theme="dark"] .attempt-reason{background:var(--surface-2)!important;border-color:var(--line-soft)!important}
html[data-theme="dark"] .btc-chart-panel iframe{background:#111215!important;border-color:var(--line)!important}
html[data-theme="dark"] input,html[data-theme="dark"] select{background:#16181e;color:#ffffff;border-color:var(--line)}
html[data-theme="dark"] input:disabled,html[data-theme="dark"] select:disabled{background:#1a1c22;color:#8892b0}
html[data-theme="dark"] .auth-panel{background:#141519}
html[data-theme="dark"] .login-card{background:#1a1c22;border-color:var(--line);box-shadow:var(--shadow)}
html[data-theme="dark"] .login-card h2{color:#ffffff!important}
html[data-theme="dark"] .login-card>.intro{color:#cbd5e1!important}
html[data-theme="dark"] .forgot-button{color:#cbd5e1!important;text-decoration-color:#64748b!important}
html[data-theme="dark"] .forgot-button:hover{color:#ffffff!important;text-decoration-color:#ffffff!important}
html[data-theme="dark"] .back-link{color:#ffffff!important}
html[data-theme="dark"] .login-button{background:#ffffff!important;color:#0f172a!important;font-weight:600!important}
html[data-theme="dark"] .login-button:hover{background:#f1f5f9!important}
html[data-theme="dark"] .local-note{color:#94a3b8!important;border-top-color:#2a2e38!important}
html[data-theme="dark"] .local-note strong{color:#e2e8f0!important}
html[data-theme="dark"] .auth-visual{background:#111215;border-right-color:var(--line)}
html[data-theme="dark"] .auth-visual:before{border-color:#21242c}
html[data-theme="dark"] .auth-visual:after{border-color:#1a1c22}
html[data-theme="dark"] .auth-field input{background:#16181e;border-color:var(--line);color:#ffffff}
/* ENGINE VARIANT SELECTOR v0.9.73.0 */
.engine-variant-selector-wrap{margin-bottom:16px;padding:14px;border-radius:var(--radius-sm);background:var(--bg-soft);border:1px solid var(--line-soft)}
.engine-variant-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;flex-wrap:wrap;gap:8px}
.engine-variant-eyebrow{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.engine-variant-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.engine-variant-card{background:var(--surface);border:1.5px solid var(--line-soft);border-radius:10px;padding:12px 14px;cursor:pointer;transition:all .2s cubic-bezier(0.16,1,0.3,1);display:flex;flex-direction:column;gap:6px;position:relative;user-select:none}
.engine-variant-card:hover{border-color:var(--line);transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.04)}
.engine-variant-card.active{border-color:var(--green);background:rgba(88,113,94,.07);box-shadow:0 0 0 1px var(--green),0 3px 12px rgba(88,113,94,.12)}
.variant-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.variant-radio-dot{width:14px;height:14px;border-radius:50%;border:2px solid var(--line);background:transparent;display:inline-block;transition:all .15s ease;flex-shrink:0}
.engine-variant-card.active .variant-radio-dot{border-color:var(--green);background:var(--green);box-shadow:inset 0 0 0 2.5px var(--surface)}
.variant-card-name{font-size:13px;font-weight:600;color:var(--ink)}
.variant-card-sub{font-size:11.5px;font-weight:600;color:var(--terracotta)}
.variant-card-desc{font-size:11px;line-height:1.45;color:var(--muted);margin:0}
.variant-card-specs{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px;padding-top:6px;border-top:1px dashed var(--line-soft);font-size:10px;color:var(--muted)}
html[data-theme="dark"] .engine-variant-card{background:#181a20;border-color:#2a2e38}
html[data-theme="dark"] .engine-variant-card:hover{background:#20232b;border-color:#3b404d}
html[data-theme="dark"] .engine-variant-card.active{border-color:#62a87c;background:rgba(98,168,124,.12);box-shadow:0 0 0 1px #62a87c,0 3px 14px rgba(0,0,0,.4)}
html[data-theme="dark"] .engine-variant-card.active .variant-radio-dot{border-color:#62a87c;background:#62a87c;box-shadow:inset 0 0 0 2.5px #181a20}
html[data-theme="dark"] .variant-card-name{color:#ffffff}
html[data-theme="dark"] .variant-card-desc{color:#ffffff!important;opacity:.95}
html[data-theme="dark"] .variant-card-specs{border-top-color:#2a2e38;color:#ffffff!important;font-weight:500}
html[data-theme="dark"] .engine-variant-eyebrow{color:#ffffff!important}

/* HIGH-CONTRAST DARK MODE TYPOGRAPHY, COMPONENTS & METRICS (v0.9.82.0) */

/* Vibrant High-Contrast Red for Negative Metrics, Losses & Short Sides */
html[data-theme="dark"] .negative,
html[data-theme="dark"] .result-loss,
html[data-theme="dark"] .trade-side.short {
  color: #ff4d4d !important;
  font-weight: 600 !important;
}
html[data-theme="dark"] .book-dot.off {
  background: #ff4d4d !important;
  box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.22) !important;
}

/* Form Labels, Inputs & Hints */
html[data-theme="dark"] .field label,
html[data-theme="dark"] label {
  color: #f1f5f9 !important;
  font-weight: 600;
}
html[data-theme="dark"] .hint,
html[data-theme="dark"] .note-list,
html[data-theme="dark"] .save-note,
html[data-theme="dark"] .locked,
html[data-theme="dark"] .danger-note,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .empty p {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select {
  background: #16181e !important;
  border-color: #334155 !important;
  color: #ffffff !important;
}

/* Subtitles, Descriptions, Summaries & Notes */
html[data-theme="dark"] .dashboard-heading p,
html[data-theme="dark"] .panel-title p,
html[data-theme="dark"] .active-trades-head p,
html[data-theme="dark"] .stats-section-title p,
html[data-theme="dark"] .risk-panel-header p,
html[data-theme="dark"] .crypto-section-header p,
html[data-theme="dark"] .mode-card p,
html[data-theme="dark"] .strategy-description,
html[data-theme="dark"] .diagnostic-note,
html[data-theme="dark"] .analytics-note,
html[data-theme="dark"] .bt-status-copy,
html[data-theme="dark"] .topbar p {
  color: #cbd5e1 !important;
}

/* Metric Labels, Spans & Small Notes Across All Cards - Crisp & Legible */
html[data-theme="dark"] :is(
  .overview-card .kpi-label,
  .overview-kpi-label,
  .overview-kpi-sub,
  .pillar-stat-label,
  .pillar-list-item span,
  .risk-kpi span,
  .crypto-kpi span,
  .crypto-meta span,
  .stats-metrics span,
  .stats-detail-grid span,
  .position-metric span,
  .distance-box span,
  .risk-mode-body span,
  .metric-card span,
  .backtest-method span,
  .backtest-summary span,
  .comparison-metrics span,
  .position-pnl span,
  .corridor-head,
  .macro-sparkline-head span,
  .diagnostic-step span,
  .strategy-flow span,
  .kv span,
  .protection-grid span,
  .mode-card .numbers span,
  .sr-bar-row .lbl small,
  .sr-bar-row .val small,
  .sr-guide,
  .sr-guide-grid>div strong,
  .sr-facts span,
  .sr-field>span,
  .sr-resolve,
  .sr-alloc-row>b,
  .sr-legend,
  .sr-qbar span,
  .fa-row.head,
  .fa-sub-h,
  .fa-edit,
  .fin-kpi span,
  .fin-alloc-num span,
  .fin-alloc-ppr,
  .fin-leg-row small,
  .fin-leg-note,
  .fin-yr-col small,
  .fin-foot,
  .fin-hist-strip span,
  .fin-hist-strip small,
  .sys-card-t small,
  .sys-card .kv span
) {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] :is(
  .overview-card .kpi-note,
  .risk-kpi small,
  .crypto-kpi small,
  .position-metric small,
  .risk-mode-body small,
  .metric-card small,
  .diagnostic-step small,
  .strategy-flow small,
  .fin-kpi small
) {
  color: #94a3b8 !important;
}

/* Table Headers High-Contrast in Dark Mode */
html[data-theme="dark"] table th,
html[data-theme="dark"] .sr-table thead th,
html[data-theme="dark"] .trade-table th,
html[data-theme="dark"] .analytics-table th,
html[data-theme="dark"] table.fin-sortable thead th,
html[data-theme="dark"] .fa-row.head {
  color: #ffffff !important;
  font-weight: 650 !important;
  letter-spacing: .04em !important;
}

/* Specific overrides for #stats dark contrast */
html[data-theme="dark"] #stats .stats-section-title h3 { color: #ffffff !important; }
html[data-theme="dark"] #stats .stats-section-title p { color: #cbd5e1 !important; }
html[data-theme="dark"] #stats .stats-metrics span { color: #cbd5e1 !important; }
html[data-theme="dark"] #stats .analytics-table th { color: #ffffff !important; background: #1e2128 !important; }
html[data-theme="dark"] #stats .analytics-table td { color: #f8fafc !important; }
html[data-theme="dark"] #stats .analytics-table td strong { color: #ffffff !important; }
html[data-theme="dark"] #stats .analytics-table .reason-cell { color: #cbd5e1 !important; }
html[data-theme="dark"] #stats .analytics-empty { color: #cbd5e1 !important; }

/* Metric Values, Headers & Prominent Texts */
html[data-theme="dark"] .overview-card .kpi-value,
html[data-theme="dark"] .risk-kpi strong,
html[data-theme="dark"] .crypto-kpi strong,
html[data-theme="dark"] .crypto-meta strong,
html[data-theme="dark"] .stats-metrics strong:not(.positive):not(.negative),
html[data-theme="dark"] .stats-detail-grid strong,
html[data-theme="dark"] .position-metric strong,
html[data-theme="dark"] .distance-box strong,
html[data-theme="dark"] .risk-mode-body strong,
html[data-theme="dark"] .metric-card strong,
html[data-theme="dark"] .backtest-method strong,
html[data-theme="dark"] .backtest-summary strong,
html[data-theme="dark"] .comparison-metrics strong,
html[data-theme="dark"] .diagnostic-step strong,
html[data-theme="dark"] .strategy-flow strong,
html[data-theme="dark"] .calc-box strong {
  color: #ffffff !important;
}

/* Radar & Proximity Panel */
html[data-theme="dark"] #radarNextCandleTime,
html[data-theme="dark"] #radarNextCandleTime span {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] #radarNextCandleTime strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .radar-stat {
  background: #1e212a !important;
  border: 1px solid #333948 !important;
  border-radius: 10px !important;
  padding: 10px 12px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.22) !important;
}
html[data-theme="dark"] .radar-stat span {
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}
html[data-theme="dark"] .radar-stat strong {
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin-top: 3px !important;
}
html[data-theme="dark"] .radar-stat small {
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
}
html[data-theme="dark"] #radarDayDistUp,
html[data-theme="dark"] #radarSwingDistUp,
html[data-theme="dark"] #radarIntraDistUp,
html[data-theme="dark"] #radarDayDistUp *,
html[data-theme="dark"] #radarSwingDistUp *,
html[data-theme="dark"] #radarIntraDistUp *,
html[data-theme="dark"] .radar-dist-up,
html[data-theme="dark"] .radar-dist-up * {
  color: #4ade80 !important;
  font-weight: 400 !important;
}
html[data-theme="dark"] #radarDayDistDown,
html[data-theme="dark"] #radarSwingDistDown,
html[data-theme="dark"] #radarIntraDistDown,
html[data-theme="dark"] #radarDayDistDown *,
html[data-theme="dark"] #radarSwingDistDown *,
html[data-theme="dark"] #radarIntraDistDown *,
html[data-theme="dark"] .radar-dist-down,
html[data-theme="dark"] .radar-dist-down-val {
  color: #ff8585 !important;
  font-weight: 400 !important;
}
html[data-theme="dark"] .radar-dist-down-sub {
  color: #fca5a5 !important;
  font-weight: 400 !important;
}
html[data-theme="dark"] .radar-pct-legend,
html[data-theme="dark"] .radar-pct-legend span {
  color: #cbd5e1 !important;
  font-size: 11.5px !important;
}
html[data-theme="dark"] .radar-pct-legend strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .radar-pct-legend em {
  color: #fbbf24 !important;
  font-style: normal;
}
html[data-theme="dark"] .radar-checklist {
  background: #16181f !important;
  border-color: #2e3442 !important;
}
html[data-theme="dark"] .radar-checklist-head {
  border-color: #262b36 !important;
}
html[data-theme="dark"] .checklist-row {
  border-color: #262b36 !important;
}
html[data-theme="dark"] .checklist-name {
  color: #ffffff !important;
  font-size: 12.5px !important;
}
html[data-theme="dark"] .checklist-sub {
  color: #94a3b8 !important;
  font-size: 11px !important;
}
html[data-theme="dark"] .checklist-ticker.ok {
  background: rgba(74,222,128,0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(74,222,128,0.3) !important;
}
html[data-theme="dark"] .checklist-ticker.warn {
  background: rgba(251,191,36,0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(251,191,36,0.3) !important;
}
html[data-theme="dark"] .checklist-ticker.fail {
  background: rgba(254,165,165,0.18) !important;
  color: #fca5a5 !important;
  border-color: rgba(254,165,165,0.4) !important;
  font-weight: 650 !important;
}
html[data-theme="dark"] .checklist-ticker.neutral {
  background: #1e212a !important;
  color: #94a3b8 !important;
  border-color: #333948 !important;
}
html[data-theme="dark"] .checklist-status.ok {
  background: rgba(74,222,128,0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(74,222,128,0.3) !important;
}
html[data-theme="dark"] .checklist-status.warn {
  background: rgba(251,191,36,0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(251,191,36,0.3) !important;
}
html[data-theme="dark"] .checklist-status.fail {
  background: rgba(254,165,165,0.18) !important;
  color: #fca5a5 !important;
  border-color: rgba(254,165,165,0.4) !important;
}
html[data-theme="dark"] .checklist-status.neutral {
  background: #1e212a !important;
  color: #94a3b8 !important;
  border-color: #333948 !important;
}
html[data-theme="dark"] .eval-card {
  background: #16181f !important;
  border-color: #2e3442 !important;
}
html[data-theme="dark"] .eval-title {
  color: #ffffff !important;
  font-size: 12.5px !important;
}
html[data-theme="dark"] .eval-summary {
  color: #cbd5e1 !important;
  font-size: 12px !important;
}
html[data-theme="dark"] .eval-summary strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .eval-reason-item {
  color: #cbd5e1 !important;
  font-size: 11.5px !important;
}
html[data-theme="dark"] .eval-reason-item strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .eval-reason-item.fail .reason-dot {
  color: #ff8585 !important;
  font-weight: 650 !important;
}
html[data-theme="dark"] .eval-reason-item.ok .reason-dot {
  color: #4ade80 !important;
}
html[data-theme="dark"] .eval-tip {
  border-color: #2e3442 !important;
  color: #94a3b8 !important;
  font-size: 11.5px !important;
}
html[data-theme="dark"] .radar-progress-container {
  background: #16181f !important;
  border-color: #2e3442 !important;
}
html[data-theme="dark"] .candle-track {
  background: #1e212a !important;
  border-color: #333948 !important;
}
html[data-theme="dark"] .radar-sub-balance {
  background: #1e212a !important;
  border-color: #333948 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .radar-pre-sim {
  background: #16181f !important;
  border-color: #2e3442 !important;
}
html[data-theme="dark"] .radar-pre-sim-head strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .pre-sim-col {
  background: #1e212a !important;
  border-color: #333948 !important;
}
html[data-theme="dark"] .pre-sim-col span {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .pre-sim-col strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .pre-sim-col small {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .eval-tabs {
  border-color: #2e3442 !important;
}
html[data-theme="dark"] .eval-tab-btn {
  background: #1e212a !important;
  border-color: #333948 !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .eval-tab-btn:hover {
  background: #282c37 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .eval-tab-btn.active {
  background: #282c37 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}
html[data-theme="dark"] .eval-collapse-btn {
  background: #1e212a !important;
  border-color: #333948 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .eval-collapse-btn:hover {
  background: #282c37 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}
html[data-theme="dark"] .risk-warning-note {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid rgba(251, 191, 36, 0.55) !important;
  color: #fef08a !important;
}
html[data-theme="dark"] .risk-warning-note span {
  color: #fef9c3 !important;
}
html[data-theme="dark"] .risk-warning-note strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .risk-warning-note .warn-fix {
  color: #fde047 !important;
}
html[data-theme="dark"] .risk-warning-note code {
  background: rgba(245, 158, 11, 0.32) !important;
  color: #ffffff !important;
  border: 1px solid rgba(251, 191, 36, 0.65) !important;
}
html[data-theme="dark"] .pre-sim-min-warn {
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid rgba(248, 113, 113, 0.55) !important;
  color: #fee2e2 !important;
}
html[data-theme="dark"] .pre-sim-min-warn span,
html[data-theme="dark"] .pre-sim-min-warn strong {
  color: #fecaca !important;
  font-weight: 400 !important;
}
html[data-theme="dark"] .pre-sim-min-warn .warn-title {
  color: #ffffff !important;
  font-weight: 600 !important;
}
html[data-theme="dark"] .pre-sim-min-warn .warn-fix {
  color: #fca5a5 !important;
  font-weight: 400 !important;
}
html[data-theme="dark"] .pre-sim-min-warn code {
  background: rgba(239, 68, 68, 0.32) !important;
  color: #ffffff !important;
  border: 1px solid rgba(248, 113, 113, 0.65) !important;
}
html[data-theme="dark"] #riskMarginSimulatorPanel .field label {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] #riskMarginSimulatorPanel .field label strong {
  color: #ffffff !important;
}
html[data-theme="dark"] #riskMarginSimulatorPanel .field .hint {
  color: #94a3b8 !important;
}
html[data-theme="dark"] #riskMarginSimulatorPanel div[style*="background:var(--bg-soft)"] {
  background: #181b22 !important;
  border-color: #2d3340 !important;
}
html[data-theme="dark"] #riskMarginSimulatorPanel div[style*="background:var(--bg-soft)"] span {
  color: #94a3b8 !important;
}
html[data-theme="dark"] #riskMarginSimulatorPanel div[style*="background:var(--bg-soft)"] strong {
  color: #ffffff !important;
}

/* Open Positions & Status Countdown */
html[data-theme="dark"] .empty-position {
  background: #17191e !important;
  border-color: #2a2e38 !important;
}
html[data-theme="dark"] .empty-position strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .empty-position span {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .countdown-badge {
  background: #1a1c22 !important;
  border-color: #2a2e38 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] #nextScanCountdownLabel,
html[data-theme="dark"] #quickEmergencyPauseLabel {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}
html[data-theme="dark"] #nextScanCountdownLabel {
  color: #cbd5e1 !important;
}

/* Risk Summary & Inline Panels */
html[data-theme="dark"] .risk-summary-inline {
  background: #17191e !important;
  border-color: #2a2e38 !important;
}
html[data-theme="dark"] .risk-summary-inline strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .risk-summary-inline span {
  color: #cbd5e1 !important;
}

/* Live P&L Performance Panel */
html[data-theme="dark"] .live-pnl-panel span,
html[data-theme="dark"] .live-pnl-panel small,
html[data-theme="dark"] .live-pnl-panel p {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .live-pnl-panel strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .backtest-progress-copy {
  color: #cbd5e1 !important;
}

/* Tags, Minimal Rules Strips & Tables */
html[data-theme="dark"] .tag {
  background: #22252d !important;
  border: 1px solid #334155 !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .rules-minimal-strip {
  background: #17191e !important;
  border-color: #2a2e38 !important;
}
html[data-theme="dark"] .rules-minimal-strip strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .calc-box {
  background: #17191e !important;
  border-color: #2a2e38 !important;
}
html[data-theme="dark"] .calc-box p {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .trade-table th,
html[data-theme="dark"] .analytics-table th {
  background: #1e2128 !important;
  color: #cbd5e1 !important;
  border-bottom-color: #2a2e38 !important;
}
html[data-theme="dark"] .trade-table td,
html[data-theme="dark"] .analytics-table td {
  border-bottom-color: #21242c !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .analytics-table .reason-cell {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .position-foot {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .position-foot strong {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .book-connection {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .book-connection strong {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] #swingBitgetLabel.ok,
html[data-theme="dark"] #dayBitgetLabel.ok,
html[data-theme="dark"] #intraBitgetLabel.ok,
html[data-theme="dark"] .book-connection strong.ok {
  color: #6ee7a0 !important;
}
html[data-theme="dark"] #swingBitgetLabel.error,
html[data-theme="dark"] #dayBitgetLabel.error,
html[data-theme="dark"] #intraBitgetLabel.error,
html[data-theme="dark"] .book-connection strong.error {
  color: #ff8585 !important;
}
html[data-theme="dark"] .user-email {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .logout {
  color: #94a3b8 !important;
}
html[data-theme="dark"] [style*="color:var(--muted)"] {
  color: #cbd5e1 !important;
}

/* DASHBOARD v0.8.5 */
.dashboard-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:8px 0 0;padding:0 2px}.dashboard-heading .eyebrow{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--terracotta);font-weight:600}.dashboard-heading h2{font-size:18px;letter-spacing:-.025em;margin:5px 0 0;font-weight:600}.dashboard-heading p{font-size:11.5px;color:#68645d;margin:6px 0 0;line-height:1.5}.dashboard-divider{height:1px;background:var(--line);margin:4px 0 2px}
.overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.overview-card{border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:17px 18px;min-height:112px}.overview-card .kpi-label{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#67635c;font-size:11px}.overview-card .kpi-value{display:block;font-size:25px;margin-top:14px;font-weight:600;letter-spacing:-.04em}.overview-card .kpi-note{display:block;color:#8c877f;font-size:10.5px;margin-top:5px}.positive{color:var(--green)!important}.negative{color:var(--red)!important}.neutral{color:var(--ink)!important}
.risk-panel{border:1px solid var(--line);background:linear-gradient(180deg,#fffdf9 0%,#faf7f1 100%);border-radius:18px;padding:20px}.risk-panel-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.risk-panel-header h3{margin:0;font-size:14px;font-weight:650}.risk-panel-header p{margin:5px 0 0;color:#6e6a62;font-size:11px}.risk-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.risk-kpi{border:1px solid var(--line-soft);background:rgba(255,255,255,.55);border-radius:12px;padding:13px}.risk-kpi span{display:block;color:#6d6961;font-size:10.5px}.risk-kpi strong{display:block;margin-top:7px;font-size:15px;font-weight:650}.risk-kpi small{display:block;margin-top:4px;color:#8c877f;font-size:10px}
.crypto-section{border:1px solid var(--line);background:var(--surface);border-radius:20px;padding:20px;box-shadow:0 10px 30px rgba(70,60,45,.025)}.crypto-section.swing{border-top:3px solid var(--accent-swing)}.crypto-section.day{border-top:3px solid var(--accent-day)}.crypto-section-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.crypto-section-header h2{font-size:16px;margin:0;font-weight:650;letter-spacing:-.02em}.crypto-section-header p{font-size:11px;color:#6d6961;margin:5px 0 0}.crypto-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.crypto-kpi{border:1px solid var(--line-soft);background:var(--bg-soft);border-radius:12px;padding:13px;min-height:88px}.crypto-kpi span{display:block;color:#6c6860;font-size:10.5px}.crypto-kpi strong{display:block;margin-top:8px;font-size:17px;font-weight:650;letter-spacing:-.025em}.crypto-kpi small{display:block;margin-top:4px;color:#8b867e;font-size:9.5px}.crypto-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}.crypto-meta div{border-top:1px solid var(--line-soft);padding-top:10px}.crypto-meta span{display:block;color:#77726a;font-size:10px}.crypto-meta strong{display:block;margin-top:4px;font-size:11.5px}
.active-trades{overflow:hidden;border:1px solid var(--line);background:var(--surface);border-radius:18px}.active-trades-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid var(--line-soft)}.active-trades-head h3{margin:0;font-size:14px}.active-trades-head p{margin:4px 0 0;font-size:10.5px;color:#77726a}.trade-table{width:100%;border-collapse:collapse}.trade-table th,.trade-table td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--line-soft);font-size:11px}.trade-table th{font-size:9.5px;color:#817c73;text-transform:uppercase;letter-spacing:.08em;font-weight:650;background:#faf8f3}.trade-table tr:last-child td{border-bottom:0}.trade-type{font-weight:650}.trade-side.long{color:var(--green)}.trade-side.short{color:var(--red)}.empty-row{text-align:center!important;color:#8b867e!important;padding:24px!important}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:6px;box-shadow:0 0 0 3px rgba(88,113,94,.10)}
.dashboard-top-row{display:flex;flex-direction:column;gap:12px;margin-bottom:12px;width:100%}
.status-panel{border:1px solid var(--line);background:var(--surface);border-radius:14px;overflow:hidden;width:100%}
.status-panel-bar{display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:8px 14px;width:100%;box-sizing:border-box;flex-wrap:wrap}
.status-actions-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-start}
.status-bitget-text{font-weight:600;color:var(--ink)}
.status-mode-text{font-weight:650;color:var(--ink)}
html[data-theme="dark"] .status-bitget-text,html[data-theme="dark"] .status-mode-text{color:#ffffff!important}
@media(max-width:640px){
  .radar-head-status-inline{width:100%;justify-content:flex-end!important}
}
.trigger-radar-panel{border:1px solid var(--line);background:var(--surface);border-radius:14px;overflow:hidden;margin-bottom:12px}
.radar-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));gap:10px;padding:10px 14px}
.radar-card{border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;justify-content:flex-start;gap:8px;box-sizing:border-box}
.radar-card.day-radar{border:1.5px solid var(--accent-day)!important;background:var(--accent-day-bg)!important;box-shadow:0 4px 16px var(--accent-day-glow)!important}
.radar-card.swing-radar{border:1.5px solid var(--accent-swing)!important;background:var(--accent-swing-bg)!important;box-shadow:0 4px 16px var(--accent-swing-glow)!important}
.radar-card.intra-radar{border:1.5px solid var(--accent-intra)!important;background:var(--accent-intra-bg)!important;box-shadow:0 4px 16px var(--accent-intra-glow)!important}
.toast-container{position:fixed;top:18px;right:18px;z-index:99999;display:flex;flex-direction:column;gap:8px;max-width:380px;pointer-events:none}
.app-toast{pointer-events:auto;display:flex;align-items:flex-start;gap:10px;padding:10px 14px;border-radius:10px;border:1px solid var(--line);background:var(--surface);box-shadow:0 8px 24px rgba(0,0,0,.15);font-size:11.5px;color:var(--ink);line-height:1.45;animation:toastSlideIn .25s cubic-bezier(.16,1,.3,1)}
.app-toast.info{border-left:4px solid var(--blue-live)}
.app-toast.success{border-left:4px solid var(--green)}
.app-toast.warning{border-left:4px solid var(--amber);background:rgba(217,119,6,.06)}
.app-toast.error{border-left:4px solid var(--red);background:var(--red-bg)}
.app-toast .toast-icon{font-size:14px;flex:0 0 auto;margin-top:1px}
.app-toast .toast-body{flex:1}
.app-toast .toast-title{font-weight:600;display:block;margin-bottom:2px}
.app-toast .toast-close{background:none;border:none;color:var(--muted);font-size:15px;line-height:1;cursor:pointer;padding:0 2px;margin-left:6px;flex:0 0 auto}
.app-toast .toast-close:hover{color:var(--ink)}
@keyframes toastSlideIn{from{opacity:0;transform:translateY(-10px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
.radar-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:6px;border-bottom:1px solid var(--line-soft);min-height:50px;box-sizing:border-box}
.radar-body{padding-top:2px;display:flex;flex-direction:column;gap:8px;flex:1}
.radar-stat{background:var(--surface);border:1px solid var(--line-soft);border-radius:8px;padding:8px 10px;min-height:106px;height:100%;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;box-sizing:border-box}
.radar-stat span{display:block;font-size:12px;color:var(--muted);font-weight:650}
.radar-stat strong{display:block;margin-top:3px;font-size:16px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.radar-stat small{display:block;width:100%;margin-top:3px;font-size:12px;font-weight:500;line-height:1.35;text-align:left;overflow-wrap:anywhere}
.trigger-pair-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-height:106px}
.trigger-metric{display:block;font-size:12px;font-weight:400;line-height:1.35}
.trigger-state{display:block;margin-top:3px;font-size:11.5px;font-weight:400;line-height:1.35;color:var(--muted)!important}
.trigger-state.breakout{color:var(--amber)!important;font-weight:400!important}
.trigger-state.open{color:var(--green)!important;font-weight:400!important}
.trigger-sub-small{font-size:9.5px!important;line-height:1.25!important}
.radar-dist-up,.radar-dist-up *{color:#16a34a!important;font-weight:400!important}
.radar-dist-down,.radar-dist-down-val{color:#dc2626!important;font-weight:400!important}
.radar-dist-down-sub{color:#b91c1c!important;font-weight:400!important}
.radar-dist-up .trigger-state.waiting,.radar-dist-down .trigger-state.waiting{color:var(--muted)!important;font-weight:400!important}
.radar-dist-up .trigger-state.breakout,.radar-dist-down .trigger-state.breakout{color:var(--amber)!important;font-weight:400!important}
.radar-dist-up .trigger-state.open,.radar-dist-down .trigger-state.open{color:var(--green)!important;font-weight:400!important}
html[data-theme="dark"] #radarDayDistUp .trigger-state.waiting,
html[data-theme="dark"] #radarSwingDistUp .trigger-state.waiting,
html[data-theme="dark"] #radarIntraDistUp .trigger-state.waiting,
html[data-theme="dark"] #radarDayDistDown .trigger-state.waiting,
html[data-theme="dark"] #radarSwingDistDown .trigger-state.waiting,
html[data-theme="dark"] #radarIntraDistDown .trigger-state.waiting{color:#cbd5e1!important;font-weight:400!important}
html[data-theme="dark"] #radarDayDistUp .trigger-state.breakout,
html[data-theme="dark"] #radarSwingDistUp .trigger-state.breakout,
html[data-theme="dark"] #radarIntraDistUp .trigger-state.breakout,
html[data-theme="dark"] #radarDayDistDown .trigger-state.breakout,
html[data-theme="dark"] #radarSwingDistDown .trigger-state.breakout,
html[data-theme="dark"] #radarIntraDistDown .trigger-state.breakout{color:#fbbf24!important;font-weight:400!important}
html[data-theme="dark"] #radarDayDistUp .trigger-state.open,
html[data-theme="dark"] #radarSwingDistUp .trigger-state.open,
html[data-theme="dark"] #radarIntraDistUp .trigger-state.open,
html[data-theme="dark"] #radarDayDistDown .trigger-state.open,
html[data-theme="dark"] #radarSwingDistDown .trigger-state.open,
html[data-theme="dark"] #radarIntraDistDown .trigger-state.open{color:#4ade80!important;font-weight:400!important}
.radar-pct-legend{margin-top:2px;font-size:11.5px;color:var(--muted);line-height:1.45;min-height:28px}
.radar-pct-legend strong{color:var(--ink)}

.radar-checklist{margin-top:4px;background:var(--surface);border:1px solid var(--line-soft);border-radius:10px;padding:8px 10px;box-sizing:border-box;display:flex;flex-direction:column}
.radar-checklist-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:0;cursor:pointer;padding:2px 0;transition:margin-bottom .15s ease}
.radar-checklist-head.has-items{margin-bottom:6px;border-bottom:1px solid var(--line-soft);padding-bottom:6px}
.radar-checklist-title-wrap{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap}
.radar-checklist-title-wrap strong{font-size:11.5px;color:var(--ink)}
.checklist-items{display:flex;flex-direction:column;gap:1px;flex:1}
.checklist-row{display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid var(--line-soft)}
.checklist-row:last-child{border-bottom:none}
.checklist-left{display:flex;align-items:center;gap:8px;min-width:0}
.checklist-ticker{width:20px;height:20px;min-width:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:600}
.checklist-ticker.ok{background:var(--green-bg);color:var(--green);border:1px solid var(--green-line)}
.checklist-ticker.warn{background:var(--amber-bg);color:var(--amber);border:1px solid var(--amber-line)}
.checklist-ticker.fail{background:var(--red-bg);color:var(--red);border:1px solid var(--red-line)}
.checklist-ticker.neutral{background:var(--bg-soft);color:var(--muted);border:1px solid var(--line-soft)}
.checklist-text{display:flex;flex-direction:column;min-width:0}
.checklist-name{font-size:12px;font-weight:650;color:var(--ink);line-height:1.25;display:inline-flex;align-items:center;gap:4px}
.checklist-sub{font-size:11px;color:var(--muted);line-height:1.3;margin-top:1px}
.checklist-right{text-align:right;white-space:nowrap;margin-left:8px}
.checklist-status{display:inline-block;font-size:11px;font-weight:650;padding:3px 8px;border-radius:6px;white-space:nowrap}
.checklist-status.ok{background:var(--green-bg);color:var(--green);border:1px solid var(--green-line)}
.checklist-status.warn{background:var(--amber-bg);color:var(--amber);border:1px solid var(--amber-line)}
.checklist-status.fail{background:var(--red-bg);color:var(--red);border:1px solid var(--red-line)}
.checklist-status.neutral{background:var(--bg-soft);color:var(--muted);border:1px solid var(--line-soft)}

.radar-progress-container{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0 10px;padding:8px 10px;background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:10px;box-sizing:border-box}
.candle-progress-box{display:flex;flex-direction:column}
.candle-track{height:6px;background:var(--surface);border:1px solid var(--line-soft);border-radius:999px;overflow:hidden;position:relative}
.radar-sub-balance{font-size:10.5px;color:var(--muted);font-weight:600;background:var(--bg-soft);padding:1px 6px;border-radius:4px;border:1px solid var(--line-soft);white-space:nowrap}
.radar-pre-sim{margin-top:4px;background:var(--surface);border:1px solid var(--line-soft);border-radius:10px;padding:8px 10px;box-sizing:border-box}
.radar-pre-sim-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;font-size:11.5px;color:var(--ink)}
.radar-pre-sim-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px}
.pre-sim-col{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:6px;padding:6px 8px;display:flex;flex-direction:column;min-width:0;min-height:54px;box-sizing:border-box}
.pre-sim-col span{font-size:10.5px;color:var(--muted);font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pre-sim-col strong{font-size:12.5px;color:var(--ink);font-weight:600;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pre-sim-col small{font-size:10px;color:var(--muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eval-tabs{display:flex;gap:6px;margin-bottom:8px;border-bottom:1px solid var(--line-soft);padding-bottom:6px;overflow-x:auto}
.eval-tab-btn{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:6px;padding:4px 10px;font-size:11px;font-weight:600;color:var(--muted);cursor:pointer;transition:all .18s ease;white-space:nowrap;touch-action:manipulation;user-select:none}
.eval-tab-btn:hover{background:var(--surface);color:var(--ink)}
.eval-tab-btn.active{background:var(--surface-2);color:var(--ink);border-color:var(--line);font-weight:600}
.risk-warning-note{margin-top:8px;padding:8px 10px;border-radius:8px;background:var(--amber-bg);border:1px solid var(--amber-line);color:var(--amber);font-size:11.5px;line-height:1.4}
.pre-sim-min-warn{margin-top:8px;padding:8px 10px;border-radius:8px;background:rgba(255,123,114,.12);border:1px solid rgba(255,123,114,.45);color:#ff9999;font-size:11.5px;line-height:1.45;font-weight:400}
.pre-sim-min-warn span{font-weight:400}
.pre-sim-min-warn .warn-title{display:block;font-weight:600;color:var(--ink);margin-bottom:2px}
.pre-sim-min-warn .warn-fix{display:block;margin-top:4px;font-size:11px;color:#fca5a5;font-weight:400;line-height:1.35}
.pre-sim-min-warn strong,.pre-sim-min-warn .warn-fix strong{font-weight:400}
.pre-sim-min-warn code{background:rgba(255,123,114,.25);color:var(--ink);padding:1px 5px;border-radius:4px;font-size:10.5px;border:1px solid rgba(255,123,114,.5);font-weight:400}
.pre-sim-min-warn.position-open-info{background:rgba(34,211,238,.08);border-color:rgba(34,211,238,.38);color:var(--ink)}
.pre-sim-min-warn.position-open-info .warn-fix{color:var(--ink);margin-top:0}


.radar-last-eval{margin-top:4px;display:flex;flex-direction:column}
.eval-card{background:var(--surface);border:1px solid var(--line-soft);border-radius:10px;padding:10px 12px;height:100%;box-sizing:border-box;display:flex;flex-direction:column}
.eval-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;gap:8px;cursor:pointer;user-select:none}
.eval-head-main{display:flex;align-items:center;gap:6px;min-width:0;flex:1}
.eval-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.eval-collapse-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line-soft);background:var(--bg-soft);color:var(--muted);border-radius:6px;padding:5px 12px;min-height:30px;min-width:82px;font-size:11px;font-weight:600;line-height:1.2;white-space:nowrap;cursor:pointer;touch-action:manipulation;user-select:none;transition:all .15s ease;box-sizing:border-box;pointer-events:auto;position:relative;z-index:2}
.eval-collapse-btn:hover{color:var(--ink);background:var(--surface);border-color:var(--line)}
.eval-collapse-btn:active{transform:scale(.97)}
.eval-collapse-btn *{pointer-events:none}
.eval-collapsible.is-collapsed{display:none}
.eval-summary{font-size:12px;color:var(--ink-2);line-height:1.45;margin-bottom:6px}
.eval-reasons{display:flex;flex-direction:column;gap:3px}
.eval-reason-item{display:flex;align-items:baseline;gap:6px;font-size:11.5px;line-height:1.4;color:var(--ink-2)}
.eval-reason-item.fail .reason-dot{color:var(--red);font-weight:650}
.eval-reason-item.ok .reason-dot{color:var(--green);font-weight:650}
.eval-tip{margin-top:6px;padding-top:5px;border-top:1px dashed var(--line-soft);font-size:11px;color:var(--muted);line-height:1.35}

/* Viewer / Read-Only mode styles */
body.is-viewer .viewer-hide { display: none !important; }
body.is-viewer .action-button.primary:not(#logoutBtn):not(#topThemeToggleBtn) {
  opacity: 0.55 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}
body.is-viewer .emergency-pause-btn {
  opacity: 0.55 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
}
body.is-viewer #settings input:not(#newAccessEmail),
body.is-viewer #settings select:not(#newAccessRole),
body.is-viewer #settings button:not([id*="toggle"]):not([id*="Load"]) {
  pointer-events: none !important;
  opacity: 0.65 !important;
  cursor: not-allowed !important;
}
html[data-theme="dark"] #viewerBanner {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  color: #fef08a !important;
}

.risk-mode-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.risk-mode-card{border:1px solid var(--line);background:var(--surface);border-radius:18px;padding:18px}.risk-mode-card.swing-risk{border-top:3px solid var(--accent-swing)}.risk-mode-card.day-risk{border-top:3px solid var(--accent-day)}.risk-mode-card.total-risk{border-top:3px solid var(--black)}.risk-mode-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:14px;border-bottom:1px solid var(--line-soft)}.risk-mode-head h3{margin:4px 0 0;font-size:14px}.risk-type{font-size:9px;letter-spacing:.14em;font-weight:650;color:var(--muted)}.risk-mode-body{display:grid;grid-template-columns:1fr 1fr;gap:12px 10px;padding-top:14px}.risk-mode-body span{display:block;color:#6d6961;font-size:10.5px}.risk-mode-body strong{display:block;margin-top:5px;font-size:15px;font-weight:650}.risk-mode-body small{display:block;margin-top:3px;color:#8c877f;font-size:9.5px}.broker-head-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.position-list{padding:8px 12px;display:grid;gap:8px}.empty-position{padding:14px 16px;text-align:center;border:1px dashed var(--line);border-radius:12px;background:var(--bg-soft)}.empty-position strong{display:block;font-size:13px}.empty-position span{display:block;color:var(--muted);font-size:10.5px;margin-top:5px}.position-card{border:1px solid var(--line);border-radius:16px;background:#fffdf9;overflow:visible}.position-card.accent-day{border-top:3px solid var(--accent-day)!important}.position-card.accent-swing{border-top:3px solid var(--accent-swing)!important}.position-card.compact-pos{border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.03)}.pos-c-header{display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:8px 12px;background:var(--bg-soft);border-bottom:1px solid var(--line-soft);flex-wrap:wrap}.pos-c-header-left{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.pos-book-badge{font-size:9.5px;font-weight:650;letter-spacing:.05em;padding:2px 7px;border-radius:6px;text-transform:uppercase}.pos-book-badge.intra{background:var(--accent-intra-bg);color:var(--accent-intra);border:1px solid var(--accent-intra-line)}.pos-book-badge.day{background:var(--accent-day-bg);color:var(--accent-day);border:1px solid var(--accent-day-line)}.pos-book-badge.swing{background:var(--accent-swing-bg);color:var(--accent-swing);border:1px solid var(--accent-swing-line)}.pos-size-badge{font-size:10.5px;font-weight:650;color:var(--ink);background:var(--surface);border:1px solid var(--line);padding:2px 7px;border-radius:6px}.pos-opened-time{font-size:10.5px;color:var(--muted)}.pos-c-header-right{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.pos-c-pnl-label{font-size:10px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}.pos-c-pnl-val{font-size:16px;font-weight:650;letter-spacing:-.02em}.pos-c-r-val{font-size:11.5px;font-weight:650}.pos-c-metrics-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;background:var(--surface);border-bottom:1px solid var(--line-soft)}@media(max-width:1150px){.pos-c-metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.pos-c-cell:nth-child(4n){border-right:0!important}}@media(max-width:768px){.pos-c-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pos-c-cell:nth-child(2n){border-right:0!important}}.pos-c-cell{padding:3px 4px;border-right:1px solid var(--line-soft);display:flex;flex-direction:column;justify-content:center;min-width:0}.pos-c-cell:last-child{border-right:0}.pos-c-lbl{font-size:9px;color:var(--muted);font-weight:650;text-transform:uppercase;letter-spacing:.03em;margin-bottom:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pos-c-val{font-size:11.5px;font-weight:650;color:var(--ink);white-space:normal;line-height:1.25}.pos-c-sub{font-size:10px;font-weight:600;opacity:.95;margin-left:2px}.pos-c-val.negative,.pos-c-pnl-val.negative,.pos-c-r-val.negative,.pos-c-sub.negative{color:#dc2626!important;font-weight:650!important;opacity:1!important}.pos-c-val.negative .pos-c-sub{color:#b91c1c!important;font-weight:650!important;opacity:1!important}html[data-theme="dark"] .pos-c-val.negative,html[data-theme="dark"] .pos-c-pnl-val.negative,html[data-theme="dark"] .pos-c-r-val.negative,html[data-theme="dark"] .pos-c-sub.negative{color:#ff3b3b!important;font-weight:650!important;opacity:1!important;text-shadow:0 0 8px rgba(255,59,59,.5)!important}html[data-theme="dark"] .pos-c-val.negative .pos-c-sub{color:#ff5252!important;font-weight:650!important;opacity:1!important;text-shadow:0 0 6px rgba(255,82,82,.45)!important}.pos-c-val.positive,.pos-c-pnl-val.positive,.pos-c-r-val.positive,.pos-c-sub.positive{color:#059669!important;font-weight:650!important;opacity:1!important}.pos-c-val.positive .pos-c-sub{color:#047857!important;font-weight:650!important;opacity:1!important}html[data-theme="dark"] .pos-c-val.positive,html[data-theme="dark"] .pos-c-pnl-val.positive,html[data-theme="dark"] .pos-c-r-val.positive,html[data-theme="dark"] .pos-c-sub.positive{color:#00e676!important;font-weight:650!important;opacity:1!important;text-shadow:0 0 8px rgba(0,230,118,.45)!important}html[data-theme="dark"] .pos-c-val.positive .pos-c-sub{color:#26e788!important;font-weight:650!important;opacity:1!important;text-shadow:0 0 6px rgba(38,231,136,.4)!important}.pos-risk-neg{color:#dc2626!important;font-size:12px;font-weight:650;letter-spacing:-.01em;display:inline-block}.pos-profit-pos{color:#059669!important;font-size:12px;font-weight:650;letter-spacing:-.01em;display:inline-block}html[data-theme="dark"] .pos-risk-neg{color:#ff6b6b!important;font-size:12px;font-weight:650;letter-spacing:-.01em;text-shadow:none!important}html[data-theme="dark"] .pos-profit-pos{color:#4ade80!important;font-size:12px;font-weight:650;letter-spacing:-.01em;text-shadow:none!important}html[data-theme="dark"] .pos-c-sub.negative{color:#ff7b72!important;text-shadow:none!important}html[data-theme="dark"] .pos-c-sub.positive{color:#4ade80!important;text-shadow:none!important}.pos-c-bar-wrap{padding:6px 12px 7px;background:var(--bg-soft);border-bottom:1px solid var(--line-soft)}.pos-c-bar-labels{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:600;margin-bottom:5px}.pos-c-bar-labels .sl-lbl{color:var(--red)}.pos-c-bar-labels .mid-lbl{color:var(--muted);font-weight:600}.pos-c-bar-labels .tp-lbl{color:var(--green)}.pos-c-bar-track{position:relative;height:6px;background:rgba(0,0,0,.08);border-radius:999px;overflow:visible}html[data-theme="dark"] .pos-c-bar-track{background:rgba(255,255,255,.12)}.pos-c-bar-fill{position:absolute;top:0;bottom:0;left:0;border-radius:999px}.pos-c-bar-notch{position:absolute;top:-3px;width:2px;height:12px;z-index:2;border-radius:1px}.pos-c-bar-notch.entry{background:#64748b}.pos-c-bar-notch.be{background:var(--amber)}.pos-c-bar-pin{position:absolute;top:-4px;width:6px;height:14px;border-radius:3px;background:var(--ink);transform:translateX(-50%);z-index:3;box-shadow:0 1px 4px rgba(0,0,0,.35)}.pos-c-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 12px;font-size:10.5px;color:var(--muted);background:var(--surface);flex-wrap:wrap}.pos-c-footer strong{color:var(--ink);font-weight:650}.pos-c-reason{max-width:60%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media(max-width:800px){.pos-c-reason{max-width:100%}}.position-card-head{border-radius:14px 14px 0 0;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 13px;border-bottom:1px solid var(--line-soft);background:#faf8f3}.position-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.position-title strong{font-size:14px}.side-badge,.source-badge{font-size:9px;font-weight:650;letter-spacing:.08em;padding:5px 7px;border-radius:999px}.side-badge.long{background:var(--green-bg);color:var(--green);border:1px solid var(--green-line)}.side-badge.short{background:var(--red-bg);color:var(--red);border:1px solid var(--red-line)}.source-badge{background:var(--amber-bg);color:var(--amber);border:1px solid var(--amber-line)}.source-badge.real{background:var(--blue-live-bg);color:var(--blue-live);border-color:var(--blue-live-line)}.position-pnl{text-align:right}.position-pnl span{display:block;color:var(--muted);font-size:11px}.position-pnl strong{display:block;font-size:22px;letter-spacing:-.04em;margin-top:3px}.position-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;border-bottom:1px solid var(--line-soft)}.position-metric{padding:7px 11px;border-right:1px solid var(--line-soft)}.position-metric:last-child{border-right:0}.position-metric span{display:block;color:#77726a;font-size:11px}.position-metric strong{display:block;margin-top:5px;font-size:12.5px}.position-metric small{display:block;margin-top:2px;color:#938e85;font-size:10.5px}.position-protection{padding:8px 12px}.distance-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.distance-box{border:1px solid var(--line-soft);border-radius:11px;padding:10px 12px;background:var(--bg-soft)}.distance-box span{display:block;color:#77726a;font-size:11px}.distance-box strong{display:block;margin-top:4px;font-size:14px}.corridor-head{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#77726a;margin-bottom:4px}.corridor{height:8px;border-radius:999px;background:linear-gradient(90deg,var(--red-bg),#ebe7df 48%,var(--green-bg));position:relative;overflow:hidden;border:1px solid var(--line-soft)}.corridor-marker{position:absolute;top:-3px;width:3px;height:14px;background:var(--black);border-radius:2px}.pos-gauge{margin:12px 0 10px;padding:12px 14px;background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:14px;position:relative}.pos-gauge-header{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:10px;font-size:11px}.pos-gauge-level{display:flex;flex-direction:column}.pos-gauge-level.sl{align-items:flex-start}.pos-gauge-level.tp{align-items:flex-end}.pos-gauge-level span{font-size:9.5px;font-weight:650;letter-spacing:.06em;text-transform:uppercase}.pos-gauge-level.sl span{color:var(--red)}.pos-gauge-level.tp span{color:var(--green)}.pos-gauge-level strong{font-size:13px;font-weight:600;color:var(--ink);margin-top:2px}.pos-gauge-level small{font-size:10px;color:var(--muted);font-weight:600}.pos-gauge-center{text-align:center}.pos-gauge-center span{font-size:9px;font-weight:650;letter-spacing:.08em;color:var(--muted);text-transform:uppercase}.pos-gauge-center strong{display:block;font-size:12.5px;font-weight:650;margin-top:2px}.pos-gauge-track{position:relative;height:12px;background:#e2ddd4;border-radius:999px;overflow:visible;border:1px solid var(--line);margin:16px 0 22px}.pos-gauge-fill{position:absolute;top:0;height:100%;border-radius:999px;transition:width .25s ease}.pos-gauge-entry-notch{position:absolute;top:-4px;width:2px;height:20px;background:#6e6960;z-index:2}.pos-gauge-entry-label{position:absolute;top:22px;transform:translateX(-50%);font-size:9.5px;color:var(--muted);white-space:nowrap;font-weight:650}.pos-gauge-btc-marker{position:absolute;top:-8px;transform:translateX(-50%);z-index:4;display:flex;flex-direction:column;align-items:center}.pos-gauge-btc-pin{width:12px;height:28px;border-radius:999px;background:var(--black);border:2px solid #fffdf9;box-shadow:0 2px 5px rgba(0,0,0,.22)}.pos-gauge-btc-badge{position:absolute;bottom:calc(100% + 4px);background:var(--black);color:#fffdf9;padding:3px 7px;border-radius:6px;font-size:10px;font-weight:600;white-space:nowrap;box-shadow:0 4px 10px rgba(0,0,0,.15);display:flex;align-items:center;gap:4px}.pos-gauge-btc-badge .r-badge{background:rgba(255,255,255,.2);padding:1px 4px;border-radius:4px;font-size:9px}.macro-sparkline-box{margin-top:10px;padding:9px 12px;background:#faf8f3;border:1px solid var(--line-soft);border-radius:10px}.macro-sparkline-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.macro-sparkline-head span{font-size:9.5px;font-weight:650;letter-spacing:.08em;color:var(--muted);text-transform:uppercase}.macro-sparkline-head strong{font-size:11.5px;font-weight:600}.macro-sparkline-svg{width:100%;height:38px;overflow:visible;display:block}.position-foot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:10px;color:#7d786f;font-size:9.5px}.position-foot strong{color:#5d5952}.live-account-note{color:var(--muted)}
@media(max-width:1180px){.overview-grid,.risk-kpi-grid,.crypto-kpis,.risk-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.position-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.position-metric:nth-child(3n){border-right:0}.crypto-meta{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1400px){.radar-card{min-width:0}}
@media(max-width:1050px){
  .auth-screen{grid-template-columns:1fr}.auth-visual{display:none}.auth-panel{min-height:100vh}
  .app-shell.visible{display:block}.mobile-menu-button{display:none !important}
  body.mobile-menu-open{overflow:hidden}.metric-grid{grid-template-columns:repeat(2,1fr)}.two-col,.mode-cards{grid-template-columns:1fr}.protection-grid,.protection-grid.compact{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:900px){
  .top-navbar{
    padding:8px 12px !important;
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    min-height:52px !important;
  }
  .top-nav-brand{
    order:1 !important;
    flex:0 0 auto !important;
    cursor:pointer !important;
    user-select:none !important;
    -webkit-tap-highlight-color:transparent !important;
    padding:3px 6px !important;
    border-radius:8px !important;
    transition:background .15s ease !important;
  }
  .top-nav-brand:active{background:var(--bg-soft) !important}
  .top-nav-brand .brand{gap:8px !important}
  .top-nav-brand .logo-mark{width:30px !important;height:30px !important}
  .top-nav-brand strong{font-size:12.5px !important}
  .top-nav-brand small{font-size:9px !important}
  .mobile-menu-cue{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    color:var(--muted) !important;
    width:18px !important;
    height:18px !important;
    margin-left:4px !important;
  }
  .mobile-menu-cue svg{width:16px;height:16px;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;fill:none}
  .top-nav-actions{order:2 !important;flex:0 0 auto !important;gap:6px !important}
  .top-nav-actions .user-email{display:none !important}
  .top-nav-actions .user-avatar{width:26px !important;height:26px !important;font-size:10px !important}
  .top-nav-actions .theme-toggle-btn{padding:5px 8px !important;font-size:10.5px !important}
  .top-nav-actions .logout{padding:5px 8px !important;font-size:10.5px !important}
  .top-nav-links{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;
    width:280px !important;
    max-width:82vw !important;
    height:100vh !important;
    height:100dvh !important;
    background:var(--surface) !important;
    z-index:10001 !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    padding:16px 14px !important;
    gap:7px !important;
    box-shadow:6px 0 28px rgba(0,0,0,.25) !important;
    transform:translateX(-105%) !important;
    transition:transform .28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-top:none !important;
    border-right:1px solid var(--line) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }
  html[data-theme="dark"] .top-nav-links{background:#121418 !important;border-right-color:var(--line) !important;box-shadow:6px 0 28px rgba(0,0,0,.6) !important}
  body.mobile-nav-open .top-nav-links{transform:translateX(0) !important}
  body.mobile-nav-open{overflow:hidden !important}
  .top-nav-links button{
    width:100% !important;
    justify-content:flex-start !important;
    padding:10px 12px !important;
    font-size:13px !important;
    flex-shrink:0 !important;
    border-radius:9px !important;
    gap:10px !important;
  }
  .nav-product-items{
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    width:calc(100% - 10px) !important;
    gap:4px !important;
    padding-left:12px !important;
    margin:2px 0 4px 10px !important;
    border-left:2px solid var(--line-soft) !important;
  }
  .nav-product-header{justify-content:space-between !important}
  .mobile-drawer-header{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    padding-bottom:12px !important;
    margin-bottom:6px !important;
    border-bottom:1px solid var(--line-soft) !important;
  }
  .mobile-drawer-close{
    background:transparent !important;
    border:0 !important;
    color:var(--muted) !important;
    cursor:pointer !important;
    padding:6px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:8px !important;
    width:32px !important;
    height:32px !important;
  }
  .mobile-drawer-close:hover{background:var(--bg-soft) !important;color:var(--ink) !important}
}
@media(min-width:901px){
  .mobile-menu-cue,.mobile-drawer-header{display:none !important}
}
.mobile-menu-backdrop{display:none}
.live-paper-modal-backdrop{position:fixed;inset:0;background:rgba(20,18,15,.55);z-index:9998;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(1px)}
.live-paper-modal-backdrop[hidden]{display:none!important}
.live-paper-modal{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:20px;max-width:380px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.live-paper-modal h3{margin:0 0 8px;font-size:15px;font-weight:650;color:var(--ink)}
.live-paper-modal p{margin:0 0 16px;font-size:12px;line-height:1.5;color:var(--muted)}
.live-paper-modal p strong{color:var(--ink)}
.live-paper-modal-actions{display:flex;flex-direction:column;gap:8px}
.live-paper-btn{border-radius:10px;padding:11px 14px;font-size:12.5px;font-weight:600;cursor:pointer;text-align:left;display:flex;align-items:center;gap:8px;border:1.5px solid transparent}
.live-paper-btn-live{background:var(--red-bg);color:var(--red);border-color:var(--red-line)}
.live-paper-btn-live:hover{filter:brightness(0.97)}
.live-paper-btn-paper{background:var(--green-bg);color:var(--green);border-color:var(--green-line)}
.live-paper-btn-paper:hover{filter:brightness(0.97)}
.live-paper-btn-cancel{background:transparent;color:var(--muted);border-color:var(--line);font-weight:600;text-align:center;padding:8px 14px;margin-top:2px}
html[data-theme="dark"] .live-paper-modal{background:var(--surface)}
@media(max-width:900px){
  .mobile-menu-backdrop{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.48);
    z-index:9999;
    opacity:0;
    pointer-events:none;
    transition:opacity .25s ease;
  }
  body.mobile-nav-open .mobile-menu-backdrop,
  .mobile-menu-backdrop.visible{
    opacity:1;
    pointer-events:auto;
  }
}
.pos-tot-pnl{font-size:15px;font-weight:650}
.pos-tot-pnl.neutral{color:var(--muted)}
.pos-tot-pnl.positive{color:#059669!important}
.pos-tot-pnl.negative{color:#dc2626!important}
.open-risk-profit-summary{display:flex;align-items:baseline;gap:4px;margin:4px 0 0;padding:0;border-left:0;white-space:nowrap;font-size:13px}
.open-risk-profit-summary .risk-total{color:#dc2626!important;font-size:13.5px;font-weight:650}
.open-risk-profit-summary .profit-total{color:#059669!important;font-size:13.5px;font-weight:650}
html[data-theme="dark"] .pos-tot-pnl.positive{color:#4ade80!important;text-shadow:none!important}
html[data-theme="dark"] .pos-tot-pnl.negative{color:#ff6b6b!important;text-shadow:none!important}
html[data-theme="dark"] .open-risk-profit-summary .risk-total{color:#ff6b6b!important}
html[data-theme="dark"] .open-risk-profit-summary .profit-total{color:#4ade80!important}
@media(max-width:680px){.open-risk-profit-summary{white-space:normal}}
@media(max-width:850px){
  .radar-grid{grid-template-columns:1fr !important;gap:12px !important}
}
@media(max-width:680px){
  .login-card{padding:24px 18px;border-radius:20px}.auth-panel{padding:16px}
  .topbar,.content{padding-left:12px;padding-right:12px}.content{padding-top:14px;padding-bottom:36px;gap:12px}
  .topbar{min-height:60px;padding-top:10px;padding-bottom:10px;align-items:center;flex-direction:row;gap:8px}
  .topbar-main{flex:1;min-width:0}.topbar h1{font-size:17px;letter-spacing:-.02em}
  .top-actions{flex:0 0 auto;gap:6px}.top-actions .pill{font-size:8.5px;padding:4px 6px}
  .mobile-menu-button{width:38px;height:38px;border-radius:10px}
  .metric-grid,.form-grid,.strategy-flow,.protection-grid,.protection-grid.compact,.overview-grid,.risk-kpi-grid,.crypto-kpis,.crypto-meta,.risk-mode-grid,.position-grid,.distance-row,.stats-detail-grid{grid-template-columns:1fr}
  .mode-card .numbers{grid-template-columns:1fr}.panel{padding:14px;border-radius:14px}.panel-title{gap:8px;flex-wrap:wrap}
  .dashboard-market-row .market-ticker{min-width:0;width:100%;grid-template-columns:auto auto auto}
  .paper-engine-strip,.entry-pause-panel{max-width:100%}
  .analytics-table-wrap{margin-left:0;margin-right:0;width:100%}.analytics-table{min-width:760px}

  /* Trigger Radar Mobile Layout */
  .trigger-radar-panel .active-trades-head{flex-direction:column !important;align-items:stretch !important;gap:10px !important;padding:10px 12px !important}
  .trigger-radar-panel .active-trades-head > div:first-child{width:100%}
  .status-actions-right{justify-content:flex-start !important}
  #nextScanCountdownBadge,#quickEmergencyPauseBtn{flex:1 1 auto !important;min-width:0 !important}
  .radar-progress-container{grid-template-columns:1fr !important;gap:8px !important;margin:6px 0 10px !important;padding:8px 10px !important}
  .radar-grid{padding:8px 10px 12px !important;gap:12px !important}
  .radar-card{padding:10px 10px 12px !important}
  .radar-pre-sim{padding:8px !important}
  .radar-pre-sim-grid{grid-template-columns:repeat(3,minmax(0,1fr)) !important;gap:6px !important}
  .pre-sim-col{padding:6px 8px !important}
  .pre-sim-col strong{font-size:13px !important}
  .eval-tabs{gap:5px !important;padding-bottom:6px !important;overflow-x:auto !important;-webkit-overflow-scrolling:touch !important}
  .eval-tab-btn{flex-shrink:0 !important;padding:4px 9px !important;font-size:11px !important}
  .checklist-row{flex-direction:column !important;gap:6px !important}
  .checklist-right{width:100% !important;margin-left:26px !important;text-align:left !important;white-space:normal !important}
  .checklist-status{white-space:normal !important;line-height:1.3 !important}
  .eval-head{align-items:flex-start !important;flex-direction:column !important}
  .eval-head-actions{justify-content:flex-start !important}
  .rules-minimal-strip{flex-direction:column !important;align-items:flex-start !important;gap:6px !important}
}
@media(max-width:560px){
  .trigger-pair-grid{grid-template-columns:1fr !important}
}
@media(max-width:480px){
  .topbar{padding-left:10px;padding-right:10px}.content{padding-left:10px;padding-right:10px}
  .topbar h1{font-size:15.5px}
  .radar-head{flex-direction:column !important;align-items:flex-start !important;gap:6px !important;min-height:auto !important}
  #radarDayChecklistBadge,#radarSwingChecklistBadge,#radarIntraChecklistBadge,.radar-head-badge-wrap{align-self:flex-start !important;align-items:flex-start !important}
  .radar-stat{padding:7px 8px !important;min-height:72px !important}
  .radar-stat strong{font-size:14.5px !important}
  .checklist-row{align-items:flex-start !important;padding:7px 0 !important}
  .checklist-left{align-items:flex-start !important;min-width:0 !important;flex:1 !important}
  .checklist-ticker{margin-top:1px !important;width:18px !important;height:18px !important;min-width:18px !important;font-size:10px !important}
  .checklist-name{font-size:12px !important}
  .checklist-sub{font-size:10px !important}
  .checklist-right{flex-shrink:0 !important;margin-left:6px !important}
  .checklist-status{font-size:10px !important;padding:2px 6px !important}
  .eval-card{padding:9px 10px !important}
  .eval-title{font-size:11.5px !important}
  .eval-summary{font-size:11px !important}
  .eval-reason-item{font-size:11px !important}
  .top-actions #paperModePill{max-width:85px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sidebar{width:min(90vw,304px)}.market-ticker>strong{font-size:11.5px}
}


.macro-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.macro-card{border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:10px 14px}
.macro-card.global{border-top:3px solid var(--dot-neutral)}
.macro-card.swing{border-top:3px solid var(--accent-swing)}
.macro-card.day{border-top:3px solid var(--accent-day)}
.macro-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding-bottom:6px;border-bottom:1px solid var(--line-soft)}
.macro-card-head h3{margin:1px 0 0;font-size:13px}
.macro-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;padding-top:8px}
.macro-metrics div{min-width:0}
.macro-metrics span{display:block;color:var(--muted);font-size:11px}
.macro-metrics strong{display:block;margin-top:2px;font-size:12.5px;line-height:1.2}
@media(max-width:1050px){.macro-overview-grid{grid-template-columns:1fr}.macro-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:680px){.macro-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.nav-root-group{margin-bottom:6px}
/* ROOT LEVEL (LEVEL 0): Stocks, Crypto */
.root-nav-toggle{width:100%;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:9px 10px!important;border:0!important;background:transparent!important;border-radius:10px!important;font-size:14.5px!important;font-weight:600!important;letter-spacing:-.01em!important;color:var(--ink)!important;cursor:pointer;text-align:left;transition:background .15s ease}
.root-nav-toggle:hover{background:rgba(255,255,255,.45)!important}
.root-nav-toggle .nav-chevron{font-size:12px;color:var(--muted);transition:transform .18s ease;margin-left:auto}
.root-nav-toggle[aria-expanded="false"] .nav-chevron{transform:rotate(-90deg)}
.root-nav-toggle .nav-icon{font-size:15px!important;width:20px;display:grid;place-items:center}

/* LEVEL 1: Direct sub-items under each product group (Crypto Bot, Stock Radar, Forex Bot, System) */
#navStocks > button,
#navStock > button[data-tab],
#navCrypto > button[data-tab],
#navForex > button[data-tab],
#navSystem > button[data-tab]{padding-left:22px!important;font-size:13px!important;font-weight:400!important;color:#534f47!important;display:flex;align-items:center;gap:8px}
#navStocks > button:hover,
#navStock > button[data-tab]:hover,
#navCrypto > button[data-tab]:hover,
#navForex > button[data-tab]:hover,
#navSystem > button[data-tab]:hover{color:var(--ink)!important;background:rgba(255,255,255,.42)!important}
#navStock > button[data-tab].active,
#navCrypto > button[data-tab].active,
#navForex > button[data-tab].active,
#navSystem > button[data-tab].active{font-weight:400!important;color:var(--ink)!important;background:#f8f5ef!important}
#navStocks > button .nav-icon,
#navStock > button[data-tab] .nav-icon,
#navCrypto > button[data-tab] .nav-icon,
#navForex > button[data-tab] .nav-icon,
#navSystem > button[data-tab] .nav-icon{font-size:13.5px!important;width:18px;display:grid;place-items:center}

.sub-nav-toggle{width:100%;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:8px 10px 4px 22px!important;border:0!important;background:transparent!important;border-radius:6px!important;font-size:11px!important;font-weight:600!important;letter-spacing:.08em!important;text-transform:uppercase!important;color:#716d65!important;cursor:pointer;text-align:left}
.sub-nav-toggle:hover{color:var(--ink)!important}
.sub-nav-toggle .nav-chevron{font-size:10px;color:var(--muted);transition:transform .18s ease}
.sub-nav-toggle[aria-expanded="false"] .nav-chevron{transform:rotate(-90deg)}
.sub-nav-toggle .nav-icon{font-size:13px!important;width:18px;display:grid;place-items:center}

/* LEVEL 2: Nested sub-items (dead — #navAnalysis no longer exists in the current flat nav) */
#navAnalysis > button[data-tab]{padding-left:36px!important;font-size:12px!important;font-weight:400!important;color:#615d54!important;display:flex;align-items:center;gap:7px}
#navAnalysis > button[data-tab]:hover{color:var(--ink)!important;background:rgba(255,255,255,.42)!important}
#navAnalysis > button[data-tab].active{font-weight:550!important;color:var(--ink)!important;background:#f8f5ef!important}
#navAnalysis > button[data-tab] .nav-icon{font-size:12px!important;width:16px;display:grid;place-items:center}

.nav-item-disabled{width:100%;text-align:left;background:none;border:none;padding:8px 12px 8px 22px!important;color:var(--muted);font-size:13px;font-weight:400!important;cursor:not-allowed;opacity:.65;display:flex;align-items:center;gap:8px;border-radius:8px}
#dashboardTickerBadge,.topbar-ticker{display:inline-flex;align-items:baseline;gap:8px;background:transparent!important;border:none!important;box-shadow:none!important;padding:0!important;margin:4px 0 0 0;line-height:1;white-space:nowrap}
#dashboardTickerBadge .ticker-price,.topbar-ticker .ticker-price{font-size:13.5px;font-weight:600;letter-spacing:-.02em;color:var(--ink);line-height:1;margin:0;vertical-align:baseline}
#dashboardTickerBadge .ticker-change,.topbar-ticker .ticker-change{font-size:11px;font-weight:600;font-style:normal;line-height:1;margin:0;vertical-align:baseline}
#dashboardTickerBadge .ticker-time,.topbar-ticker .ticker-time{font-size:10.5px;color:var(--muted);line-height:1;margin:0;vertical-align:baseline}

/* PAPER AUTO v0.8.5 */
.dashboard-control-stack{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}.entry-pause-panel{margin:0;border:1px solid var(--line);border-radius:14px;background:var(--bg-soft);padding:9px 11px}.entry-pause-head{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:7px}.entry-pause-head>div{display:flex;align-items:baseline;gap:9px;min-width:0;flex-wrap:wrap}.entry-pause-head h3{font-size:13px;margin:0}.entry-pause-head p{font-size:9.5px;color:var(--muted);margin:0;max-width:none}.pause-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.pause-control{border:1px solid var(--line);border-radius:11px;padding:8px 9px;background:var(--card);display:flex;justify-content:space-between;gap:8px;align-items:center;min-height:44px}.pause-control>div{display:flex;flex-direction:column;gap:2px}.pause-control span{font-size:8.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}.pause-control strong{font-size:10.5px}.pause-control.paused{border-color:var(--amber-line);background:var(--amber-bg)}.pause-toggle{border:1px solid var(--line);background:var(--bg-soft);color:var(--ink-2);border-radius:8px;padding:6px 8px;font-size:9.5px;font-weight:650;white-space:nowrap}.pause-toggle:hover{background:var(--line-soft)}.pause-control.paused .pause-toggle{background:var(--terracotta);color:#fff;border-color:var(--terracotta)}.pause-note{margin-top:6px;font-size:9px;color:var(--muted)}@media(max-width:780px){.pause-controls{grid-template-columns:1fr}.entry-pause-head{align-items:flex-start;flex-direction:column}.entry-pause-head>div{display:block}.entry-pause-head p{margin-top:3px}}
.paper-engine-strip{display:grid;grid-template-columns:1.35fr repeat(5,minmax(88px,.68fr));gap:7px;align-items:stretch;margin:0}.paper-engine-strip>div{border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.42);padding:8px 10px;min-height:48px}.engine-main{display:flex!important;gap:8px;align-items:center}.engine-main>div{display:flex;flex-direction:column;gap:1px}.engine-main strong{font-size:12px}.engine-main small,.engine-stat span{font-size:9px;color:var(--muted)}.engine-stat{display:flex;flex-direction:column;justify-content:center;gap:2px}.engine-stat strong{font-size:10.5px;line-height:1.25}.trade-history{display:flex;flex-direction:column;gap:6px}.history-row{display:grid;grid-template-columns:90px 90px 75px 100px 75px 80px 80px 82px 100px 80px 80px 80px 135px 135px 85px 85px 82px 100px;min-width:1770px;gap:4px 8px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:7px 12px}.reason-pill{font-size:11px!important;font-weight:400!important;display:inline!important;line-height:1.2!important;white-space:nowrap!important}.reason-pill.tp{color:#059669!important}.reason-pill.sl{color:#dc2626!important}.reason-pill.liq{color:#d97706!important}.reason-pill.other{color:var(--muted)!important}html[data-theme="dark"] .reason-pill.tp{color:#4ade80!important}html[data-theme="dark"] .reason-pill.sl{color:#ff6b6b!important}html[data-theme="dark"] .reason-pill.liq{color:#fbbf24!important}#tradeHistoryCard{max-height:min(74vh,780px);overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin}.history-row.header{position:sticky;top:0;z-index:4;background:var(--surface);box-shadow:0 1px 0 var(--line);border:1px solid var(--line-soft);border-radius:8px;padding:6px 12px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em;font-weight:600;white-space:nowrap}.history-cell{display:flex;flex-direction:column;gap:1px;min-width:0}.history-cell span{font-size:11px;color:var(--muted);font-weight:400}.history-cell strong{font-size:11px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-cell strong.positive,.attempt-table strong.positive{color:#059669!important;font-weight:400!important}.history-cell strong.negative,.attempt-table strong.negative{color:#dc2626!important;font-weight:400!important}html[data-theme="dark"] .history-cell strong.positive,html[data-theme="dark"] .attempt-table strong.positive{color:#4ade80!important;font-weight:400!important;text-shadow:0 0 6px rgba(74,222,128,.3)!important}html[data-theme="dark"] .history-cell strong.negative,html[data-theme="dark"] .attempt-table strong.negative{color:#ff6b6b!important;font-weight:400!important;text-shadow:0 0 6px rgba(255,107,107,.3)!important}.history-return-val,.history-gross-val{font-size:11px!important;font-weight:400!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.history-return-val.positive,.history-gross-val.positive{color:#059669!important;font-weight:400!important}.history-return-val.negative,.history-gross-val.negative{color:#dc2626!important;font-weight:400!important}.history-return-val.neutral,.history-gross-val.neutral{color:var(--muted)!important;font-weight:400!important}html[data-theme="dark"] .history-return-val.positive,html[data-theme="dark"] .history-gross-val.positive{color:#4ade80!important;font-weight:400!important}html[data-theme="dark"] .history-return-val.negative,html[data-theme="dark"] .history-gross-val.negative{color:#ff6b6b!important;font-weight:400!important}.hist-head-nobold{font-weight:400!important}.side-pill{font-size:11px!important;font-weight:400!important;display:inline!important;line-height:1.2!important;letter-spacing:.02em!important}.side-pill.positive{color:#059669!important}.side-pill.negative{color:#dc2626!important}html[data-theme="dark"] .side-pill.positive{color:#4ade80!important;text-shadow:0 0 6px rgba(74,222,128,.28)!important}html[data-theme="dark"] .side-pill.negative{color:#ff6b6b!important;text-shadow:0 0 6px rgba(255,107,107,.28)!important}.funding-legacy-tag{font-size:9px!important;font-weight:400!important;white-space:nowrap!important;color:var(--amber)!important}.attempt-status-text{font-size:11px!important;font-weight:400!important;white-space:nowrap!important;display:inline!important}.attempt-status-text.status-ok{color:#059669!important}.attempt-status-text.status-warn{color:var(--amber)!important}.attempt-status-text.status-fail{color:#dc2626!important}html[data-theme="dark"] .attempt-status-text.status-ok{color:#4ade80!important}html[data-theme="dark"] .attempt-status-text.status-fail{color:#ff6b6b!important}.dir-btn-long{color:#059669!important;font-weight:650!important}.dir-btn-short{color:#dc2626!important;font-weight:650!important}html[data-theme="dark"] .dir-btn-long{color:#4ade80!important}html[data-theme="dark"] .dir-btn-short{color:#ff6b6b!important}.history-reasons-compact{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding-top:4px;margin-top:2px;border-top:1px dashed var(--line-soft);font-size:9.5px;color:var(--muted);flex-wrap:wrap}.history-reasons-compact strong{color:var(--ink);font-weight:650}.history-reasons-compact .hist-tag{color:var(--muted);font-weight:600;text-transform:uppercase;font-size:8.5px;margin-right:2px}.history-reason-inline{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px;font-size:9.5px}.history-reasons{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:6px;padding-top:6px;margin-top:2px;border-top:1px solid var(--line-soft)}.history-reason{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:8px;padding:6px 9px}.history-reason span{display:block;font-size:9.5px;color:var(--muted);margin-bottom:2px}.history-reason strong{display:block;font-size:10px;line-height:1.35;white-space:normal}.attempt-row{display:grid;grid-template-columns:1.1fr .9fr .8fr 1.1fr 1fr;gap:8px;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 10px}.attempt-row.header{background:transparent;border:0;padding:0 10px;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em}.attempt-reasons{grid-column:1/-1;display:grid;grid-template-columns:1fr;gap:6px;padding-top:6px;margin-top:2px;border-top:1px solid var(--line-soft)}.attempt-reason{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:8px;padding:6px 9px}.attempt-reason span{display:block;font-size:9.5px;color:var(--muted);margin-bottom:2px}.attempt-reason strong{display:block;font-size:10px;line-height:1.35;white-space:normal}.attempt-chips{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}.attempt-chip{font-size:10px;font-weight:600}.attempt-chip.ok{color:#059669}.attempt-chip.fail{color:#dc2626;font-weight:650}.attempt-table th,.attempt-table td{padding:5px 8px;vertical-align:middle}table.attempt-table th,table.attempt-table td{font-size:11px!important}table.attempt-table td{font-weight:400!important}table.attempt-table td strong{font-size:11px!important;font-weight:400!important}.attempt-table tbody tr:hover{background:rgba(0,0,0,.025)}html[data-theme="dark"] .attempt-table tbody tr:hover{background:rgba(255,255,255,.03)}.attempt-chips-mini{display:flex;gap:3px;flex-wrap:wrap;margin-top:2px}.attempt-chip-mini{font-size:11px;font-weight:400;display:inline;line-height:1.2}.attempt-chip-mini.ok{color:#059669}.attempt-chip-mini.fail{color:#dc2626}html[data-theme="dark"] .attempt-chip-mini.ok{color:#6ee7a0!important}html[data-theme="dark"] .attempt-chip-mini.fail{color:#ff7b72!important}.segmented.compact-seg button{padding:3px 7px!important;font-size:9.5px!important;border-radius:6px!important}#historyViewSwitcher button,#exportLiveTradesCsvBtn,#exportLiveTradesJsonBtn{padding:7px 10px!important;font-size:10px!important;font-weight:650!important;border-radius:8px!important}#capitalLedgerTable th,#capitalLedgerTable td{font-size:12.5px!important}.position-reason{margin:8px 12px 0;padding:7px 10px;border:1px solid var(--line-soft);border-radius:9px;background:var(--bg-soft)}.position-reason span{display:block;font-size:11px;color:var(--muted);margin-bottom:3px}.position-reason strong{display:block;font-size:11px;line-height:1.45}.stats-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-bottom:18px}.stats-card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px}.stats-card-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.stats-card-head h3{font-size:17px;margin:3px 0 0}.stats-metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.stats-metrics div{border-top:1px solid var(--line);padding-top:10px;display:flex;flex-direction:column;gap:3px}.stats-metrics span{font-size:11.5px;color:var(--muted)}.stats-metrics strong{font-size:15px}.liq-safe{color:#567665}.liq-watch{color:#9a5b44}@media(max-width:1100px){.paper-engine-strip{grid-template-columns:1fr 1fr;margin:0}.stats-summary-grid{grid-template-columns:1fr}.history-reasons{grid-template-columns:1fr}.attempt-row{grid-template-columns:1fr 1fr}.attempt-row.header{display:none}}@media(max-width:640px){.history-reason-inline{max-width:100%}}
.history-sort-btn{appearance:none;border:0;background:transparent;color:inherit;font:inherit;text-transform:inherit;letter-spacing:inherit;padding:2px 0;cursor:pointer;display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.history-row{grid-template-columns:90px 90px 75px 100px 75px 80px 80px 82px 100px 80px 80px 80px 135px 135px 85px 85px 82px 100px;min-width:1770px}
.history-sort-btn:hover,.history-sort-btn.active{color:var(--ink)}
.history-sort-arrow{font-size:10px;line-height:1;color:var(--muted)}

/* ANALYTICS v0.8.5 */
.action-button{border:1px solid #d8d1c5;background:#f8f5ef;color:#4f4b44;border-radius:10px;padding:8px 11px;font-size:10.5px;font-weight:650;white-space:nowrap}.action-button:hover{background:#eee8de}.action-button.primary{background:var(--black);color:#fffdf9;border-color:var(--black)}.action-button.primary:hover{background:#11110f}.action-button:disabled{opacity:.55}
.heading-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.stats-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px}.segmented{display:inline-flex;border:1px solid var(--line);border-radius:11px;padding:3px;background:#eee9e0}.segmented button{border:0;background:transparent;color:#77726a;border-radius:8px;padding:7px 10px;font-size:10px;font-weight:650}.segmented button.active{background:#fffdf9;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.05)}
.stats-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.stats-detail-grid>div{border:1px solid var(--line-soft);background:var(--bg-soft);border-radius:11px;padding:11px 12px}.stats-detail-grid span{display:block;color:var(--muted);font-size:9.5px}.stats-detail-grid strong{display:block;margin-top:5px;font-size:13px}.analytics-table-wrap{overflow:auto;max-height:min(74vh,780px);max-width:100%;border:1px solid var(--line);border-radius:14px;background:var(--card);-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}.analytics-table{width:100%;border-collapse:collapse;min-width:900px}.analytics-table th,.analytics-table td{padding:10px 12px;border-bottom:1px solid var(--line-soft);font-size:10.5px;text-align:left;vertical-align:top}.analytics-table th{position:sticky;top:0;background:var(--bg-soft);color:var(--muted);text-transform:uppercase;letter-spacing:.055em;font-size:9px;z-index:1}.analytics-table tr:last-child td{border-bottom:0}.analytics-table td strong{font-size:11px}.analytics-table .reason-cell{min-width:250px;max-width:360px;white-space:normal;line-height:1.45;color:var(--ink-2)}.analytics-empty{padding:26px;text-align:center;color:var(--muted);font-size:11px}.analytics-note{font-size:10px;color:var(--muted);line-height:1.55;margin-top:10px}.stats-section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}.stats-section-title h3{margin:0;font-size:14px}.stats-section-title p{margin:4px 0 0;color:var(--muted);font-size:10px}.scope-badge{font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.result-win{color:var(--green)}.result-loss{color:var(--red)}.result-breakeven{color:var(--muted)}
/* v0.8.5 diagnostic backtest + readability */
#stats .stats-section-title h3{font-size:15px;color:#2b2a26}#stats .stats-section-title p{font-size:11.5px;line-height:1.45;color:#5c5952}#stats .stats-summary-grid{gap:12px;margin-bottom:14px}#stats .stats-card{padding:12px 14px!important;border-radius:14px!important}#stats .stats-card-head{margin-bottom:8px!important}#stats .stats-card-head h3{font-size:14px!important;font-weight:600!important;margin:2px 0 0!important}#stats .stats-card-head .eyebrow{font-size:14px!important;font-weight:600!important;text-transform:none!important;letter-spacing:normal!important}#stats .stats-metrics{gap:7px 12px!important}#stats .stats-metrics div{padding-top:6px!important;gap:2px!important}#stats .stats-metrics span{font-size:10px!important;color:#5c5952}#stats .stats-metrics strong,#stats .stats-metrics .stat-metric-val{font-size:13.5px!important;font-weight:400!important}#stats .stats-metrics strong:not(.positive):not(.negative),#stats .stats-metrics .stat-metric-val:not(.positive):not(.negative){color:var(--ink)!important}#stats .stats-metrics .stat-metric-val-pnl{font-size:22px!important;font-weight:600!important}#stats .stats-card .pill.ok{color:#059669!important;border-color:rgba(5,150,105,.35)!important;background:rgba(5,150,105,.1)!important}html[data-theme="dark"] #stats .stats-card .pill.ok{color:#4ade80!important;border-color:rgba(74,222,128,.35)!important;background:rgba(74,222,128,.12)!important}#stats .analytics-table th{font-size:10px;color:#5a564f;background:#f7f4ee}#stats .analytics-table td{font-size:11.75px;line-height:1.45;color:#403e39;font-weight:400!important}#stats .analytics-table td strong{font-size:12px;font-weight:400!important}#stats .analytics-table .reason-cell{color:#403e39;line-height:1.55}#stats .analytics-empty{font-size:12px;color:#625f58}#stats .analytics-table-wrap .info-tip:after,#stats .analytics-table-wrap .info-tip:before{display:none}

@media(max-width:900px){.stats-detail-grid{grid-template-columns:1fr 1fr}}@media(max-width:620px){.stats-detail-grid{grid-template-columns:1fr}.stats-toolbar{align-items:flex-start;flex-direction:column}}


  .diagnostic-funnel{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:12px}.diagnostic-step{position:relative;border:1px solid var(--line);border-radius:12px;padding:11px 10px;background:var(--panel);min-width:0}.diagnostic-step span{display:block;font-size:9px;line-height:1.3;color:var(--muted);text-transform:uppercase;letter-spacing:.055em}.diagnostic-step strong{display:block;margin-top:5px;font-size:17px}.diagnostic-step small{display:block;margin-top:3px;color:var(--muted);font-size:9px}.diagnostic-context{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:8px}.diagnostic-context .diagnostic-step{background:var(--surface-2)}.diagnostic-bottleneck{margin-top:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--bg-soft);font-size:12px;line-height:1.55}.diagnostic-bottleneck strong{color:var(--ink)}.diagnostic-table{min-width:920px}.diagnostic-note{font-size:11px;color:var(--muted);line-height:1.55;margin-top:10px}@media(max-width:900px){.diagnostic-funnel{grid-template-columns:repeat(3,minmax(0,1fr))}.diagnostic-context{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.diagnostic-funnel,.diagnostic-context{grid-template-columns:repeat(2,minmax(0,1fr))}}
  .backtest-layout{display:grid;gap:14px}.pair-switch{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0}.pair-switch button{border:1px solid var(--line);background:rgba(255,255,255,.4);border-radius:999px;padding:6px 14px;font-size:12px;letter-spacing:.04em;cursor:pointer;color:inherit}.pair-switch button.active{background:#2c2a24;color:#f6f1e6;border-color:#2c2a24}

.gate-glossary{margin-top:14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.4);padding:2px 14px 2px}
.gate-glossary>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;padding:12px 0;font-size:13px;font-weight:650}
.gate-glossary>summary::-webkit-details-marker{display:none}
.info-i{width:18px;height:18px;border-radius:50%;border:1px solid currentColor;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-style:italic;font-weight:600;flex:0 0 18px;opacity:.75}
.gate-glossary dl{margin:0 0 12px;display:grid;gap:10px}
.gate-glossary dt{font-size:13px;font-weight:600}
.gate-glossary dt span{font-weight:500;color:var(--muted);font-size:12px}
.gate-glossary dd{margin:2px 0 0;font-size:12px;line-height:1.45;color:var(--muted)}


.brand{padding-bottom:12px}
.brand-ticker{padding:0 8px 18px;min-width:0}
.brand-ticker>span{display:block;font-size:9px;letter-spacing:.08em;text-transform:uppercase;color:#706a60}
.brand-ticker>strong{display:inline;font-size:15px;letter-spacing:-.03em;color:#20201d}
.brand-ticker>.market-change{display:inline;margin-left:8px;font-size:11px;font-style:normal}
.brand-ticker>small{display:block;margin-top:3px;font-size:9px;color:#706a60}
.sidebar-engine{display:flex;gap:8px;align-items:flex-start;margin:0 0 14px;padding:0 2px 12px;border-bottom:1px solid #d8d1c5}
.sidebar-engine .live-dot{margin-top:6px;flex:0 0 auto}
.sidebar-engine .eyebrow{display:block;font-size:8.5px;letter-spacing:.1em;text-transform:uppercase;color:#706a60}
.sidebar-engine strong{display:block;font-size:11px;margin-top:2px}
.sidebar-engine small{display:block;font-size:11px;color:#625d54;margin-top:3px;line-height:1.4}
.dev-run-hint{color:#b42318;font-size:12px;font-weight:650;margin:10px 0 0;min-height:0}
.info-tip{display:inline-flex!important;align-items:center;justify-content:center;width:15px;height:15px;padding:0;line-height:1;font-style:normal;font-family:Inter,ui-sans-serif,system-ui,sans-serif}


.sidebar-head{display:flex;flex-direction:column;align-items:stretch;gap:0}
.sidebar-head-top{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}
.brand-ticker{display:block;width:100%;padding:2px 8px 18px;min-width:0;box-sizing:border-box}
.brand-ticker>span{display:block;font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:#706a60;margin-bottom:3px}
.brand-ticker>strong{display:inline;font-size:16px;letter-spacing:-.03em;color:#20201d;font-weight:650}
.brand-ticker>.market-change{display:inline;margin-left:8px;font-size:11px;font-style:normal;font-weight:600;vertical-align:1px}
.brand-ticker>small{display:block;margin-top:3px;font-size:9px;color:#706a60}

.backtest-method{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.backtest-method>div{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--bg-soft)}.backtest-method span{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.07em;margin-bottom:4px}.backtest-method strong{font-size:13px}.backtest-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:16px}.backtest-progress{margin-top:14px}.backtest-progress-track{height:7px;border-radius:999px;background:var(--line-soft);overflow:hidden}.backtest-progress-bar{height:100%;width:0;background:currentColor;transition:width .25s ease}.backtest-progress-copy{display:flex;justify-content:space-between;gap:12px;margin-top:7px;font-size:12px;color:var(--muted)}.backtest-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.backtest-summary>div{border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--panel)}.backtest-summary span{font-size:11px;color:var(--muted);display:block;margin-bottom:4px}.backtest-summary strong{font-size:17px}.validation-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.validation-item{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:12px}.validation-item strong.pass{color:var(--green)}.validation-item strong.fail{color:var(--red)}.validation-item strong.pending{color:var(--muted)}.bt-status-copy{font-size:13px;line-height:1.55;color:var(--text-soft)}.backtest-table td.reason-cell{min-width:280px;white-space:normal;line-height:1.45}@media(max-width:900px){.backtest-method,.backtest-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.validation-list{grid-template-columns:1fr}}
/* v0.8.5 layout, information tips and A/B comparison */
.app-shell{overflow-x:clip}.sidebar{align-self:start;height:100dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.nav-group-toggle{font-size:12px!important;letter-spacing:.11em!important;font-weight:600!important;color:#716d65!important}.nav-group-toggle .nav-chevron{font-size:13px}
#stats .info-tip{display:inline-flex!important;opacity:1!important;visibility:visible!important;flex:0 0 auto;border-width:1.5px;color:var(--ink-2);border-color:var(--muted-2);background:var(--surface)}.section-title-with-info{display:flex;align-items:center;gap:5px}.section-title-with-info h3{margin:0}.section-title-with-info .info-tip:after{left:0;transform:none}.section-title-with-info .info-tip:before{left:8px;transform:none}
.comparison-intro{font-size:12px;line-height:1.65;color:var(--ink-2);margin:0 0 14px}.comparison-variants{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.comparison-card{border:1px solid var(--line);border-radius:14px;padding:15px;background:#fbfaf7}.comparison-card.variant-b{border-color:var(--terracotta-line);background:var(--terracotta-bg)}.comparison-card.variant-c{border-color:#c9b27a;background:#fbf6ea}.comparison-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:12px}.comparison-card h4{margin:3px 0 0;font-size:13px}.comparison-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.comparison-metrics div{border:1px solid var(--line-soft);background:var(--surface);border-radius:10px;padding:9px}.comparison-metrics span{display:block;color:var(--muted);font-size:11px}.comparison-metrics strong{display:block;margin-top:4px;font-size:12px}

.comparison-card,.comparison-card.variant-a,.comparison-card.variant-b,.comparison-card.variant-c{background:#f6f3ec!important;border-color:#e4ddd0!important}
.comparison-card.locked-pass{outline:2px solid #3d8b5a}
.dev-run-hint{font-weight:600;margin:8px 0 14px;font-size:13px}
.dev-run-hint.need{color:#c0392b}
.dev-run-hint.ok{color:#2d7a46}
.variant-letter{display:inline-flex;min-width:22px;height:22px;padding:0 5px;border-radius:7px;background:#2b2a26;color:#f4f0e8;align-items:center;justify-content:center;font-size:11px;font-weight:650;margin-right:8px;white-space:nowrap;box-sizing:border-box}

.pass-summary-banner{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:14px;padding:12px 16px;background:var(--surface,#fff);border:1px solid var(--line-soft,#e4ddd0);border-radius:12px;font-size:12.5px;color:var(--ink,#111)}
.pass-summary-banner strong{color:var(--ink,#111)}
.pass-summary-badge{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:12px}
.pass-summary-badge.has-pass{color:#2a7a49}
.pass-summary-badge.no-pass{color:#8d463e}
.no-pass-notice{grid-column:1/-1;border:1px dashed var(--line-soft,#d8d0c2);border-radius:14px;padding:24px 20px;background:var(--surface-2,#fbfaf7);display:flex;gap:16px;align-items:flex-start}
.no-pass-notice h4{margin:0 0 6px;font-size:14px;color:var(--ink,#111);font-weight:600}
.no-pass-notice p{margin:0;font-size:12px;line-height:1.6;color:var(--muted,#666)}
.no-pass-icon{font-size:24px;line-height:1;flex-shrink:0}
.action-button:disabled,
.action-button[disabled],
.action-button.primary:disabled,
.action-button.primary[disabled]{
  background:#ece7df!important;
  color:#8c867c!important;
  border-color:#d8d0c2!important;
  opacity:0.65!important;
  cursor:not-allowed!important;
  pointer-events:none!important;
  box-shadow:none!important;
}

.book-status{display:flex;flex-direction:column;gap:8px;margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid #d8d1c5}
.book-status-title{padding:0 2px 2px;color:#817b71;font-size:10.5px;font-weight:600;letter-spacing:.13em;text-transform:uppercase}
.book-status-card{padding:10px;border:1px solid #d8d1c5;border-radius:11px;background:rgba(255,253,249,.52)}
.book-dot-row{display:flex;align-items:center;gap:8px;min-width:0}
.book-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:#c9c3b9}
.book-dot.on{background:var(--green);box-shadow:0 0 0 3px rgba(73,102,83,.18)}
.book-dot.off{background:var(--red);box-shadow:0 0 0 3px rgba(141,70,62,.14)}
.book-dot.wait{background:var(--amber);box-shadow:0 0 0 3px rgba(121,99,63,.16)}
.book-dot-row>div{min-width:0;flex:1}.book-dot-row strong{display:block;font-size:11px;line-height:1.2}.book-dot-row small{display:block;font-size:11px;color:#4f4b44;margin-top:2px;font-weight:650}
.book-connection{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 0 17px;padding-top:7px;border-top:1px solid rgba(216,209,197,.78);font-size:11px;color:#6b665e}.book-connection strong{font-size:11px;text-align:right;color:#625d54}#swingBitgetLabel.ok,#dayBitgetLabel.ok,#intraBitgetLabel.ok,.book-connection strong.ok{color:var(--green)!important}#swingBitgetLabel.error,#dayBitgetLabel.error,#intraBitgetLabel.error,.book-connection strong.error{color:var(--red)!important}
.engine-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:4px}
.engine-mode-button.active,.engine-mode-button.active:hover{background:rgba(88,113,94,.07);border-color:var(--green);color:var(--green);font-weight:650;box-shadow:0 0 0 1px var(--green),0 3px 12px rgba(88,113,94,.12)}
html[data-theme="dark"] .engine-mode-button.active,
html[data-theme="dark"] .engine-mode-button.active:hover{background:rgba(98,168,124,.12)!important;border-color:#62a87c!important;color:#8bd3a5!important;font-weight:650!important;box-shadow:0 0 0 1px #62a87c,0 3px 14px rgba(0,0,0,.4)!important}
.engine-mode-button.active:disabled{opacity:1;cursor:default}.engine-mode-button.locked:disabled{background:#f2eee7;color:#8a857c;border-color:#ddd6ca}
.radar-balance{display:flex;flex-direction:column;gap:2px;margin-top:2px;flex:1 1 auto;min-width:0}.radar-balance .eyebrow{font-size:12px!important;font-weight:650}.radar-balance-value{margin:0;font-size:12.5px;color:var(--ink);font-weight:600;line-height:1.35}.radar-balance-total{font-size:10.5px;color:var(--muted);font-weight:400;line-height:1.35}.pre-sim-risk,.risk-value{color:var(--red)!important}.pre-sim-profit,.profit-value{color:var(--green)!important}
.risk-summary-values{display:flex;align-items:center;gap:10px 18px;flex-wrap:wrap}.risk-summary-values strong{font-weight:600}.rules-system-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.rules-system-card-title{display:flex;align-items:center;gap:7px}.rules-system-card-title strong{font-size:12px;font-weight:600}.rules-status{display:inline-flex;align-items:center;min-height:23px;padding:3px 8px;border:1px solid var(--line);border-radius:999px;color:var(--muted);background:var(--surface);font-size:10.5px;font-weight:550}.rules-status.active{border-color:var(--green);background:rgba(88,113,94,.07);color:var(--green)}.rules-item{display:flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--line-soft);border-radius:8px;padding:6px 10px;font-size:11px}.rules-item span{font-weight:400}.rules-item span strong{font-weight:600}.radar-stat span,.pre-sim-col span{font-weight:550}.pre-sim-col small{font-weight:400}
html[data-theme="dark"] .pre-sim-col strong.pre-sim-risk,html[data-theme="dark"] .risk-value{color:#ff8585!important}html[data-theme="dark"] .pre-sim-col strong.pre-sim-profit,html[data-theme="dark"] .profit-value{color:#6ee7a0!important}html[data-theme="dark"] .rules-status.active{border-color:#62a87c;background:rgba(98,168,124,.12);color:#8bd3a5}html[data-theme="dark"] .panel-title p,html[data-theme="dark"] .strategy-description,html[data-theme="dark"] .hint,html[data-theme="dark"] .radar-balance-total,html[data-theme="dark"] .rules-item span,html[data-theme="dark"] .kv span{color:#d7dde8!important}
#logs #engineControlPanel{order:1}#logs #dayEngineControlPanel{order:2}#logs #intradayEngineControlPanel{order:3}#logs #servicesPanel{order:4}#logs #bitgetDiagnosticsPanel{order:5}#logs #notificationsConfigPanel{order:6}#logs .content>.danger-note{order:7}
.engine-controls-persistent{margin:0 0 14px;padding:12px 0;border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}
#cryptoSettingsFilter #cryptoFilterDayBtn,#backtestViewTabs #btTabDay{color:var(--accent-day)!important;border:1px solid var(--accent-day-line)!important;background:var(--accent-day-bg)!important}
#cryptoSettingsFilter #cryptoFilterSwingBtn,#backtestViewTabs #btTabSwing{color:var(--accent-swing)!important;border:1px solid var(--accent-swing-line)!important;background:var(--accent-swing-bg)!important}
#cryptoSettingsFilter #cryptoFilterIntraBtn,#backtestViewTabs #btTabIntra{color:var(--accent-intra)!important;border:1px solid var(--accent-intra-line)!important;background:var(--accent-intra-bg)!important}
#cryptoSettingsFilter #cryptoFilterDayBtn.active,#backtestViewTabs #btTabDay.active{border-color:var(--accent-day)!important;box-shadow:0 0 0 1px var(--accent-day),0 2px 7px var(--accent-day-glow)!important}
#cryptoSettingsFilter #cryptoFilterSwingBtn.active,#backtestViewTabs #btTabSwing.active{border-color:var(--accent-swing)!important;box-shadow:0 0 0 1px var(--accent-swing),0 2px 7px var(--accent-swing-glow)!important}
#cryptoSettingsFilter #cryptoFilterIntraBtn.active,#backtestViewTabs #btTabIntra.active{border-color:var(--accent-intra)!important;box-shadow:0 0 0 1px var(--accent-intra),0 2px 7px var(--accent-intra-glow)!important}
html[data-theme="dark"] .logo-mark{background:#f5f1e8!important;color:#111215!important;border:1px solid #ffffff!important;box-shadow:0 4px 14px rgba(0,0,0,.32)}
#stats .stats-card.card-accent-swing .stats-card-head h3,.card-accent-swing > .panel-title h2,.card-accent-swing > .stats-section-title h3{color:var(--accent-swing)!important}#stats .stats-card.card-accent-day .stats-card-head h3,.card-accent-day > .panel-title h2,.card-accent-day > .stats-section-title h3{color:var(--accent-day)!important}#stats .stats-card.card-accent-intra .stats-card-head h3,.card-accent-intra > .panel-title h2,.card-accent-intra > .stats-section-title h3{color:var(--accent-intra)!important}#stats .stats-card.card-accent-neutral .stats-card-head h3{color:#111215!important;font-weight:600!important}#stats .stats-card.card-accent-neutral .eyebrow{color:#44403c!important;font-weight:600!important}html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-card-head h3{color:#ffffff!important}html[data-theme="dark"] #stats .stats-card.card-accent-neutral .eyebrow{color:#ffffff!important}html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics strong:not(.positive):not(.negative){color:#ffffff!important}html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics span{color:#ffffff!important}html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics div{border-top-color:rgba(255,255,255,.2)!important}
.btc-chart-panel iframe{background:#fffdf9;height:500px!important}
.card-fold{border:1px solid var(--line);background:#f8f5ef;color:#5d5952;border-radius:8px;width:26px;height:26px;padding:0;font-size:16px;line-height:1;flex:0 0 auto}
.comparison-card-head{align-items:center}
.comparison-card.folded{padding:10px 12px}
.comparison-card.folded .validation-list{display:none}
.comparison-card.folded .comparison-metrics{display:none}
.nav-alert-icon{display:inline-flex;align-items:center;animation:navAlertPulse 1.8s infinite ease-in-out;flex:0 0 auto}
.nav-alert-danger{display:inline-flex;align-items:center;animation:navAlertPulse 1.8s infinite ease-in-out;flex:0 0 auto}
@keyframes navAlertPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.1);opacity:.7}}
.analytics-table-wrap{scrollbar-width:thin;scrollbar-color:var(--line) transparent;scrollbar-gutter:stable}
@media(max-width:680px){
  .content{padding-bottom:calc(30px + env(safe-area-inset-bottom))}
  .sidebar{padding-bottom:env(safe-area-inset-bottom)}
  .action-button,.engine-mode-button,.segmented button,.mobile-menu-button,.mobile-menu-close,.pause-toggle,.card-fold,.login-button,.forgot-button{min-height:44px}
  input,select,textarea{min-height:44px;font-size:16px!important}
  #alertsConfigBody>div{grid-template-columns:1fr!important}
  #alertsConfigBody .action-button{flex:1 1 140px}
  .engine-controls-persistent .engine-mode-button{flex:1 1 180px}
  .analytics-table-wrap{box-shadow:inset -12px 0 10px -14px rgba(25,25,25,.5)}
}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
/* Stats cards metrics: Positive / Negative coloring matching Trade History (not bold) */
.stats-metrics strong,
.stats-metrics span.stat-metric-val,
#stats .stats-metrics strong,
#stats .stats-metrics span.stat-metric-val,
#stats .stats-card .stats-metrics strong,
#stats .stats-card .stats-metrics span.stat-metric-val {
  font-weight: 400 !important;
  font-size: 13.5px !important;
}
.stats-metrics strong.positive,
.stats-metrics span.stat-metric-val.positive,
#stats .stats-metrics strong.positive,
#stats .stats-metrics span.stat-metric-val.positive,
#stats .stats-card .stats-metrics strong.positive,
#stats .stats-card .stats-metrics span.stat-metric-val.positive,
#stats .stats-card.card-accent-neutral .stats-metrics strong.positive,
#stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.positive,
#stats .stats-card.card-accent-swing .stats-metrics strong.positive,
#stats .stats-card.card-accent-swing .stats-metrics span.stat-metric-val.positive,
#stats .stats-card.card-accent-day .stats-metrics strong.positive,
#stats .stats-card.card-accent-day .stats-metrics span.stat-metric-val.positive,
#stats .stats-card.card-accent-intra .stats-metrics strong.positive,
#stats .stats-card.card-accent-intra .stats-metrics span.stat-metric-val.positive {
  color: #059669 !important;
  font-weight: 400 !important;
  text-shadow: none !important;
}
.stats-metrics strong.negative,
.stats-metrics span.stat-metric-val.negative,
#stats .stats-metrics strong.negative,
#stats .stats-metrics span.stat-metric-val.negative,
#stats .stats-card .stats-metrics strong.negative,
#stats .stats-card .stats-metrics span.stat-metric-val.negative,
#stats .stats-card.card-accent-neutral .stats-metrics strong.negative,
#stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.negative,
#stats .stats-card.card-accent-swing .stats-metrics strong.negative,
#stats .stats-card.card-accent-swing .stats-metrics span.stat-metric-val.negative,
#stats .stats-card.card-accent-day .stats-metrics strong.negative,
#stats .stats-card.card-accent-day .stats-metrics span.stat-metric-val.negative,
#stats .stats-card.card-accent-intra .stats-metrics strong.negative,
#stats .stats-card.card-accent-intra .stats-metrics span.stat-metric-val.negative {
  color: #dc2626 !important;
  font-weight: 400 !important;
  text-shadow: none !important;
}
html[data-theme="dark"] .stats-metrics strong.positive,
html[data-theme="dark"] .stats-metrics span.stat-metric-val.positive,
html[data-theme="dark"] #stats .stats-metrics strong.positive,
html[data-theme="dark"] #stats .stats-metrics span.stat-metric-val.positive,
html[data-theme="dark"] #stats .stats-card .stats-metrics strong.positive,
html[data-theme="dark"] #stats .stats-card .stats-metrics span.stat-metric-val.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics strong.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-swing .stats-metrics strong.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-swing .stats-metrics span.stat-metric-val.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-day .stats-metrics strong.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-day .stats-metrics span.stat-metric-val.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-intra .stats-metrics strong.positive,
html[data-theme="dark"] #stats .stats-card.card-accent-intra .stats-metrics span.stat-metric-val.positive {
  color: #4ade80 !important;
  font-weight: 400 !important;
  text-shadow: none !important;
}
html[data-theme="dark"] .stats-metrics strong.negative,
html[data-theme="dark"] .stats-metrics span.stat-metric-val.negative,
html[data-theme="dark"] #stats .stats-metrics strong.negative,
html[data-theme="dark"] #stats .stats-metrics span.stat-metric-val.negative,
html[data-theme="dark"] #stats .stats-card .stats-metrics strong.negative,
html[data-theme="dark"] #stats .stats-card .stats-metrics span.stat-metric-val.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics strong.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-swing .stats-metrics strong.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-swing .stats-metrics span.stat-metric-val.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-day .stats-metrics strong.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-day .stats-metrics span.stat-metric-val.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-intra .stats-metrics strong.negative,
html[data-theme="dark"] #stats .stats-card.card-accent-intra .stats-metrics span.stat-metric-val.negative {
  color: #ff6b6b !important;
  font-weight: 400 !important;
  text-shadow: none !important;
}
#stats .stats-card .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
#stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
#stats .stats-card.card-accent-swing .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
#stats .stats-card.card-accent-day .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
#stats .stats-card.card-accent-intra .stats-metrics span.stat-metric-val.stat-metric-val-pnl {
  font-weight: 650 !important;
}
html[data-theme="dark"] #stats .stats-card .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
html[data-theme="dark"] #stats .stats-card.card-accent-neutral .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
html[data-theme="dark"] #stats .stats-card.card-accent-swing .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
html[data-theme="dark"] #stats .stats-card.card-accent-day .stats-metrics span.stat-metric-val.stat-metric-val-pnl,
html[data-theme="dark"] #stats .stats-card.card-accent-intra .stats-metrics span.stat-metric-val.stat-metric-val-pnl {
  font-weight: 650 !important;
}
.radar-blocked-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  color: #059669;
  background: rgba(5,150,105,0.10);
  border: 1px solid rgba(5,150,105,0.35);
  padding: 1.5px 6px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.25;
  cursor: default;
}
html[data-theme="dark"] .radar-blocked-pill {
  color: #34d399;
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.38);
}
.live-pnl-panel strong.negative {
  color: #dc2626 !important;
}
html[data-theme="dark"] .live-pnl-panel strong.negative {
  color: #ff6b6b !important;
  text-shadow: none !important;
}
.live-pnl-panel strong.positive {
  color: #059669 !important;
}
html[data-theme="dark"] .live-pnl-panel strong.positive {
  color: #4ade80 !important;
  text-shadow: none !important;
}
.live-pnl-panel strong.neutral {
  color: var(--ink) !important;
}
.live-pnl-box-title {
  font-size: 11px;
  font-weight: 650;
  color: #4d4a43;
  text-transform: uppercase;
  letter-spacing: .04em;
}
html[data-theme="dark"] .live-pnl-box-title {
  color: #ffffff;
}
.live-pnl-sub-label {
  font-size: 10.5px;
  font-weight: 400;
  color: #6d6961;
  display: block;
  line-height: 1.2;
}
html[data-theme="dark"] .live-pnl-sub-label {
  color: #ffffff;
}
.position-card .pos-c-val.negative,
.position-card .pos-c-val.negative .pos-c-sub,
.pos-tot-pnl.negative {
  color: #dc2626 !important;
}
html[data-theme="dark"] .position-card .pos-c-val.negative,
html[data-theme="dark"] .position-card .pos-c-val.negative .pos-c-sub,
html[data-theme="dark"] .pos-tot-pnl.negative {
  color: #ff6b6b !important;
  text-shadow: none !important;
}
.position-card .pos-c-val.positive,
.position-card .pos-c-val.positive .pos-c-sub,
.pos-tot-pnl.positive {
  color: #059669 !important;
}
html[data-theme="dark"] .position-card .pos-c-val.positive,
html[data-theme="dark"] .position-card .pos-c-val.positive .pos-c-sub,
html[data-theme="dark"] .pos-tot-pnl.positive {
  color: #4ade80 !important;
  text-shadow: none !important;
}
.position-card .side-badge.long,
.position-card .pos-profit-pos {
  color: #059669 !important;
}
.position-card .side-badge.short,
.position-card .pos-risk-neg {
  color: #dc2626 !important;
}
.position-card .side-badge.long {
  background: rgba(5,150,105,.1) !important;
  border-color: rgba(5,150,105,.35) !important;
}
.position-card .side-badge.short {
  background: rgba(220,38,38,.1) !important;
  border-color: rgba(220,38,38,.35) !important;
}
html[data-theme="dark"] .position-card .side-badge.long,
html[data-theme="dark"] .position-card .pos-profit-pos {
  color: #4ade80 !important;
}
html[data-theme="dark"] .position-card .side-badge.short,
html[data-theme="dark"] .position-card .pos-risk-neg {
  color: #ff6b6b !important;
}
html[data-theme="dark"] .position-card .side-badge.long {
  background: rgba(74,222,128,.12) !important;
  border-color: rgba(74,222,128,.35) !important;
}
html[data-theme="dark"] .position-card .side-badge.short {
  background: rgba(255,107,107,.12) !important;
  border-color: rgba(255,107,107,.35) !important;
}
/* ── Stock Opportunity Radar · v1 Phase 6 visual system ──
   sr-* tokens merged into the single light/dark :root blocks at the top of
   this stylesheet; only the component rules remain here. */
.sr-hero{position:relative;overflow:hidden}
#stockOpportunities .content>*,#stockWatchlist .content>*,#stockPortfolio .content>*,#stockExposure .content>*,#stockPerformance .content>*{min-width:0;max-width:100%}
.sr-kpis .metric-card{min-width:0}
.sr-facts .sr-fresh{display:inline-flex;text-transform:none;letter-spacing:0;font-size:12px;font-weight:650;color:var(--ink)}
.sr-hero::before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,var(--sr-strong),var(--sr-forming),var(--sr-monitor))}
.sr-hero.amber::before{background:linear-gradient(90deg,var(--sr-monitor),var(--amber))}
.sr-hero.ai::before{background:linear-gradient(90deg,var(--sr-strong),var(--sr-ai))}
.sr-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px}
.sr-kpis .metric-card{padding:9px 12px;position:relative;overflow:hidden}
.sr-kpis .metric-card strong{font-size:var(--fs-xl);font-weight:600;margin-top:2px;font-variant-numeric:tabular-nums}
.sr-kpis .metric-card small{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-kpis .metric-card.k-strong{border-left:3px solid var(--sr-strong)}.sr-kpis .metric-card.k-strong strong{color:var(--sr-strong)}
.sr-kpis .metric-card.k-forming{border-left:3px solid var(--sr-forming)}.sr-kpis .metric-card.k-forming strong{color:var(--sr-forming)}
.sr-kpis .metric-card.k-ai{border-left:3px solid var(--sr-ai)}.sr-kpis .metric-card.k-ai strong{color:var(--sr-ai)}
.sr-kpis .metric-card.k-neutral{border-left:3px solid var(--line)}
.sr-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:10px}
.sr-filters{display:flex;gap:6px;flex-wrap:wrap}
.sr-toolbar-right{display:flex;gap:8px;align-items:center;flex-wrap:wrap;min-width:0}
.sr-filter{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:5px 11px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);font-size:11.5px;font-weight:600;transition:background .15s,border-color .15s,color .15s}
.sr-filter .dot{width:7px;height:7px;border-radius:50%;background:var(--muted-2)}
.sr-filter .n{font-size:10.5px;font-weight:600;padding:0 6px;border-radius:999px;background:var(--bg-soft);color:var(--muted);font-variant-numeric:tabular-nums}
.sr-filter[data-radar-filter="strong"] .dot{background:var(--sr-strong)}
.sr-filter[data-radar-filter="forming"] .dot{background:var(--sr-forming)}
.sr-filter[data-radar-filter="monitor"] .dot{background:var(--sr-monitor)}
.sr-filter[data-radar-filter="avoid"] .dot{background:var(--sr-avoid)}
.sr-filter:hover{border-color:var(--muted-2)}
.sr-filter.active{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.sr-filter.active .n{background:rgba(255,255,255,.18);color:inherit}
html[data-theme="dark"] .sr-filter.active{background:var(--ink);color:#111215}
html[data-theme="dark"] .sr-filter.active .n{background:rgba(0,0,0,.14)}
.sr-search{width:240px;max-width:100%;min-height:34px;padding:7px 12px;font-size:12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.sr-search:focus{outline:2px solid var(--sr-ai-line);outline-offset:1px}
.sr-table-wrap{overflow:auto;max-height:min(74vh,780px);overscroll-behavior:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch;margin:0 -4px}
.sr-table{width:100%;border-collapse:separate;border-spacing:0;font-size:12.5px}
.sr-table thead th{position:sticky;top:0;z-index:4;padding:7px 8px;text-align:left;font-size:10px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--line);background:var(--surface);box-shadow:0 1px 0 var(--line);white-space:nowrap}
.sr-table thead th.c,.sr-table td.c,.sr-table thead th.r,.sr-table td.r{text-align:left}
.sr-table tbody td{padding:7px 8px;border-bottom:1px solid var(--line-soft);vertical-align:middle;font-size:12.5px;text-align:left}
.sr-table tbody tr{transition:background .12s}
.sr-table tbody tr:hover{background:var(--sr-row-hover)}
.sr-table tbody tr:last-child td{border-bottom:0}
.sr-table .sr-empty{text-align:center;padding:30px 16px;color:var(--muted);font-size:12.5px}
.sr-table .sr-empty.err{color:var(--sr-neg)}
.sr-table.compact thead th{padding:6px 7px;font-size:10px;text-align:left}
.sr-table.compact tbody td{padding:6px 7px;font-size:12px;text-align:left}
.sr-table.compact .sr-sym{font-size:13px}
.sr-table.compact .sr-sub{font-size:10.5px}
.sr-table.compact .sr-status{font-size:11px}
.sr-rowlink{cursor:pointer}
.sr-sym{display:flex;align-items:center;gap:6px;font-weight:650;font-size:13px;letter-spacing:-.01em;color:var(--ink)}
.sr-sub{font-size:10.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:180px;margin-top:2px;line-height:1.25;text-align:left}
.sr-num{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12.5px;text-align:left}
.sr-price{font-size:10.5px;font-weight:650;color:var(--ink-2);background:var(--bg-soft);border:1px solid var(--line-soft);padding:1px 5px;border-radius:4px;font-variant-numeric:tabular-nums}
.sr-score{--v:0;--c:var(--sr-avoid);width:34px;height:34px;border-radius:50%;display:inline-grid;place-items:center;background:conic-gradient(var(--c) calc(var(--v)*1%),var(--sr-track) 0);flex:0 0 auto}
.sr-score>span{width:26px;height:26px;border-radius:50%;background:var(--surface);display:grid;place-items:center;font-size:11px;font-weight:650;color:var(--c);font-variant-numeric:tabular-nums}
.sr-score.lg{width:78px;height:78px}.sr-score.lg>span{width:64px;height:64px;font-size:24px}
.sr-score.s-strong{--c:var(--sr-strong)}.sr-score.s-forming{--c:var(--sr-forming)}.sr-score.s-monitor{--c:var(--sr-monitor)}.sr-score.s-avoid{--c:var(--sr-avoid)}
.sr-pill{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:600;padding:2px 7px;border-radius:999px;border:1px solid transparent;white-space:nowrap;line-height:1.2}
.sr-pill::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.sr-pill.nodot::before{display:none}
.sr-pill.s-strong{color:var(--sr-strong);background:var(--sr-strong-bg);border-color:var(--sr-strong-line)}
.sr-pill.s-forming{color:var(--sr-forming);background:var(--sr-forming-bg);border-color:var(--sr-forming-line)}
.sr-pill.s-monitor{color:var(--sr-monitor);background:var(--sr-monitor-bg);border-color:var(--sr-monitor-line)}
.sr-pill.s-avoid{color:var(--sr-avoid);background:var(--sr-avoid-bg);border-color:var(--sr-avoid-line)}
.sr-pill.s-neg{color:var(--sr-neg);background:var(--sr-neg-bg);border-color:var(--sr-neg-line)}
.sr-pill.s-ai{color:var(--sr-ai);background:var(--sr-ai-bg);border-color:var(--sr-ai-line)}
.sr-status{font-size:11px;font-weight:600;color:var(--ink-2);max-width:180px;line-height:1.25}
.sr-comps{display:grid;grid-template-columns:repeat(6,20px);gap:3px;justify-content:flex-start;align-items:end;height:28px}
.sr-comp{position:relative;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}
.sr-comp i{display:block;width:10px;border-radius:2px 2px 1px 1px;background:var(--sr-forming);min-height:3px}
.sr-comp i.zero{background:var(--sr-track)}
.sr-comp b{font-size:9px;font-weight:650;color:var(--ink-2);letter-spacing:0;margin-top:2px}
.sr-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:28px;padding:4px 9px;border-radius:7px;border:1px solid var(--line);background:var(--surface);color:var(--ink-2);font-size:11px;font-weight:650;white-space:nowrap;transition:background .15s,border-color .15s}
.sr-btn:hover{background:var(--bg-soft);border-color:var(--muted-2)}
.sr-btn.ai{color:var(--sr-ai);background:var(--sr-ai-bg);border-color:var(--sr-ai-line)}
.sr-btn.ai:hover{filter:brightness(1.05)}
.sr-btn.danger{color:var(--sr-neg)}.sr-btn.danger:hover{background:var(--sr-neg-bg);border-color:var(--sr-neg-line)}
.sr-btn.primary{background:var(--ink);border-color:var(--ink);color:var(--surface)}
.sr-btn-sell{display:inline-flex;align-items:center;gap:3px;margin-left:8px;vertical-align:baseline;background:none!important;border:0!important;box-shadow:none!important;padding:0!important;color:var(--ink)!important;font-size:11px!important;font-weight:650!important;cursor:pointer;white-space:nowrap}
.sr-btn-sell:hover{text-decoration:underline;background:none!important}
html[data-theme="dark"] .sr-btn-sell{color:#fff!important}
.sr-btn-sell{color:#fff!important}
.sr-dropdown-item.sale-highlight{color:var(--ink);font-weight:650}
html[data-theme="dark"] .sr-dropdown-item.sale-highlight{color:#f4f4f5}
.sr-actions{display:inline-flex;gap:5px;justify-content:flex-start;flex-wrap:nowrap;align-items:center}
.sr-sparkline{display:inline-block;vertical-align:middle;overflow:visible}
.sr-action-menu-wrap{position:relative;display:inline-flex}
.sr-btn-menu{font-weight:650;letter-spacing:1px;padding:3px 8px;min-width:26px;line-height:1;min-height:28px}
/* position:fixed (set once .open, via JS-computed top/left) so the menu escapes the
   .sr-table-wrap{overflow-x:auto} clipping — it used to get cut off on the last column. */
.sr-dropdown-menu{position:fixed;z-index:9999;min-width:150px;background:var(--surface);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,0.18);padding:4px;display:none;flex-direction:column;gap:2px}
.sr-dropdown-menu.open{display:flex}
.sr-dropdown-item{display:flex;align-items:center;gap:7px;padding:7px 10px;border-radius:6px;font-size:11.5px;font-weight:600;color:var(--ink-2);background:transparent;border:0;cursor:pointer;text-align:left;width:100%;transition:background .12s,color .12s}
.sr-dropdown-item:hover{background:var(--bg-soft);color:var(--ink)}
.sr-dropdown-item.danger{color:var(--sr-neg)}
.sr-dropdown-item.danger:hover{background:var(--sr-neg-bg);color:var(--sr-neg)}
.sr-fresh{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:650;color:var(--muted)}
.sr-fresh::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--sr-strong)}
.sr-fresh.stale::before{background:var(--sr-monitor)}
.sr-fresh.missing::before{background:var(--sr-avoid)}
.sr-mark{font-size:11px;line-height:1;cursor:help}
body.is-member .owner-only,body.is-member .nav-product-header:not([data-product="stock"]),body.is-member #navCrypto,body.is-member #navForex,body.is-member #navSystem,body.is-member #viewerBanner{display:none!important}
body.no-view-radar [data-tab="stockOpportunities"],body.no-view-radar [data-tab="stockPerformance"],body.no-view-watchlist [data-tab="stockWatchlist"],body.no-view-portfolio [data-tab="stockPortfolio"],body.no-view-portfolio [data-tab="stockExposure"]{display:none!important}
body.no-edit-portfolio .edit-portfolio,body.no-edit-watchlist .edit-watchlist,body.no-edit-ai .edit-ai{display:none!important}.sr-sym .sr-mark+.sr-sym-link,.sr-sym .sr-mark+.sr-mark{margin-left:-3px}
.sr-sym-link{color:var(--ink);text-decoration:none;display:inline-flex;align-items:center;gap:3px;font-weight:600;transition:color .15s ease}
.sr-sym-link:hover{color:var(--accent-day);text-decoration:underline}
.sr-ext-icon{width:11px;height:11px;opacity:0.55;flex-shrink:0;transition:opacity .15s ease}
.sr-sym-link:hover .sr-ext-icon{opacity:1}
.sr-sym-link.is-held,
.sr-sym-link.is-held span,
.sr-sym-link .sr-sym-txt.is-held{color:#38bdf8!important;font-weight:700!important}
.sr-sym-link.is-held .sr-ext-icon{color:#38bdf8!important;opacity:0.85!important}
.sr-sym-link.is-held:hover,
.sr-sym-link.is-held:hover span{color:#7dd3fc!important;text-decoration:underline}
.sr-sub.is-held{color:#93c5fd!important}
html[data-theme="dark"] .sr-rowlink.sr-held-row td.sr-col-asset{background:color-mix(in srgb,#38bdf8 5%,transparent);border-radius:6px 0 0 6px}
/* Column width constraints */
.sr-col-type{width:65px;min-width:55px;max-width:75px}
.sr-col-asset{width:175px;min-width:145px;max-width:190px}
.sr-col-broker{width:95px;min-width:80px;max-width:110px}
.sr-col-price{width:90px;min-width:80px}
.sr-col-trend{width:80px;min-width:72px}
.sr-col-mktval{width:105px;min-width:90px}
.sr-col-weight{width:80px;min-width:70px}
.sr-col-avg{width:110px;min-width:95px}
.sr-col-inv{width:115px;min-width:100px}
.sr-col-pnl{width:105px;min-width:90px}
.sr-col-sellzone{width:155px;min-width:135px}
.sr-col-rank{width:105px;min-width:95px}
.sr-col-decision{width:120px;min-width:110px}
.sr-col-action{width:120px;min-width:110px}
.sr-col-score.sr-col-scorerating,.sr-table td.sr-col-score:has(.sr-score-cell){width:135px;min-width:120px}
.sr-col-why{width:330px;min-width:310px;max-width:360px}
#stockRadarTable .sr-col-zone{width:230px;min-width:220px}
#stockRadarTable .sr-col-zone .sr-sub{max-width:none;overflow:visible;text-overflow:clip}
#stockPortfolioTableBody .sr-col-zone .sr-sub{max-width:none;white-space:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.sr-col-why .sr-why{font-size:11px;line-height:1.35;color:var(--ink-2);white-space:normal;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.sr-cash-bar .sr-sub{white-space:normal;overflow:visible}
.sr-etf-split{display:grid;gap:4px;font-size:12px;width:100%}
.sr-etf-row{line-height:1.4}
.sr-etf-table{width:100%;border-collapse:collapse;font-size:12px;margin-top:4px}
.sr-etf-table th{font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);text-align:left;padding:4px 6px;border-bottom:1px solid var(--line-soft);font-weight:600}
.sr-etf-table td{padding:5px 6px;border-bottom:1px solid var(--line-soft);vertical-align:middle}
.sr-etf-table .r{text-align:right;white-space:nowrap}
.sr-etf-table .m,.sr-etf-exposure .m{color:var(--muted);font-size:11px}
.sr-note .sr-etf-table strong{display:inline;margin:0}
.sr-etf-table input{width:58px!important;padding:3px 6px;border-radius:7px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:12px;text-align:right}
.sr-etf-exposure{display:grid;gap:2px;margin-top:6px;font-size:11.5px}
.sr-note .sr-etf-exposure strong{display:inline;margin:0}
.sr-col-scoreinfo{width:170px;min-width:150px;cursor:help}
.sr-score-state{font-size:11px;line-height:1.2;white-space:normal}
.sr-score-state.s-strong{color:var(--sr-strong)}.sr-score-state.s-forming{color:var(--sr-forming)}.sr-score-state.s-monitor{color:var(--sr-monitor)}.sr-score-state.s-avoid{color:var(--sr-avoid)}
.sr-etf-table.compact td{padding:3px 6px}
.sr-etf-table.compact tr:last-child td{border-bottom:0}
.sr-etf-exposure{display:flex;flex-wrap:wrap;gap:4px 6px;cursor:help;font-size:11px}
.sr-etf-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;font-size:12.5px}
.sr-etf-chip{display:inline-flex;align-items:center;gap:4px;cursor:help;white-space:nowrap}
.sr-note .sr-etf-chip strong{display:inline;margin:0}
.sr-etf-chip .m{color:var(--muted);font-size:11px}
.sr-etf-chip input{width:48px!important;padding:2px 5px;border-radius:6px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:12px;text-align:right}
.sr-etf-chips .sr-ai-btn{margin-left:auto}
.sr-stock-box{display:flex;flex-direction:column;gap:10px}
#portEtfCashBar.collapsed .sr-box-body,#portStockBox.collapsed .sr-box-body{display:none}
.sr-box-head{display:flex;align-items:center;gap:8px;width:100%;cursor:pointer;user-select:none;border-radius:6px}
.sr-box-head:hover strong{color:var(--ink)}
.sr-box-head:focus-visible{outline:2px solid var(--line);outline-offset:3px}
.sr-box-chev{color:var(--muted);font-size:13px;transition:transform .15s ease}
.sr-box-head[aria-expanded="true"] .sr-box-chev{transform:rotate(90deg)}
.sr-box-head strong{display:inline;margin:0;font-size:13.5px}
.sr-box-body{display:flex;flex-direction:column;gap:10px;width:100%}
.sr-strat-link{color:var(--ink-2);text-decoration:none;font-size:13px}
.sr-strat-link:hover{color:var(--ink)}
.sr-strat{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:14px}
.sr-strat-card{padding:16px 18px;font-size:13px;line-height:1.55;color:var(--ink-2)}
.sr-strat-card p{margin:0 0 8px}
.sr-strat-card ul,.sr-strat-card ol{margin:0 0 8px;padding-left:18px;display:flex;flex-direction:column;gap:4px}
.sr-strat-card .m{color:var(--muted);font-size:11.5px}
.sr-strat-rules{width:100%;border-collapse:collapse;margin-bottom:8px}
.sr-strat-rules td{padding:6px 4px;border-bottom:1px solid var(--line-soft);vertical-align:top}
.sr-strat-rules td:first-child{white-space:nowrap;width:1%;padding-right:12px}
@media (max-width:520px){.sr-strat{grid-template-columns:1fr}}
.sr-note .sr-act-group .sr-ai-facts strong,.sr-note .sr-ai-top strong,.sr-note .sr-ai-qty strong{display:inline;margin:0}
.sr-stock-summary{border-top:1px solid var(--line-soft);padding-top:10px}
.sr-etf-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;width:100%}
.sr-etf-card{border:1px solid var(--line-soft);border-radius:9px;padding:6px 9px;cursor:help;background:var(--surface)}
.sr-note .sr-etf-card strong{display:inline;margin:0}
.sr-etf-card-top{display:flex;justify-content:space-between;align-items:baseline;gap:6px;font-size:12.5px}
.sr-etf-card-top span{font-size:10.5px;font-weight:650}
.sr-etf-card-vals{font-size:12px;margin-top:1px}
.sr-etf-card .m{color:var(--muted);font-size:11px}
.sr-etf-card input{width:46px!important;padding:1px 4px;border-radius:6px;border:1px solid var(--line);background:var(--bg-soft);color:var(--ink);font-size:12px;text-align:right}
.sr-etf-bar{position:relative;height:6px;border-radius:999px;background:var(--sr-track);margin-top:5px}
.sr-etf-bar span{position:absolute;left:0;top:0;bottom:0;border-radius:999px}
.sr-etf-bar i{position:absolute;top:-3px;bottom:-3px;width:2px;background:var(--ink);transform:translateX(-1px)}
.sr-etf-buy{font-size:11.5px;margin-top:4px}
.sr-etf-foot{display:flex;justify-content:flex-end;width:100%;margin-top:-2px}
.sr-note .sr-etf-row strong,.sr-note .sr-etf-row span{display:inline;margin:0}
.sr-table tbody tr.sr-group-row td{background:var(--bg-soft);color:var(--ink);font-weight:650;font-size:12.5px;padding:8px 10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.sr-table tbody tr.sr-group-row td span{font-weight:500;color:var(--muted);font-size:11.5px}
.sr-table tbody tr.sr-group-row:hover{background:none}
.sr-table tbody tr.sr-group-row .sr-ccy{display:inline;margin-left:4px}
.sr-cash-bar .sr-sub strong{display:inline;margin:0}
.sr-cash-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12.5px}
.sr-cash-bar input{width:110px;padding:5px 8px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.sr-cash-bar select{width:auto!important;max-width:210px;flex:0 0 auto;padding:5px 8px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:12px}
.sr-cash-bar .hint{color:var(--muted);font-size:11.5px}
.sr-col-menu{width:40px;min-width:36px}
.sr-act-chip{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:600;color:var(--c);background:color-mix(in srgb,var(--c) 14%,transparent);border:1px solid color-mix(in srgb,var(--c) 35%,transparent);white-space:nowrap}
.sr-inline-badges{display:flex;align-items:center;gap:4px;margin-top:3px;flex-wrap:wrap}
.sr-inline-badges .sr-pill,.sr-inline-badges .sr-broker-badge{font-size:9.5px;padding:1px 5px}
.sr-price-cell .sr-sparkline{display:block;margin-top:3px}
.sr-score-cell{display:flex;align-items:center;gap:6px}
.sr-act-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.sr-act-group{border:1px solid var(--line-soft);border-left:4px solid var(--c);border-radius:10px;background:var(--bg-soft);padding:10px 12px}
.sr-act-group h4{margin:0 0 6px;font-size:12.5px;font-weight:650;color:var(--c);display:flex;align-items:center;gap:6px}
.sr-act-group h4 .n{margin-left:auto;font-size:11px;padding:1px 7px;border-radius:999px;color:var(--c);background:color-mix(in srgb,var(--c) 14%,transparent)}
.sr-act-group ul{list-style:none;margin:0;padding:0;display:grid;gap:5px}
.sr-act-group li{display:grid;grid-template-columns:auto 1fr;gap:1px 8px;font-size:12px;color:var(--ink)}
.sr-act-group li .q{text-align:right;font-weight:600;font-variant-numeric:tabular-nums;color:var(--c)}
.sr-act-group li.sr-act-item{display:block;padding:7px 0;border-top:1px solid var(--line-soft)}
.sr-act-group li.sr-act-item:first-child{border-top:0;padding-top:2px}
.sr-ai-top{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.sr-ai-sym{font-size:14px;font-weight:650;color:var(--ink)}
.sr-ai-rank{font-size:11px;font-weight:650;color:var(--c);border:1px solid color-mix(in srgb,var(--c) 45%,transparent);border-radius:999px;padding:0 6px}
.sr-ai-broker{font-size:11px;color:var(--muted)}
.sr-ai-qty{margin-left:auto;font-size:12.5px;font-weight:650;color:var(--c);font-variant-numeric:tabular-nums}
.sr-ai-bot{display:flex;align-items:center;gap:8px;margin-top:3px}
.sr-ai-facts{font-size:11px;color:var(--muted);flex:1;min-width:0}
.sr-ai-btn{flex:0 0 auto;background:none;border:1px solid var(--line);border-radius:999px;padding:2px 9px;font-size:11px;font-weight:650;color:var(--ink);cursor:pointer;white-space:nowrap}
.sr-ai-btn:hover{border-color:var(--c);color:var(--c)}
html[data-theme="dark"] .sr-ai-btn{color:#fff}
.sr-act-group li .r{grid-column:1/-1;font-size:12px;line-height:1.4;color:var(--ink-2)}
.sr-act-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.sr-act-head strong{font-size:13px}
.sr-col-score{width:65px;min-width:55px}
.sr-col-rating{width:95px;min-width:80px}
.sr-col-zone{width:145px;min-width:125px}
.sr-col-target{width:125px;min-width:110px}
.sr-col-synth{width:160px;min-width:130px}
.sr-col-comps{width:150px;min-width:140px}
.sr-col-pen{width:75px;min-width:65px}
.sr-col-act{width:85px;min-width:75px}
.sr-guide{padding:16px 20px;font-size:11.5px;color:var(--muted);background:var(--surface-2)}
.sr-guide-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}
.sr-guide-grid>div{padding:8px 10px;border-radius:10px;background:var(--surface);border:1px solid var(--line-soft);font-size:11px;color:var(--ink-2)}
.sr-guide-grid>div strong{display:block;margin-top:4px;font-size:10.5px;color:var(--muted);font-weight:600}
.sr-guide-inline{margin-top:8px;font-size:11.5px;color:var(--muted)}
.sr-guide-inline summary{cursor:pointer;font-weight:650;color:var(--ink-2);list-style:none;display:inline-flex;align-items:center;gap:4px}
.sr-guide-inline summary::-webkit-details-marker{display:none}
.sr-guide-inline summary::before{content:'▸';font-size:9px;color:var(--muted);transition:transform .15s ease}
.sr-guide-inline[open] summary::before{transform:rotate(90deg)}
.sr-guide-inline-body{margin-top:8px;padding:12px 14px;border-radius:10px;background:var(--surface-2);display:flex;flex-direction:column;gap:8px}
.sr-guide-table{font-size:11px}
.sr-guide-table th{font-size:9.5px;padding:6px 8px}
.sr-guide-table td{padding:7px 8px;color:var(--ink-2);line-height:1.4}
.sr-guide-table td:first-child{font-weight:650;color:var(--ink);white-space:nowrap}
.sr-guide-table td.c{font-weight:600;color:var(--muted);text-align:center}
.sr-broker-badge{font-size:11px;font-weight:600;padding:2px 7px;border-radius:6px;display:inline-block;line-height:1.2}
.sr-broker-badge.b-xtb{color:#dc2626;background:rgba(220,38,38,.12);border:1px solid rgba(220,38,38,.30)}
.sr-broker-badge.b-t212{color:#1e40af;background:rgba(30,58,138,.14);border:1px solid rgba(30,58,138,.32)}
.sr-broker-badge.b-degiro{color:#0284c7;background:rgba(2,132,199,.14);border:1px solid rgba(2,132,199,.32)}
.sr-broker-badge.b-ibkr{color:#b45309;background:rgba(217,119,6,.14);border:1px solid rgba(217,119,6,.32)}
.sr-broker-badge.b-other{color:var(--ink-2);background:var(--bg-soft);border:1px solid var(--line-soft)}
html[data-theme="dark"] .sr-broker-badge.b-xtb{color:#ff6b6b;background:rgba(255,107,107,.16);border-color:rgba(255,107,107,.40)}
html[data-theme="dark"] .sr-broker-badge.b-t212{color:#93c5fd;background:rgba(147,197,253,.16);border-color:rgba(147,197,253,.40)}
html[data-theme="dark"] .sr-broker-badge.b-degiro{color:#67e8f9;background:rgba(103,232,249,.16);border-color:rgba(103,232,249,.40)}
html[data-theme="dark"] .sr-broker-badge.b-ibkr{color:#fbbf24;background:rgba(251,191,36,.16);border-color:rgba(251,191,36,.40)}
.sr-addbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;background:var(--bg-soft);padding:12px 14px;border-radius:12px;border:1px solid var(--line-soft);margin-top:10px}
.sr-addbar input{min-height:34px;padding:7px 10px;font-size:12px;border-radius:9px}
.sr-pos{color:var(--sr-pos)!important}.sr-neg{color:var(--sr-neg)!important}
/* Stock detail modal */
.sr-modal{position:fixed;inset:0;background:rgba(10,10,12,.62);z-index:99990;display:grid;place-items:center;padding:16px;backdrop-filter:blur(4px)}
.sr-modal-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;max-width:720px;width:100%;max-height:90vh;overflow-y:auto;padding:22px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:16px}
.sr-modal-head{display:flex;gap:16px;align-items:center;padding-bottom:14px;border-bottom:1px solid var(--line-soft)}
.sr-modal-head .meta{flex:1;min-width:0}
.sr-modal-head h3{margin:0;font-size:20px;letter-spacing:-.02em;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sr-modal-head p{margin:3px 0 0;font-size:12px;color:var(--muted)}
.sr-x{border:none;background:var(--bg-soft);color:var(--muted);width:34px;height:34px;border-radius:9px;font-size:18px;display:grid;place-items:center;align-self:flex-start}
.sr-section-t{font-size:10.5px;font-weight:650;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:8px}.fin-card .sr-section-t{color:var(--ink)}
.sr-bars{display:grid;gap:10px}
.sr-bar-row{display:grid;grid-template-columns:150px 1fr 48px;gap:10px;align-items:center}
.sr-bar-row .lbl{font-size:12px;font-weight:650;color:var(--ink)}
.sr-bar-row .lbl small{display:block;font-size:10.5px;font-weight:500;color:var(--muted);margin-top:1px;line-height:1.3}
.sr-bar-track{height:8px;border-radius:999px;background:var(--sr-track);overflow:hidden}
.sr-bar-fill{height:100%;border-radius:999px;background:var(--sr-forming)}
.sr-bar-row .val{font-size:12px;font-weight:650;text-align:right;font-variant-numeric:tabular-nums;color:var(--ink)}
.sr-bar-row .val small{color:var(--muted);font-weight:500}
.sr-bars.compact{grid-template-columns:1fr 1fr;gap:6px 18px}
.sr-bars.compact .sr-bar-row{grid-template-columns:140px 1fr 34px;gap:8px}
.sr-bars.compact .sr-bar-track{height:4px}
.sr-bars.compact .sr-bar-row .lbl{font-size:11px}
.sr-bars.compact .sr-bar-row .lbl small{font-size:10px}
.sr-bars.compact .sr-bar-row .val{font-size:10.5px}
.sr-pen{padding:10px 12px;border-radius:10px;background:var(--sr-neg-bg);border:1px solid var(--sr-neg-line);font-size:12px;color:var(--ink)}
.sr-pen ul{margin:6px 0 0;padding-left:18px}
.sr-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.sr-facts>div{padding:9px 11px;border-radius:10px;background:var(--bg-soft);border:1px solid var(--line-soft)}
.sr-facts span{display:block;font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;font-weight:650}
.sr-facts strong{display:block;margin-top:3px;font-size:13px;font-variant-numeric:tabular-nums}
.sr-modal-foot{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;border-top:1px solid var(--line-soft);padding-top:12px}
.sr-form{margin-top:16px;padding:16px;border-radius:14px;background:var(--bg-soft);border:1px solid var(--line-soft);display:flex;flex-direction:column;gap:12px}
.sr-form-head{display:flex;flex-direction:column;gap:3px}
.sr-form-head strong{font-size:13px;color:var(--ink)}
.sr-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px}
.sr-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.sr-field>span{font-size:10.5px;font-weight:650;color:var(--muted)}
.sr-field input{width:100%;min-height:36px;padding:7px 10px;font-size:12.5px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.sr-field input:focus{outline:2px solid var(--sr-ai-line);outline-offset:1px}
.sr-field-wide{grid-column:span 2}
.sr-resolve{font-size:10.5px;color:var(--muted);line-height:1.35}
.sr-resolve.ok{color:var(--sr-strong)}.sr-resolve.warn{color:var(--sr-monitor)}
.sr-c-toggle{display:inline-flex;border-radius:7px;background:var(--bg-soft);border:1px solid var(--line);padding:2px;gap:2px}
.sr-toggle-btn{padding:2px 8px;font-size:10.5px;font-weight:600;border-radius:5px;border:none;background:transparent;color:var(--muted);cursor:pointer;transition:all .15s}
.sr-toggle-btn:hover{color:var(--ink)}
.sr-toggle-btn.active{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
html[data-theme="dark"] .sr-toggle-btn.active{background:#232428;color:#f0f0f2}
.sr-closed{margin-top:14px;border-top:1px solid var(--line-soft);padding-top:10px}
.sr-closed summary{cursor:pointer;font-size:12px;font-weight:600;color:var(--ink-2);padding:6px 0;min-height:32px}
.sr-alloc{display:grid;gap:10px}
.sr-alloc-row{display:grid;grid-template-columns:60px 1fr;gap:10px;align-items:center}
.sr-alloc-row>b{font-size:11px;color:var(--muted);font-weight:600}
.sr-alloc-bar{display:flex;height:14px;border-radius:999px;overflow:hidden;background:var(--sr-track)}
.sr-alloc-bar i{display:block;height:100%;min-width:2px;border-right:2px solid var(--surface)}
.sr-alloc-bar i:last-child{border-right:0}
.sr-legend{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:4px;font-size:10.5px;color:var(--ink-2)}
.sr-legend span{display:inline-flex;align-items:center;gap:5px}
.sr-legend span::before{content:"";width:9px;height:9px;border-radius:3px;background:var(--c)}
.sr-two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.sr-notes{display:grid;gap:8px}
.sr-note{padding:10px 12px;border-radius:10px;border:1px solid var(--line-soft);background:var(--bg-soft);font-size:12px;color:var(--ink);line-height:1.45}
.sr-note strong{display:block;margin-bottom:2px}
.sr-note.warn{background:var(--sr-monitor-bg);border-color:var(--sr-monitor-line)}
.sr-note.info{background:var(--sr-ai-bg);border-color:var(--sr-ai-line)}
.sr-note.ok{background:var(--sr-strong-bg);border-color:var(--sr-strong-line)}
.sr-num{font-variant-numeric:tabular-nums}
.sr-ccy{display:block;font-weight:inherit;font-variant-numeric:tabular-nums;white-space:nowrap}
.sr-actions.wrap{flex-wrap:wrap;justify-content:flex-end;max-width:210px;margin-left:auto}
.sr-facts strong .sr-pill{display:inline-flex;text-transform:none;letter-spacing:0;font-size:11px;font-weight:600;margin-top:2px}
.sr-criteria{display:grid;gap:8px}
.sr-crit{display:flex;gap:10px;align-items:flex-start;padding:9px 11px;border-radius:10px;border:1px solid var(--line-soft);background:var(--bg-soft)}
.sr-crit-ic{flex:0 0 22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:650}
.sr-crit.ok .sr-crit-ic{background:var(--sr-strong-bg);color:var(--sr-strong)}
.sr-crit.fail .sr-crit-ic{background:var(--sr-neg-bg);color:var(--sr-neg)}
.sr-crit-l{font-size:12px;font-weight:650;color:var(--ink)}
.sr-qbars{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;align-items:end;margin:6px 0 8px}
.sr-qbar{display:flex;flex-direction:column;align-items:center;gap:3px}
.sr-qcol{width:100%;max-width:44px;display:flex;flex-direction:column}
.sr-qpos,.sr-qneg{height:48px;display:flex;justify-content:center}
.sr-qpos{align-items:flex-end;border-bottom:1px solid var(--line)}
.sr-qneg{align-items:flex-start}
.sr-qpos i,.sr-qneg i{display:block;width:100%;border-radius:4px}
.sr-qpos i{background:var(--sr-strong)}.sr-qneg i{background:var(--sr-neg)}
.sr-qbar b{font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--ink)}
.sr-qbar span{font-size:10px;color:var(--muted);font-weight:600}
@media(max-width:1000px){.sr-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sr-two{grid-template-columns:1fr}}
@media(max-width:480px){.sr-form-grid{grid-template-columns:1fr}.sr-field-wide{grid-column:auto}}
@media(max-width:1000px){.sr-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sr-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
  .sr-toolbar{flex-direction:column;align-items:stretch}
  .sr-filters{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
  .sr-filters::-webkit-scrollbar{display:none}
  .sr-filter{flex:0 0 auto}
  .sr-search{width:100%}
  .sr-toolbar-right{width:100%}.sr-toolbar-right .sr-search{flex:1 1 160px;width:auto!important;min-width:0}
  .sr-bar-row{grid-template-columns:1fr 48px}.sr-bar-row .sr-bar-track{grid-column:1/-1;grid-row:2}
  .sr-bars.compact{grid-template-columns:1fr}
  .sr-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sr-modal-card{padding:16px}
}
@media(max-width:720px){
  .sr-table.cards{min-width:0!important}
  .sr-table.cards thead{display:none}
  .sr-table.cards,.sr-table.cards tbody{display:block}
  .sr-table.cards tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;padding:12px 2px;border-bottom:1px solid var(--line-soft)}
  .sr-table.cards tbody tr:hover{background:none}
  .sr-table.cards tbody td{display:block;padding:0;border:0;text-align:left!important;min-width:0}
  .sr-table.cards td[data-label]::before{content:attr(data-label);display:block;font-size:9.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-bottom:2px}
  .sr-table.cards td.full,.sr-table.cards td.sr-empty{grid-column:1/-1}
  .sr-table.cards .sr-sub{text-align:left!important;max-width:none;white-space:normal}
  .sr-table.cards .sr-actions.wrap{max-width:none;justify-content:flex-start;margin:0}
}
@media(max-width:480px){.sr-kpis{grid-template-columns:1fr 1fr}.sr-kpis .metric-card strong{font-size:16px}.sr-guide-grid{grid-template-columns:1fr}}
.sr-ai-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:640px){.sr-ai-grid{grid-template-columns:1fr}}
@media(pointer:coarse){.sr-btn,.sr-filter,.sr-search,.sr-field input,.sr-closed summary{min-height:44px}.sr-x{width:44px;height:44px}}
@media(prefers-reduced-motion:reduce){.sr-table tbody tr,.sr-btn,.sr-filter{transition:none}}

/* ── CALM THEME (v13) ─────────────────────────────────────────────────────────────────────
   Sober, neutral look for the whole app: muted status colours, one neutral card style (no
   glows, no thick coloured borders), a colourless product menu and lighter bold text. Kept as
   one override layer at the end so the older rules above stay untouched. */
html[data-theme="dark"]{
  --bg:#111113;--bg-soft:#161618;--surface:#18181b;--surface-2:#1f1f23;
  --ink:#f5f5f7;--ink-2:#dcdce0;--muted:#8d8d95;--muted-2:#6f6f76;
  --line:#2a2a2f;--line-soft:#232327;--black:#111113;
  --green:#4ade80;--green-bg:rgba(74,222,128,.12);--green-line:rgba(74,222,128,.32);
  --red:#ff6b6b;--red-bg:rgba(255,107,107,.12);--red-line:rgba(255,107,107,.34);
  --terracotta:#cf946c;--terracotta-bg:rgba(207,148,108,.10);--terracotta-line:rgba(207,148,108,.26);
  --amber:#fbbf24;--amber-bg:rgba(251,191,36,.12);--amber-line:rgba(251,191,36,.30);
  --accent-day:#a9b4ff;--accent-day-glow:transparent;--accent-day-bg:rgba(169,180,255,.08);--accent-day-line:rgba(169,180,255,.30);
  --accent-swing:#eba06a;--accent-swing-glow:transparent;--accent-swing-bg:rgba(235,160,106,.08);--accent-swing-line:rgba(235,160,106,.30);
  --accent-intra:#62d0d6;--accent-intra-glow:transparent;--accent-intra-bg:rgba(98,208,214,.08);--accent-intra-line:rgba(98,208,214,.30);
  --blue-live:#83a9cc;--blue-live-glow:transparent;--blue-live-bg:rgba(131,169,204,.09);--blue-live-line:rgba(131,169,204,.28);
  --sr-strong:#4ade80;--sr-strong-bg:rgba(74,222,128,.12);--sr-strong-line:rgba(74,222,128,.32);
  --sr-forming:#7ab5b8;--sr-forming-bg:rgba(122,181,184,.10);--sr-forming-line:rgba(122,181,184,.28);
  --sr-monitor:#fbbf24;--sr-monitor-bg:rgba(251,191,36,.12);--sr-monitor-line:rgba(251,191,36,.30);
  --sr-avoid:#8f949c;--sr-avoid-bg:rgba(143,148,156,.10);--sr-avoid-line:rgba(143,148,156,.26);
  --sr-neg:#ff6b6b;--sr-neg-bg:rgba(255,107,107,.12);--sr-neg-line:rgba(255,107,107,.34);
  --sr-pos:#4ade80;
  --sr-ai:#98a5cf;--sr-ai-bg:rgba(152,165,207,.10);--sr-ai-line:rgba(152,165,207,.28);
  --sr-track:rgba(255,255,255,.08);
  /* Box top-line colours for boxes that aren't about one trading type. */
  --accent-crypto:#d6b560;--accent-stock:#62c495;--accent-forex:#b39ce8;--accent-system:#95a1b8;
  --shadow:none;--shadow-sm:none;
}
strong,b{font-weight:600}

/* One card style: thin neutral border, no glow. */
html body .card-accent-white,html body .card-accent-neutral,html body .card-accent-grey,
html body .card-accent-day,html body .card-accent-swing,html body .card-accent-intra,
html[data-theme="dark"] body .card-accent-white,html[data-theme="dark"] body .card-accent-neutral,html[data-theme="dark"] body .card-accent-grey,
html[data-theme="dark"] body .card-accent-day,html[data-theme="dark"] body .card-accent-swing,html[data-theme="dark"] body .card-accent-intra{
  border:1px solid var(--line)!important;background:var(--surface)!important}
html body .radar-card.day-radar,html body .radar-card.swing-radar,html body .radar-card.intra-radar,
html[data-theme="dark"] body .radar-card.day-radar,html[data-theme="dark"] body .radar-card.swing-radar,html[data-theme="dark"] body .radar-card.intra-radar{background:var(--surface)!important;border:1px solid var(--line)!important}
.metric-card,.panel{box-shadow:none}
.sr-hero::before{display:none}

/* Product menu: no colour per product; the active one is simply darker. */
html body .nav-product-header[data-product],html[data-theme="dark"] body .nav-product-header[data-product]{
  color:var(--muted)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important}
html body .nav-product-header[data-product] .nav-icon,html[data-theme="dark"] body .nav-product-header[data-product] .nav-icon{color:inherit!important}
html body .nav-product-header[data-product]:hover,html[data-theme="dark"] body .nav-product-header[data-product]:hover{color:var(--ink)!important;background:var(--surface-2)!important}
html body .nav-product-header[data-product].active,html[data-theme="dark"] body .nav-product-header[data-product].active{
  color:var(--ink)!important;background:var(--surface-2)!important;border-color:var(--line)!important}
html body .nav-product-header[data-product] .nav-soon-badge,html[data-theme="dark"] body .nav-product-header[data-product] .nav-soon-badge{
  background:transparent!important;color:var(--muted)!important;border:1px solid var(--line)!important;font-weight:600!important}
html[data-theme="dark"] body .top-navbar{background:var(--surface)}
html body .top-nav-links button.active,html[data-theme="dark"] body .top-nav-links button.active{background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);color:var(--ink)}

/* Pills and chips: quiet tints of the (now muted) status colours. */
html body .pill{background:var(--surface-2);color:var(--muted)}
html[data-theme="dark"] body .pill.off,html[data-theme="dark"] body .pill.fail,html[data-theme="dark"] body .attempt-chip.fail{
  border-color:var(--red-line)!important;color:var(--red)!important;background:var(--red-bg)!important;font-weight:600!important}
html[data-theme="dark"] body .attempt-direction-short{color:var(--red)!important;font-weight:600!important}
.sr-act-chip{font-weight:600}
.sr-table thead th{font-weight:600;letter-spacing:.05em}
/* Broker badges: the name already says which broker — no colour needed. */
html body .sr-broker-badge[class],html[data-theme="dark"] body .sr-broker-badge[class]{color:var(--ink-2);background:var(--surface-2);border:1px solid var(--line)}

/* Every box gets a 2px coloured line on top: the trading type's colour when the box is about
   one (Intraday / Day / Swing), otherwise the colour of the section it lives in. */
main section.tab{--box-accent:var(--accent-crypto)}
main section.tab[id^="stock"]{--box-accent:var(--accent-stock)}
main section#logs{--box-accent:var(--accent-system)}
main section#forexPlaceholder{--box-accent:var(--accent-forex)}
.sr-modal{--box-accent:var(--accent-stock)}
.card-accent-intra,.radar-card.intra-radar{--box-accent:var(--accent-intra)}
.card-accent-day,.radar-card.day-radar{--box-accent:var(--accent-day)}
.card-accent-swing,.radar-card.swing-radar{--box-accent:var(--accent-swing)}
html[data-theme="dark"] body :is(.panel,.metric-card,.radar-card,.broker-panel,.stats-card,.sr-notes>.sr-note,.sr-modal-card){
  box-shadow:inset 0 2px 0 var(--box-accent,var(--accent-system))!important}
/* The action groups (Reduzir / Acumular / Novas compras / Reserva) use the same top line. */
.sr-act-group{border-left:1px solid var(--line-soft);box-shadow:inset 0 2px 0 var(--c)}
/* Metric cards use the top line like every other box, not a coloured frame. */
html[data-theme="dark"] body .metric-card[class*="k-"]{border-color:var(--line)!important}
/* Carteira: the Ações and ETFs groups each get their own colour — a tinted header and a thin
   bar down the left of every row in the group — so the two are told apart at a glance. */
:root{--grp-stock:#38bdf8;--grp-etf:#c084fc}
#stockPortfolioTableBody{--grp:var(--grp-stock)}
#stockPortfolioTableBody tr.sr-group-row.g-etf,#stockPortfolioTableBody tr.sr-group-row.g-etf~tr{--grp:var(--grp-etf)}
#stockPortfolioTableBody tr.sr-group-row td{background:color-mix(in srgb,var(--grp) 16%,var(--surface))!important;color:var(--grp);font-size:13.5px;font-weight:650;padding:10px 12px;border-top:1px solid color-mix(in srgb,var(--grp) 40%,transparent);border-bottom:1px solid color-mix(in srgb,var(--grp) 40%,transparent);border-left:4px solid var(--grp)!important}
#stockPortfolioTableBody tr.sr-group-row td span{color:var(--ink-2)}
#stockPortfolioTableBody tr:not(.sr-group-row) td:first-child{border-left:4px solid color-mix(in srgb,var(--grp) 75%,transparent)!important}
#stockPortfolioTableBody tr.sr-group-row.g-etf td{border-top:18px solid var(--surface)!important;background-clip:padding-box}

/* ── Mobile fixes (review at 390px) ── */
html[data-theme="dark"] body .card-fold{background:var(--surface-2);color:var(--muted);border-color:var(--line)}
@media(max-width:900px){.comparison-variants{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.comparison-variants{grid-template-columns:1fr}}
@media(max-width:720px){
  .sr-filters{max-width:100%;min-width:0}
  .sr-toolbar{min-width:0;max-width:100%}
  .sr-cash-bar select{max-width:100%!important}
  /* Card layout: the group header spans the whole card, and the group colour bar sits on the
     card's left edge instead of on its first cell. */
  .sr-table.cards tbody tr.sr-group-row{display:block;padding:0}
  .sr-table.cards tbody tr.sr-group-row td{display:block;padding:10px 12px}
  #stockPortfolioTableBody tr:not(.sr-group-row){border-left:4px solid color-mix(in srgb,var(--grp) 75%,transparent);padding-left:10px}
  #stockPortfolioTableBody tr:not(.sr-group-row) td:first-child{border-left:0!important}
}
.sr-strat-tag{display:inline-block;font-size:11px;font-weight:600;color:var(--ink-2);border:1px solid var(--line);border-radius:999px;padding:2px 10px;background:var(--surface-2)}

/* ── My Finances ── */
:root{--accent-finance:#a78bfa}
main section#finHistory,main section#finPortfolio,main section#finDashboard{--box-accent:var(--accent-finance)}
body.not-owner .finance-only{display:none!important}
.fin-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:12px}
.fin-kpi{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface-2);display:flex;flex-direction:column;gap:2px}
.fin-kpi span{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:600}
.fin-kpi strong{font-size:16px;color:var(--ink)}
.fin-kpi small{font-size:11px;color:var(--muted)}
.fin-kpi .fin-kpi-usd{display:block;font-size:12px;font-style:normal;font-weight:600;color:var(--ink-2);margin-top:2px}
.fin-filters{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.fin-selects{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.fin-selects select{width:auto!important;padding:6px 10px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:12.5px}
.fin-selects .sr-search{flex:1;min-width:160px}
.fin-act{display:inline-block;font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:999px;border:1px solid var(--line);white-space:nowrap}
.fin-act.fin-in{color:var(--accent-day);border-color:var(--accent-day-line);background:var(--accent-day-bg)}
.fin-act.fin-out{color:var(--amber);border-color:var(--amber-line);background:var(--amber-bg)}
.fin-act.fin-gain{color:var(--green);border-color:var(--green-line);background:var(--green-bg)}
.fin-act.fin-cost{color:var(--red);border-color:var(--red-line);background:var(--red-bg)}
.fin-act.fin-neutral{color:var(--muted)}
.fin-notes{font-size:11.5px;color:var(--muted);max-width:260px;white-space:normal}
.fin-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;font-size:12px;color:var(--muted)}
.sr-filter:disabled{opacity:.45;cursor:not-allowed}
.fin-muted{color:var(--muted);text-transform:none;letter-spacing:0;font-weight:500}
.fin-note{font-size:11.5px;color:var(--muted);margin:10px 0 0}
.fin-alloc{display:flex;flex-direction:column;gap:10px}
.fin-alloc-row{display:grid;grid-template-columns:130px 1fr 150px 150px 110px;align-items:center;gap:12px;font-size:13px}
.fin-alloc-name{font-weight:600;color:var(--ink)}
.fin-alloc-bar{position:relative;height:8px;border-radius:999px;background:var(--sr-track)}
.fin-alloc-fill{position:absolute;inset:0 auto 0 0;border-radius:999px}
.fin-alloc-target{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--ink);border-radius:2px}
.fin-c-etf{background:var(--fin-etf)}.fin-c-stock{background:var(--fin-stock)}.fin-c-crypto{background:var(--fin-crypto)}.fin-c-fund{background:var(--fin-fund)}.fin-c-cash{background:var(--fin-cash)}
.fin-alloc-num strong{color:var(--ink)}.fin-alloc-num span{color:var(--muted);font-size:11.5px}
.fin-alloc-gap{font-size:12px;color:var(--muted)}.fin-alloc-gap.under{color:var(--accent-day)}.fin-alloc-gap.over{color:var(--amber)}
.fin-alloc-val{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink-2)}
.fin-alloc-ppr{font-size:12.5px;color:var(--muted);border-top:1px solid var(--line-soft);padding-top:8px}
.fin-group td{font-weight:650}
@media(max-width:720px){.fin-alloc-row{grid-template-columns:1fr 1fr;gap:4px 10px}.fin-alloc-bar{grid-column:1/-1;order:3}.fin-alloc-val{text-align:left}}
/* Validated categorical order for asset classes (dark surface): ETFs, Ações, Fundos, PPR, Liquidez, Crypto */
:root{--fin-etf:#3987e5;--fin-stock:#d95926;--fin-fund:#199e70;--fin-ppr:#c98500;--fin-cash:#d55181;--fin-crypto:#008300;--fin-neutral:#8e8e96;--fin-income:#199e70}
.fin-dash-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}
.fin-card{padding:16px 18px}
.fin-wide{grid-column:1/-1}
.fin-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:11.5px;color:var(--ink-2);margin-bottom:10px}
.fin-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.fin-cols{display:flex;align-items:flex-end;gap:3px;height:170px;padding-bottom:18px;border-bottom:1px solid var(--line-soft)}
.fin-col{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;position:relative;cursor:default;outline:none}
.fin-col:hover .fin-col-stack,.fin-col:focus .fin-col-stack{filter:brightness(1.2)}
.fin-col-stack{display:flex;flex-direction:column-reverse;gap:2px;min-height:0;border-radius:4px 4px 0 0;overflow:hidden}
.fin-col-stack span{display:block;min-height:1px}
.fin-col-x{position:absolute;bottom:-17px;left:50%;transform:translateX(-50%);font-size:10px;color:var(--muted);white-space:nowrap}
.fin-hbars{display:flex;flex-direction:column;gap:8px}
.fin-hbar{display:grid;grid-template-columns:minmax(80px,120px) 1fr auto;align-items:center;gap:5px;font-size:12.5px;outline:none}
.fin-hbar:hover .fin-hbar-f,.fin-hbar:focus .fin-hbar-f{filter:brightness(1.2)}
.fin-hbar-l{color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fin-hbar-t{height:10px;background:var(--sr-track);border-radius:4px;overflow:hidden}
.fin-hbar-f{display:block;height:100%;border-radius:0 4px 4px 0}
.fin-hbar-v{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink);font-weight:600;white-space:nowrap}
.fin-hbar-v small{display:block;font-weight:500;color:var(--muted);font-size:11px}
@media(max-width:560px){.fin-dash-grid{grid-template-columns:1fr}.fin-hbar{grid-template-columns:90px 1fr auto}.fin-hbars.below .fin-hbar{grid-template-columns:min(var(--fin-label-w,90px),90px) 1fr!important;column-gap:10px}}

/* Owner positions come from the My Finances ledger (monthly import): no manual edits here. */
body.ledger-managed .manual-pos{display:none!important}
.sr-ledger-note{display:none;margin:8px 0 0;font-size:12.5px;color:var(--ink-2)}
body.ledger-managed .sr-ledger-note{display:block}

/* Each product menu has its own vivid colour (the submenu items stay neutral). The same colour
   is the top line of that product's boxes. */
html body .nav-product-header[data-product="finance"],html[data-theme="dark"] body .nav-product-header[data-product="finance"]{--prod:var(--accent-finance)}
html body .nav-product-header[data-product="crypto"],html[data-theme="dark"] body .nav-product-header[data-product="crypto"]{--prod:#fbbf24}
html body .nav-product-header[data-product="stock"],html[data-theme="dark"] body .nav-product-header[data-product="stock"]{--prod:#4ade80}
html body .nav-product-header[data-product="forex"],html[data-theme="dark"] body .nav-product-header[data-product="forex"]{--prod:#f472b6}
html body .nav-product-header[data-product="system"],html[data-theme="dark"] body .nav-product-header[data-product="system"]{--prod:#38bdf8}
html body .nav-product-header[data-product],html[data-theme="dark"] body .nav-product-header[data-product]{
  color:var(--ink)!important;border:1px solid transparent!important;background:transparent!important}
html body .nav-product-header[data-product] .nav-icon,html[data-theme="dark"] body .nav-product-header[data-product] .nav-icon{
  color:var(--prod)!important}
html body .nav-product-header[data-product]:hover,html[data-theme="dark"] body .nav-product-header[data-product]:hover{
  color:#ffffff!important;background:rgba(255,255,255,0.06)!important;border-color:var(--line-soft)!important}
html body .nav-product-header[data-product].active,html[data-theme="dark"] body .nav-product-header[data-product].active{
  color:#ffffff!important;background:rgba(255,255,255,0.08)!important;border-color:var(--line)!important}
:root,html[data-theme="dark"]{--accent-crypto:#fbbf24;--accent-stock:#4ade80;--accent-system:#38bdf8;--accent-forex:#f472b6}
.fin-alloc-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.fin-alloc-num:has(.fin-target-in){white-space:nowrap}
.fin-target-in{width:48px!important;padding:3px 6px;border-radius:6px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:12.5px;text-align:right}
.fin-targets-bar{display:flex;align-items:center;justify-content:flex-end;gap:8px;border-top:1px solid var(--line-soft);padding-top:10px}
.fin-targets-bar span{margin-right:auto;font-size:12.5px}
.fin-targets-bar span.ok{color:var(--green)}.fin-targets-bar span.bad{color:var(--amber)}
.fin-total-row td{border-top:1px solid var(--line)!important;background:var(--surface-2)}
.sr-where{border:1px solid color-mix(in srgb,var(--accent-stock) 30%,var(--line));border-radius:16px;padding:16px 16px 14px;margin:4px 0 14px;background:color-mix(in srgb,var(--accent-stock) 3%,transparent)}
.sr-where-head{margin:0 0 12px}
.sr-where-head p{margin:4px 0 0;font-size:12.5px;color:var(--ink-2);max-width:900px}
.fin-span2{grid-column:span 2}
@media(max-width:1100px){.fin-span2{grid-column:1/-1}}
.fin-donut{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.fin-donut svg{width:150px;height:150px;flex:none}
.fin-arc{outline:none;cursor:default;transition:filter .15s}.fin-arc:hover,.fin-arc:focus{filter:brightness(1.25)}
.fin-donut-c{fill:var(--ink);font-size:13px;font-weight:700}
.fin-donut-s{fill:var(--muted);font-size:8.5px}
.fin-donut-leg{flex:1;min-width:170px;display:flex;flex-direction:column;gap:7px}
.fin-leg-row{display:grid;grid-template-columns:10px 1fr auto;column-gap:8px;align-items:center;font-size:12.5px}
.fin-leg-row i{width:10px;height:10px;border-radius:3px}
.fin-leg-row span{color:var(--ink-2)}
.fin-leg-row strong{color:var(--ink);text-align:right}
.fin-leg-row small{grid-column:2/-1;color:var(--muted);font-size:11px;margin-top:-3px}
.fin-leg-row small b{font-weight:600}.fin-leg-row b.fin-over{color:var(--amber)}.fin-leg-row b.fin-under{color:#6aa9ff}
.fin-leg-note{font-size:11px;color:var(--muted);margin-bottom:2px}
.fin-jump{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.fin-jump a{font-size:12px;font-weight:600;color:var(--ink-2);text-decoration:none;padding:5px 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2)}
.fin-jump a:hover{color:var(--ink);border-color:var(--accent-finance)}
.fin-sec-h{margin:26px 2px 10px;padding-left:12px;border-left:3px solid var(--sec);scroll-margin-top:90px}
.fin-sec-h h3{margin:0;font-size:15px;color:var(--ink)}
.fin-sec-h p{margin:2px 0 0;font-size:12px;color:var(--muted)}
.fin-sec-kpis{padding:12px 14px}.fin-sec-kpis .fin-kpis{margin:0}

.fin-leg-row span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:root{--roi-total:#a78bfa;--roi-year:#38bdf8}
.fin-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0 12px}
.fin-tab{font:inherit;font-size:12.5px;font-weight:600;color:var(--ink-2);padding:7px 14px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);cursor:pointer}
.fin-tab:hover{color:var(--ink)}
.fin-tab.active{color:var(--ink);border-color:var(--accent-finance);background:color-mix(in srgb,var(--accent-finance) 16%,transparent)}
.fin-pane[hidden]{display:none!important}
.fin-cols{height:130px}
.fin-roi{display:flex;flex-direction:column;gap:10px}
.fin-roi-row{display:grid;grid-template-columns:62px 1fr;gap:10px;align-items:center;font-size:12.5px;outline:none}
.fin-roi-row.is-total .fin-roi-l{color:var(--ink);font-weight:700}
.fin-roi-l{color:var(--ink-2)}
.fin-roi-bars{display:flex;flex-direction:column;gap:3px}
.fin-roi-b{display:flex;align-items:center;gap:6px;min-width:0}
.fin-roi-t{flex:1;height:7px;background:var(--sr-track);border-radius:4px;overflow:hidden;vertical-align:middle}
.fin-roi-f{display:block;height:100%;border-radius:0 4px 4px 0}
.fin-roi-bars b{display:inline-block;width:58px;text-align:right;font-size:11.5px;font-weight:600;color:var(--ink)}
.fin-roi-row:hover .fin-roi-f,.fin-roi-row:focus .fin-roi-f{filter:brightness(1.2)}
.fin-card{padding:14px 16px}
.fin-donut svg{width:130px;height:130px}
.fin-hbars{gap:6px}
.fin-yr{display:flex;gap:10px;align-items:stretch;padding-top:4px}
.fin-yr-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:4px;outline:none;cursor:default}
.fin-yr-col>b{font-size:12px;font-weight:700}
.fin-yr-plot{width:100%;height:130px;display:flex;flex-direction:column}
.fin-yr-pos,.fin-yr-neg{display:flex;justify-content:center}
.fin-yr-pos{align-items:flex-end;border-bottom:1px solid var(--line)}
.fin-yr-neg{align-items:flex-start}
.fin-yr-pos span,.fin-yr-neg span{display:block;width:min(46px,70%);background:var(--green)}
.fin-yr-pos span{border-radius:4px 4px 0 0}
.fin-yr-neg span{background:var(--red);border-radius:0 0 4px 4px}
.fin-yr-col:hover span,.fin-yr-col:focus span{filter:brightness(1.2)}
.fin-yr-x{font-size:11.5px;color:var(--ink-2);font-weight:600}
.fin-yr-col small{font-size:10.5px;color:var(--muted);white-space:nowrap}
.fin-ai{padding:16px 20px;margin-top:14px}
.fin-ai-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.fin-ai-desc{margin:10px 0 0;font-size:13px;line-height:1.55;color:var(--ink)}
.fin-ai-text{margin:10px 0 0;font-size:12.5px;line-height:1.55;color:var(--ink-2)}
.fin-ai-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:10px}
.fin-ai-col{border:1px solid var(--line-soft);border-radius:10px;padding:10px 12px;background:var(--surface-2);font-size:12.5px}
.fin-ai-col ul{margin:6px 0 0;padding-left:18px;color:var(--ink-2);line-height:1.5}
.fin-asset-modal{--box-accent:var(--accent-finance)}
.fin-asset-modal .sr-modal-card{max-width:860px}
.fin-pc{position:relative}
.fin-pc svg{width:100%;height:auto;display:block;overflow:visible}
.fin-pc-grid text{fill:var(--muted);font-size:10px}
.fin-pc-grid line{stroke:var(--line-soft);stroke-width:1}
.fin-pc-line{fill:none;stroke:var(--roi-total);stroke-width:2;vector-effect:non-scaling-stroke}
.fin-pc-mark{outline:none}.fin-pc-mark.buy{fill:var(--green)}.fin-pc-mark.sell{fill:var(--red)}
.fin-pc-x{stroke:var(--muted);stroke-dasharray:3 3;vector-effect:non-scaling-stroke}
.fin-pc-dot{fill:var(--roi-total);stroke:var(--surface);stroke-width:2}
.fin-pc-lab{position:absolute;right:0;top:-22px;font-size:11.5px;color:var(--ink);font-weight:600}
#finRoiBody .sr-rowlink,#finPortBody .sr-rowlink{cursor:pointer}

/* ── Left sidebar menu ─────────────────────────────────────────────────────────────────
   Desktop: fixed sidebar (always visible while the page scrolls), products stacked with the
   active product's submenu opened right under it, user + logout at the foot. The top bar is
   not needed there. Mobile (≤900px): the same menu is the slide-in drawer opened from the
   top bar; the submenu also sits under its product. */
:root{--side-w:236px}
.nav-side-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:12px;border-top:1px solid var(--line-soft)}
.nav-side-foot .top-nav-actions{width:100%;justify-content:space-between}
.nav-side-foot .user-meta{min-width:0}
html body .top-nav-links .nav-side-foot .logout{width:auto!important;flex:0 0 auto!important;justify-content:center!important;padding:6px 11px!important;font-size:11px!important}
@media(min-width:901px){
  html body .top-navbar{display:none!important}
  html body .top-nav-links{position:fixed!important;top:0!important;left:0!important;bottom:0!important;right:auto!important;width:var(--side-w)!important;max-width:none!important;height:100vh!important;height:100dvh!important;
    flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-start!important;gap:4px!important;padding:16px 12px 14px!important;
    background:var(--surface)!important;border-right:1px solid var(--line)!important;box-shadow:none!important;overflow-y:auto!important;overflow-x:hidden!important;pointer-events:auto!important;z-index:60!important;transform:none!important;scrollbar-width:thin}
  html body .top-nav-links .mobile-drawer-header{display:flex!important;align-items:center;padding:2px 4px 14px!important;margin-bottom:8px!important;border-bottom:1px solid var(--line-soft)!important}
  html body .top-nav-links .mobile-drawer-close{display:none!important}
  html body .nav-product-headers{flex-direction:column!important;align-items:stretch!important;gap:4px!important;flex:0 0 auto!important}
  html body .top-nav-links button{width:100%!important;justify-content:flex-start!important;padding:8px 11px!important;font-size:12.5px!important}
  html body .nav-product-header{justify-content:flex-start!important}
  html body .nav-product-header .nav-group-chevron{margin-left:auto!important}
  html body .nav-product-items{flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-start!important;gap:2px!important;padding-left:8px!important;margin:2px 0 8px 14px!important;border-left:2px solid var(--line-soft)!important}
  html body .nav-product-items button{font-size:12px!important;padding:7px 10px!important}
  main{padding-top:0!important;margin-left:var(--side-w)!important;width:auto!important;max-width:calc(100% - var(--side-w))!important}
}
@media(max-width:900px){
  html body .top-nav-links .nav-side-foot{margin-top:auto;padding-top:12px}
  html body .top-nav-links .mobile-drawer-close{width:34px!important;height:34px!important;flex:0 0 34px!important;padding:6px!important;justify-content:center!important}
  html body .top-nav-links .mobile-drawer-close svg{width:18px;height:18px}
  html body .top-nav-links .mobile-drawer-header .brand{min-width:0}
  html body .top-nav-links .nav-side-foot .user-email{display:block!important}
}

/* My Finances on phones: grids never wider than the screen, compact charts, and the long
   tables keep only the columns that matter (tap a row for the full detail). */
.fin-dash-grid>*{min-width:0}
@media(max-width:560px){
  .fin-dash-grid{grid-template-columns:minmax(0,1fr)!important}
  .fin-card{padding:12px 12px 10px}
  .fin-yr{gap:3px}.fin-yr-col>b{font-size:10px}.fin-yr-x{font-size:10.5px}.fin-yr-col small{font-size:8.5px}.fin-yr-plot{height:110px}
  .fin-roi-row{grid-template-columns:52px 1fr}.fin-roi-bars b{width:50px;font-size:10.5px}
  .fin-donut{gap:10px}.fin-donut svg{width:110px;height:110px}.fin-donut-leg{min-width:0;flex:1 1 150px}
  .fin-hbar{grid-template-columns:minmax(70px,110px) 1fr auto!important;gap:6px}
  .fin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fin-tabs{gap:5px}.fin-tab{padding:6px 11px;font-size:12px}
  .fin-ai-head .sr-btn{width:100%}
  .fin-roi-table,.fin-year-table,#finPortBody{min-width:0!important}
  table.fin-roi-table{min-width:0!important;width:100%}
  table.fin-roi-table th:nth-child(n+2):nth-child(-n+10),table.fin-roi-table td:nth-child(n+2):nth-child(-n+10),table.fin-roi-table th:nth-child(n+14),table.fin-roi-table td:nth-child(n+14){display:none}
  table.fin-year-table{min-width:0!important;width:100%}
  table.fin-year-table th:nth-child(2),table.fin-year-table td:nth-child(2),table.fin-year-table th:nth-child(3),table.fin-year-table td:nth-child(3),table.fin-year-table th:nth-child(6),table.fin-year-table td:nth-child(6),table.fin-year-table th:nth-child(7),table.fin-year-table td:nth-child(7),table.fin-year-table th:nth-child(8),table.fin-year-table td:nth-child(8){display:none}
  table:has(#finPortBody){min-width:0!important;width:100%}
  table:has(#finPortBody) th:nth-child(n+2):nth-child(-n+3),#finPortBody tr:not(.fin-group) td:nth-child(n+2):nth-child(-n+3),table:has(#finPortBody) th:nth-child(6),#finPortBody tr:not(.fin-group) td:nth-child(6){display:none}
  .fin-alloc-row{grid-template-columns:1fr auto!important}
  table.fin-table{width:100%!important}
  table.fin-table th,table.fin-table td{padding-left:5px!important;padding-right:5px!important;font-size:12px}
  #finPortBody tr:not(.fin-group) td:first-child{width:100%;max-width:0}
  #finPortBody td:first-child strong,#finPortBody td:first-child .sr-sub{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #finPortBody td:nth-child(4),#finPortBody td:nth-child(5){white-space:nowrap}
  .fin-asset-modal .sr-modal-card{padding:14px}
  .fin-asset-modal .fin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.fin-tabs{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none}
.fin-tabs::-webkit-scrollbar{display:none}
.fin-tab{flex:0 0 auto;white-space:nowrap}
@media(max-width:560px){.fin-tabs{gap:4px}.fin-tab{padding:6px 9px!important;font-size:11.5px!important}}
.fin-roi-filters{display:flex;flex-direction:row;gap:8px;flex-wrap:wrap;align-items:center;margin:4px 0 10px}
.fin-roi-filters input,.fin-roi-filters select{font:inherit;font-size:12.5px;padding:6px 10px;border-radius:8px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink)}
.fin-roi-filters input{flex:1 1 180px;min-width:0}
th.fin-sort{cursor:pointer;user-select:none;white-space:nowrap}
th.fin-sort:hover,th.fin-sort.on{color:var(--ink)}
th.fin-sort i{font-style:normal;font-size:9px}

html body .fin-roi-filters input,html body .fin-roi-filters select{width:auto!important;height:34px!important;min-height:0!important;margin:0!important;box-sizing:border-box;flex:0 0 auto}
html body .fin-roi-filters input{flex:1 1 200px!important;max-width:320px}
#finDashKpis{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.fin-sec-kpis .fin-kpis{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
@media(max-width:560px){#finDashKpis,.fin-sec-kpis .fin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}html body .fin-roi-filters input{max-width:none}html body .fin-roi-filters select{flex:1 1 140px}}
.fin-yr-pos.fin-stack{flex-direction:column;justify-content:flex-end;align-items:center}
.fin-yr-pos.fin-stack span{border-radius:0}
.fin-yr-pos.fin-stack span:first-child{border-radius:4px 4px 0 0}
.fin-yr-pos.fin-stack span+span{margin-top:0}
#finDashKpis{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
@media(min-width:1200px){#finDashKpis{grid-template-columns:repeat(4,minmax(0,1fr))}}
.fin-yr-col>b{white-space:nowrap}
#finRoiBody tr.fin-total-row td{border-top:0!important;border-bottom:1px solid var(--line)!important}
.fin-ledger>span small{font-size:10px;text-transform:none;letter-spacing:0;color:var(--muted);font-weight:500;margin-left:4px}
.fin-ledger>div{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12px;line-height:1.55}
.fin-ledger>div em{font-style:normal;color:var(--ink-2)}
.fin-ledger>div b{font-weight:600;color:var(--ink);white-space:nowrap}
.fin-ledger>div.sum{border-top:1px dashed var(--line);margin-top:1px;padding-top:1px}
.fin-ledger>div.sum em,.fin-ledger>div.sum b{font-weight:700;color:var(--ink)}
.fin-ledger>div.net{border-top:1px solid var(--line);margin-top:2px;padding-top:3px;font-size:13px}
.fin-ledger>div.net em{color:var(--ink);font-weight:700}.fin-ledger>div.net b{font-weight:700}
@media(min-width:1200px){#finDashKpis{grid-template-columns:repeat(4,minmax(0,1fr))}.fin-sec-kpis .fin-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:560px){.fin-ledger{grid-column:1/-1}}

@media(max-width:560px){#finDashKpis,.fin-sec-kpis .fin-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.fin-ledger{grid-column:1/-1}}
@media(max-width:560px){#finDashKpis>.fin-kpi:first-child,.fin-sec-kpis .fin-kpis>.fin-kpi:first-child{grid-column:1/-1}}
.fin-brk{display:flex;gap:5px;flex-wrap:wrap;margin:0 0 8px}
.fin-brk-b{font:inherit;font-size:11.5px;font-weight:600;padding:4px 10px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink-2);cursor:pointer}
.fin-brk-b:hover{color:var(--ink)}
.fin-brk-b.on{color:var(--ink);border-color:var(--accent-finance);background:color-mix(in srgb,var(--accent-finance) 16%,transparent)}
.fin-brk-note{font-size:11.5px;color:var(--muted);align-self:center}
span.fin-brk-b{cursor:default}
#globalTooltipBubble.rich{max-width:290px;min-width:190px;padding:10px 12px;font-size:11.5px;line-height:1.4;background:#1d1f24;border:1px solid rgba(255,255,255,.12)}
#globalTooltipBubble .tt-t{font-weight:700;font-size:12.5px;margin-bottom:6px;color:#fff}
#globalTooltipBubble .tt-r{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:1px 0}
#globalTooltipBubble .tt-r span{color:#b8bcc6}
#globalTooltipBubble .tt-r b{font-weight:600;color:#fff;white-space:nowrap;font-variant-numeric:tabular-nums}
#globalTooltipBubble .tt-r b.tt-pos{color:#4ade80}#globalTooltipBubble .tt-r b.tt-neg{color:#f87171}
#globalTooltipBubble .tt-sep{height:1px;background:rgba(255,255,255,.14);margin:6px 0}
#globalTooltipBubble .tt-h{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#8b909b;margin:2px 0 3px}
#globalTooltipBubble .tt-n{margin-top:7px;font-size:10.5px;color:#9aa0ab;line-height:1.35}
.fin-perf{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-top:10px}
.fin-perf>div{border:1px solid var(--line-soft);border-radius:9px;padding:7px 10px;background:var(--surface-2);display:flex;flex-direction:column;gap:1px}
.fin-perf span{font-size:10.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.fin-perf b{font-size:14px}
.fin-perf small{font-size:11px;color:var(--ink-2)}
.fin-perf .fin-note{grid-column:1/-1;margin:0}
#finAssetSub a{color:var(--accent-finance)}
/* My Finances side menu: the Painel's kinds nested under "Painel geral" */
.nav-fin-sub{display:flex;flex-direction:column;gap:1px;margin:0 0 4px 16px;padding-left:8px;border-left:1px dashed var(--line-soft)}
html body .top-nav-links .nav-fin-sub button{font-size:11.5px!important;padding:5px 9px!important;min-height:0!important}
.nav-fin-sub button em{font-style:normal;font-size:9.5px;color:var(--muted);margin-left:4px;text-transform:uppercase;letter-spacing:.04em}
#finDashboard [hidden]{display:none!important}
.fin-sec-kpis .panel-title p{margin:2px 0 0}
.nav-fin-sub .nav-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-fin-sub .nav-icon{opacity:.8}

/* KPI row: three tiles + a wider two-column "rendimentos vs custos" box, all the same height */
.fin-ledger .lg-cols{display:grid;grid-template-columns:1fr 1fr;column-gap:22px;margin-top:2px}
.fin-ledger .lg-col{display:flex;flex-direction:column;min-width:0}
.fin-ledger .lg-col>div{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12px;line-height:1.5}
.fin-ledger .lg-col>div em{font-style:normal;color:var(--ink-2)}
.fin-ledger .lg-col>div b{font-weight:600;color:var(--ink);white-space:nowrap}
.fin-ledger .lg-col>div.sum{border-top:1px dashed var(--line);margin-top:1px;padding-top:1px}
.fin-ledger .lg-col>div.sum em,.fin-ledger .lg-col>div.sum b{font-weight:700;color:var(--ink)}
.fin-ledger .lg-col>div.net{border-top:1px solid var(--line);margin-top:3px;padding-top:3px;font-size:13px}
.fin-ledger .lg-col>div.net em{color:var(--ink);font-weight:700}.fin-ledger .lg-col>div.net b{font-weight:700}
.fin-ledger .lg-col>small{font-size:10.5px;color:var(--muted);margin-top:2px}
@media(min-width:1200px){#finDashKpis,.fin-sec-kpis .fin-kpis{grid-template-columns:repeat(4,minmax(0,1fr)) minmax(0,2fr)!important}}
@media(max-width:1199px) and (min-width:561px){#finDashKpis,.fin-sec-kpis .fin-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}.fin-ledger{grid-column:1/-1}}

/* Charts fill their card: rows of cards share one height, and each chart stretches into it
   (bar lists spread out, column charts grow taller, donuts centre) — no half-empty boxes. */
.fin-dash-grid>.fin-card{display:flex;flex-direction:column}
.fin-card>.fin-chart{flex:1;display:flex;flex-direction:column;min-height:0}
.fin-chart>.fin-hbars,.fin-chart>.fin-roi{flex:1;justify-content:space-around}
.fin-chart>.fin-donut{flex:1;align-items:center}
.fin-chart>div[id]{flex:1;display:flex;flex-direction:column}
.fin-chart>.fin-yr,.fin-chart>div[id]>.fin-yr{flex:1;flex-direction:row}
.fin-chart>div[id]>.fin-yr{flex:1}
.fin-yr{min-height:170px}
.fin-yr-col{justify-content:flex-start}
.fin-yr-plot{flex:1;height:auto!important;min-height:110px}

.nav-fin-sub2{margin:0 0 2px 22px}
html body .top-nav-links .nav-fin-sub2 button{font-size:11px!important;padding:4px 8px!important}
.fin-sec-kpis .fin-kpis.fin-kpis-crypto{grid-template-columns:repeat(auto-fit,minmax(128px,1fr))!important}
@media(max-width:560px){.fin-sec-kpis .fin-kpis.fin-kpis-crypto{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* Chart cards flow like text: each row is filled edge to edge at any screen width (cards in the
   last row grow to take the free space), so there is never a half-empty row. */
.fin-dash-grid{display:flex!important;flex-wrap:wrap;gap:14px;align-items:stretch}
.fin-dash-grid>*{flex:1 1 280px;min-width:0}
.fin-dash-grid>.fin-span2{flex:2 1 400px}
.fin-dash-grid>.fin-wide{flex:1 1 100%}
@media(max-width:700px){.fin-dash-grid>*,.fin-dash-grid>.fin-span2{flex-basis:100%}}
.fin-sec-kpis .fin-kpis.fin-kpis-crypto{display:flex!important;flex-wrap:wrap}
.fin-kpis-crypto>.fin-kpi{flex:1 1 125px;min-width:0}
table.fin-sortable thead th{cursor:pointer;user-select:none;white-space:nowrap}
table.fin-sortable thead th:hover,table.fin-sortable thead th.on{color:var(--ink)}
table.fin-sortable thead th[data-arrow]:not([data-arrow=""])::after{content:" " attr(data-arrow);font-size:9px}
.fin-etf-split{margin:-4px 0 6px 28px;padding:6px 0 6px 12px;border-left:2px solid var(--line-soft);display:flex;flex-direction:column;gap:4px}
.fin-etf-split-h{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.fin-etf-split-h span.ok{color:var(--green)}.fin-etf-split-h span.bad{color:var(--amber)}
.fin-etf-split-row{display:grid;grid-template-columns:90px 1fr 210px;align-items:center;gap:10px;font-size:12px}
.fin-etf-split-row span:last-child{color:var(--muted);white-space:nowrap}.fin-etf-split-row strong{color:var(--ink)}
.fin-alloc-bar.sm{height:5px}
.fin-etf-in{width:48px!important;padding:2px 6px;border-radius:6px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:12px;text-align:right}
@media(max-width:560px){.fin-etf-split{margin-left:6px}.fin-etf-split-row{grid-template-columns:70px 1fr;}.fin-etf-split-row span:last-child{grid-column:1/-1}}
.fin-collapse-h{cursor:pointer;user-select:none;display:flex;align-items:center;gap:6px}
.fin-collapse-h .fin-chev{display:inline-block;font-size:11px;transition:transform .15s;color:var(--muted)}
.fin-collapsible:not(.collapsed) .fin-collapse-h .fin-chev{transform:rotate(90deg)}
.fin-collapsible.collapsed>:not(.fin-collapse-h){display:none!important}
.fin-collapsible.collapsed .fin-collapse-h{margin-bottom:0}
.fin-collapsible.collapsed .fin-collapse-h::after{content:"carrega para ver";font-size:10.5px;text-transform:none;letter-spacing:0;color:var(--muted);font-weight:400;margin-left:6px}


/* Carteira: the "O que comprar" table look — coloured class groups and a left rail per row */
#finPortBody tr.sr-group-row td{background:color-mix(in srgb,var(--grp) 16%,var(--surface))!important;color:var(--grp);font-size:13.5px;font-weight:650;padding:10px 12px;border-top:1px solid color-mix(in srgb,var(--grp) 40%,transparent);border-bottom:1px solid color-mix(in srgb,var(--grp) 40%,transparent);border-left:4px solid var(--grp)!important}
#finPortBody tr.sr-group-row td span{color:var(--ink-2);font-weight:500;font-size:11.5px}
#finPortBody tr:not(.sr-group-row) td:first-child{border-left:4px solid color-mix(in srgb,var(--grp) 75%,transparent)!important}
#finPortBody .sr-inline-badges{margin-top:4px}
#finPortFilters{margin-bottom:12px}
/* Alocação face aos alvos: value inside the bar, target as a tag on its marker */
.fin-alloc-bar.lg{height:18px;margin-top:16px;border-radius:6px}
.fin-alloc-bar.lg .fin-alloc-fill{border-radius:6px}
.fin-alloc-cur{position:absolute;top:50%;transform:translateY(-50%);font-size:10.5px;font-weight:700;color:#ffffff;text-shadow:0 1px 3px rgba(0,0,0,.85);white-space:nowrap;font-variant-numeric:tabular-nums;pointer-events:none;text-align:left;z-index:2}
.fin-alloc-cur.out{color:var(--ink);text-shadow:none}
html[data-theme="dark"] .fin-alloc-cur{color:#ffffff!important}
html[data-theme="dark"] .fin-alloc-cur.out{color:#ffffff!important}
html[data-theme="dark"] .fa-name{color:#ffffff!important}
html[data-theme="dark"] .fa-row.sub .fa-name{color:#e2e8f0!important}
html[data-theme="dark"] .fa-val{color:#ffffff!important}
html[data-theme="dark"] .fa-gap small{color:#cbd5e1!important}
.fin-alloc-bar.lg .fin-alloc-target{top:-3px;bottom:-3px;z-index:1}
.fin-alloc-target span{position:absolute;bottom:calc(100% + 2px);left:50%;transform:translateX(-50%);font-size:10px;font-weight:650;color:var(--ink-2);white-space:nowrap;background:var(--surface);border:1px solid var(--line-soft);padding:0 5px;border-radius:5px;line-height:14px}
.fin-alloc-target.l span{left:-2px;transform:none}
.fin-alloc-target.r span{left:auto;right:-2px;transform:none}
/* ROI anual per asset as columns: room for the asset names */
.fin-yr-assets .fin-yr-x{font-size:10px;line-height:1.25;white-space:normal;text-align:center;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-width:100%;min-height:2.5em}
/* Sistema · Stock Radar: one card per data source, like the Crypto Bot system panels */
.sys-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
.sys-card{background:var(--bg-soft);border:1px solid var(--line-soft);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px}
.sys-card-h{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:8px;border-bottom:1px solid var(--line-soft)}
.sys-card-t{display:flex;align-items:center;gap:8px;min-width:0}
.sys-card-i{font-size:16px}
.sys-card-t strong{font-size:12.5px;color:var(--ink)}
.sys-card-t small{display:block;font-size:10px;color:var(--muted)}
.sys-card .kv div{padding:7px 0}
.sys-card .kv span,.sys-card .kv strong{font-size:11px}
.sys-card-x{padding:8px 10px;border-radius:8px;background:var(--surface);border:1px solid var(--line-soft)}

/* Alocação face aos alvos as a table: Classe | Atual · alvo | Diferença | Valor */
#finAlloc.fin-alloc{gap:0}
.fa-row{display:grid;grid-template-columns:150px minmax(0,1fr) 170px 110px;align-items:center;gap:16px;font-size:13px;padding:8px 0}
.fa-row.head{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:0 0 6px;border-bottom:1px solid var(--line-soft)}
.fa-row:not(.head):not(.sub){border-bottom:1px solid var(--line-soft)}
.fa-name{font-weight:600;color:var(--ink)}
.fa-bar{position:relative;height:18px;border-radius:6px;background:var(--sr-track);margin-top:16px}
.fa-bar .fin-alloc-fill{border-radius:6px}
.fa-bar.sm{height:12px;margin-top:14px}
.fa-bar.sm .fin-alloc-cur{font-size:9.5px}
.fa-bar .fin-alloc-target{top:-3px;bottom:-3px;z-index:1}
.fa-gap{display:flex;flex-direction:column;line-height:1.3}
.fa-gap b{font-size:12.5px;font-weight:650}
.fa-gap b.under{color:var(--accent-day)}
.fa-gap b.over{color:var(--amber)}
.fa-gap b.ok{color:var(--green)}
.fa-gap small{font-size:10.5px;color:var(--muted)}
.fa-val{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink-2)}
.fa-sub{margin:0 0 0 22px;padding:2px 0 6px 12px;border-left:2px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}
.fa-sub-h{font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-top:6px}
.fa-sub-h span.ok{color:var(--green)}
.fa-sub-h span.bad{color:var(--amber)}
.fa-row.sub{font-size:12px;grid-template-columns:116px minmax(0,1fr) 170px 110px;padding:4px 0}
.fa-row.sub .fa-name{font-weight:500;color:var(--ink-2)}
.fa-edit{white-space:nowrap;color:var(--muted);font-size:12px}
@media(max-width:720px){
  .fa-row,.fa-row.sub{grid-template-columns:1fr auto;gap:4px 10px}
  .fa-row .fa-bar{grid-column:1/-1;order:3}
  .fa-row .fa-gap{grid-column:1/-1;order:4;flex-direction:row;gap:8px;align-items:baseline}
  .fa-row.head{display:none}
  .fa-sub{margin-left:4px}
}
/* Histórico: the totals in one compact strip */
.fin-hist-strip{display:flex;flex-wrap:wrap;gap:6px 26px;padding:10px 14px;border:1px solid var(--line-soft);border-radius:10px;background:var(--bg-soft);margin-top:12px}
.fin-hist-strip>div{display:flex;align-items:baseline;gap:7px}
.fin-hist-strip span{font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.fin-hist-strip strong{font-size:14px;color:var(--ink);font-variant-numeric:tabular-nums}
.fin-hist-strip small{font-size:10.5px;color:var(--muted)}

/* horizontal bars with the figures under each bar (ROI anual · 5 melhores / 5 piores) */
.fin-hbars.below .fin-hbar{grid-template-columns:var(--fin-label-w,105px) 1fr!important;column-gap:12px;row-gap:3px}
.fin-hbars.below .fin-hbar-l{grid-row:span 2;align-self:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fin-hbars.below .fin-hbar-v{grid-column:2;text-align:left;display:flex;align-items:baseline;gap:6px;font-size:12px}
.fin-hbars.below .fin-hbar-v small{display:inline}

/* ── Navigation: Visão Geral / Hub Button ─────────────────────────────────────── */
.nav-overview-block{padding:0 0 10px 0;margin-bottom:8px;border-bottom:1px solid var(--line-soft)}
.nav-overview-btn{width:100%;display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;background:var(--surface-2);border:1px solid var(--line);font-size:12.5px;font-weight:650;color:var(--ink);cursor:pointer;transition:all .18s ease;text-align:left}
.nav-overview-btn:hover{background:var(--surface-3, rgba(255,255,255,0.06));border-color:var(--accent-finance);color:var(--ink)}
.nav-overview-btn.active{background:linear-gradient(135deg, rgba(20,184,166,0.15), rgba(99,102,241,0.12));border-color:var(--accent-finance);color:var(--ink);box-shadow:0 2px 10px rgba(20,184,166,0.15)}
.nav-overview-btn .nav-icon{color:var(--accent-finance);display:inline-flex;align-items:center;justify-content:center}
.nav-overview-btn .nav-icon svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:2}
.nav-hub-pill{margin-left:auto;font-size:8.5px;padding:2px 6px;line-height:1;border-radius:4px;font-weight:750;letter-spacing:.05em;background:var(--accent-finance);color:#fff}

/* ── Visão Geral / Master Overview Cockpit Page ───────────────────────────────── */
.overview-tab .content{display:flex;flex-direction:column;gap:16px;max-width:1440px;margin:0 auto}
.overview-hero-card{padding:22px 26px;position:relative;overflow:hidden;border:1.5px solid var(--line)!important;border-radius:14px;background:var(--surface)!important}
.overview-hero-header{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:14px;margin-bottom:20px}
.overview-hero-title-group h2{margin:0;font-size:20px;font-weight:700;letter-spacing:-.02em;color:var(--ink);display:flex;align-items:center;gap:8px}
.overview-hero-title-group p{margin:4px 0 0;font-size:13px;color:var(--muted);max-width:720px;line-height:1.45}
.overview-hero-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.overview-kpis-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.overview-kpi-box{padding:13px 14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-soft);display:flex;flex-direction:column;gap:4px;transition:transform .15s ease,border-color .15s ease;min-width:0}
.overview-kpi-box:first-child{grid-column:span 2;padding:16px 18px}
.overview-kpi-box:not(:first-child) .overview-kpi-label{font-size:9.5px}
.overview-kpi-box:not(:first-child) .overview-kpi-value{font-size:19px}
.overview-kpi-box:not(:first-child) .overview-kpi-sub{font-size:10.5px}
@media(max-width:1100px){.overview-kpis-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-kpi-box:first-child{grid-column:span 2}}
@media(max-width:620px){.overview-kpis-grid{grid-template-columns:1fr}.overview-kpi-box:first-child{grid-column:span 1}}
.overview-kpi-box:hover{border-color:var(--line);transform:translateY(-1px)}
.overview-kpi-label{font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);display:flex;align-items:center;gap:6px}
.overview-kpi-value{font-size:24px;font-weight:700;letter-spacing:-.03em;color:var(--ink);font-variant-numeric:tabular-nums;line-height:1.2;margin:4px 0 2px}
.overview-kpi-sub{font-size:11.5px;color:var(--muted);display:flex;align-items:center;gap:6px}
.overview-kpi-sub strong,
.overview-kpi-sub b,
.overview-kpi-sub .ov-lbl{color:#ffffff!important;font-weight:600}

.overview-pillars-grid{display:grid;grid-template-columns:repeat(3, 1fr);gap:16px}

@media(max-width:1080px){
  .overview-pillars-grid{grid-template-columns:1fr}
}
.overview-pillar-card{display:flex;flex-direction:column;border-radius:14px;border:1.5px solid var(--line)!important;background:var(--surface)!important;padding:20px;position:relative;overflow:hidden;transition:all .2s ease}
.overview-pillar-card:hover{box-shadow:0 8px 28px rgba(0,0,0,0.12);border-color:var(--accent-day)!important}
.overview-pillar-card.crypto:hover{border-color:var(--accent-intra)!important}
.overview-pillar-card.stock:hover{border-color:var(--accent-day)!important}
.overview-pillar-card.finance:hover{border-color:var(--accent-finance)!important}

.pillar-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line-soft)}
.pillar-title-wrap{display:flex;align-items:center;gap:10px}
.pillar-title-wrap h3{margin:0;font-size:16px;font-weight:700;letter-spacing:-.015em;color:var(--ink)}
.pillar-badge{font-size:10px;font-weight:700;padding:2px 7px;border-radius:6px;line-height:1.3;text-transform:uppercase}
.pillar-badge.live{background:rgba(34,197,94,0.15);color:var(--green);border:1px solid rgba(34,197,94,0.3)}
.pillar-badge.paper{background:rgba(245,158,11,0.15);color:var(--amber);border:1px solid rgba(245,158,11,0.3)}

.pillar-body{display:flex;flex-direction:column;gap:12px;flex:1}
.pillar-stat-row{display:flex;justify-content:space-between;align-items:baseline;padding:4px 0}
.pillar-stat-label{font-size:12px;color:var(--muted)}
.pillar-stat-val{font-size:14px;font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}
.pillar-list{display:flex;flex-direction:column;gap:6px;margin:4px 0;background:var(--surface-2);border-radius:10px;padding:10px 12px;border:1px solid var(--line-soft)}
.pillar-list-item{display:flex;align-items:center;justify-content:space-between;font-size:12px}
.pillar-list-item strong{color:var(--ink);font-weight:600}
.pillar-list-item span{color:var(--muted)}
.overview-gain-breakdown{margin-top:-6px;color:var(--muted)}
.overview-gain-breakdown .pillar-list{margin-top:2px;padding:7px 9px;gap:4px}
.overview-gain-breakdown .pillar-list-item{gap:10px;font-size:10.5px}
.overview-gain-breakdown .pillar-list-item strong{font-size:10.5px}
.overview-gain-breakdown .pillar-list-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.overview-card-asof{margin-top:auto;padding-top:7px;text-align:right;color:#fff;font-size:10px;line-height:1.25;opacity:.9;font-weight:550;letter-spacing:.01em}
.pillar-cta{margin-top:10px;padding-top:10px;border-top:1px solid var(--line-soft)}
.overview-cta-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:10px;border:1px solid var(--line);background:var(--surface-2);font-size:12.5px;font-weight:650;color:var(--ink);cursor:pointer;transition:all .15s ease}
.overview-cta-btn:hover{background:var(--ink);color:var(--surface);border-color:var(--ink)}

/* ── Unified Box Styles ──────────────────────────────────────────────────────── */
.fin-unified-box, .sr-unified-box{border:1.5px solid var(--line)!important;border-radius:14px!important;background:var(--surface)!important}


/* Stock Radar reorganisation: menus by role, How it works tabs, Ranking star, Monthly Plan list */
body:not(.is-member) .member-only{display:none!important}
.nav-hidden{display:none!important}
.sr-howto-tabs{display:flex;gap:6px;margin:0 0 12px}
.sr-star{border:0;background:none;padding:0 4px 0 0;font-size:15px;line-height:1;color:var(--muted);cursor:pointer}
.sr-star.on{color:#f5b301}
.sr-star:hover{color:#f5b301}
.sr-month{border:1px solid var(--line-soft);border-radius:12px;background:var(--bg-soft);padding:12px 14px;margin:10px 0 12px}
.sr-month-in{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sr-month-in input{width:120px}
.sr-month-empty{margin:8px 0 0;font-size:12px;color:var(--muted)}
.sr-month-list{margin-top:10px;display:flex;flex-direction:column;gap:6px}
.sr-month-h{font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-2);display:flex;justify-content:space-between;border-bottom:1px solid var(--line-soft);padding-bottom:4px}
.sr-month-h span{color:var(--ink);font-variant-numeric:tabular-nums}
.sr-month-list ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.sr-month-list li{display:grid;grid-template-columns:72px 92px 132px 118px auto;justify-content:start;align-items:center;gap:12px;font-size:12.5px}
.sr-month-list .sym{font-weight:700;color:var(--ink)}
.sr-month-list .sr-mtag{font-size:11px;color:var(--muted)}
.sr-month-list .sr-mtag.new{color:var(--accent-day)}
.sr-month-list .sr-mtag.trim{color:var(--amber)}
.sr-month-list .eur{text-align:right;font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums}
.sr-month-list .m{color:var(--muted);font-size:11.5px;text-align:left}
.sr-month-note{margin:0;font-size:11.5px;color:var(--amber)}
@media(max-width:720px){.sr-month-list li{grid-template-columns:60px auto auto;gap:6px 10px}.sr-month-list .sr-mtag,.sr-month-list .m{display:none}}
.fin-dec{margin-left:6px;border:1px solid var(--line);background:var(--surface);border-radius:6px;font-size:10.5px;font-weight:650;padding:1px 6px;cursor:pointer;color:var(--ink-2)}
.fin-dec.buy{color:var(--green);border-color:color-mix(in srgb,var(--green) 40%,transparent)}
.fin-dec.res{color:var(--accent-day);border-color:color-mix(in srgb,var(--accent-day) 40%,transparent)}
.fin-dec.trim{color:var(--amber);border-color:color-mix(in srgb,var(--amber) 45%,transparent)}

/* Cockpit: the net worth box leads, the other three are compact */
.overview-kpis-grid{grid-template-columns:minmax(0,2.3fr) repeat(3,minmax(0,1fr))!important;gap:10px!important;align-items:start}
.overview-kpi-box:first-child{grid-column:auto!important;padding:16px 20px}
.overview-kpi-box:first-child .overview-kpi-value{font-size:30px}
.overview-kpi-box:not(:first-child){padding:9px 11px;gap:2px}
.overview-kpi-box:not(:first-child) .overview-kpi-label{font-size:9px;letter-spacing:.04em}
.overview-kpi-box:not(:first-child) .overview-kpi-value{font-size:15px;margin:1px 0}
.overview-kpi-box:not(:first-child) .overview-kpi-sub{font-size:10px;line-height:1.35}
.overview-kpi-box:not(:first-child) .overview-kpi-sub div{gap:0!important}
@media(max-width:1100px){.overview-kpis-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.overview-kpi-box:first-child{grid-column:1/-1!important}}
@media(max-width:620px){.overview-kpis-grid{grid-template-columns:1fr!important}}
/* Cockpit cards: one text size for every label, value and list row */
.overview-pillars-grid .pillar-stat-label{font-size:12px!important}
.overview-pillars-grid .pillar-stat-val,.overview-pillars-grid .pillar-stat-val *{font-size:13px!important;font-weight:650}
.overview-pillars-grid .pillar-list-item,.overview-pillars-grid .pillar-list-item strong,.overview-pillars-grid .pillar-list-item span{font-size:12px!important}
.overview-pillars-grid .sr-act-chip{font-size:11px!important}
.ov-top-sym{font-weight:600;color:var(--ink)!important}
.ov-top-sym.is-held,.ov-top-sym.is-held strong{color:#38bdf8!important}

/* Box titles (Total Net Worth, Result / P&L, …) closer to white; their small notes stay muted */
.fin-kpi>span,.overview-kpi-label,.fin-hist-strip>div>span{color:var(--ink-2)!important}
.fin-kpi>span small{color:var(--muted)}

/* How it works › Monthly Plan explanation */
.sr-howto-steps{margin:6px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:8px;font-size:12.5px;line-height:1.5;color:var(--ink-2)}
.sr-howto-steps strong{color:var(--ink)}
.sr-howto-example{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:var(--bg-soft);border:1px solid var(--line-soft);font-size:12px;color:var(--ink-2)}

.sr-month-split{display:inline-flex;align-items:baseline;gap:6px;flex-wrap:wrap;font-size:14px;color:var(--ink);padding:4px 10px;border-radius:8px;background:var(--surface);border:1px solid var(--line-soft)}
.sr-month-split b{font-weight:700}
.sr-month-split .m{font-size:12px;color:var(--muted)}
.sr-month-h{max-width:560px}
.sr-month-list .eur{white-space:nowrap}

/* Monthly Plan boxes, simplified */
.sr-month-opt{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:12.5px;color:var(--ink-2)}
.sr-etf-card.simple .sr-etf-card-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.sr-etf-card.simple .sr-etf-card-top .m{color:var(--muted)}
.sr-etf-card.simple .sr-etf-bar{margin:6px 0 4px}
.sr-month-opt select{width:auto!important;flex:0 0 auto;min-width:0;padding:5px 8px;font-size:12.5px}

/* This Month: one text size for the question, input, mode and split; bigger list titles */
.sr-month-in,.sr-month-in label,.sr-month-in input,.sr-month-opt,.sr-month-opt label,.sr-month-opt select,.sr-month-splitrow,.sr-month-splitrow .sr-month-split,.sr-month-splitrow .sr-month-split .m{font-size:14px!important}
.sr-month-in label strong,.sr-month-opt label{font-weight:650;color:var(--ink)}
.sr-month-splitrow{margin-top:8px}
.sr-month-splitrow:empty{display:none}
.sr-month-h{font-size:13.5px!important;text-transform:none!important;letter-spacing:0!important;color:var(--ink)!important;margin-top:4px}
.sr-month-sub{font-size:11px;font-weight:650;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);display:flex;justify-content:space-between;max-width:560px;margin:4px 0 2px}
.sr-month-sub span{font-variant-numeric:tabular-nums}

/* This Month split: the € going to ETFs and to stocks stand out in white */
.sr-month-split{color:var(--ink-2)!important}
.sr-month-split b{color:var(--ink)!important;font-weight:700}
:root[data-theme="dark"] .sr-month-split b{color:#fff!important}

.sr-month-splitrow,.sr-month-splitrow .sr-month-split,.sr-month-splitrow .sr-month-split .m{font-size:12.5px!important}
.sr-month-splitrow .sr-month-split .m{font-size:11.5px!important}
/* My Finances · allocation bars, invested total, world map */
.fin-al{display:flex;flex-direction:column;gap:12px;margin-top:6px}
.fin-al-row{display:grid;grid-template-columns:96px 1fr 112px;gap:10px;align-items:center;font-size:12.5px;outline:none}
.fin-al-l{color:var(--ink-2)}
.fin-al-t{position:relative;height:9px;background:var(--sr-track);border-radius:5px}
.fin-al-f{position:absolute;left:0;top:0;bottom:0;border-radius:5px}
.fin-al-m{position:absolute;top:-4px;bottom:-4px;width:2px;margin-left:-1px;background:var(--ink);border-radius:1px}
.fin-al-tick{display:inline-block;width:2px!important;height:10px!important;background:var(--ink)!important;border-radius:1px!important;vertical-align:middle}
.fin-al-v{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.fin-al-v>b{font-size:13px;color:var(--ink)}.fin-al-v small{font-size:11px;color:var(--muted)}
.fin-al-row:hover .fin-al-f,.fin-al-row:focus .fin-al-f{filter:brightness(1.2)}
.fin-buys-tot{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:0 0 8px;font-size:12.5px;color:var(--ink-2)}
.fin-buys-tot strong{font-size:15px;color:var(--ink)}.fin-buys-tot small{color:var(--muted);font-size:11.5px}
.fin-geo{display:flex;flex-direction:column;gap:10px}
.fin-geo-map{width:100%;height:auto;display:block}
.fin-geo-map path{stroke:var(--surface,#0b1220);stroke-width:.5;stroke-linejoin:round}
.fin-geo-none{fill:var(--sr-track)}
.fin-geo-r{outline:none;transition:filter .15s}.fin-geo-r:hover,.fin-geo-r:focus{filter:brightness(1.25)}
.fin-geo-leg{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:2px 14px}
@media (max-width:640px){.fin-al-row{grid-template-columns:72px 1fr 92px}}
/* Geographic Exposure: vivid region colours, brighter in dark mode */
:root{--geo-us:#2563eb;--geo-eu:#ea580c;--geo-other:#059669;--geo-em:#9333ea}
[data-theme="dark"]{--geo-us:#60a5fa;--geo-eu:#fb923c;--geo-other:#34d399;--geo-em:#c084fc}
/* KPI boxes in one row on wide screens (value, money in, P&L, ROI, IRR, income) */
@media(min-width:1200px){#finDashKpis,.fin-sec-kpis .fin-kpis{grid-template-columns:minmax(0,1.7fr) repeat(2,minmax(0,1fr)) minmax(0,1.9fr)!important}
  #finDashKpis .fin-kpi strong,.fin-sec-kpis .fin-kpi strong{font-size:15px}
  #finDashKpis .fin-kpi small,.fin-sec-kpis .fin-kpi small{font-size:10.5px;line-height:1.3}
  #finDashKpis .fin-kpi,.fin-sec-kpis .fin-kpi{padding:9px 10px}
  #finDashKpis .fin-ledger .lg-cols,.fin-sec-kpis .fin-ledger .lg-cols{grid-template-columns:1fr;column-gap:0}
  #finDashKpis .fin-ledger>div,.fin-sec-kpis .fin-ledger>div,#finDashKpis .fin-ledger .lg-col>div,.fin-sec-kpis .fin-ledger .lg-col>div{font-size:11.5px;line-height:1.45}
  #finDashKpis .fin-ledger em,.fin-sec-kpis .fin-ledger em{white-space:nowrap}}
/* Invested per Year: buys/sells and money-in side by side */
.fin-yr-plot.fin-yr-duo{flex-direction:row;gap:3px}
.fin-yr-duo>.fin-yr-pos{flex:1;height:100%}
.fin-yr-duo>.fin-yr-pos span{width:min(26px,90%)}
/* My Finances · earnings by type */
.fin-type-table td,.fin-type-table th{white-space:nowrap}
.fin-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:7px;vertical-align:middle}
.fin-best{margin-left:6px;color:var(--green)!important;border-color:currentColor!important}
/* Net Worth box: put in / taken out / gained under the value */
.fin-nw-lines{margin-top:6px;border-top:1px dashed var(--line);padding-top:5px;outline:none}
.fin-nw-lines>div{outline:none;border-radius:4px;display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12px;line-height:1.55}
.fin-nw-lines em{font-style:normal;color:var(--ink-2);white-space:nowrap}.fin-nw-lines b{font-weight:600;color:var(--ink);white-space:nowrap}
.fin-nw-lines .net{border-top:1px solid var(--line);margin-top:2px;padding-top:3px}.fin-nw-lines .net em{color:var(--ink);font-weight:700}
.fin-nw-lines .net small{font-size:11px;font-weight:600;margin-left:3px}
.fin-nw-lines>div:hover,.fin-nw-lines>div:focus{background:var(--surface-3,rgba(127,127,127,.12))}
.fin-nw-lines .sep{border-top:1px dashed var(--line);margin-top:2px;padding-top:3px}
.pillar-stat-val .ov-pc{font-size:11.5px;font-weight:600;color:var(--muted);margin-left:4px}
/* Open Positions: values a bit bigger, no bold */
html .position-card .pos-c-metrics-grid .pos-c-val,
html .position-card .pos-c-metrics-grid .pos-c-val .pos-c-sub,
html .position-card .pos-c-metrics-grid .pos-risk-neg,
html .position-card .pos-c-metrics-grid .pos-profit-pos{font-weight:400!important}
html .position-card .pos-c-metrics-grid .pos-c-val{font-size:13px!important;line-height:1.3}
html .position-card .pos-c-metrics-grid .pos-c-val .pos-c-sub{font-size:11.5px!important}
html .position-card .pos-c-metrics-grid .pos-risk-neg,html .position-card .pos-c-metrics-grid .pos-profit-pos{font-size:13px!important}
html .position-card .pos-c-metrics-grid .pos-c-lbl{font-size:10px}
.ov-live{font-size:9.5px;font-weight:600;color:var(--green);margin-left:4px;letter-spacing:.02em}

/* My Finances privacy toggle (eye): visible only on the My Finances pages */
.fin-mask-btn{display:none;position:fixed;right:18px;bottom:18px;z-index:900;width:44px;height:44px;border-radius:50%;
  align-items:center;justify-content:center;border:1px solid var(--line);background:var(--panel,#fff);color:var(--ink);
  box-shadow:0 6px 18px rgba(0,0,0,.18);cursor:pointer}
body:has(.tab.finance-only.active) .fin-mask-btn{display:flex}
body.mobile-nav-open .fin-mask-btn{display:none}
.fin-mask-btn .eye-off{display:none}
.fin-mask-btn.masked .eye-open{display:none}
.fin-mask-btn.masked .eye-off{display:block}
.fin-mask-btn:focus-visible{outline:2px solid var(--accent-finance,#3b82f6);outline-offset:2px}
@media (max-width:900px){.fin-mask-btn{right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px))}}
/* Kill switch per book (Trigger Radar) */
.radar-kill{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:5px;font-size:11px;color:var(--muted);outline:none;cursor:help}
.radar-kill b{font-weight:600;color:var(--ink-2)}
.radar-kill-bar{display:inline-block;flex:1 1 60px;min-width:50px;max-width:110px;height:5px;border-radius:3px;background:var(--sr-track,rgba(127,127,127,.2));overflow:hidden}
.radar-kill-bar>i{display:block;height:100%;background:var(--green);border-radius:3px}
.radar-kill.warn .radar-kill-bar>i{background:var(--amber)}.radar-kill.warn b{color:var(--amber)}
.radar-kill.locked{color:var(--red)}.radar-kill.locked b{color:var(--red)}.radar-kill.locked .radar-kill-bar>i{background:var(--red)}
/* Stock Radar · data confidence (S4) */
.sr-conf{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;font-size:10px;font-weight:600;border:1px solid currentColor;white-space:nowrap}
.sr-conf.medium{color:var(--amber)}.sr-conf.low{color:var(--red)}.sr-conf.high{color:var(--green)}
.sr-conf-line{margin-top:8px;font-size:12px;color:var(--muted)}.sr-conf-line .sr-conf{margin-left:2px}
/* Backtests · recent holdout reading (A5) */
.validation-list .cmp-holdout,.validation-list .cmp-holdout-sub{grid-column:1/-1}
.validation-item.cmp-holdout{border-style:dashed;margin-top:4px}
.cmp-holdout-sub{font-size:11px;color:var(--muted);padding:0 4px;margin-top:-4px}
/* My Finances KPI row: value · Net P&L · ROI · IRR · income vs costs (details on hover) */
@media(min-width:1200px){#finDashKpis,.fin-sec-kpis .fin-kpis{grid-template-columns:minmax(0,1.25fr) minmax(0,1.5fr) repeat(2,minmax(0,1fr)) minmax(0,1.15fr)!important}}
@media(max-width:1199px){html body .fin-ledger.fin-ledger-compact{grid-column:auto}}
.fin-kpis>.fin-kpi.fin-tip{cursor:help}
.fin-pnl .fin-nw-lines{border-top:0;margin-top:4px;padding-top:0}
.fin-pnl .fin-nw-lines>div{font-size:13px;line-height:1.7}
.fin-pnl .fin-nw-lines b{font-weight:700}
/* Cockpit: the four headline boxes (net worth, crypto bot, investments, liquidity) all the same size */
html body .overview-kpis-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;align-items:stretch}
html body .overview-kpi-box,html body .overview-kpi-box:first-child,html body .overview-kpi-box:not(:first-child){grid-column:auto!important;padding:12px 14px;gap:3px}
html body .overview-kpi-box .overview-kpi-label,html body .overview-kpi-box:not(:first-child) .overview-kpi-label{font-size:10px;letter-spacing:.04em}
html body .overview-kpi-box .overview-kpi-value,html body .overview-kpi-box:first-child .overview-kpi-value,html body .overview-kpi-box:not(:first-child) .overview-kpi-value{font-size:20px;margin:2px 0}
html body .overview-kpi-box .overview-kpi-sub,html body .overview-kpi-box:not(:first-child) .overview-kpi-sub{font-size:11px}
@media(max-width:1100px){html body .overview-kpis-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}html body .overview-kpi-box:first-child{grid-column:auto!important}}
@media(max-width:560px){html body .overview-kpis-grid{grid-template-columns:1fr!important}}
/* 24h change chip (▲ green / ▼ red) next to a total */
.fin-day{display:inline-block;font-size:11px;font-weight:600;letter-spacing:0;white-space:nowrap;vertical-align:middle;margin-left:4px;cursor:help}
.overview-kpi-value .fin-day{font-size:11.5px;display:block;margin:2px 0 0}
.fin-day.fin-day-flat{color:var(--ink)!important}
/* Net P&L box: label on top, value below aligned left, space between the two lines */
html body .fin-pnl .fin-nw-lines>div{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:1px;line-height:1.35;padding:2px 0}
html body .fin-pnl .fin-nw-lines>div+div{margin-top:8px}
html body .fin-pnl .fin-nw-lines b{white-space:normal;text-align:left}
html body .fin-pnl .fin-nw-lines b .fin-day{margin-left:2px}
/* 24h change: brackets and "24h" in the normal text colour; the arrow + % green / red / white */
html body .fin-day{color:var(--ink-2)!important}
html body .fin-day .fin-day-v.fin-day-up{color:var(--sr-pos)!important}
html body .fin-day .fin-day-v.fin-day-down{color:var(--sr-neg)!important}
html body .fin-day .fin-day-v.fin-day-flat{color:var(--ink)!important}
/* Cockpit · My Finances card: the % and the 24h change smaller than the amount */
html body .overview-pillars-grid .pillar-stat-val small,html body .overview-pillars-grid .pillar-stat-val .fin-day,html body .overview-pillars-grid .pillar-stat-val .fin-day *{font-size:11px!important;font-weight:600}
html body .overview-pillars-grid .pillar-stat-val small,html body .overview-pillars-grid .pillar-stat-val .fin-day{margin-left:3px}
/* Cockpit · My Finances card: % and 24h change styled exactly as in the My Finances boxes */
html body .overview-pillars-grid .pillar-stat-val small{font-size:10.5px!important;font-weight:500!important;color:var(--muted)!important;margin-left:4px}
html body .overview-pillars-grid .pillar-stat-val .fin-day,html body .overview-pillars-grid .pillar-stat-val .fin-day *{font-size:10.5px!important;font-weight:600!important}
/* Cockpit · My Finances card: the 24h change on its own line, under the amount and % */
html body .overview-pillars-grid .pillar-stat-val{display:inline-block;text-align:right}
html body .overview-pillars-grid .pillar-stat-val .fin-day{display:block;margin:1px 0 0!important;text-align:right;line-height:1.2}
/* The % next to Unrealized Net P&L / Total Net P&L: brighter so it reads well in dark mode */
html body .fin-nw-lines b small,html body .overview-pillars-grid .pillar-stat-val small{color:var(--ink-2)!important}
/* My Finances · value over time (line + shaded area) */
.fin-worth .fin-pc-lab{position:static;display:block;margin:0 0 6px;font-weight:500;color:var(--ink-2);min-height:16px}
.fin-worth .fin-pc-lab b{color:var(--ink);font-weight:700}
.fin-worth-line{fill:none;stroke:var(--accent-finance);stroke-width:2.2;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.fin-worth .fin-pc-dot{fill:var(--accent-finance)}
.fin-worth svg{cursor:crosshair}
/* Monthly Plan · how it works — short topics */
.sr-howto-simple{list-style:none;padding-left:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.sr-howto-simple>li{border:1px solid var(--line-soft);border-radius:10px;padding:10px 12px;background:var(--surface-2);margin:0}
.sr-howto-simple>li>strong{display:block;font-size:13px;margin-bottom:4px;color:var(--ink)}
.sr-howto-simple ul{margin:0;padding-left:16px;font-size:12.5px;line-height:1.5;color:var(--ink-2)}
.sr-howto-simple ul li{margin:2px 0}
.sr-howto-simple b{color:var(--ink)}
.sr-strat-summary{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:6px 14px;font-size:13px;line-height:1.45;color:var(--ink-2)}
.sr-strat-summary strong{color:var(--ink)}
/* value over time: smaller text, invested line dashed */
.fin-worth .fin-pc-lab{font-size:11px}
.fin-worth .fin-pc-grid text{font-size:8.5px}
.fin-worth-inv{fill:none;stroke:var(--ink-2);stroke-width:1.4;stroke-dasharray:4 3;vector-effect:non-scaling-stroke;opacity:.85}
.fin-worth-dot2{fill:var(--ink-2);stroke:var(--surface);stroke-width:1.5}
.fin-worth-leg{font-size:10.5px;margin:4px 0 0}
.fin-worth-leg i.dash{background:none!important;border-top:2px dashed var(--ink-2);height:0;width:14px;display:inline-block;vertical-align:middle}
.fin-worth svg{max-height:200px}
/* Invest Radar explanations: one idea per line, icon first */
.sr-icon-list{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-direction:column;gap:4px;font-size:12.5px;line-height:1.45;color:var(--ink-2)}
.sr-icon-list strong{color:var(--ink)}
.sr-howto-simple ul{list-style:none;padding-left:0}
/* Portfolio Overview layout: balanced rows — halves (2 per row) and thirds (3 per row) */
html body .fin-dash-grid>.fin-half{flex:1 1 calc(50% - 7px);max-width:100%}
html body .fin-dash-grid>.fin-third{flex:1 1 calc(33.333% - 10px);max-width:100%}
@media(max-width:1100px){html body .fin-dash-grid>.fin-third{flex-basis:calc(50% - 7px)}}
@media(max-width:800px){html body .fin-dash-grid>.fin-half,html body .fin-dash-grid>.fin-third{flex-basis:100%}}
/* value over time: grey = money invested, green / red band = gain / loss on top of it */
.fin-worth-invarea{fill:color-mix(in srgb,var(--ink-2) 10%,transparent);stroke:none}
.fin-worth-band{stroke:none}
.fin-worth-band.up{fill:color-mix(in srgb,var(--sr-pos) 30%,transparent)}
.fin-worth-band.dn{fill:color-mix(in srgb,var(--sr-neg) 32%,transparent)}
.fin-worth-leg i.fin-leg-inv{background:color-mix(in srgb,var(--ink-2) 22%,transparent)!important}
.fin-worth-leg i.fin-leg-up{background:color-mix(in srgb,var(--sr-pos) 55%,transparent)!important}
.fin-worth-leg i.fin-leg-dn{background:color-mix(in srgb,var(--sr-neg) 55%,transparent)!important}
/* Monthly Plan: not enough cash at the broker */
.sr-month-funds{margin:8px 0;padding:8px 10px;border-radius:8px;border:1px solid color-mix(in srgb,var(--amber) 50%,transparent);background:color-mix(in srgb,var(--amber) 10%,transparent);font-size:12.5px;line-height:1.5;color:var(--ink)}
.sr-month-funds small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.sr-month-list li.no-cash .sym{color:var(--amber)}
/* KPI row with separate Realized / Unrealized boxes (6 boxes) */
@media(min-width:1200px){html body #finDashKpis,html body .fin-sec-kpis .fin-kpis:not(.fin-kpis-crypto){grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,1.3fr) repeat(3,minmax(0,1fr))!important}}
@media(max-width:1199px) and (min-width:561px){html body #finDashKpis,html body .fin-sec-kpis .fin-kpis:not(.fin-kpis-crypto){grid-template-columns:repeat(3,minmax(0,1fr))!important}}
.fin-unreal strong small{font-size:11px;font-weight:500;color:var(--ink-2)!important;margin-left:3px}
.fin-unreal strong .fin-day{display:block;margin:2px 0 0;font-size:11px}
/* four per row (Stocks: Geographic · Dividends Top 6 · Invested per Year · Dividends vs Fees) */
html body .fin-dash-grid>.fin-quarter{flex:1 1 calc(25% - 11px);max-width:100%}
@media(max-width:1300px){html body .fin-dash-grid>.fin-quarter{flex-basis:calc(50% - 7px)}}
@media(max-width:800px){html body .fin-dash-grid>.fin-quarter{flex-basis:100%}}
/* Geographic Exposure: never taller than ~170px, compact legend */
html body .fin-geo{gap:6px}
html body .fin-geo-map{max-height:170px;width:auto;max-width:100%;margin:0 auto}
html body .fin-geo-leg{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));font-size:11.5px;gap:1px 10px}
/* Monthly Plan: "why this split" panel on the right of the month box */
@media(min-width:1000px){
  #portMonthBox{display:grid;grid-template-columns:minmax(0,620px) minmax(300px,420px);column-gap:28px;justify-content:start;align-items:stretch}
  #portMonthBox>.sr-month-side{display:flex;flex-direction:column}
  #portMonthBox>.sr-month-side>.sr-month-why{flex:1 1 auto}
  #portMonthBox>*:not(.sr-month-side){grid-column:1}
  #portMonthBox>.sr-month-side{grid-column:2;grid-row:1}
}
.sr-month-why{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:12px;line-height:1.45;color:var(--ink-2)}
.sr-month-why-h{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--ink);font-weight:700;margin-bottom:10px}
.sr-month-why b{color:var(--ink)}
.sr-why-empty{margin:0;color:var(--muted)}
.sr-why-bar{display:flex;height:8px;border-radius:4px;overflow:hidden;gap:2px;background:transparent}
.sr-why-bar i,.sr-why-leg i{display:block;background:var(--fin-etf)}
.sr-why-bar i.s,.sr-why-leg i.s{background:var(--fin-stock)}
.sr-why-leg{display:flex;gap:14px;margin-top:6px}
.sr-why-leg span{display:flex;align-items:center;gap:5px}
.sr-why-leg i{width:8px;height:8px;border-radius:2px}
.sr-why-note{color:var(--muted);font-size:11.5px;margin-top:4px}
.sr-why-sec{font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:700;margin:12px 0 4px;padding-top:8px;border-top:1px solid var(--line)}
.sr-why-row{display:grid;grid-template-columns:46px 64px minmax(0,1fr);gap:8px;align-items:baseline;padding:2px 0}
.sr-why-row .v{text-align:right;font-variant-numeric:tabular-nums;color:var(--ink);font-weight:600;white-space:nowrap}
.sr-why-row .r{color:var(--ink-2)}
.sr-why-row.zero .v,.sr-why-row.zero b{color:var(--muted)}
.sr-why-syms{color:var(--muted);margin-top:2px}
.sr-why-warn{margin-top:10px;color:var(--amber)}
@media(max-width:999px){.sr-month-side{margin-top:12px}}
#portMonthFunds .sr-month-funds{margin:10px 0 0}
/* Positions table: action sub-groups inside Stocks / ETFs; merged cells */
#stockPortfolioTableBody tr.sr-subgroup-row td{background:none;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-2);padding:10px 12px 4px;border-bottom:1px solid var(--line)}
#stockPortfolioTableBody tr.sr-subgroup-row td span{font-weight:500;color:var(--muted)}
#stockPortfolioTableBody tr.sr-subgroup-row.a0 td{color:var(--sr-monitor)}
#stockPortfolioTableBody tr.sr-subgroup-row.a1 td{color:var(--sr-strong)}
#stockPortfolioTableBody tr.sr-subgroup-row:hover{background:none}
#stockPortfolioTableBody .sr-pos-ret{margin-top:2px;font-size:12px}
#stockPortfolioTableBody .sr-pos-ret .sr-sub{display:inline;margin-left:4px}
#stockPortfolioTableBody .sr-col-price .sr-sub{white-space:nowrap}
@media(max-width:720px){.sr-table.cards tbody tr.sr-subgroup-row{display:block;padding:0}.sr-table.cards tbody tr.sr-subgroup-row td{display:block}}
/* Monthly Plan: left column in the same card style as "Porquê esta divisão"; cash choices */
.sr-month-main{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.sr-funds-line{margin-top:6px}
.sr-funds-btns{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 4px 10px}
.sr-funds-btns .sr-btn{font-size:11.5px;padding:4px 10px}
.sr-month-funds.ok{border-color:color-mix(in srgb,var(--sr-strong) 45%,transparent);background:color-mix(in srgb,var(--sr-strong) 8%,transparent)}
.sr-month-funds.skip{border-color:var(--line);background:none;color:var(--ink-2)}
.sr-link-btn{background:none;border:0;padding:0;color:var(--accent-day);cursor:pointer;font:inherit;text-decoration:underline}
/* Positions table: coloured band on each action sub-group (sell/trim amber, buy green, hold grey) */
#stockPortfolioTableBody tr.sr-subgroup-row td{--act:var(--muted);background:color-mix(in srgb,var(--act) 14%,var(--surface))!important;color:var(--act)!important;border-top:1px solid color-mix(in srgb,var(--act) 35%,transparent);border-bottom:1px solid color-mix(in srgb,var(--act) 35%,transparent);padding:7px 12px}
#stockPortfolioTableBody tr.sr-subgroup-row.a0 td{--act:var(--sr-monitor)}
#stockPortfolioTableBody tr.sr-subgroup-row.a1 td{--act:var(--sr-strong)}
#stockPortfolioTableBody tr.sr-subgroup-row.a2 td{--act:var(--ink-2)}
#stockPortfolioTableBody tr.sr-subgroup-row td span{color:inherit;opacity:.75}
/* My Finances AI box: topics with the key part in bold; Target Gaps column */
.fin-ai-col ul{padding-left:16px}
.fin-ai-col li{margin:3px 0}
.fin-ai-col li b{color:var(--ink);font-weight:700}
.fin-ai-col li b.fin-ai-under{color:var(--accent-day)}
.fin-ai-col li b.fin-ai-over{color:var(--sr-monitor)}
.fin-ai-col li .fin-ai-sub{font-size:11.5px;color:var(--ink-2);margin-top:1px}
/* Dashboard: Total Available Liquidity is a secondary figure — smaller than the other headline values */
html body .overview-kpi-box #ovLiquidityTotal{font-size:16px}
/* Crypto Bot · Missed Opportunities report */
.mo-note{font-size:12px;color:var(--ink-2);margin:6px 0}
.mo-table td.r,.mo-table th.r{text-align:right;font-variant-numeric:tabular-nums}
.mo-details{margin-top:8px}
.mo-details summary{cursor:pointer;font-size:12px;font-weight:650;color:var(--ink)}
/* refresh with a stored session: no login flash while it is restored (see init in app.js) */
html.auth-restoring #authScreen{display:none!important}
/* Dashboard: scheduled-review reminders (docs/REVIEWS.md) */
.mp-reminder{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:10px 0 0;padding:10px 12px;border-radius:10px;border:1px solid color-mix(in srgb,var(--amber) 45%,transparent);background:color-mix(in srgb,var(--amber) 9%,transparent);font-size:12.5px;line-height:1.45;color:var(--ink)}
.mp-reminder .m{color:var(--ink-2);font-size:12px}
.mp-reminder-b{display:flex;gap:6px;flex-wrap:wrap}
.mp-reminder-b .sr-btn{font-size:11.5px;padding:4px 10px}
/* Login: one centred column — big brand (logo + Quanti, no version) above the card */
html body .auth-screen{grid-template-columns:1fr}
html body .auth-panel{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:32px 16px}
.auth-brand-hero{gap:16px}
.auth-brand-hero .logo-mark{width:72px;height:72px;border-radius:20px;font-size:40px;font-weight:750}
html body .auth-brand-hero strong{display:block;font-size:40px;font-weight:700;letter-spacing:-.035em;line-height:1.05;color:var(--ink)}
html body .auth-brand-hero small{display:block;margin-top:4px;font-size:14px;color:var(--muted)}
@media(max-width:520px){.auth-brand-hero .logo-mark{width:56px;height:56px;border-radius:16px;font-size:30px}html body .auth-brand-hero strong{font-size:32px}html body .auth-panel{gap:20px}}
/* Real Estate · Rental Simulator */
.re-soon{font-size:9.5px;padding:1px 6px;margin-left:4px;background:color-mix(in srgb,var(--amber) 18%,transparent);color:var(--amber);border-color:transparent}
.re-layout{display:grid;grid-template-columns:minmax(300px,420px) minmax(0,1fr);gap:16px;align-items:start}
@media(max-width:980px){.re-layout{grid-template-columns:1fr}}
.re-inputs{display:flex;flex-direction:column;gap:10px}
.re-group summary{cursor:pointer;font-weight:700;font-size:13px;color:var(--ink)}
.re-fields{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.re-field{display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:center;gap:10px;font-size:12.5px;color:var(--ink-2)}
.re-l{line-height:1.3}
.re-auto{display:block;font-size:11px;color:var(--muted)}
.re-in{display:flex;align-items:center;gap:6px}
.re-in input,.re-field select{width:100%;min-width:0;background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:6px 8px;color:var(--ink);font:inherit;text-align:right}
.re-field select{text-align:left}
.re-in em{font-style:normal;font-size:11px;color:var(--muted);min-width:34px}
.re-field.is-auto input::placeholder{color:var(--muted);font-style:italic}
.re-results{display:flex;flex-direction:column;gap:12px;min-width:0}
.re-flow{display:flex;flex-direction:column;margin-top:8px}
.re-flow-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 120px;gap:10px;padding:5px 0;border-bottom:1px dashed var(--line);font-size:13px;align-items:baseline}
.re-flow-row b{text-align:right;font-variant-numeric:tabular-nums;font-weight:600}
.re-flow-row b.m{color:var(--muted);font-weight:500}
.re-flow-row small{color:var(--muted);font-size:11.5px}
.re-flow-row.sub{font-weight:650}
.re-flow-row.total{font-weight:700;border-bottom:1px solid var(--line);background:var(--surface-2);padding:7px 6px;border-radius:6px}
.re-flow-row.in b:first-of-type{color:var(--sr-strong)}
.re-note{font-size:12px;color:var(--ink-2);margin:8px 0 0;line-height:1.5}
.re-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-top:8px}
.re-sens{width:100%;border-collapse:separate;border-spacing:3px;margin-top:8px;font-size:12.5px;font-variant-numeric:tabular-nums}
.re-sens th{font-weight:650;color:var(--ink-2);text-align:right;padding:4px 6px}
.re-sens td{text-align:right;padding:6px 8px;border-radius:6px;font-weight:600}
.re-sens td.pos{background:color-mix(in srgb,var(--sr-strong) 16%,transparent);color:var(--ink)}
.re-sens td.neg{background:color-mix(in srgb,#d9534f 16%,transparent);color:var(--ink)}
.re-sens td.cur{outline:2px solid var(--ink);outline-offset:-2px}
.re-soon-card ul{margin:8px 0;padding-left:18px;color:var(--ink-2);font-size:13px;line-height:1.6}
@media(max-width:520px){.re-field{grid-template-columns:1fr}.re-flow-row{grid-template-columns:minmax(0,1fr) 90px}.re-flow-row b.m{display:none}}
/* Real Estate · projection */
.re-chart{width:100%;height:auto;margin-top:4px}
.re-chart .re-grid line{stroke:var(--line);stroke-width:1}
.re-chart .re-grid text{fill:var(--muted);font-size:10px}
.re-chart polyline{fill:none;stroke-width:2.2;stroke-linejoin:round}
.re-l-value{stroke:var(--accent-finance)}
.re-l-debt{stroke:#d9534f}
.re-l-equity{stroke:var(--sr-strong)}
.re-bar-up{fill:color-mix(in srgb,var(--muted) 55%,transparent)}
.re-bar-dn{fill:color-mix(in srgb,#d9534f 45%,transparent)}
.re-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:12px}
@media(max-width:820px){.re-compare{grid-template-columns:1fr}}
.re-compare .re-flow-row{grid-template-columns:minmax(0,1fr) 120px}
.re-years{margin-top:10px}
.re-years summary{cursor:pointer;font-size:12.5px;font-weight:650;color:var(--ink)}
.re-years .r{text-align:right;font-variant-numeric:tabular-nums}
/* Real Estate: coloured menu icon; invalid number field */
html body .nav-product-header[data-product="realestate"],html[data-theme="dark"] body .nav-product-header[data-product="realestate"]{--prod:#fb923c}
.re-in input.re-bad{border-color:#d9534f}
/* Real Estate: boxes use the app's panel + fin-kpi look; only layout here */
.re-group{margin:0}
.re-group summary{list-style-position:outside}
.re-kpi4{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin:0}
@media(max-width:700px){.re-kpi4{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.re-kpi4 .fin-kpi strong,.re-kpi3 .fin-kpi strong{font-size:20px;font-variant-numeric:tabular-nums}
.re-kpi3{grid-template-columns:repeat(3,minmax(0,1fr))!important;margin:8px 0 10px}
@media(max-width:700px){.re-kpi3{grid-template-columns:1fr!important}}
.re-kpis .fin-kpi strong{font-variant-numeric:tabular-nums}
.re-kpis .fin-kpi small{line-height:1.4}
.fin-kpi.re-good{border-color:color-mix(in srgb,var(--sr-strong) 55%,transparent);background:color-mix(in srgb,var(--sr-strong) 9%,var(--surface-2))}
.fin-kpi.re-bad{border-color:color-mix(in srgb,var(--amber) 55%,transparent);background:color-mix(in srgb,var(--amber) 9%,var(--surface-2))}
