/* Forecast: approved agency / creative layout, with independent paired periods. */
.forecast-page{--forecast-short:#fff5f4;--forecast-month:#f7faff}
.forecast-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
.forecast-controls .segmented{padding:4px}.forecast-controls .segmented button{padding:10px 17px;font-size:13px;white-space:nowrap}
.forecast-export{font-size:12px;white-space:nowrap}
.forecast-filters{display:grid;grid-template-columns:155px repeat(3,minmax(140px,1fr)) minmax(170px,1.2fr) auto;align-items:end;gap:16px;margin-bottom:24px}
.forecast-filters>label{min-width:0}.forecast-filters input[type=date]{width:100%;height:40px}
.forecast-filters .filter-trigger{height:40px;min-width:0;width:100%}.forecast-filters .filter-trigger>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.forecast-filters .filter-popover{z-index:20}.forecast-filters #forecastReset{height:40px;width:40px;padding:9px}
.forecast-scroll{background:white;border:1px solid var(--line);border-radius:10px;overflow:auto;max-height:calc(100vh - 265px);min-height:160px;scrollbar-gutter:stable}
.forecast-table{width:100%;min-width:1280px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:12px}
.forecast-table .col-name{width:220px}.forecast-table .col-period{width:120px}.forecast-table .col-progress{width:116px}.forecast-table .col-daily{width:133px}.forecast-table .col-action{width:39px}
.forecast-table th,.forecast-table td{padding:14px 12px;max-width:none;overflow:visible;text-overflow:clip;vertical-align:middle;border-bottom:1px solid #e7edf5}
.forecast-table thead th{z-index:5;background:#f6f9fd}.forecast-table .forecast-bands th{height:43px;top:0;font-size:12px;color:#546a85;letter-spacing:.1px}.forecast-bands th[colspan]{text-align:center;border-left:1px solid var(--line)}
.forecast-table .forecast-columns th{height:42px;top:43px;font-size:11px;color:#687990}
.forecast-table .band-start{border-left:1px solid #e7edf5}
.forecast-table tbody th{position:static;background:transparent;text-align:left;color:var(--navy);font-weight:500}
.forecast-table .forecast-agency th{padding:12px 18px;background:#edf3fb;color:#304d72;font-weight:700;font-size:13px;letter-spacing:.1px}
.forecast-table .forecast-name{background:white;white-space:normal;vertical-align:middle;padding:20px 18px;border-right:1px solid #e7edf5;border-bottom:1px solid var(--line)}
.forecast-name>strong{display:block;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.forecast-name>small{display:block;font-size:10px;line-height:1.5;margin-top:7px;overflow-wrap:anywhere}
.forecast-period strong{display:block;font-size:12px}.forecast-period small{display:block;font-size:10px;line-height:1.5;margin-top:5px}
.forecast-row{height:88px;background:white}.forecast-row[data-row-period=month]{background:var(--forecast-month)}

.forecast-table tbody tr.forecast-row:hover{background:#eef4fd}
.forecast-row td>small{display:block;font-size:10px;line-height:1.5;margin-top:6px;white-space:normal}
.forecast-row td>strong{font-size:13px;font-weight:650}.forecast-row td.num{white-space:nowrap}
.forecast-row.forecast-last td,.forecast-row.forecast-last .forecast-period{border-bottom:1px solid var(--line)}
.forecast-progress{display:flex;flex-direction:column;gap:7px;min-width:75px;max-width:120px}.forecast-progress svg{width:100%;height:7px;display:block}.progress-track{fill:#e4ebf4}.progress-fill{fill:#4f8eef}
.forecast-progress strong{font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}.forecast-progress.done{color:#087960}.forecast-progress.done .progress-fill{fill:#169c82}.forecast-progress.short{color:var(--red)}.forecast-progress.short .progress-fill{fill:#dc6864}.forecast-progress.uncertain{color:#96651a}.forecast-progress.uncertain .progress-fill{fill:#d8a74e}
.forecast-conflict{display:block;font-size:10px;font-weight:600;line-height:1.6;color:#ac3d3d;background:#fff0ee;border:1px solid #f6d5d0;border-radius:6px;padding:7px 8px;margin-top:12px;max-width:180px}.forecast-conflict .icon-host{width:13px;height:13px;margin-right:5px;vertical-align:-2px}
.forecast-quality{color:#986316}.forecast-quality .icon-host{width:12px;height:12px;vertical-align:-2px;margin-right:3px}
.forecast-table .forecast-action{padding:8px 3px}.forecast-action button{border:0;background:transparent;padding:7px;color:#68809f}.forecast-action .icon-host{width:16px;height:16px}
.forecast-no-plan{color:var(--muted);font-size:12px;white-space:normal}.forecast-table .is-inactive{background:#fafbfc;height:88px}
.forecast-daily small{color:var(--muted)}.forecast-row .number-negative small{color:var(--red)}.forecast-row .number-positive small{color:var(--green)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
body:has(.forecast-page) .top .eyebrow,body:has(.forecast-page) #freshness{display:none}
@media(min-width:1650px){.forecast-table{font-size:13px}.forecast-table .col-name{width:245px}.forecast-table .col-progress{width:130px}.forecast-table .col-daily{width:150px}.forecast-row{height:96px}}
@media(max-width:1200px){.forecast-filters{grid-template-columns:150px 1fr 1fr}.forecast-filters #fcCreative{grid-column:1/3}.forecast-scroll{max-height:calc(100vh - 330px)}}
@media(max-width:650px){.forecast-controls{flex-wrap:wrap}.forecast-controls .segmented button{padding:9px 11px;font-size:12px}.forecast-filters{grid-template-columns:1fr 1fr;gap:12px}.forecast-filters #fcCreative{grid-column:auto}.forecast-filters #forecastReset{justify-self:end}.forecast-scroll{max-height:65vh}}
.forecast-table .forecast-name{position:sticky;left:0;z-index:2}
.forecast-table .forecast-bands th:first-child{left:0;z-index:8}

/* Color is restricted to the deviation cell; signed values remain readable. */
.forecast-table td.forecast-deviation{background:var(--deviation-bg,transparent);color:var(--deviation-ink,inherit);box-shadow:inset 3px 0 var(--deviation-edge,transparent)}
.forecast-table td.forecast-deviation>small{color:inherit;font-size:12px;font-weight:750}
.forecast-table td.forecast-deviation>strong{color:inherit}
.deviation-under-high{--deviation-bg:#f5b9bc;--deviation-ink:#7f1d1d;--deviation-edge:#c84a54}
.deviation-under-medium{--deviation-bg:#fbdadd;--deviation-ink:#922c36;--deviation-edge:#df8790}
.deviation-under-low{--deviation-bg:#fff1f2;--deviation-ink:#9b3842;--deviation-edge:#efb9bf}
.deviation-zero{--deviation-bg:#f1f5f9;--deviation-ink:#475569;--deviation-edge:#94a3b8}
.deviation-over-low{--deviation-bg:#f6f0fc;--deviation-ink:#6b487f;--deviation-edge:#d2bce7}
.deviation-over-medium{--deviation-bg:#eadff8;--deviation-ink:#603484;--deviation-edge:#b693d5}
.deviation-over-high{--deviation-bg:#d8c3f2;--deviation-ink:#4a2469;--deviation-edge:#9163b7}

/* Numeric filters stay compact; the selected period belongs to each rule. */
.forecast-rules{border:1px solid var(--line);border-radius:8px;background:white;margin-bottom:12px}
.forecast-rules summary{cursor:pointer;padding:12px 15px;font-size:13px;font-weight:650}
.forecast-rules summary .badge{margin-left:8px;font-weight:500}
.forecast-rules form{padding:0 15px 14px}.forecast-rules form>p{margin:0 0 12px;font-size:12px}
.forecast-rule{display:grid;grid-template-columns:28px 130px minmax(150px,220px) 65px minmax(140px,200px) 110px 36px;gap:8px;align-items:center;margin:8px 0}
.forecast-rule input,.forecast-rule select{width:100%;height:38px;font-size:13px}
.forecast-rule input[aria-invalid=true]{border-color:var(--red)}
.forecast-rule-join,.forecast-rule-unit{font-size:12px;color:var(--muted)}
.forecast-rule button{width:36px;height:36px;padding:8px;border-color:transparent}
.forecast-rule-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:12px}
.forecast-rule-actions button{font-size:12px}.forecast-rule-actions [role=status]{font-size:12px}
.forecast-results{margin:10px 0;font-size:12px;color:var(--muted)}
@media(max-width:1000px){.forecast-rule{grid-template-columns:24px 105px minmax(120px,1fr) 55px minmax(100px,1fr) 85px 34px;gap:6px}}
@media(max-width:650px){.forecast-rule{grid-template-columns:24px 1fr 1fr 50px}.forecast-rule label:nth-child(5){grid-column:2}.forecast-rule button{grid-column:4}.forecast-rule{padding-bottom:10px;border-bottom:1px solid var(--line)}}

.forecast-sort-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:10px 0}
.forecast-sort-controls label{display:flex;flex-direction:row;align-items:center;gap:8px}
.forecast-sort-controls [hidden]{display:none}
.forecast-sort-controls select{padding:6px 9px;font-size:12px}
.forecast-sort-controls [role=status]{font-size:12px}
.forecast-table .forecast-sort-button{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;border:0;border-radius:4px;padding:4px 0;background:transparent;font:inherit;color:inherit;text-align:left}
.forecast-table .num .forecast-sort-button{justify-content:flex-end;text-align:right}
.forecast-table .forecast-sort-button:hover{color:var(--blue)}
.forecast-table th[aria-sort=ascending] .forecast-sort-button,.forecast-table th[aria-sort=descending] .forecast-sort-button{color:#0756d8}
.forecast-sort-arrow{flex:none;font-size:13px;color:#798ba2}
.forecast-table th[aria-sort=ascending] .forecast-sort-arrow,.forecast-table th[aria-sort=descending] .forecast-sort-arrow{color:#0756d8}
.forecast-table .forecast-name .forecast-inline-agency{font-size:11px;font-weight:650;color:#526a89;margin:0 0 6px}

/* Independent period switches; one creative keeps its selected rows together. */
.forecast-period-options{display:flex;flex-wrap:wrap;gap:8px}
.forecast-period-options label{display:flex;flex-direction:row;align-items:center;gap:8px;cursor:pointer;padding:9px 12px;border:1px solid var(--line);border-radius:7px;background:white;color:var(--muted);font-size:13px;white-space:nowrap}
.forecast-period-options label.active{border-color:#9bbff5;background:#edf4ff;color:#0756d8}
.forecast-period-options label:focus-within{outline:3px solid #87b7ff;outline-offset:2px}
.forecast-period-options input{margin:0}
.forecast-row[data-row-period=cumulative]{background:#f5f8fa}
.forecast-rule{grid-template-columns:28px 180px minmax(150px,220px) 65px minmax(140px,200px) 110px 36px}
.forecast-table .col-period{width:135px}
@media(max-width:1100px){.forecast-controls{flex-wrap:wrap}.forecast-rule{grid-template-columns:24px 150px minmax(120px,1fr) 55px minmax(100px,1fr) 85px 34px;gap:6px}}
@media(max-width:650px){.forecast-rule{grid-template-columns:24px 1fr 1fr 50px}}
