/* Forecasting Lab */
#forecast-lab { --fc-good:#2f7d55; --fc-bad:#b94444; --fc-warn:#b7791f; --fc-muted:var(--text-secondary, #5d6f63); position:relative; }
#forecast-lab.is-running .fc-body { opacity:.6; transition:opacity .2s; pointer-events:none; }
#forecast-lab .good { color:var(--fc-good); } #forecast-lab .bad { color:var(--fc-bad); }
.fc-bar-top { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px 20px; padding:14px 18px; margin-bottom:14px; }
.fc-bar-top label, .fc-controls label, .fc-form-grid label, .fc-filters label { display:flex; flex-direction:column; gap:6px; font-size:12px; font-weight:600; color:var(--fc-muted); }
.fc-bar-top select { min-width:240px; }
#forecast-lab select, #forecast-lab input:not([type=checkbox]) { height:40px; border:1px solid var(--line); border-radius:8px; padding:0 10px; background:var(--surface); color:inherit; font:inherit; font-size:14px; font-weight:500; }
#forecast-lab small { font-weight:400; }
.fc-ds-meta { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; font-size:13px; color:var(--fc-muted); padding-bottom:8px; }
.fc-ds-meta span, .fc-run, .fc-export, .fc-disclaimer, .fc-notes span, .fc-pat-text, .fc-source h3 { display:inline-flex; align-items:center; gap:6px; }
.fc-ds-meta .lucide, .fc-notes .lucide, .fc-disclaimer .lucide, .fc-pat-text .lucide, .fc-source h3 .lucide, .fc-export .lucide { width:15px; height:15px; flex:none; }
.fc-synthetic { color:#9a4d00; background:#fff1dc; border:1px solid #f0c98c; border-radius:999px; padding:3px 10px; font-weight:600; }
.fc-synthetic-text { display:block; color:#9a4d00; font-weight:600; }
.fc-run { margin-inline-start:auto; gap:10px; font-size:13px; padding-bottom:2px; }
.fc-tabs { display:flex; gap:4px; overflow-x:auto; border-bottom:1px solid var(--line); margin-bottom:14px; scrollbar-width:none; }
.fc-tabs button { display:inline-flex; align-items:center; gap:7px; padding:10px 14px; border:0; border-bottom:2px solid transparent; background:none; color:var(--fc-muted); font:inherit; font-size:14px; font-weight:600; cursor:pointer; white-space:nowrap; }
.fc-tabs button .lucide { width:16px; height:16px; }
.fc-tabs button.active { color:var(--accent-text); border-bottom-color:var(--accent-text); }
.fc-notes { display:flex; flex-direction:column; gap:4px; margin:0 0 12px; font-size:13px; color:var(--fc-muted); }
.fc-controls { display:flex; flex-wrap:wrap; gap:12px 16px; align-items:flex-end; padding:14px 18px; margin-bottom:14px; }
.fc-controls label { min-width:160px; }
.fc-scen-inputs span { display:flex; gap:8px; } .fc-scen-inputs input { width:130px; }
.fc-views { display:inline-flex; border:1px solid var(--line); border-radius:9px; overflow:hidden; margin-inline-start:auto; }
.fc-views button { display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border:0; background:var(--surface); color:var(--fc-muted); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.fc-views button + button { border-inline-start:1px solid var(--line); }
.fc-views button .lucide { width:15px; height:15px; }
.fc-views button.active { background:var(--accent-soft); color:var(--accent-text); }
.fc-strip { grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); margin-bottom:14px; }
.fc-strip span { display:block; margin-top:6px; font-size:12px; color:var(--fc-muted); }
.fc-card { margin-bottom:16px; }
.fc-card .card-header { gap:12px; flex-wrap:wrap; }
.fc-card > *:not(.card-header):not(.table-scroll) { margin-inline:21px; }
.fc-card > .small-note { display:flex; gap:6px; align-items:flex-start; margin-bottom:14px; }
.fc-card > .small-note .lucide { width:14px; height:14px; flex:none; margin-top:2px; }
.fc-chart-wrap { overflow-x:auto; padding-bottom:6px; }
.fc-chart { width:100%; min-width:560px; height:auto; display:block; }
.fc-grid { stroke:var(--line); stroke-width:1; }
.fc-axis { fill:var(--fc-muted); font-size:12px; }
.fc-cat { font-weight:600; }
.fc-actual { fill:none; stroke:var(--ink, #1e2b23); stroke-width:2; }
.fc-forecast { fill:none; stroke:var(--fc-good); stroke-width:2.5; stroke-dasharray:7 5; }
.fc-extra { fill:none; stroke-width:2.2; }
.fc-band { fill:var(--fc-good); opacity:.14; }
.fc-divider { stroke:var(--fc-muted); stroke-dasharray:2 4; }
.fc-divider-label { fill:var(--fc-muted); font-size:12px; font-weight:600; }
.fc-hover { fill:transparent; } .fc-hover:hover { fill:var(--accent-soft); opacity:.5; }
.fc-bar { opacity:.9; } .fc-bar:hover { opacity:1; } .fc-bar.is-actual { opacity:.5; }
.fc-bar-value { fill:var(--fc-muted); font-size:12px; font-weight:600; }
.fc-point { fill:var(--fc-good); stroke:var(--surface); stroke-width:2; }
.fc-mark-strong { fill:var(--fc-good); } .fc-mark-weak { fill:var(--fc-bad); }
.fc-legend { display:flex; flex-wrap:wrap; gap:6px 16px; margin:8px 0 12px; font-size:12px; color:var(--fc-muted); }
.fc-legend span { display:inline-flex; align-items:center; gap:6px; }
.fc-key { display:inline-block; width:16px; height:10px; border-radius:3px; }
.fc-key-actual { background:var(--ink, #1e2b23); height:3px; }
.fc-key-forecast { background:repeating-linear-gradient(90deg, var(--fc-good) 0 6px, transparent 6px 9px); height:3px; }
.fc-key-band { background:var(--fc-good); opacity:.2; }
.fc-dot { display:inline-block; width:8px; height:8px; border-radius:50%; }
.fc-dot.fc-mark-strong { background:var(--fc-good); } .fc-dot.fc-mark-weak { background:var(--fc-bad); }
.fc-table td { vertical-align:top; }
.fc-table td small { display:block; font-size:12px; color:var(--fc-muted); margin-top:2px; }
.fc-table tr.is-selected td { background:var(--accent-soft); }
.fc-table td .button { margin-inline-end:6px; }
.fc-why { min-width:280px; white-space:normal; font-size:13px; line-height:1.5; color:var(--fc-muted); }
.fc-why details { margin-top:6px; }
.fc-why summary { cursor:pointer; color:var(--accent-text); font-weight:600; }
.fc-why ul { list-style:none; margin:6px 0 0; padding:0; display:grid; gap:3px; }
.fc-why li { display:grid; grid-template-columns:1fr auto auto; gap:8px; font-size:12px; }
.fc-why li small { margin:0; }
.fc-plan-table th, .fc-plan-table td { white-space:nowrap; }
.fc-plan-table td.fc-why { white-space:normal; }
.fc-conf, .fc-demand { display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:600; text-transform:capitalize; }
.fc-conf-high { background:#e3f2e8; color:#2f6b47; } .fc-conf-medium { background:#fff1dc; color:#8a5a12; } .fc-conf-low { background:#f6e1e1; color:#9b3838; }
.fc-demand-strong { background:#e3f2e8; color:#2f6b47; } .fc-demand-normal { background:var(--surface-soft, #eef2ef); color:var(--fc-muted); }
.fc-demand-weak { background:#f6e1e1; color:#9b3838; } .fc-demand-low-confidence { background:#ececec; color:#666; }
.fc-filters { display:flex; flex-wrap:wrap; gap:10px 14px; margin-bottom:10px; }
.fc-filters select, .fc-filters input { min-width:150px; }
.fc-export { flex-wrap:wrap; gap:8px; margin:6px 21px 16px; font-size:13px; font-weight:600; color:var(--fc-muted); }
.fc-conflicts { display:flex; gap:10px; align-items:flex-start; margin-bottom:14px; }
.fc-conflicts .lucide { width:16px; height:16px; flex:none; margin-top:2px; }
.fc-conflicts ul { margin:6px 0 0; padding-inline-start:18px; line-height:1.6; }
.fc-disclaimer { font-size:13px; color:var(--fc-muted); margin:4px 0 20px; }
.fc-cals { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:18px; }
.fc-cal h3 { font-size:14px; margin:0 0 8px; }
.fc-cal-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; }
.fc-cal-head { font-size:11px; font-weight:700; color:var(--fc-muted); text-align:center; padding-bottom:2px; }
.fc-cal-cell { position:relative; min-height:48px; border-radius:7px; padding:4px 6px; border:1px solid var(--line); display:flex; flex-direction:column; justify-content:space-between; cursor:default; }
.fc-cal-cell b { font-size:13px; } .fc-cal-cell small { font-size:11px; color:var(--fc-muted); }
.fc-cal-cell.is-empty { border:0; } .fc-cal-cell.is-past { opacity:.5; background:var(--surface-soft, #f3f5f3); }
.fc-patterns { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:16px; padding-bottom:16px; }
.fc-patterns h3 { font-size:13px; margin:0 0 8px; color:var(--fc-muted); }
.fc-pat-row { display:flex; flex-wrap:wrap; gap:6px; }
.fc-pat { display:flex; flex-direction:column; align-items:center; gap:2px; min-width:58px; padding:8px; border:1px solid var(--line); border-radius:8px; font-size:12px; }
.fc-pat span { text-align:center; font-weight:600; } .fc-pat span small { display:block; color:var(--fc-muted); }
.fc-pat b { font-size:15px; } .fc-pat > small { color:var(--fc-muted); font-size:11px; }
.fc-pat-text { margin:0 0 8px; font-size:13px; line-height:1.5; align-items:flex-start; }
.fc-sources { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:14px; margin-bottom:16px; }
.fc-source { padding:16px 18px; display:flex; flex-direction:column; gap:10px; }
.fc-source h3 { margin:0; font-size:15px; }
.fc-source p { margin:0; font-size:13px; line-height:1.55; color:var(--fc-muted); }
.fc-source .button { align-self:flex-start; }
.fc-file { cursor:pointer; }
.fc-inline { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.fc-progress { height:8px; border-radius:99px; background:var(--line); overflow:hidden; }
.fc-progress span { display:block; height:100%; background:var(--fc-good); transition:width .4s; }
.fc-form-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:14px; padding:4px 0 16px; }
.fc-unit { display:flex; align-items:center; gap:6px; } .fc-unit input { width:100px; } .fc-unit em { font-style:normal; }
.fc-check { flex-direction:row !important; align-items:center; gap:8px !important; font-size:13px !important; color:inherit !important; }
.fc-form-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; flex-wrap:wrap; padding-bottom:16px; }
.fc-event-form { padding:16px 18px 0; margin:0 21px 14px !important; }
.fc-event-form h3 { margin:0 0 10px; font-size:15px; }
.fc-modes { display:flex; flex-wrap:wrap; gap:8px 18px; font-size:13px; color:var(--fc-muted); margin-bottom:12px; }
.fc-modes b { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:6px; background:var(--accent-soft); color:var(--accent-text); margin-inline-end:6px; font-size:12px; }
.fc-report { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:10px; padding-bottom:12px; }
.fc-report div { border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.fc-report small { display:block; font-size:12px; color:var(--fc-muted); } .fc-report strong { font-size:14px; }
.fc-rejects, .fc-sample { margin-bottom:14px; font-size:13px; } .fc-rejects summary, .fc-sample summary { cursor:pointer; font-weight:600; color:var(--accent-text); }
.fc-req { font-size:11px; color:var(--fc-bad); font-weight:600; }
.fc-inline-label { display:inline-flex; gap:8px; align-items:center; margin-bottom:10px; font-size:13px; font-weight:600; }
.fc-explain { font-size:13px; line-height:1.7; color:var(--fc-muted); padding-bottom:12px; }
.fc-season .metric-strip { margin-top:2px; }
@media (max-width:700px) {
  .fc-bar-top select, .fc-controls label, .fc-filters select, .fc-filters input { min-width:0; width:100%; }
  .fc-controls label, .fc-filters label { flex:1 1 100%; }
  #forecast-lab select, #forecast-lab input:not([type=checkbox]) { height:44px; font-size:16px; }
  .fc-views { margin-inline-start:0; width:100%; } .fc-views button { flex:1; justify-content:center; padding:10px 6px; }
  .fc-views button span { display:none; }
  .fc-run { margin-inline-start:0; }
  .fc-card > *:not(.card-header):not(.table-scroll) { margin-inline:14px; }
  .fc-export { margin-inline:14px; } .fc-export .button { flex:1 1 100%; justify-content:center; }
  .fc-scen-inputs span { flex-direction:column; } .fc-scen-inputs input { width:100%; }
  .fc-cal-cell { min-height:46px; padding:3px 4px; } .fc-cal-cell small, .fc-cal-pct, .fc-cal-cell .fc-cal-event { display:none; }
  .fc-cal-tag { font-size:10px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fc-synthetic { background:#3a2a12; border-color:#7a5a24; color:#f2c27b; }
}
:root[data-theme="dark"] .fc-synthetic { background:#3a2a12; border-color:#7a5a24; color:#f2c27b; }
.fc-used { display:flex; gap:6px; align-items:flex-start; margin-top:8px; } .fc-used .lucide { width:14px; height:14px; flex:none; margin-top:2px; } .fc-used.is-used { color:var(--fc-good) !important; }
.fc-total-row td { background:var(--surface-soft, #f3f5f3); font-weight:600; }
.fc-notes .text-link { margin-inline-start:6px; }
/* Calendar: plain cells, the forecast is written as text. */
.fc-cal-tag { display:block; font-size:12px; font-weight:700; line-height:1.3; min-height:1.3em; }
.fc-tag-strong { color:var(--fc-good); } .fc-tag-weak { color:var(--fc-bad); }
.fc-tag-low-confidence { color:var(--fc-muted); font-weight:600; font-style:italic; }
.fc-cal-pct { font-weight:500; }
.fc-cal-event { font-style:normal; font-size:11px; font-weight:600; color:var(--fc-muted); text-decoration:underline dotted; }
.fc-cal-legend .fc-cal-tag { display:inline; }
.fc-card > .small-note.fc-cal-legend { display:block; line-height:1.7; margin-top:12px; }
.fc-changes h2 { display:flex; align-items:center; gap:8px; } .fc-changes h2 .lucide { width:18px; height:18px; color:var(--accent-text); }
.fc-change-list { list-style:none; margin:0 21px 16px; padding:0; display:grid; gap:8px; }
.fc-change-list li { display:grid; grid-template-columns:minmax(160px, 260px) 1fr; gap:2px 14px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:13px; }
.fc-change-list li small { grid-column:1; color:var(--fc-muted); font-size:12px; }
.fc-change-list li span { grid-column:2; grid-row:1 / span 2; align-self:center; }
.fc-change-raised span, .fc-change-new span { color:var(--fc-good); } .fc-change-lowered span, .fc-change-stopped span { color:var(--fc-bad); }
@media (max-width:700px) { .fc-change-list { margin-inline:14px; } .fc-change-list li { grid-template-columns:1fr; } .fc-change-list li span { grid-column:1; grid-row:auto; } }
.fc-day-link { display:inline-flex; align-items:center; gap:6px; border:0; background:none; padding:0; font:inherit; font-weight:700; color:var(--accent-text); cursor:pointer; text-decoration:underline dotted; }
.fc-day-link .lucide { width:14px; height:14px; }
.fc-day-hint { display:flex; gap:6px; align-items:center; } .fc-day-hint .lucide { width:14px; height:14px; }
#forecast-lab .fc-bar[data-day] { cursor:pointer; }
.fc-modal-backdrop { position:fixed; inset:0; z-index:200; background:rgba(15, 25, 20, .45); display:flex; justify-content:flex-end; }
.fc-modal { width:min(920px, 100%); height:100%; background:var(--surface); color:var(--ink); display:flex; flex-direction:column; box-shadow:-12px 0 40px rgba(0,0,0,.18); }
.fc-modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:18px 22px 12px; border-bottom:1px solid var(--line); }
.fc-modal-head h2 { margin:4px 0 0; font-size:20px; }
.fc-modal-nav { display:flex; gap:6px; }
.fc-modal-body { flex:1; overflow-y:auto; padding:16px 22px; }
.fc-modal-body .fc-strip { margin-bottom:14px; }
.fc-modal-body .good { color:#2f7d55; } .fc-modal-body .bad { color:#b94444; }
.fc-modal-body td small { display:block; font-size:12px; color:var(--text-secondary, #5d6f63); }
.fc-why-box { border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-bottom:16px; background:var(--surface-soft, #f4f8f3); }
.fc-why-box h3 { display:flex; align-items:center; gap:6px; margin:0 0 6px; font-size:14px; } .fc-why-box .lucide { width:15px; height:15px; }
.fc-why-box ul { margin:0; padding-inline-start:18px; font-size:13px; line-height:1.65; }
.fc-modal-sub { font-size:15px; margin:18px 0 8px; }
.fc-day-camps .fc-camp-row td { border-top:1px solid var(--line); }
.fc-adset td { font-size:13px; padding-top:4px; padding-bottom:4px; background:var(--surface-soft, #f4f8f3); }
.fc-adset td:first-child { padding-inline-start:24px; }
.fc-adset-head td { font-size:12px; color:var(--text-secondary, #5d6f63); background:var(--surface-soft, #f4f8f3); padding-top:6px; padding-bottom:2px; }
.fc-modal-foot { display:flex; justify-content:flex-end; gap:10px; padding:12px 22px; border-top:1px solid var(--line); }
@media (max-width:700px) { .fc-modal-head, .fc-modal-body, .fc-modal-foot { padding-inline:14px; } .fc-modal-foot .button { flex:1; justify-content:center; } }
.fc-hour-tag { font-size:11px; font-weight:700; } .fc-hour-tag.fc-tag-strong { fill:var(--fc-good); } .fc-hour-tag.fc-tag-weak { fill:var(--fc-bad); }
.fc-table b.fc-tag-strong, .fc-table b.fc-tag-weak { display:block; }

/* Forecast Backtesting & Accuracy */
.bt-head { margin:4px 2px 12px; } .bt-head h2 { margin:0 0 4px; } .bt-head p { margin:0; color:var(--fc-muted); font-size:14px; }
.bt-controls .bt-check { flex-direction:row; align-items:center; gap:8px; min-width:0; }
.bt-controls .bt-note { flex:1 1 100%; display:flex; gap:6px; align-items:flex-start; margin:0; }
.bt-controls .bt-note .lucide { width:14px; height:14px; flex:none; margin-top:2px; }
.bt-statuses { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; font-size:13px; }
.bt-status { border:1px solid var(--line); border-radius:999px; padding:3px 10px; font-weight:600; }
.bt-evaluated { color:var(--fc-good); } .bt-invalid { color:var(--fc-bad); } .bt-partial { color:var(--fc-warn); } .bt-pending, .bt-superseded { color:var(--fc-muted); }
.bt-results > .small-note { display:flex; gap:6px; align-items:flex-start; }
.bt-results > .small-note .lucide { width:14px; height:14px; flex:none; margin-top:2px; }
.bt-results.is-running { opacity:.6; pointer-events:none; }
.bt-row { display:flex; gap:12px; flex-wrap:wrap; }
.bt-inline { display:inline-flex; gap:8px; align-items:center; font-size:13px; font-weight:600; color:var(--fc-muted); }
.bt-warn { color:var(--fc-warn); font-weight:600; }
.fc-table td.bt-best { font-weight:700; background:var(--accent-soft); }
.bt-table td { white-space:nowrap; } .bt-table td small { white-space:normal; }
.bt-pager { display:flex; gap:10px; align-items:center; justify-content:flex-end; padding:10px 0 14px; font-size:13px; }
@media (max-width:700px) {
  .bt-tabs button span { display:inline; }
  .bt-tabs { flex-wrap:wrap; }
  .bt-table td { white-space:normal; }
  .bt-pager { justify-content:center; }
}
