:root{--chart-bg:#f8f9fa;--accent-fill:#08785f;--soft:#eff3f4;--good-bg:#eaf4ef;--warn-bg:#fff5df;--danger-bg:#fff0f0;--blue-bg:#edf2fb}
.health-strip{display:flex;align-items:center;flex-wrap:wrap;gap:12px 26px;padding:12px 0 18px;border-bottom:1px solid var(--line);margin-bottom:23px;min-height:44px}
.health-item{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted)}.health-item svg{width:14px;height:14px}.health-item strong{font-weight:550;color:var(--ink)}.health-item.healthy svg{color:var(--green)}
.session-state{border-left:3px solid var(--line);padding-left:14px}.session-state strong{font-size:13px;font-weight:700}.session-state small{max-width:275px;overflow-wrap:anywhere}#runner-label[data-state=RUNNING]{color:var(--green)}#runner-label[data-state=UNRESPONSIVE]{color:var(--red)}#runner-label[data-state=PAUSED]{color:var(--amber)}
.metrics-strip{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}.metric-value{font-size:21px}.metric-percent{display:block;font-size:12px;margin-top:5px;min-height:15px}.metric:nth-child(4){padding-left:2px}.metric-foot{color:var(--muted)}
.strategy-pnl{display:flex;gap:7px;align-items:baseline;margin-top:10px;font-variant-numeric:tabular-nums}.strategy-pnl strong{font-size:16px;font-weight:600}.strategy-pnl span{font-size:10px;color:var(--muted)}
.strategy-row p{margin-top:4px;color:var(--muted)}.risk-mini{padding-top:20px;border-top:2px solid var(--line)}.risk-mini .small-row{margin-bottom:10px}.risk-mini strong{font-size:11px;font-variant-numeric:tabular-nums}.risk-mini h3{font-size:12px}
meter{height:9px;margin-top:5px}meter::-webkit-meter-bar{height:9px}meter::-webkit-meter-optimum-value{background:var(--green)}meter[data-level=watch]::-webkit-meter-optimum-value{background:#a59238}meter[data-level=high]::-webkit-meter-optimum-value{background:#c18236}meter[data-level=critical]::-webkit-meter-optimum-value{background:var(--red)}
.risk-caption{font-size:10px;color:var(--muted);margin:7px 0 10px}.risk-caption[data-level=high],.risk-caption[data-level=watch]{color:var(--amber)}.risk-caption[data-level=critical]{color:var(--red);font-weight:650}.next-window{margin-top:15px;border-top:1px solid var(--line);padding-top:12px;font-size:11px;line-height:1.7;color:var(--muted)}
.overview-grid{grid-template-columns:minmax(0,1fr) 310px;align-items:start}.market-section{display:block}.chart-wrap{height:365px;min-height:0;max-height:365px}.strategy-section{padding-left:22px}.strategy-row,.strategy-row:first-child{padding:10px 0}.strategy-section .section-heading{margin-bottom:12px}.risk-mini{margin-top:15px;padding-top:15px}.risk-mini .risk-caption{margin-bottom:8px}
.recent-trade{display:flex;width:100%;align-items:flex-start;justify-content:space-between;gap:15px;text-align:left;background:none;border:0;border-bottom:1px solid var(--line);padding:15px 0;color:var(--ink)}.recent-trade:hover{background:var(--soft)}.recent-trade>span{min-width:0}.recent-trade>span:last-child{text-align:right;max-width:36%}.recent-trade strong{font-size:12px;font-weight:550;overflow-wrap:anywhere}.recent-trade small{font-size:10px;overflow-wrap:anywhere;line-height:1.7}.history-table td{font-size:11px;max-width:210px;overflow-wrap:anywhere}.history-table th{white-space:normal}#view-history .inline-tools{flex-wrap:wrap}#runner-action{min-width:125px}#theme-toggle[aria-checked=true]{color:var(--amber)}
.button.primary,.brand-mark{background:var(--accent-fill);border-color:var(--accent-fill);color:#fff}.button.primary:hover{background:#07634f}.icon-button.danger-text:hover{background:var(--danger-bg)}
[data-theme=dark]{color-scheme:dark;--ink:#e3e7e9;--muted:#a0abb1;--line:#373e42;--surface:#212527;--chart-bg:#181c1e;--green:#52cda8;--blue:#84aff2;--red:#f38e94;--amber:#e5ba64;--soft:#2a3033;--good-bg:#203a32;--warn-bg:#393323;--danger-bg:#3c272c;--blue-bg:#27374b;color:var(--ink);background:var(--chart-bg)}
[data-theme=dark] .sidebar,[data-theme=dark] .topbar,[data-theme=dark] .button,[data-theme=dark] .icon-button,[data-theme=dark] dialog{background:var(--surface);color:var(--ink)}
[data-theme=dark] .button.primary,[data-theme=dark] .brand-mark{background:var(--accent-fill);color:#fff;border-color:var(--accent-fill)}
[data-theme=dark] input,[data-theme=dark] select{background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] .nav-item,[data-theme=dark] label,[data-theme=dark] .breadcrumb strong,[data-theme=dark] .small-row>span:last-child,[data-theme=dark] .text-button{color:var(--muted)}
[data-theme=dark] .nav-item.active,[data-theme=dark] .settings-nav button.active{background:var(--good-bg);color:var(--green)}
[data-theme=dark] .nav-item:hover:not(.active),[data-theme=dark] .button:hover,[data-theme=dark] .icon-button:hover,[data-theme=dark] .trade-row:hover{background:var(--soft)}
[data-theme=dark] .indicator-strip,[data-theme=dark] pre,[data-theme=dark] .activity-icon,[data-theme=dark] .badge,[data-theme=dark] .count{background:var(--soft);color:var(--muted)}
[data-theme=dark] .badge.good,[data-theme=dark] .badge.paper,[data-theme=dark] .contract-icon,[data-theme=dark] .activity-icon.good,[data-theme=dark] .nav-count{background:var(--good-bg);color:var(--green)}
[data-theme=dark] .badge.warn{background:var(--warn-bg);color:var(--amber)}[data-theme=dark] .badge.blue{background:var(--blue-bg);color:var(--blue)}
[data-theme=dark] .badge.bad,[data-theme=dark] .contract-icon.put,[data-theme=dark] .activity-icon.bad{background:var(--danger-bg);color:var(--red)}
[data-theme=dark] .notice{background:var(--warn-bg);color:var(--amber);border-color:#685738}[data-theme=dark] .notice.danger{background:var(--danger-bg);border-color:#734148;color:var(--red)}[data-theme=dark] .notice.neutral{background:var(--soft);color:var(--muted);border-color:var(--line)}
[data-theme=dark] .chart-empty{background:var(--chart-bg)}[data-theme=dark] meter,[data-theme=dark] meter::-webkit-meter-bar{background:var(--soft)}[data-theme=dark] .trade-row{background:transparent}[data-theme=dark] .danger-text{color:var(--red)}
@media(max-width:1250px){.metrics-strip{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:22px}.metrics-strip .metric:nth-child(3n){border:0}.overview-grid{grid-template-columns:minmax(0,1fr) 280px}.metric-value{font-size:22px}.top-actions #clock{display:none}}
@media(max-width:900px){.overview-grid{grid-template-columns:minmax(0,1fr)}.chart-wrap{flex:initial;min-height:275px}.strategy-section{padding-left:0}.health-strip{gap:12px 20px}.topbar{flex-wrap:wrap}.breadcrumb{flex:1}.risk-mini{display:block}.metrics-strip{grid-template-columns:repeat(3,minmax(0,1fr))}.sidebar nav{width:auto}}
@media(max-width:620px){.sidebar{display:flex;flex-wrap:wrap;gap:12px;padding:13px 16px}.brand>span:last-child{display:block;font-size:15px}.brand-sub{display:none}.sidebar nav{display:flex;justify-content:space-between;gap:3px;width:100%;border-top:1px solid var(--line);padding-top:9px}.nav-item{width:38px;min-height:38px}.topbar{padding:10px 16px;gap:12px}.top-actions{gap:7px;margin-left:auto}.top-actions #refresh{display:none}.breadcrumb{min-width:100%;font-size:11px}.session-state>div{display:block}.session-state strong{font-size:13px}.session-state small{font-size:11px;margin-top:4px}.metrics-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}.metrics-strip .metric:nth-child(3n){border-right:1px solid var(--line)}.metrics-strip .metric:nth-child(2n){border-right:0}.metric-value{font-size:22px}.metric-percent{font-size:11px}.health-strip{align-items:flex-start;flex-direction:column;gap:10px;padding-bottom:18px}.health-item{font-size:11px}.history-table td{max-width:none}.recent-trade{padding:14px 0}.chart-wrap{min-height:230px;height:230px}.risk-mini strong{font-size:12px}.risk-caption{font-size:11px}.top-actions .icon-button{width:36px;height:36px}.top-actions .button{min-height:36px}#view-history .inline-tools{width:100%}#history-search{flex:1;min-width:140px}#history-period{flex:1;min-width:130px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.strategy-expander>summary{list-style:none;cursor:pointer;border-radius:3px;min-height:82px;display:block;padding:2px 0}.strategy-expander>summary::-webkit-details-marker{display:none}.strategy-heading-end{display:flex;align-items:center;gap:6px;flex-shrink:0}.strategy-heading-end>svg{width:14px;height:14px;color:var(--muted);transition:transform .15s}.strategy-expander[open] .strategy-heading-end>svg{transform:rotate(180deg)}.strategy-today{display:block;font-size:11px;line-height:1.65;color:var(--muted);margin-top:4px}.strategy-detail-panel{padding:14px 0 7px;border-top:1px solid var(--line);margin-top:10px}.strategy-status{display:flex;gap:10px;justify-content:space-between;align-items:flex-start;font-size:11px;color:var(--muted)}.strategy-status .badge{max-width:75%;text-align:right}.strategy-asof{font-size:10px;line-height:1.7;color:var(--muted);margin-top:10px}.strategy-levels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 10px;margin:17px 0}.strategy-levels dt,.strategy-capacity dt{font-size:10px;color:var(--muted);line-height:1.6}.strategy-levels dd{font-size:12px;font-weight:550;margin:4px 0 0;font-variant-numeric:tabular-nums}.strategy-levels dd small{font-size:10px;font-weight:400}.strategy-filter-table{table-layout:fixed;width:100%;font-size:10px}.strategy-filter-table th:first-child{width:43%}.strategy-filter-table th,.strategy-filter-table td{padding:8px 3px;white-space:normal;font-size:10px;overflow-wrap:anywhere}.strategy-filter-table th{color:var(--muted);font-weight:450}.strategy-filter-table td{text-align:right;font-variant-numeric:tabular-nums}.strategy-filter-table thead th:not(:first-child){text-align:right}.strategy-filter-table .badge{font-size:9px;min-height:20px;padding:2px 5px}.strategy-trigger td{font-weight:600;color:var(--ink)}.strategy-capacity{margin:14px 0 0;border-top:1px solid var(--line);padding-top:7px}.strategy-capacity>div{display:flex;justify-content:space-between;gap:12px;margin-top:8px}.strategy-capacity dd{margin:0;font-size:11px;font-variant-numeric:tabular-nums}.strategy-data-note{font-size:10px;color:var(--muted);line-height:1.6;margin-top:9px}
@media(max-width:620px){.strategy-filter-table thead{display:table-header-group}.strategy-filter-table tr{display:table-row}.strategy-filter-table td{display:table-cell}.strategy-filter-table tbody th{display:table-cell}.strategy-filter-table th:first-child{width:46%}.strategy-expander>summary{min-height:86px}.strategy-detail-panel{padding-bottom:15px}.strategy-filter-table th,.strategy-filter-table td{font-size:11px;padding:9px 4px}.strategy-status,.strategy-capacity dd{font-size:12px}}
@media(max-width:620px){.history-table .trade-row td:last-child{display:block;grid-column:1/-1;padding:10px 0 0}.history-table .trade-row td:last-child::before{content:attr(data-label);display:block;font-size:10px;color:var(--muted);margin-bottom:5px}}
.pnl-toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 22px;padding:12px 0;border-bottom:1px solid var(--line)}
.pnl-inputs{display:flex;align-items:center;gap:18px;flex-wrap:wrap;min-width:0}
.pnl-inputs label{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted)}
.pnl-inputs select{width:135px;min-height:36px;color:var(--ink)}
.pnl-history input{width:16px;height:16px;accent-color:var(--green);margin:0}
.pnl-inputs .pnl-history{flex-direction:row}
.pnl-toolbar small{font-size:11px}
@media(max-width:1150px){.pnl-toolbar{align-items:flex-start;flex-direction:column}}
@media(max-width:620px){.pnl-inputs{gap:12px}.pnl-toolbar{gap:12px}.pnl-inputs label{font-size:11px}.pnl-history{min-height:30px}.metric-percent{overflow-wrap:anywhere}}
.portfolio-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 14px;margin-bottom:12px}
.portfolio-heading small{font-size:11px}
.portfolio-summary{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0 23px;margin-bottom:25px}
.portfolio-summary-controls{justify-content:flex-end;gap:10px 16px;margin-bottom:16px}
.portfolio-summary-controls label{flex-direction:row;gap:7px;font-size:11px}
.portfolio-summary-controls select{width:108px;height:28px;min-height:28px;padding:3px 7px;font-size:11px;border-radius:4px}
.portfolio-summary-controls .pnl-history{min-height:28px}
.portfolio-summary-controls .pnl-history input{width:14px;height:14px}
.portfolio-summary .metrics-strip{margin:0;padding:0;border:0}
@media(max-width:620px){.portfolio-summary-controls{gap:6px 12px;margin-bottom:18px}.portfolio-summary-controls select{height:32px;min-height:32px}.portfolio-summary-controls .pnl-history{min-height:32px}.portfolio-summary-controls label{font-size:10px}}

/* Shared report language for secondary workspace pages. */
.view-toolbar{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:0 0 22px;padding:12px 0 20px;border-bottom:1px solid var(--line)}
.view-toolbar>div:first-child{min-width:0}.view-toolbar h2{font-size:17px}.view-toolbar h2+small{margin-top:3px;max-width:620px}
.view-toolbar.pnl-toolbar{margin-bottom:0}.page-summary-strip{grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 26px;padding:2px 0 25px}
.page-summary-strip .metric-value{font-size:22px}.page-summary-strip .metric:nth-child(4){padding-left:0}
.content-section{min-width:0;padding-top:3px}.content-section>.section-heading{margin-bottom:10px}.content-section>.section-heading>.subtle{font-variant-numeric:tabular-nums}
.report-section{margin-top:0;padding-top:25px}.report-grid>.section{padding-top:25px}
#view-positions .empty-state,#view-history .empty-state,#view-activity .empty-state{min-height:180px;border-bottom:1px solid var(--line)}
#view-activity .activity-item:first-child{border-top:1px solid var(--line)}
@media(max-width:900px){.view-toolbar{align-items:flex-start}.page-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:22px}.page-summary-strip .metric:nth-child(2){border-right:0}.page-summary-strip .metric:nth-child(3){border-right:1px solid var(--line)}}
@media(max-width:620px){.view-toolbar{align-items:flex-start;flex-direction:column;gap:14px;padding-top:4px}.view-toolbar .inline-tools{flex-wrap:wrap}.view-toolbar .inline-tools select{flex:1}.view-toolbar>select{width:100%}.page-summary-strip{margin-bottom:22px}.page-summary-strip .metric-value{font-size:21px}.content-section>.section-heading{align-items:flex-end}.content-section .segmented{order:2}.report-grid>.section{padding-top:20px}}
