/*
  FRCST Dashboard Design System + Shared Shell v2.0.0
  Canonical chrome, navigation, widget frames, typography and reusable controls.
  Dashboard-local CSS may define unique visualization/layout rules only.
*/
:root{
  --frcst-teal:#2DBFAD;--frcst-teal2:#7ff8ea;--frcst-teal-dim:#2aa898;--frcst-teal-deep:#0d5d55;
  --frcst-dark:#081010;--frcst-dark-mid:#0d1919;--frcst-card:#101f1f;--frcst-card2:#142828;--frcst-card3:#0b1616;
  --frcst-border:#24403f;--frcst-border2:#315553;--frcst-text:#e6f4f2;--frcst-mid:#a8c8c5;--frcst-muted:#78aaa6;
  --frcst-negative:#e05a5a;--frcst-warning:#e8a84a;--frcst-running:#6aa7ff;--frcst-purple:#b98cff;
  --frcst-max:1680px;--frcst-sidebar:320px;--frcst-sidebar-compact:260px;--frcst-gap:18px;--frcst-radius-widget:10px;--frcst-radius-control:8px;
  --frcst-font-sans:'Geist',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --frcst-font-mono:'Geist Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --frcst-font-display:'Syne',var(--frcst-font-sans);
}
html{font-size:16px;background:var(--frcst-dark)}
body.frcst-dashboard.frcst-shell{margin:0;min-height:100vh;color:var(--frcst-text);font:400 13px/1.45 var(--frcst-font-sans);-webkit-font-smoothing:antialiased;background:radial-gradient(circle at 18% 0,rgba(45,191,173,.13),transparent 28%),linear-gradient(rgba(45,191,173,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(45,191,173,.055) 1px,transparent 1px),var(--frcst-dark);background-size:auto,22px 22px,22px 22px}
body.frcst-dashboard.frcst-shell{display:flex;flex-direction:column}
body.frcst-shell *,body.frcst-shell *::before,body.frcst-shell *::after{box-sizing:border-box}
body.frcst-shell .mono{font-family:var(--frcst-font-mono)!important}
body.frcst-shell .muted{color:var(--frcst-muted)!important}
body.frcst-shell .pos{color:var(--frcst-teal)!important}body.frcst-shell .warn{color:var(--frcst-warning)!important}body.frcst-shell .neg{color:var(--frcst-negative)!important}

/* ── Canonical shared header. There is one DOM implementation, generated by shell JS. ── */
body.frcst-shell #header{height:58px!important;padding:0 34px!important;position:sticky!important;top:0!important;z-index:1000!important;background:linear-gradient(180deg,rgba(12,27,27,.985),rgba(9,22,22,.975))!important;border-bottom:1px solid rgba(45,191,173,.28)!important;box-shadow:0 7px 24px rgba(0,0,0,.22),0 1px 0 rgba(45,191,173,.035)!important;backdrop-filter:blur(10px)!important}
body.frcst-shell #header .header-inner{height:58px!important;max-width:var(--frcst-max)!important;margin:0 auto!important;display:flex!important;align-items:center!important;gap:18px!important;padding:0!important}
body.frcst-shell #header .header-logo{display:flex!important;align-items:center!important;gap:11px!important;min-width:0!important;padding-right:30px!important;border-right:1px solid rgba(45,191,173,.25)!important;color:inherit!important;text-decoration:none!important;flex:0 0 auto!important;font:inherit!important;letter-spacing:0!important}
body.frcst-shell #header .frcst-brand-mark{width:28px!important;height:28px!important;display:grid!important;place-items:center!important;flex:0 0 28px!important;margin:0!important;filter:drop-shadow(0 0 9px rgba(45,191,173,.28))!important}
body.frcst-shell #header .frcst-brand-mark svg{width:28px!important;height:28px!important;display:block!important;margin:0!important}
body.frcst-shell #header .frcst-brand-copy{display:flex!important;flex-direction:column!important;gap:4px!important;line-height:1!important}
body.frcst-shell #header .frcst-brand-name{font:800 16px/1 var(--frcst-font-sans)!important;letter-spacing:.08em!important;color:#2ec9b6!important}
body.frcst-shell #header .frcst-brand-tagline{font:500 8.5px/1.15 var(--frcst-font-mono)!important;letter-spacing:.18em!important;text-transform:uppercase!important;color:#fff!important;white-space:nowrap!important}
body.frcst-shell #header .frcst-header-page-pill{display:inline-flex!important;align-items:center!important;min-height:31px!important;padding:7px 12px!important;border:1px solid rgba(45,191,173,.52)!important;border-radius:999px!important;background:rgba(45,191,173,.07)!important;color:var(--frcst-teal2)!important;font:600 10px/1 var(--frcst-font-mono)!important;letter-spacing:.12em!important;text-transform:uppercase!important;white-space:nowrap!important}
body.frcst-shell #header .shell-badge{font:500 9.5px/1 var(--frcst-font-mono)!important;text-transform:uppercase!important;letter-spacing:.14em!important;color:#a9c9c6!important;border:1px solid rgba(45,191,173,.30)!important;border-radius:99px!important;padding:5px 10px!important;background:rgba(255,255,255,.015)!important;white-space:nowrap!important}
body.frcst-shell #header .spacer{flex:1!important}
body.frcst-shell #header .header-meta{display:flex!important;align-items:center!important;gap:9px!important;white-space:nowrap!important;color:#8eb5b2!important;font:500 10px/1 var(--frcst-font-mono)!important}
body.frcst-shell #header .header-meta b,body.frcst-shell #header #sysState,body.frcst-shell #header #headerUtc,body.frcst-shell #header #updatedTop,body.frcst-shell #header #dashboardVersion{color:var(--frcst-teal2)!important;font-weight:600!important}
body.frcst-shell #header .header-version{color:#8eb5b2!important;font-size:10px!important}

/* ── Titlebar is also shell-owned. ── */
body.frcst-shell #titlebar{padding:22px 34px!important;background:linear-gradient(180deg,rgba(8,18,18,.88),rgba(7,16,16,.78))!important;border-bottom:1px solid rgba(45,191,173,.16)!important;box-shadow:inset 0 -1px 0 rgba(255,255,255,.01)!important}
body.frcst-shell #titlebar .title-inner{max-width:var(--frcst-max)!important;margin:0 auto!important;padding:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:24px!important;align-items:end!important}
body.frcst-shell #titlebar .eyebrow{margin:0 0 7px!important;color:var(--frcst-teal)!important;font:600 10px/1 var(--frcst-font-mono)!important;letter-spacing:.18em!important;text-transform:uppercase!important}
body.frcst-shell #titlebar .title{margin:0!important;color:var(--frcst-text)!important;font:700 29px/1.12 var(--frcst-font-display)!important;letter-spacing:-.03em!important}
body.frcst-shell #titlebar .subtitle{margin:6px 0 0!important;color:#83b2ae!important;font:400 13px/1.45 var(--frcst-font-sans)!important}

/* ── Status + Live Connection ── */
body.frcst-shell .status-dot,body.frcst-shell .frcst-status-dot{width:8px!important;height:8px!important;flex:0 0 8px!important;border-radius:50%!important;background:var(--frcst-muted)!important;box-shadow:none!important}
body.frcst-shell .status-dot.healthy,body.frcst-shell .frcst-status-dot--healthy{background:var(--frcst-teal)!important;box-shadow:0 0 11px rgba(45,191,173,.70)!important}
body.frcst-shell .status-dot.running,body.frcst-shell .frcst-status-dot--running{background:var(--frcst-running)!important;box-shadow:0 0 11px rgba(106,167,255,.70)!important}
body.frcst-shell .status-dot.attention,body.frcst-shell .frcst-status-dot--attention{background:var(--frcst-warning)!important;box-shadow:0 0 11px rgba(232,168,74,.58)!important}
body.frcst-shell .status-dot.critical,body.frcst-shell .frcst-status-dot--critical{background:var(--frcst-negative)!important;box-shadow:0 0 11px rgba(224,90,90,.58)!important}
@keyframes frcst-pulse{50%{opacity:.35}}
body.frcst-shell .status-dot.connecting,body.frcst-shell .frcst-status-dot--connecting{background:var(--frcst-warning)!important;box-shadow:0 0 11px rgba(232,168,74,.58)!important;animation:frcst-pulse 1.25s ease-in-out infinite}
body.frcst-shell #syncPill.frcst-live-connection{min-width:205px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;padding:12px 14px!important;border:1px solid var(--frcst-border2)!important;border-radius:var(--frcst-radius-widget)!important;background:rgba(16,31,31,.70)!important;box-shadow:none!important}
body.frcst-shell #syncPill .frcst-live-connection__label{color:#84aaa7!important;font:500 9px/1 var(--frcst-font-mono)!important;letter-spacing:.12em!important;text-transform:uppercase!important}
body.frcst-shell #syncPill .frcst-live-connection__value{margin-top:7px!important;color:var(--frcst-teal)!important;font:500 14px/1.2 var(--frcst-font-mono)!important}
body.frcst-shell #syncPill .frcst-live-connection__dot{width:9px!important;height:9px!important;flex:0 0 9px!important;border-radius:50%!important}
body.frcst-shell #syncPill.frcst-live-connection--healthy{border-color:rgba(45,191,173,.34)!important}
body.frcst-shell #syncPill.frcst-live-connection--attention{border-color:rgba(232,168,74,.52)!important;background:rgba(232,168,74,.055)!important}
body.frcst-shell #syncPill.frcst-live-connection--critical{border-color:rgba(224,90,90,.58)!important;background:rgba(224,90,90,.055)!important}

/* ── Shared page frame. Navigation is the first widget in the left column. ── */
body.frcst-shell #page{flex:1 0 auto!important;width:100%!important;max-width:var(--frcst-max)!important;margin:0 auto!important;padding:22px 34px 22px!important;display:grid!important;grid-template-columns:var(--frcst-sidebar) minmax(0,1fr)!important;gap:var(--frcst-gap)!important;align-items:start!important}
body.frcst-shell #page>.frcst-sidebar{display:block!important;min-width:0!important;position:static!important;top:auto!important;align-self:start!important}
body.frcst-shell #page>.frcst-sidebar>*+*{margin-top:18px!important}
body.frcst-shell #page>.frcst-main-slot{min-width:0!important;margin:0!important}
body.frcst-shell #page>.frcst-main-stack{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:18px!important;align-content:start!important}

/* ── Left navigation widget ── */
body.frcst-shell .frcst-nav-widget{overflow:hidden!important}
body.frcst-shell .frcst-nav-widget__body{padding:10px 12px 13px!important}
body.frcst-shell .frcst-nav-home{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;padding:10px 11px;border:1px solid rgba(45,191,173,.18);border-radius:8px;background:rgba(255,255,255,.012);color:var(--frcst-mid);text-decoration:none;font:600 10.5px/1.2 var(--frcst-font-mono)}
body.frcst-shell .frcst-nav-home:hover,body.frcst-shell .frcst-nav-home.active{color:var(--frcst-teal2);border-color:rgba(45,191,173,.46);background:rgba(45,191,173,.10);box-shadow:inset 3px 0 0 var(--frcst-teal)}
body.frcst-shell .frcst-nav-group{padding-top:10px;margin-top:10px;border-top:1px solid rgba(45,191,173,.12)}
body.frcst-shell .frcst-nav-group:first-of-type{margin-top:0}
body.frcst-shell .frcst-nav-group__title{margin:0 0 7px;padding:0 7px;color:var(--frcst-teal);font:600 9px/1.2 var(--frcst-font-mono);letter-spacing:.13em;text-transform:uppercase}
body.frcst-shell .frcst-nav-link{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:34px;padding:8px 9px;border:1px solid transparent;border-radius:8px;color:#a6c4c1;text-decoration:none;font:500 10.5px/1.25 var(--frcst-font-mono)}
body.frcst-shell .frcst-nav-link:hover{color:var(--frcst-teal2);background:rgba(45,191,173,.055);border-color:rgba(45,191,173,.18)}
body.frcst-shell .frcst-nav-link.active{color:var(--frcst-teal2);background:rgba(45,191,173,.105);border-color:rgba(45,191,173,.34);box-shadow:inset 3px 0 0 var(--frcst-teal)}
body.frcst-shell .frcst-nav-link__marker{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:rgba(120,170,166,.38)}
body.frcst-shell .frcst-nav-link.active .frcst-nav-link__marker{background:var(--frcst-teal);box-shadow:0 0 8px rgba(45,191,173,.65)}
body.frcst-shell .frcst-nav-link[data-state="planned"]{opacity:.60}

/* ── Canonical calm widget frame. No teal halo by default. ── */
body.frcst-shell .panel,body.frcst-shell .frcst-panel{position:relative!important;background:rgba(16,31,31,.92)!important;border:1px solid rgba(45,191,173,.34)!important;border-radius:var(--frcst-radius-widget)!important;box-shadow:0 14px 36px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.02)!important;overflow:hidden!important}
body.frcst-shell .panel::before,body.frcst-shell .frcst-panel::before{display:none!important;content:none!important}
body.frcst-shell .panel-head,body.frcst-shell .frcst-panel__header{min-height:46px!important;padding:13px 16px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;border-bottom:1px solid rgba(45,191,173,.18)!important;background:linear-gradient(180deg,rgba(17,34,34,.58),rgba(10,20,20,.24))!important}
body.frcst-shell .panel-title,body.frcst-shell .frcst-panel__title{display:flex!important;align-items:center!important;gap:9px!important;color:#b5d2cf!important;font:600 10px/1 var(--frcst-font-mono)!important;letter-spacing:.13em!important;text-transform:uppercase!important}
body.frcst-shell .panel-title::before,body.frcst-shell .frcst-panel__title::before{content:''!important;width:18px!important;height:2px!important;flex:0 0 18px!important;border-radius:2px!important;background:var(--frcst-teal)!important;box-shadow:none!important}
body.frcst-shell .panel-sub,body.frcst-shell .panel-meta,body.frcst-shell .frcst-panel__meta{color:#82aaa7!important;font:500 9.5px/1.2 var(--frcst-font-mono)!important}

/* ── Shared reusable controls ── */
body.frcst-shell .status-pill{display:inline-flex!important;align-items:center!important;gap:7px!important;min-height:25px!important;padding:5px 8px!important;border:1px solid rgba(45,191,173,.30)!important;border-radius:999px!important;background:rgba(45,191,173,.07)!important;color:var(--frcst-teal2)!important;font:650 8.5px/1 var(--frcst-font-mono)!important;letter-spacing:.08em!important;text-transform:uppercase!important;white-space:nowrap!important}
body.frcst-shell .status-pill.attention{color:var(--frcst-warning)!important;border-color:rgba(232,168,74,.36)!important;background:rgba(232,168,74,.075)!important}
body.frcst-shell .status-pill.critical{color:var(--frcst-negative)!important;border-color:rgba(224,90,90,.42)!important;background:rgba(224,90,90,.08)!important}
body.frcst-shell .btn,body.frcst-shell .frcst-button{appearance:none!important;min-height:34px!important;padding:8px 10px!important;border:1px solid rgba(45,191,173,.28)!important;border-radius:var(--frcst-radius-control)!important;background:rgba(45,191,173,.05)!important;color:var(--frcst-teal2)!important;text-decoration:none!important;font:600 9.5px/1 var(--frcst-font-mono)!important;cursor:pointer!important}
body.frcst-shell .btn:hover,body.frcst-shell .frcst-button:hover{border-color:rgba(45,191,173,.46)!important;background:rgba(45,191,173,.10)!important}
body.frcst-shell .btn.disabled,body.frcst-shell .frcst-button[disabled]{opacity:.38!important;pointer-events:none!important}
body.frcst-shell .tabs{display:flex!important;gap:6px!important;flex-wrap:wrap!important}
body.frcst-shell .tab{appearance:none!important;border:1px solid var(--frcst-border2)!important;border-radius:999px!important;background:rgba(0,0,0,.08)!important;color:#82aaa7!important;padding:7px 10px!important;font:500 9.5px/1 var(--frcst-font-mono)!important;cursor:pointer!important}
body.frcst-shell .tab.active,body.frcst-shell .tab:hover{color:var(--frcst-teal2)!important;border-color:rgba(45,191,173,.48)!important;background:rgba(45,191,173,.08)!important}
body.frcst-shell input[type="search"],body.frcst-shell .frcst-input{min-height:38px!important;padding:0 12px!important;color:var(--frcst-text)!important;background:#071010!important;border:1px solid var(--frcst-border2)!important;border-radius:var(--frcst-radius-control)!important;outline:none!important;font:400 10px/1 var(--frcst-font-mono)!important}
body.frcst-shell input[type="search"]:focus,body.frcst-shell .frcst-input:focus{border-color:rgba(45,191,173,.55)!important}
body.frcst-shell input::placeholder{color:var(--frcst-muted)!important}

/* ── KPI strips share typography + separators. Layout remains dashboard-specific. ── */
body.frcst-shell #kpis,body.frcst-shell #kpi-strip{background:rgba(13,25,25,.94)!important;border-bottom:1px solid rgba(45,191,173,.18)!important}
body.frcst-shell .kpi{border-right-color:rgba(45,191,173,.16)!important}
body.frcst-shell .kpi-label{color:#82aaa7!important;font-size:9.5px!important;line-height:1.2!important}
body.frcst-shell .kpi-small{color:#82aaa7!important;font-size:10px!important;line-height:1.4!important}

/* ── Footer ── */
body.frcst-shell .frcst-footer{border-top:1px solid rgba(45,191,173,.16);background:rgba(7,16,16,.76);padding:0 34px;margin-top:0}
body.frcst-shell .frcst-footer__inner{max-width:var(--frcst-max);min-height:54px;margin:0 auto;display:flex;align-items:center;gap:18px;color:#789e9b;font:500 9.5px/1.3 var(--frcst-font-mono)}
body.frcst-shell .frcst-footer__brand{color:#b3cecb;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
body.frcst-shell .frcst-footer__sep{color:rgba(120,170,166,.32)}
body.frcst-shell .frcst-footer__spacer{flex:1}
body.frcst-shell .frcst-footer__accent{color:var(--frcst-teal2)}


@media(max-width:1180px){:root{--frcst-sidebar:280px}}
@media(max-width:980px){
  body.frcst-shell #header{height:54px!important;padding:0 16px!important}body.frcst-shell #header .header-inner{height:54px!important}body.frcst-shell #header .header-logo{padding-right:12px!important}body.frcst-shell #header .shell-badge,body.frcst-shell #header .header-meta .optional{display:none!important}
  body.frcst-shell #titlebar{padding:20px 16px!important}body.frcst-shell #titlebar .title-inner{grid-template-columns:1fr!important}body.frcst-shell #syncPill{justify-self:start!important}
  body.frcst-shell #page{padding:18px 16px 18px!important;grid-template-columns:1fr!important}body.frcst-shell #page>.frcst-sidebar{display:grid!important;grid-template-columns:1fr!important}
  body.frcst-shell .frcst-nav-widget__body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.frcst-nav-home{grid-column:1/-1}.frcst-nav-group{margin-top:0!important;padding-top:8px!important}
  body.frcst-shell .frcst-footer{padding:0 16px}
}
@media(max-width:620px){
  body.frcst-shell #header .frcst-brand-tagline,body.frcst-shell #header .shell-badge{display:none!important}body.frcst-shell #header .frcst-header-page-pill{max-width:145px;overflow:hidden;text-overflow:ellipsis}body.frcst-shell #header .header-meta{display:none!important}
  body.frcst-shell #titlebar .title{font-size:26px!important}body.frcst-shell #syncPill{display:none!important}
  body.frcst-shell .frcst-nav-widget__body{grid-template-columns:1fr}.frcst-nav-home{grid-column:auto}
  body.frcst-shell .frcst-footer__inner{flex-wrap:wrap;padding:12px 0;gap:8px 12px}.frcst-footer__spacer{display:none}
}


/* v2.0.1 compact sidebar / footer rail / glow alignment */
body.frcst-shell[data-frcst-sidebar="compact"] #page{grid-template-columns:var(--frcst-sidebar-compact) minmax(0,1fr)!important;gap:14px!important}
body.frcst-shell[data-frcst-sidebar="compact"] .frcst-nav-widget__body{padding:9px 10px 11px!important}
body.frcst-shell[data-frcst-sidebar="compact"] .frcst-nav-home{padding:9px 10px!important;font-size:10px!important}
body.frcst-shell[data-frcst-sidebar="compact"] .frcst-nav-group__title{font-size:8.5px!important;padding:0 6px!important}
body.frcst-shell[data-frcst-sidebar="compact"] .frcst-nav-link{min-height:31px!important;padding:7px 8px!important;font-size:10px!important}
body.frcst-shell .frcst-footer__rail{max-width:var(--frcst-max);margin:0 auto;padding:10px 0 12px;border-top:1px solid rgba(45,191,173,.12)}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail{position:static!important;left:auto!important;right:auto!important;bottom:auto!important;z-index:auto!important;min-height:0!important;width:100%!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;backdrop-filter:none!important;box-shadow:none!important;display:flex!important;align-items:center!important;gap:12px!important;font:500 9.5px/1.35 var(--frcst-font-mono)!important;color:#789e9b!important;white-space:normal!important}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-live{color:var(--frcst-teal2)!important}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-key{color:var(--frcst-teal)!important}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-value{color:#c6dbd8!important}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-sep{color:rgba(120,170,166,.34)!important}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-hide-mobile{display:inline!important}
body.frcst-shell .component.frcst-component--attention{border-color:rgba(232,168,74,.40)!important;background:linear-gradient(180deg,rgba(39,28,11,.46),rgba(12,20,20,.92))!important}
body.frcst-shell .component.frcst-component--critical{border-color:rgba(224,90,90,.48)!important;background:linear-gradient(180deg,rgba(40,18,18,.50),rgba(12,20,20,.92))!important}
body.frcst-shell .summary-card.frcst-component--attention{border-color:rgba(232,168,74,.36)!important}
body.frcst-shell .summary-card.frcst-component--critical{border-color:rgba(224,90,90,.44)!important}
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .history-summary-card,
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .metrics-card,
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .price-level,
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .pnl-history-kpis>div,
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .system-health-card,
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .closed-profile-card,
body.frcst-shell[data-frcst-dashboard="performance"] .profile-card,
body.frcst-shell[data-frcst-dashboard="performance"] .stat,
body.frcst-shell[data-frcst-dashboard="performance"] .system-health-card,
body.frcst-shell[data-frcst-dashboard="performance"] .source-row{box-shadow:none!important;filter:none!important;background:rgba(7,16,16,.38)!important;border-color:rgba(45,191,173,.20)!important}
body.frcst-shell[data-frcst-dashboard="performance"] .profile-card::before{box-shadow:none!important;filter:none!important}
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .pnl-history-widget,
body.frcst-shell[data-frcst-dashboard="performance"] .summary-panel,
body.frcst-shell[data-frcst-dashboard="performance"] .chart-panel,
body.frcst-shell[data-frcst-dashboard="performance"] .data-sources-panel,
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .closed-profile-panel,
body.frcst-shell[data-frcst-dashboard="historical-evidence"] .system-health-panel{box-shadow:0 14px 36px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.02)!important}


/* v2.0.2 · canonical semantic header state text */
body.frcst-shell #header #sysState.frcst-meta-state--healthy{
  color:var(--frcst-teal2)!important;
}
body.frcst-shell #header #sysState.frcst-meta-state--attention{
  color:var(--frcst-warning)!important;
}
body.frcst-shell #header #sysState.frcst-meta-state--critical{
  color:var(--frcst-negative)!important;
}
body.frcst-shell #header #sysState.frcst-meta-state--running{
  color:var(--frcst-running)!important;
}
body.frcst-shell #header #sysState.frcst-meta-state--connecting{
  color:var(--frcst-warning)!important;
}


/* v2.0.3 · canonical widget glow alignment across all dashboards */
:root{
  --frcst-widget-shadow-calm:0 14px 36px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.02);
  --frcst-widget-shadow-inner:0 10px 24px rgba(0,0,0,.14),inset 0 1px 0 rgba(255,255,255,.015);
  --frcst-widget-border-calm:rgba(45,191,173,.24);
  --frcst-widget-border-soft:rgba(45,191,173,.18);
}
body.frcst-shell :is(
  .panel,.frcst-panel,.frcst-nav-widget,.summary-panel,.chart-panel,.data-sources-panel,.system-health-panel,
  .closed-profile-panel,.pnl-history-widget,.market-universe-panel,.market-chart-widget,.perf-panel,.pnl-pct-panel,
  .expanded-chart-widget,.expanded-position-card,.market-expanded-card,.snapshot-layout>.panel,.main-grid>.panel,#sidebar>.panel
){
  box-shadow:var(--frcst-widget-shadow-calm)!important;
  border-color:var(--frcst-widget-border-calm)!important;
  filter:none!important;
}
body.frcst-shell :is(
  .summary-card,.history-summary-card,.metrics-card,.system-health-card,.closed-profile-card,.profile-card,.health-kpi,
  .list-card,.mini-card,.pulse-card,.chart-info-card,.price-path-card,.identity-card,.size-card,.sl-risk-card,.kpi
){
  box-shadow:var(--frcst-widget-shadow-inner)!important;
  border-color:var(--frcst-widget-border-soft)!important;
  filter:none!important;
}
body.frcst-shell[data-frcst-dashboard="historical-evidence"] :is(.history-summary-card,.metrics-card,.system-health-card,.closed-profile-card,.price-level,.pnl-history-kpis>div),
body.frcst-shell[data-frcst-dashboard="performance"] :is(.profile-card,.stat,.system-health-card,.source-row),
body.frcst-shell[data-frcst-dashboard="market-observer"] :is(.list-card,.mini-card,.chart-info-card),
body.frcst-shell[data-frcst-dashboard="risk-protection"] :is(.history-summary-card,.metrics-card,.price-path-card,.identity-card,.size-card,.sl-risk-card){
  box-shadow:var(--frcst-widget-shadow-inner)!important;
  border-color:var(--frcst-widget-border-soft)!important;
  filter:none!important;
}


/* ── v2.1.0 · canonical surface system + overlay navigation ── */
:root{
  --frcst-surface-bg:linear-gradient(180deg,rgba(15,30,30,.955),rgba(9,20,20,.975));
  --frcst-surface-bg-subtle:rgba(7,17,17,.56);
  --frcst-surface-border:rgba(45,191,173,.27);
  --frcst-surface-border-subtle:rgba(45,191,173,.16);
  --frcst-surface-shadow:0 14px 34px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.018);
}
body.frcst-dashboard.frcst-shell{
  background-color:var(--frcst-dark)!important;
  background-image:linear-gradient(rgba(45,191,173,.050) 1px,transparent 1px),linear-gradient(90deg,rgba(45,191,173,.050) 1px,transparent 1px)!important;
  background-size:22px 22px,22px 22px!important;
  background-position:0 0,0 0!important;
}
body.frcst-shell .frcst-surface{
  background:var(--frcst-surface-bg)!important;
  border:1px solid var(--frcst-surface-border)!important;
  border-radius:var(--frcst-radius-widget)!important;
  box-shadow:var(--frcst-surface-shadow)!important;
  filter:none!important;
  outline:none!important;
}
body.frcst-shell .frcst-surface::before,
body.frcst-shell .frcst-surface::after{box-shadow:none!important;filter:none!important;text-shadow:none!important}
body.frcst-shell .frcst-surface-subtle{
  background:var(--frcst-surface-bg-subtle)!important;
  border-color:var(--frcst-surface-border-subtle)!important;
  box-shadow:none!important;
  filter:none!important;
}
/* Status dots keep their semantic glow; widgets themselves do not use teal halo. */
body.frcst-shell .frcst-surface:hover{box-shadow:var(--frcst-surface-shadow)!important}

/* No navigation column is injected anymore. Existing dashboard sidebars remain intact. */
body.frcst-shell[data-frcst-has-sidebar="false"] #page{grid-template-columns:minmax(0,1fr)!important}
body.frcst-shell[data-frcst-has-sidebar="false"] #page>.frcst-main-slot{grid-column:1!important;min-width:0!important}
body.frcst-shell[data-frcst-has-sidebar="true"] #page{grid-template-columns:var(--frcst-sidebar) minmax(0,1fr)!important}
body.frcst-shell[data-frcst-has-sidebar="true"][data-frcst-sidebar="compact"] #page{grid-template-columns:var(--frcst-sidebar-compact) minmax(0,1fr)!important}

/* Hamburger / hover navigation. It overlays content and consumes no dashboard width. */
body.frcst-shell .frcst-nav-overlay{position:relative;z-index:2100;flex:0 0 auto}
body.frcst-shell .frcst-nav-trigger{width:34px;height:34px;padding:0;border:1px solid rgba(45,191,173,.34);border-radius:9px;background:rgba(45,191,173,.045);display:grid;place-content:center;gap:4px;cursor:pointer;transition:border-color .12s,background .12s;appearance:none}
body.frcst-shell .frcst-nav-trigger span{display:block;width:15px;height:1.5px;border-radius:2px;background:#9bc3c0;transition:transform .14s,opacity .14s,background .12s}
body.frcst-shell .frcst-nav-overlay:hover .frcst-nav-trigger,
body.frcst-shell .frcst-nav-overlay:focus-within .frcst-nav-trigger,
body.frcst-shell .frcst-nav-overlay[data-open="true"] .frcst-nav-trigger{border-color:rgba(45,191,173,.68);background:rgba(45,191,173,.10)}
body.frcst-shell .frcst-nav-overlay:hover .frcst-nav-trigger span,
body.frcst-shell .frcst-nav-overlay:focus-within .frcst-nav-trigger span,
body.frcst-shell .frcst-nav-overlay[data-open="true"] .frcst-nav-trigger span{background:var(--frcst-teal2)}
body.frcst-shell .frcst-nav-flyout{position:absolute;top:100%;left:0;width:310px;max-height:calc(100vh - 86px);padding-top:10px;overflow:auto;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-5px);transition:opacity .13s,transform .13s,visibility .13s;z-index:2200}
body.frcst-shell .frcst-nav-overlay:hover .frcst-nav-flyout,
body.frcst-shell .frcst-nav-overlay:focus-within .frcst-nav-flyout,
body.frcst-shell .frcst-nav-overlay[data-open="true"] .frcst-nav-flyout{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
body.frcst-shell .frcst-nav-flyout>.frcst-nav-widget{margin:0!important;background:rgba(10,23,23,.985)!important;border-color:rgba(45,191,173,.36)!important;box-shadow:0 22px 52px rgba(0,0,0,.52)!important;backdrop-filter:blur(14px)!important}
body.frcst-shell .frcst-nav-flyout .frcst-nav-widget__body{padding:10px 12px 13px!important}
body.frcst-shell .frcst-nav-flyout .frcst-nav-link{min-height:33px!important}

@media(max-width:980px){
 body.frcst-shell[data-frcst-has-sidebar="true"] #page,body.frcst-shell[data-frcst-has-sidebar="false"] #page{grid-template-columns:1fr!important}
 body.frcst-shell .frcst-nav-flyout{position:fixed;top:58px;left:12px;width:min(330px,calc(100vw - 24px));max-height:calc(100vh - 72px);padding-top:0}
}
@media(max-width:620px){body.frcst-shell .frcst-nav-trigger{width:32px;height:32px}.frcst-header-page-pill{display:none!important}}


/* v2.1.1 · single-row canonical footer
   The operational live rail is part of the footer, never a row below it. */
body.frcst-shell .frcst-footer{
  position:relative!important;
  z-index:40!important;
  width:100%!important;
  padding:0 34px!important;
  margin:auto 0 0!important;
  border-top:1px solid rgba(45,191,173,.18)!important;
  background:rgba(7,16,16,.96)!important;
  box-shadow:none!important;
}
body.frcst-shell .frcst-footer__inner{
  max-width:var(--frcst-max)!important;
  min-height:54px!important;
  margin:0 auto!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  white-space:nowrap!important;
  font:500 9.5px/1.35 var(--frcst-font-mono)!important;
  color:#789e9b!important;
}
body.frcst-shell .frcst-footer__brand{
  color:#b9cfcc!important;
  font-weight:600!important;
  letter-spacing:.04em!important;
}
body.frcst-shell .frcst-footer__shell{
  color:#789e9b!important;
}
body.frcst-shell .frcst-footer__rail{
  flex:1 1 auto!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail{
  position:static!important;
  inset:auto!important;
  z-index:auto!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  backdrop-filter:none!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-value{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-spacer{
  flex:1 1 auto!important;
}
body.frcst-shell .frcst-footer__fallback-utc{
  margin-left:auto!important;
}
@media(max-width:1180px){
  body.frcst-shell .frcst-footer{padding:0 20px!important}
  body.frcst-shell .frcst-footer__shell{display:none!important}
  body.frcst-shell .frcst-footer #liveRail.frcst-docked-rail .rail-hide-mobile{display:none!important}
}
@media(max-width:760px){
  body.frcst-shell .frcst-footer{padding:0 16px!important}
  body.frcst-shell .frcst-footer__brand,
  body.frcst-shell .frcst-footer__sep{display:none!important}
  body.frcst-shell .frcst-footer__inner{min-height:48px!important}
}


/* v2.1.3 · header position stability
   Deliberately minimal. v2.1.2 width/max-width overrides were removed.
   Every dashboard reserves the same physical vertical scrollbar lane,
   preventing the centered shell/header from shifting a few pixels when
   moving between pages with different document heights. */
html{
  overflow-y:scroll!important;
  scrollbar-gutter:auto!important;
}


/* v2.1.5 · static footer and canonical document/internal scrollbars
   Scrollbar appearance is the former Signal Provider scrollbar, now owned only here. */
html{overflow-y:auto!important;scrollbar-gutter:stable!important}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:#071111}
::-webkit-scrollbar-thumb{background:#1d5b55;border:2px solid #071111;border-radius:999px}
::-webkit-scrollbar-thumb:hover{background:#29766d}

/* Legacy live rails stay in the DOM for dashboard scripts, but are no longer part of the footer UI. */
body.frcst-shell #liveRail{display:none!important}
body.frcst-shell .frcst-footer{padding:0 34px!important}
body.frcst-shell .frcst-footer__inner{max-width:var(--frcst-max)!important;min-height:54px!important;margin:0 auto!important;display:flex!important;align-items:center!important;gap:18px!important;flex-wrap:nowrap!important}
body.frcst-shell .frcst-footer__brand{display:inline!important;white-space:nowrap!important}
body.frcst-shell .frcst-footer__spacer{display:block!important;flex:1 1 auto!important}
body.frcst-shell .frcst-footer__shell{display:inline!important;margin-left:auto!important;white-space:nowrap!important;text-align:right!important}
@media(max-width:760px){
  body.frcst-shell .frcst-footer{padding:0 16px!important}
  body.frcst-shell .frcst-footer__inner{min-height:48px!important;gap:10px!important}
  body.frcst-shell .frcst-footer__brand{display:inline!important}
  body.frcst-shell .frcst-footer__shell{display:inline!important;font-size:8.5px!important}
}

/* v2.1.7 · viewport-fit footer and stable conditional scrollbar. */

/* v2.1.8 · flex-column page width correction.
   v2.1.7 made the body a flex column to keep short-page footers at the viewport bottom.
   A flex item with horizontal auto margins must have an explicit cross-size; otherwise
   content-dependent intrinsic sizing can make dashboard content narrower than the canonical
   shell width. Keep max-width, gutters and footer behavior unchanged, but make #page fill
   the available shell width before max-width is applied. */


/* v2.1.9 · hover-safe navigation bridge.
   The flyout box now starts directly below the hamburger and uses transparent
   top padding for the visual 10px gap. This keeps :hover active while the
   pointer travels from the trigger into the menu. */


/* ============================================================================
   v2.2.0 · Responsive operations layer
   Desktop/laptop styling above 980px is intentionally untouched.
   The rules below make the shared chrome and all current dashboards usable on
   phone portrait/landscape and tablet widths without page-level horizontal
   scrolling. Dense data remains available through local scrollers or mobile
   card layouts where a table would otherwise be unusable.
   ============================================================================ */
@media (max-width:980px){
  html{max-width:100%;overflow-x:hidden!important}
  body.frcst-dashboard.frcst-shell{max-width:100%;overflow-x:hidden!important}
  body.frcst-shell #header{
    height:54px!important;
    padding-left:max(12px,env(safe-area-inset-left))!important;
    padding-right:max(12px,env(safe-area-inset-right))!important;
  }
  body.frcst-shell #header .header-inner{height:54px!important;gap:10px!important;min-width:0!important}
  body.frcst-shell #header .header-logo{padding-right:10px!important;gap:9px!important}
  body.frcst-shell #header .frcst-nav-trigger{width:42px!important;height:42px!important;min-width:42px!important;touch-action:manipulation}
  body.frcst-shell #header .frcst-header-page-pill{min-width:0!important;max-width:min(34vw,210px)!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.frcst-shell #titlebar{
    padding:18px max(16px,env(safe-area-inset-right)) 18px max(16px,env(safe-area-inset-left))!important;
  }
  body.frcst-shell #titlebar .title-inner{grid-template-columns:minmax(0,1fr)!important;gap:14px!important;align-items:start!important}
  body.frcst-shell #titlebar .subtitle{max-width:100%!important;overflow-wrap:anywhere}
  body.frcst-shell #syncPill.frcst-live-connection{justify-self:start!important;min-width:190px!important}
  body.frcst-shell #page{
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:18px max(16px,env(safe-area-inset-right)) 18px max(16px,env(safe-area-inset-left))!important;
  }
  body.frcst-shell #page>.frcst-sidebar,
  body.frcst-shell #page>.frcst-main-slot,
  body.frcst-shell #page>.frcst-main-stack{min-width:0!important;max-width:100%!important}
  body.frcst-shell :is(.panel,.frcst-panel,.frcst-surface,.frcst-surface-subtle){min-width:0!important;max-width:100%}
  body.frcst-shell :is(.panel-head,.frcst-panel__header){min-width:0;gap:8px;flex-wrap:wrap}
  body.frcst-shell :is(.tabs,.toolbar,.console-toolbar,.market-toolbar,.chart-toolbar,.position-chart-controls,.market-chart-controls){max-width:100%;min-width:0}
  body.frcst-shell :is(.table-scroll,.history-wrap,.frcst-scroll){max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}

  /* Navigation becomes a viewport-anchored touch drawer. !important is
     deliberate: legacy dashboard CSS must never position it from the trigger. */
  body.frcst-shell .frcst-nav-overlay{z-index:4000!important}
  body.frcst-shell .frcst-nav-flyout{
    position:fixed!important;
    top:calc(54px + env(safe-area-inset-top))!important;
    left:max(10px,env(safe-area-inset-left))!important;
    right:max(10px,env(safe-area-inset-right))!important;
    bottom:auto!important;
    width:auto!important;
    max-width:420px!important;
    max-height:calc(100vh - 68px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    max-height:calc(100dvh - 68px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    padding-top:8px!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
  }
  body.frcst-shell .frcst-nav-flyout>.frcst-nav-widget{width:100%!important;max-width:100%!important}
  body.frcst-shell .frcst-nav-flyout :is(.frcst-nav-home,.frcst-nav-link){min-height:42px!important;display:flex!important;align-items:center!important}

  /* KPI strips may be dense on desktop. On tablet/landscape phone they become
     a 4-column grid while preserving every metric. */
  body.frcst-shell #kpis{max-width:100%!important;padding-left:max(16px,env(safe-area-inset-left))!important;padding-right:max(16px,env(safe-area-inset-right))!important;overflow:hidden}
  body.frcst-shell #kpis .kpi-inner{grid-template-columns:repeat(4,minmax(0,1fr))!important;max-width:100%!important}
  body.frcst-shell #kpis .kpi{min-width:0!important;padding:15px 14px!important;border-bottom:1px solid rgba(45,191,173,.14)!important}
  body.frcst-shell #kpis .kpi:first-child{padding-left:14px!important}
  body.frcst-shell #kpis .kpi :is(.kpi-label,.kpi-value,.kpi-small){min-width:0;max-width:100%}

  /* Dense tables are always local scrollers at tablet/landscape widths. */
  body.frcst-shell :is(.table-scroll,.history-wrap){overflow-x:auto!important;overflow-y:auto;touch-action:pan-x pan-y}
  body.frcst-shell :is(.table-scroll,.history-wrap) table{max-width:none}

  /* Main information first on position/evidence pages; health/risk sidebar
     follows below on narrow screens instead of delaying the primary task. */
  body.frcst-shell[data-frcst-dashboard="risk-protection"] #page>.frcst-main-slot,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] #page>.frcst-main-slot,
  body.frcst-shell[data-frcst-dashboard="market-observer"] #page>.frcst-main-slot,
  body.frcst-shell[data-frcst-dashboard="performance"] #page>.frcst-main-slot{grid-row:1!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] #page>.frcst-sidebar,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] #page>.frcst-sidebar,
  body.frcst-shell[data-frcst-dashboard="market-observer"] #page>.frcst-sidebar,
  body.frcst-shell[data-frcst-dashboard="performance"] #page>.frcst-sidebar{grid-row:2!important}

  /* Orchestrator timeline remains a full-day timeline but is now an explicit
     horizontal touch viewport rather than being clipped by its panel. */
  body.frcst-shell[data-frcst-dashboard="orchestrator"] .timeline-body{
    overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x pan-y;
  }
  body.frcst-shell[data-frcst-dashboard="orchestrator"] .timeline{min-width:900px!important}

  /* Performance chart controls wrap instead of extending beyond the viewport. */
  body.frcst-shell[data-frcst-dashboard="performance"] .chart-toolbar{display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important}
  body.frcst-shell[data-frcst-dashboard="performance"] .profile-line-controls{max-width:100%!important;flex-wrap:wrap!important}

  /* Control Center flow labels are centered inside the mobile layer card. */
  body.frcst-shell[data-frcst-dashboard="control-center"] .flow-label{
    left:50%!important;right:auto!important;transform:translateX(-50%)!important;max-width:calc(100vw - 36px)!important;width:max-content!important;white-space:normal!important;text-align:center!important;line-height:1.35!important;
  }
}

@media (max-width:760px){
  body.frcst-shell #header .header-meta{display:none!important}
  body.frcst-shell #titlebar .title{font-size:25px!important}
  body.frcst-shell #titlebar .eyebrow{line-height:1.35!important}
  body.frcst-shell #syncPill.frcst-live-connection{display:none!important}
  body.frcst-shell .frcst-nav-flyout{max-width:none!important}
  body.frcst-shell .frcst-footer{padding-left:max(14px,env(safe-area-inset-left))!important;padding-right:max(14px,env(safe-area-inset-right))!important}

  /* Touch-first controls. Dense chip rows scroll locally rather than forcing
     the document wider. */
  body.frcst-shell :is(.tabs,.position-chart-controls,.position-chart-legend,.market-chart-controls,.chart-legend){
    overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
  }
  body.frcst-shell :is(.tab,.filter-btn,.profile-line-toggle,.reset-zoom,.btn,.mexc-btn){min-height:38px}
}

@media (max-width:620px){
  body.frcst-shell #header{padding-left:max(10px,env(safe-area-inset-left))!important;padding-right:max(10px,env(safe-area-inset-right))!important}
  body.frcst-shell #header .header-logo{padding-right:9px!important;border-right:0!important}
  body.frcst-shell #header .frcst-brand-tagline,
  body.frcst-shell #header .frcst-header-page-pill,
  body.frcst-shell #header .shell-badge{display:none!important}
  body.frcst-shell #header .frcst-nav-trigger{width:44px!important;height:44px!important;min-width:44px!important}
  body.frcst-shell .frcst-nav-flyout{
    top:calc(54px + env(safe-area-inset-top))!important;
    left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    max-height:none!important;
    padding-top:6px!important;
  }
  body.frcst-shell .frcst-nav-flyout :is(.frcst-nav-home,.frcst-nav-link){min-height:44px!important;font-size:10.5px!important}
  body.frcst-shell #titlebar{padding:16px max(12px,env(safe-area-inset-right)) 16px max(12px,env(safe-area-inset-left))!important}
  body.frcst-shell #titlebar .title{font-size:24px!important;line-height:1.12!important}
  body.frcst-shell #titlebar .subtitle{font-size:12px!important;line-height:1.45!important}
  body.frcst-shell #page{padding:14px max(12px,env(safe-area-inset-right)) 16px max(12px,env(safe-area-inset-left))!important;gap:14px!important}
  body.frcst-shell #page>.frcst-main-stack{gap:14px!important}
  body.frcst-shell #page>.frcst-sidebar>*+*{margin-top:14px!important}
  body.frcst-shell :is(.panel-head,.frcst-panel__header){padding-left:13px!important;padding-right:13px!important}

  body.frcst-shell #kpis{padding-left:0!important;padding-right:0!important}
  body.frcst-shell #kpis .kpi-inner{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.frcst-shell #kpis .kpi{padding:14px 12px!important;overflow:hidden!important}
  body.frcst-shell #kpis .kpi:first-child{padding-left:12px!important}

  /* Live Positions KPI mini-bars must shrink with their cell. */
  body.frcst-shell[data-frcst-dashboard="risk-protection"] :is(.kpi-pnl-bars,.kpi-exposure-bars,.kpi-risk-stack){min-width:0!important;width:100%!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] .kpi-pnl-row{grid-template-columns:32px minmax(20px,1fr) auto!important;gap:5px!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] .kpi-pnl-values{display:grid!important;gap:1px!important;justify-items:end!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] .kpi-pnl-values :is(b,small){display:block!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] :is(.kpi-exposure-row,.kpi-risk-row){grid-template-columns:32px minmax(18px,1fr) auto!important;gap:5px!important}

  /* ----------------------------------------------------------------------
     Position tables become readable cards in portrait phone view. The full
     desktop table returns automatically above 620px. Expanded charts remain
     directly below the selected card and therefore use the phone width.
     ---------------------------------------------------------------------- */
  body.frcst-shell[data-frcst-dashboard="risk-protection"] .table-scroll,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] .history-wrap{overflow:visible!important;max-height:none!important}

  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history{
    display:block!important;width:100%!important;min-width:0!important;border-collapse:separate!important;
  }
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions thead,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history thead{display:none!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tbody,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tbody{display:grid!important;gap:10px!important;width:100%!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0!important;width:100%!important;padding:7px!important;border:1px solid rgba(45,191,173,.22)!important;border-radius:9px!important;background:rgba(6,16,16,.44)!important;overflow:hidden!important;
  }
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row{grid-template-columns:1fr!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row.active,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row.active{border-color:rgba(45,191,173,.52)!important;background:rgba(45,191,173,.055)!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row td,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row td{
    display:grid!important;grid-template-columns:minmax(68px,.8fr) minmax(0,1.2fr)!important;align-items:center!important;gap:8px!important;min-width:0!important;padding:8px 9px!important;border:0!important;border-bottom:1px solid rgba(45,191,173,.08)!important;text-align:right!important;white-space:normal!important;overflow:visible!important;
  }
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row td::before,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row td::before{
    color:#739b97;font:600 8.5px/1.2 var(--frcst-font-mono);letter-spacing:.08em;text-transform:uppercase;text-align:left;
  }
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row td:nth-child(1),
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row td:nth-child(4){grid-column:1/-1!important;display:block!important;text-align:left!important;font-size:14px!important;padding:10px 9px!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row td:nth-child(1)::before,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row td:nth-child(4)::before{content:none!important}

  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(2)::before{content:"Side"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(3)::before{content:"Status"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(4)::before{content:"Entry"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(5)::before{content:"Current"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(6)::before{content:"TP"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(7)::before{content:"Current SL"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(8)::before{content:"Original SL"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(9)::before{content:"Notional"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(10)::before{content:"PnL"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(11){grid-column:1/-1!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(11)::before{content:"Trade rail"}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(12)::before{content:"Hold"}

  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(1)::before{content:"Closed"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(2)::before{content:"Opened"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(3)::before{content:"Hold"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(5)::before{content:"Side"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(6)::before{content:"Entry"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(7)::before{content:"Exit"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(8)::before{content:"TP"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(9)::before{content:"Current SL"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(10)::before{content:"Original SL"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(11)::before{content:"Notional"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(12)::before{content:"PnL"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(13)::before{content:"Trigger"}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history td:nth-child(14)::before{content:"Result"}

  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-expanded-row,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.position-expanded-row{display:block!important;width:100%!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-expanded-row>td,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.position-expanded-row>td{display:block!important;width:100%!important;max-width:100%!important;padding:0!important;border:0!important}
  body.frcst-shell :is(.expanded-position-card,.expanded-chart-widget){min-width:0!important;max-width:100%!important}
  body.frcst-shell :is(.position-chart-head-actions,.chart-note-row){flex-direction:column!important;align-items:stretch!important;gap:9px!important}
  body.frcst-shell .position-chart-controls{width:100%!important;justify-content:flex-start!important;flex-wrap:nowrap!important;padding-bottom:2px}
  body.frcst-shell .position-chart-legend{display:flex!important;flex-wrap:nowrap!important;gap:12px!important;padding-bottom:8px!important}
  body.frcst-shell .position-chart-scale-note{min-width:220px!important;width:auto!important;margin-left:0!important;white-space:normal!important}
  body.frcst-shell .position-chart-wrap{
    width:100%!important;height:310px!important;aspect-ratio:auto!important;overflow-x:auto!important;overflow-y:hidden!important;padding:4px 0 8px!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x pan-y;
  }
  body.frcst-shell .position-chart-wrap svg{width:720px!important;min-width:720px!important;height:100%!important;max-width:none!important;display:block!important}
  body.frcst-shell .expanded-position-card .detail-grid{grid-template-columns:1fr!important;gap:9px!important}
  body.frcst-shell .chart-note-row .mexc-btn{width:100%!important;justify-content:center!important;text-align:center!important;min-height:44px!important}

  /* Historical filter controls remain reachable as scrollable chip strips. */
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] .history-panel-head{align-items:flex-start!important}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] .history-filter-stack{width:100%!important;min-width:0!important}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] .history-filter-stack .tabs{width:100%!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:2px}
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] .history-search{width:100%!important;min-width:0!important}

  /* Market and provider universe tables retain all columns via a local touch
     scroller. The first column stays visible while swiping horizontally. */
  body.frcst-shell[data-frcst-dashboard="market-observer"] .table-scroll,
  body.frcst-shell[data-frcst-dashboard="signal-provider"] .table-scroll{overflow-x:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
  body.frcst-shell[data-frcst-dashboard="market-observer"] table.universe{min-width:800px!important}
  body.frcst-shell[data-frcst-dashboard="signal-provider"] table.data-table{min-width:560px!important}
  body.frcst-shell[data-frcst-dashboard="market-observer"] table.universe :is(th,td):first-child,
  body.frcst-shell[data-frcst-dashboard="signal-provider"] table.data-table :is(th,td):first-child{position:sticky!important;left:0!important;z-index:3;background:#0c1a1a!important}

  body.frcst-shell[data-frcst-dashboard="performance"] .chart-toolbar{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  body.frcst-shell[data-frcst-dashboard="performance"] .chart-toolbar>*{max-width:100%!important}
  body.frcst-shell[data-frcst-dashboard="performance"] .profile-line-controls{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
  body.frcst-shell[data-frcst-dashboard="performance"] .profile-line-toggle{min-width:0!important;width:auto!important;padding-left:5px!important;padding-right:5px!important}

  /* Event Console already collapses to one workspace column; make filters
     touch-sized and avoid fixed internal heights on a short landscape phone. */
  body.frcst-shell[data-frcst-dashboard="events"] .console-toolbar{align-items:flex-start!important}
  body.frcst-shell[data-frcst-dashboard="events"] .filter-group{max-width:100%!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:2px}
  body.frcst-shell[data-frcst-dashboard="events"] .filter-btn{min-height:38px!important;white-space:nowrap!important}
  body.frcst-shell[data-frcst-dashboard="events"] .event-search{width:100%!important;min-width:0!important;margin-left:0!important}

  /* Reports with desktop KPI strips use the same two-column mobile rhythm. */
  body.frcst-shell[data-frcst-dashboard="daily-signal-report"] .kpi-inner,
  body.frcst-shell[data-frcst-dashboard="daily-model-training-report"] .kpi-inner{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
  body.frcst-shell[data-frcst-dashboard="daily-signal-report"] .kpi-cell,
  body.frcst-shell[data-frcst-dashboard="daily-model-training-report"] .kpi-cell{min-width:0!important;width:auto!important}

  /* Diagnostic/value grids fall to a single readable column on the smallest
     phone widths without changing their tablet/desktop composition. */
  body.frcst-shell[data-frcst-dashboard="position-manager"] :is(.pm-management-kpis,.pm-recon-metrics,.pm-diagnostics-grid,.pm-source-strip){grid-template-columns:1fr!important}
  body.frcst-shell[data-frcst-dashboard="strategy-readiness"] :is(.detail-grid,.mini-grid,.section-grid){grid-template-columns:1fr!important}
}

@media (max-width:430px){
  body.frcst-shell .frcst-footer__inner{min-height:0!important;padding:11px 0!important;display:grid!important;grid-template-columns:1fr!important;gap:5px!important;white-space:normal!important}
  body.frcst-shell .frcst-footer__spacer{display:none!important}
  body.frcst-shell .frcst-footer__shell{margin-left:0!important;text-align:left!important;font-size:8.5px!important}
  body.frcst-shell #kpis .kpi{padding-left:10px!important;padding-right:10px!important}
  body.frcst-shell #kpis .kpi-label{white-space:normal!important;overflow-wrap:anywhere}
}

@media (max-width:360px){
  body.frcst-shell #titlebar .title{font-size:22px!important}
  body.frcst-shell #page{padding-left:10px!important;padding-right:10px!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row,
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row{grid-template-columns:1fr!important}
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions tr.position-row td:nth-child(1),
  body.frcst-shell[data-frcst-dashboard="historical-evidence"] table.history tr.history-row td:nth-child(4),
  body.frcst-shell[data-frcst-dashboard="risk-protection"] table.positions td:nth-child(11){grid-column:auto!important}
}

/* Short phone landscape: retain the same width responsive rules but keep the
   overlay menu within the visible dynamic viewport and reduce wasted chrome. */
@media (max-width:980px) and (max-height:500px){
  body.frcst-shell #titlebar{padding-top:12px!important;padding-bottom:12px!important}
  body.frcst-shell #titlebar .subtitle{margin-top:4px!important}
  body.frcst-shell .frcst-nav-flyout{bottom:6px!important;max-height:none!important}
  body.frcst-shell[data-frcst-dashboard="events"] .event-list{height:min(430px,65vh)!important;height:min(430px,65dvh)!important}
}

/* ============================================================================
   v2.2.1 · Mobile navigation viewport anchoring fix
   A backdrop-filter on an ancestor establishes a containing block for fixed
   descendants in Chromium/WebKit. Because the navigation flyout lives inside
   the sticky header, its mobile position:fixed top/bottom offsets were being
   resolved against the 54px header rather than the viewport. This could reduce
   the flyout itself to only a few pixels high while its panel painted outside
   that box. On responsive widths the header is already effectively opaque, so
   disable the containing-block-producing filter there. Desktop/laptop (>980px)
   remains byte-for-byte governed by the existing v2.2.0 rules.
   ============================================================================ */
@media (max-width:980px){
  body.frcst-shell #header{
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
}
