/* ============================================================================
 * Budget Planning -- styles for the "Budget Planning" view of the Variation
 * Toolbox. Own local class namespace (.vcl-bud-*), following the same
 * precedent as the other per-view stylesheets (.vcl-wf-*, .vcl-tt-*, .vcl-wl-*).
 * ============================================================================ */

.vcl-app {
  /* Reuses the hex value freed by today's standalone-Workload-tool removal
     (was --workload in vcl-workload-style.css) under a name that matches this
     tool instead -- no new colour added to the palette. */
  --budget: #7A3350;
  --budget-bg: #F5E9EE;
  --budget-tint: rgba(122, 51, 80, 0.06);
}

.vcl-app .budget-col { grid-column: 2; grid-row: 1; padding: 28px 6px 40px 0; }

/* Title + subtitle sit above a budget-coloured rule; the action buttons (Clear / Export / New
   line) sit BELOW that rule, so the header now stacks vertically instead of title-left /
   buttons-right. */
.vcl-app .vcl-bud-header { padding: 0; margin-bottom: 24px; display: flex; flex-direction: column; }
.vcl-app .vcl-bud-header__intro { padding: 0 0 16px; border-bottom: 2px solid var(--budget); }
.vcl-app .vcl-bud-header h2 { font-family: "IBM Plex Serif", serif; font-weight: 600; font-size: 22px; margin: 0 0 6px; }
.vcl-app .vcl-bud-year { color: var(--budget); font-weight: 600; font-size: 0.8em; }
.vcl-app .vcl-bud-header p { margin: 0; color: var(--muted); font-size: 14px; }
.vcl-app .vcl-bud-header__actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }

.vcl-app .vcl-bud-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.vcl-app .vcl-bud-btn:hover { border-color: var(--budget); }
/* All primary CTAs (dashboard "+ New line" AND the editor's Next / Add line / Save line) use the
   soft-tint chip treatment -- tint fill + budget text -- rather than a solid fill. */
.vcl-app .vcl-bud-btn--primary { background: var(--budget-bg); border-color: var(--budget); color: var(--budget); }
.vcl-app .vcl-bud-btn--primary:hover { background: #EED9E1; }
.vcl-app .vcl-bud-btn--ghost { border-color: transparent; background: transparent; padding: 9px 10px; }
.vcl-app .vcl-bud-btn--ghost:hover { background: var(--border-soft); border-color: transparent; }
.vcl-app .vcl-bud-btn--small { font-size: 12px; padding: 6px 10px; }
.vcl-app .vcl-bud-btn--danger:hover { border-color: var(--ii); color: var(--ii); }

.vcl-app .vcl-bud-rollup { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.vcl-app .vcl-bud-tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.vcl-app .vcl-bud-tile__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.vcl-app .vcl-bud-tile__value { font-family: "IBM Plex Serif", serif; font-size: 27px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; line-height: 1.15; }
.vcl-app .vcl-bud-tile__sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.vcl-app .vcl-bud-tile--fte .vcl-bud-tile__value { color: var(--budget); }
.vcl-app .vcl-bud-fte-input { width: 62px; font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--paper); color: var(--ink); font-variant-numeric: tabular-nums; }

/* Agency fees card (Proposal 2) -- replaces the old single-value "Variation fees" tile with three
   stacked rows (Variations / Annual fee / Total this year), so this tile reads as the "combined
   agency spend" summary rather than just another stat tile. */
.vcl-app .vcl-bud-agency__rows { display: flex; flex-direction: column; gap: 6px; }
.vcl-app .vcl-bud-agency__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink); }
.vcl-app .vcl-bud-agency__val { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vcl-app .vcl-bud-agency__divider { border-top: 1px solid var(--border-soft); margin: 2px 0; }
.vcl-app .vcl-bud-agency__row--total { font-size: 15px; font-weight: 600; color: var(--budget); }
.vcl-app .vcl-bud-agency__row--total .vcl-bud-agency__val { font-size: 16px; }

.vcl-app .vcl-bud-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
.vcl-app .vcl-bud-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px 12px; }
.vcl-app .vcl-bud-panel h3 { font-size: 13px; margin: 0 0 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.vcl-app .vcl-bud-bdrow { display: grid; grid-template-columns: 90px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.vcl-app .vcl-bud-bdrow:last-child { border-bottom: none; }
.vcl-app .vcl-bud-bdbar { height: 7px; border-radius: 4px; background: var(--border-soft); overflow: hidden; }
.vcl-app .vcl-bud-bdbar > span { display: block; height: 100%; background: var(--budget); border-radius: 4px; }
.vcl-app .vcl-bud-bdval { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.vcl-app .vcl-bud-table-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.vcl-app .vcl-bud-table-head h3 { font-size: 15px; margin: 0; font-weight: 600; font-family: "IBM Plex Serif", serif; }
.vcl-app .vcl-bud-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
/* The tool lives in a `.layout` grid ("300px 1fr": browse-col + content-col). A grid item defaults
   to min-width:auto, so a wide min-content in the content column can't shrink and instead blows the
   whole grid past the viewport -- a page-level horizontal scrollbar. Let the budget column shrink,
   and lay the table out `fixed` so its columns follow the colgroup percentages and wrap instead of
   forcing a min-content floor. The table-wrap keeps overflow-x:auto only as a graceful last resort. */
.vcl-app .budget-col { min-width: 0; }
.vcl-app table.vcl-bud-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.vcl-app table.vcl-bud-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; padding: 10px 12px; background: var(--border-soft); white-space: nowrap; }
.vcl-app table.vcl-bud-table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
/* WordPress themes routinely add vertical cell borders to every <table>; force this table's own
   clean look -- only horizontal row rules, never dangling vertical column lines. */
.vcl-app table.vcl-bud-table th,
.vcl-app table.vcl-bud-table td { border-left: 0; border-right: 0; }
/* WP themes ALSO add a dark border-bottom to every cell, on top of our own border-top row rule --
   in a tall row (e.g. the actions column, icons at the top) that bottom rule reads as a stray
   horizontal line floating below the icons. Drop it on data rows; the border-top rule is the single
   clean separator (the detail row keeps its own explicit rules via a more specific selector). */
.vcl-app table.vcl-bud-table tbody tr.vcl-bud-line-row > td,
.vcl-app table.vcl-bud-table tbody tr.vcl-bud-annual-row > td { border-bottom: 0; }
/* WP themes also give <table> a bottom margin; inside the rounded wrapper that opens a gap below
   the Total row before the rounded corner. Zero it so the footer fill reaches the rounding. */
.vcl-app .vcl-bud-table-wrap table.vcl-bud-table { margin: 0; }
.vcl-app table.vcl-bud-table tbody tr:hover { background: var(--budget-tint); }
.vcl-app .vcl-bud-cc-chip { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: var(--border-soft); color: var(--muted); margin: 1px 2px 1px 0; }
/* Mode pill (table "Mode" column) -- shared budget tint/text, with a per-mode accent border so
   Single/Grouping/Worksharing/Super-Grouping/Annual-Update stay visually distinct at a glance. */
/* Mode cell can hold two pills (e.g. Grouping + Worksharing) -- stack/wrap them with a small gap. */
.vcl-app .vcl-bud-mode-cell { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.vcl-app .vcl-bud-mode-pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 3px 9px; border-radius: 20px; background: var(--budget-tint); color: var(--budget); border: 1px solid transparent; white-space: nowrap; }
.vcl-app .vcl-bud-mode-pill--single { border-color: transparent; }
.vcl-app .vcl-bud-mode-pill--grouping { border-color: transparent; }
.vcl-app .vcl-bud-mode-pill--worksharing { background: rgba(58, 108, 168, 0.10); color: #3A6CA8; }
.vcl-app .vcl-bud-mode-pill--superGrouping { background: rgba(140, 90, 180, 0.10); color: #8C5AB4; }
.vcl-app .vcl-bud-mode-pill--annualUpdate { background: rgba(60, 150, 130, 0.10); color: #2E8C77; }
.vcl-app .vcl-bud-proc-summary { font-size: 12px; color: var(--muted); }
/* Variations cell -- aggregated per type ("3 × IA, 5 × IB, 1 × II"): count + colour-coded badge. */
/* Aggregated types stay on ONE row for the common case ("1× IA  1× IB  1× II"), but MAY wrap to a
   second line if the column is tight -- wrapping (not overflowing into the Procedures column) is the
   fallback, so the content never bleeds across the cell border. */
.vcl-app .vcl-bud-var-cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.vcl-app .vcl-bud-var-agg { font-size: 12px; color: var(--ink); line-height: 1.5; font-variant-numeric: tabular-nums; }
.vcl-app .vcl-bud-var-pill { display: inline-flex; align-items: center; gap: 4px; }
.vcl-app .vcl-bud-var-cell__code { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink); }
.vcl-app .vcl-bud-var-cell__muted { color: var(--muted); font-style: italic; font-size: 12px; }
/* Procedures cell -- procedures grouped by kind and stacked, one line per kind ("3 × nat. (HU, DE,
   IT)" / "3 × CP" / "RMS DE (+ 5 CMS), RMS LT (+ 10 CMS)"). RMS codes highlighted. */
.vcl-app .vcl-bud-proc-cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.vcl-app .vcl-bud-proc-line { font-size: 12px; color: var(--ink); line-height: 1.5; }
.vcl-app .vcl-bud-proc-k { color: var(--muted); }
.vcl-app .vcl-bud-cc { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--border-soft); color: var(--muted); }
.vcl-app .vcl-bud-cc--rms { background: var(--budget-tint); border: 1px solid var(--budget); color: var(--budget); padding: 0 5px; }
.vcl-app .vcl-bud-cc--cp { background: var(--budget-tint); color: var(--budget); }
.vcl-app .vcl-bud-cc-empty { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; color: var(--ib); }
.vcl-app .vcl-bud-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vcl-app .vcl-bud-hours-band { color: var(--ink-faint); font-size: 11.5px; }
/* Keep this a real table-cell (not flex) so the cell's vertical-align:middle centers the icons in
   tall rows; buttons are inline-flex and align via vertical-align. */
.vcl-app td.vcl-bud-row-actions { text-align: right; white-space: nowrap; padding-left: 0; padding-right: 6px; }
.vcl-app td.vcl-bud-row-actions .vcl-bud-icon-btn { vertical-align: middle; }
.vcl-app td.vcl-bud-row-actions .vcl-bud-icon-btn + .vcl-bud-icon-btn { margin-left: 1px; }
/* Icon-only row actions: borderless (the old buttons drew a stray box), the SVG inherits the button
   colour so hover tints it. */
.vcl-app .vcl-bud-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: none; background: none; border-radius: 6px; color: var(--muted); cursor: pointer; }
.vcl-app .vcl-bud-icon-btn:hover { background: var(--border-soft); color: var(--budget); }
.vcl-app .vcl-bud-icon-btn--danger:hover { background: var(--ii-bg); color: var(--ii); }
.vcl-app .vcl-bud-icon-btn svg { display: block; }
.vcl-app .vcl-bud-warn { display: inline-flex; align-items: center; gap: 5px; color: var(--ib); font-size: 12px; font-weight: 600; }
.vcl-app .vcl-bud-warn::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--ib-bg); font-size: 10px; }
.vcl-app .vcl-bud-table tfoot td { padding: 11px 12px; font-weight: 600; border-top: 2px solid var(--border); border-bottom: 0; background: var(--border-soft); font-variant-numeric: tabular-nums; }
/* Round the Total row's bottom corners so its (bluish) fill ends flush with the wrapper's 12px
   radius instead of poking square corners past the rounded border. */
.vcl-app .vcl-bud-table tfoot tr:last-child td:first-child { border-bottom-left-radius: 11px; }
.vcl-app .vcl-bud-table tfoot tr:last-child td:last-child { border-bottom-right-radius: 11px; }

/* Expandable per-line detail (the whole row is the toggle; the detail is a full-width row below). */
.vcl-app .vcl-bud-line-row { cursor: pointer; }
/* Product cell: wrap long names inside the (now wider) column instead of letting them run into the
   Mode column. */
.vcl-app .vcl-bud-expcell { white-space: normal; overflow-wrap: break-word; }
.vcl-app .vcl-bud-line-row.is-expanded,
.vcl-app .vcl-bud-annual-row.is-expanded { background: var(--budget-tint); }
.vcl-app .vcl-bud-line-row.is-expanded > td,
.vcl-app .vcl-bud-annual-row.is-expanded > td { border-bottom: none; }
/* Horizontal budget-coloured rules top AND bottom delimit the open detail as its own drawer -- a
   clean "waagrechte Linie" instead of the column grid dangling down into it. The table.vcl-bud-table
   prefix raises specificity above the generic "td { border-top: ... }" rule so the top rule sticks. */
.vcl-app table.vcl-bud-table .vcl-bud-detail-row > td { padding: 0; background: var(--budget-tint); border-top: 1px solid var(--budget); border-bottom: 1px solid var(--budget); }
.vcl-app .vcl-bud-detail { padding: 4px 16px 18px; }
.vcl-app .vcl-bud-detail__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; }
.vcl-app .vcl-bud-detail__sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; margin: 12px 0 4px; }
.vcl-app .vcl-bud-detail__item { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 3px 0; border-bottom: 1px solid var(--border-soft); }
.vcl-app .vcl-bud-detail__h { font-family: "IBM Plex Mono", monospace; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vcl-app .vcl-bud-detail__sub { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; color: var(--budget); padding: 5px 0 2px; }
.vcl-app .vcl-bud-detail__total { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; margin-top: 10px; padding-top: 8px; border-top: 1.5px solid var(--budget); font-variant-numeric: tabular-nums; }

.vcl-app .vcl-bud-modal__summary { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.vcl-app .vcl-bud-field { margin-bottom: 14px; }
.vcl-app .vcl-bud-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vcl-app .vcl-bud-meta-row { display: grid; grid-template-columns: 2fr 0.9fr 0.9fr 1.2fr; gap: 12px; margin-bottom: 16px; }
/* Station A (Product) shows only Year / Quarter / Probability in the meta row -- three columns. */
.vcl-app .vcl-bud-meta-row--triple { grid-template-columns: 0.9fr 0.9fr 1.2fr; }
/* Number-of-strengths is a single narrow field (not a full-width input). */
.vcl-app .vcl-bud-field--narrow { max-width: 200px; }
/* MRP/DCP caveat under the strengths field: reddish, no box. */
.vcl-app .vcl-bud-strength-note { font-size: 12px; line-height: 1.5; color: #A32D2D; margin: 6px 0 16px; }
.vcl-app .vcl-bud-strength-note span { margin-right: 4px; }
/* Divider between the meta fields and the station heading, both inside the white station card. */
.vcl-app .vcl-bud-meta-divider { border-top: 1px solid var(--border-soft); margin: 0 0 16px; }
.vcl-app .vcl-bud-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
/* Required-action variant: a Type-IA-only line must pick a mode before it can be saved.
   Tool accent colour + weight lifts it out of the neutral hint grey. */
.vcl-app .vcl-bud-hint--req { color: var(--budget); font-weight: 600; }

/* --- Station indicator (A B C) -- geometry copied verbatim from vcl-workflow-style.css:36-83
   (.vcl-wf-stations et al.), swapping only the colour token (--workflow -> --budget) and the
   class prefix (vcl-wf- -> vcl-bud-). --- */
.vcl-app .vcl-bud-stations { display: flex; gap: 6px; margin-bottom: 18px; position: relative; }
.vcl-app .vcl-bud-station {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
/* Unreached stations are dimmed and non-clickable -- the GW's forward-gating, ported here. */
.vcl-app .vcl-bud-station:disabled { cursor: default; opacity: 0.45; }
.vcl-app .vcl-bud-station__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  border: 1.5px solid var(--line, #d8d8d2);
  color: var(--muted);
}
.vcl-app .vcl-bud-station.is-active .vcl-bud-station__dot {
  background: var(--budget-bg);
  border-color: var(--budget);
  color: var(--budget);
}
.vcl-app .vcl-bud-station.is-done .vcl-bud-station__dot {
  background: var(--budget);
  border-color: var(--budget);
  color: #fff;
}
.vcl-app .vcl-bud-station__label {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}
.vcl-app .vcl-bud-station.is-active .vcl-bud-station__label { color: var(--budget); font-weight: 600; }

/* --- Station body card -- geometry copied verbatim from vcl-workflow-style.css:88-106
   (.vcl-wf-body et al.). --- */
.vcl-app .vcl-bud-body {
  border: 1px solid var(--line, #e4e4de);
  border-radius: 12px;
  background: #fff;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.vcl-app .vcl-bud-body__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink, #222);
  margin: 0 0 2px;
}
.vcl-app .vcl-bud-body__sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px;
}

/* --- Station A: variation rows --- */
.vcl-app .vcl-bud-var-row__code { font-family: "IBM Plex Mono", monospace; font-weight: 600; margin-right: 4px; }
.vcl-app .vcl-bud-var-row__types { display: flex; gap: 4px; flex: none; }
.vcl-app .vcl-bud-field-label { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 5px; }
/* Fixed height + border-box so the text input and the two selects are exactly the same height
   (the WP theme otherwise renders inputs and selects at different heights). */
.vcl-app .vcl-bud-input, .vcl-app .vcl-bud-select { box-sizing: border-box; height: 40px; width: 100%; font-family: inherit; font-size: 13.5px; line-height: 1.4; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--paper); color: var(--ink); }
.vcl-app .vcl-bud-input:focus, .vcl-app .vcl-bud-select:focus { outline: none; border-color: var(--budget); }
/* Leeres Pflichtfeld: zarter Budget-Tint + kräftigerer Rahmen (Tool-Farbe), verschwindet beim Ausfüllen. */
.vcl-app .vcl-bud-input--empty { background: var(--budget-bg); border-color: var(--budget); }
/* Country picker (Station B) is capped to the Guided Workflow's select width so it doesn't span the full card. */
.vcl-app .vcl-bud-select--country { max-width: 380px; }
/* CMS country-code chip grid (Station B, MRP/DCP) -- GW-style toggle chips, not checkboxes.
   Composite codes show a tiny authority suffix (vcl-bud-cc__sfx) after the 2-letter base. */
.vcl-app .vcl-bud-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 5px; }
.vcl-app .vcl-bud-cc-chip-btn { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; padding: 5px 4px; border-radius: 6px; border: 0.5px solid var(--border); background: var(--paper); color: var(--ink); cursor: pointer; display: inline-flex; align-items: baseline; justify-content: center; gap: 3px; }
.vcl-app .vcl-bud-cc-chip-btn:hover { border-color: var(--budget); }
/* Selected = soft budget tint (not a solid fill), mirroring the Guided Workflow's .vcl-wf-cc.is-on
   geometry -- only the accent colour differs (budget red vs. the GW's green). */
.vcl-app .vcl-bud-cc-chip-btn.is-on { background: var(--budget-bg); border-color: var(--budget); color: var(--budget); }
.vcl-app .vcl-bud-cc__sfx { font-size: 9px; font-weight: 500; opacity: 0.7; }
.vcl-app .vcl-bud-type-badge { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; cursor: pointer; border: 1px solid transparent; }
.vcl-app .vcl-bud-type-badge--ia { color: var(--ia); background: var(--ia-bg); }
.vcl-app .vcl-bud-type-badge--ib { color: var(--ib); background: var(--ib-bg); }
.vcl-app .vcl-bud-type-badge--ii { color: var(--ii); background: var(--ii-bg); }
.vcl-app .vcl-bud-type-badge.is-active { border-color: currentColor; }
.vcl-app .vcl-bud-search-results { border: 1px solid var(--border); border-radius: 7px; margin-top: 4px; max-height: 180px; overflow-y: auto; background: var(--panel); }
.vcl-app .vcl-bud-search-result { display: block; width: 100%; text-align: left; padding: 8px 10px; font-size: 12.5px; border: none; background: none; cursor: pointer; border-bottom: 1px solid var(--border-soft); }
.vcl-app .vcl-bud-search-result:hover { background: var(--budget-tint); }
/* Station A -- GW-style pieces: type quick-pick, picked-header + Change, grouping builder. */
.vcl-app .vcl-bud-quicktype { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 14px; }
.vcl-app .vcl-bud-quicktype__label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.vcl-app .vcl-bud-chip--type { display: inline-flex; align-items: center; gap: 6px; }
.vcl-app .vcl-bud-picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); font-size: 13.5px; }
.vcl-app .vcl-bud-picked__code { font-family: "IBM Plex Mono", monospace; font-weight: 600; }
.vcl-app .vcl-bud-picked__muted { color: var(--muted); }
.vcl-app .vcl-bud-change { font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--budget); background: none; border: none; cursor: pointer; padding: 4px 6px; flex: none; }
.vcl-app .vcl-bud-change:hover { text-decoration: underline; }
.vcl-app .vcl-bud-builder { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 16px; background: var(--panel); }
.vcl-app .vcl-bud-builder__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.vcl-app .vcl-bud-count { font-family: "IBM Plex Mono", monospace; background: var(--border-soft); border-radius: 20px; padding: 1px 8px; font-size: 11px; }
.vcl-app .vcl-bud-add { width: 100%; margin-top: 8px; font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px; border: 1px dashed var(--border); border-radius: 8px; background: none; color: var(--budget); cursor: pointer; }
.vcl-app .vcl-bud-add:hover { border-color: var(--budget); background: var(--budget-tint); }
/* Additional-variation (grouping) row -- GW buildGroupingRow: per-row search + "or set the type
   directly:" quick-pick, a type chooser when a code has several types, or resolved text. */
.vcl-app .vcl-bud-brow { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); margin-bottom: 8px; }
/* A resolved row (just "Type IB — no classification code" + remove) is a single line: center it
   vertically and trim the padding so it isn't oversized like the search-state rows. */
.vcl-app .vcl-bud-brow--compact { align-items: center; padding: 7px 10px; }
.vcl-app .vcl-bud-brow__main { flex: 1; min-width: 0; font-size: 13.5px; }
.vcl-app .vcl-bud-brow__input { width: 100%; font-family: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel); color: var(--ink); }
.vcl-app .vcl-bud-brow__input:focus { outline: none; border-color: var(--budget); }
.vcl-app .vcl-bud-brow__matches { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.vcl-app .vcl-bud-brow__match { display: block; width: 100%; text-align: left; padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--border-soft); border-radius: 6px; background: var(--panel); cursor: pointer; }
.vcl-app .vcl-bud-brow__match:hover { border-color: var(--budget); background: var(--budget-tint); }
.vcl-app .vcl-bud-brow__variants { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.vcl-app .vcl-bud-chip--sm { font-size: 12px; padding: 5px 10px; }
.vcl-app .vcl-bud-brow__pick { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
/* Descriptive variant list under a picked classification code (GW-exact, budget colour). */
.vcl-app .vcl-bud-variants { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.vcl-app .vcl-bud-variant { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.vcl-app .vcl-bud-variant:hover { border-color: var(--budget); background: var(--budget-tint); }
.vcl-app .vcl-bud-variant__label { font-size: 13px; color: var(--ink, #222); }
.vcl-app .vcl-bud-rm { display: inline-flex; align-items: center; justify-content: center; font-family: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 7px; width: 32px; height: 32px; cursor: pointer; flex: none; }
.vcl-app .vcl-bud-rm:hover { border-color: var(--ii); color: var(--ii); }
.vcl-app .vcl-bud-live-result { margin-top: 4px; border-top: 1px dashed var(--border); padding-top: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; }
.vcl-app .vcl-bud-live-result .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.vcl-app .vcl-bud-live-result .val { font-family: "IBM Plex Serif", serif; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vcl-app .vcl-bud-live-result .val .band { font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 400; color: var(--ink-faint); margin-left: 4px; }
.vcl-app .vcl-bud-live-result__note { flex-basis: 100%; margin: 0; font-size: 11px; color: var(--ink-faint); }

/* --- Inline "takeover" editor: New/Edit line replaces the dashboard (tiles + table) with the
   station flow, GW-style, instead of a pop-up modal. Head carries the title + a budget rule and a
   cancel (✕); the bottom nav mirrors the GW's Back / Next (with a final "Add / Save line"). --- */
.vcl-app .vcl-bud-editor__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 0 16px; margin-bottom: 18px; border-bottom: 2px solid var(--budget); }
/* Match the dashboard/result heading exactly (see .vcl-bud-header h2): same serif, size and year tint. */
.vcl-app .vcl-bud-editor__head h2 { font-family: "IBM Plex Serif", serif; font-size: 22px; margin: 0 0 6px; font-weight: 600; }
.vcl-app .vcl-bud-editor__subtitle { margin: 0; color: var(--muted); font-size: 14px; }
/* New/Edit "plan line" kicker: sits under the header divider, above the stepper. Small, uppercase,
   budget-tinted -- names which line is being edited without repeating in the always-same header. */
.vcl-app .vcl-bud-editor__kicker { margin: 0 0 14px; color: var(--budget); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.vcl-app .vcl-bud-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.vcl-app .vcl-bud-btn[disabled] { opacity: 0.4; cursor: default; }
.vcl-app .vcl-bud-btn[disabled]:hover { border-color: var(--border); background: var(--panel); }
.vcl-app .vcl-bud-btn--primary[disabled]:hover { background: var(--budget-bg); }

/* --- Station B (strategy chips + procedure rows) & Station C (RA toggles) --- */
/* Section sub-heading inside a station body (e.g. "Multi-authorisation strategy", "CMC dossier"). */
.vcl-app .vcl-bud-section-label { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 16px 0 6px; }
/* Opt-in chips: strategy (WS/SG/AU), procedure kind (National/MRP-DCP/CP), active substance, PI docs. */
.vcl-app .vcl-bud-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }
.vcl-app .vcl-bud-chip { font-family: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--paper); color: var(--ink); cursor: pointer; }
.vcl-app .vcl-bud-chip:hover { border-color: var(--budget); }
/* Selected = soft budget tint (not a solid fill), mirroring the Guided Workflow's .vcl-wf-opt.is-on
   -- geometry matches the GW; only the accent colour stays budget red (vs. the GW's green). */
.vcl-app .vcl-bud-chip.is-on { background: var(--budget-bg); border-color: var(--budget); color: var(--budget); }
.vcl-app .vcl-bud-chip.is-disabled { opacity: 0.4; pointer-events: none; }
/* Derived (non-interactive) mode label shown when no strategy chip is chosen. */
.vcl-app .vcl-bud-derived { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.vcl-app .vcl-bud-derived strong { color: var(--budget); font-weight: 600; }
/* Procedure rows (one card per procedure). */
.vcl-app .vcl-bud-proc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.vcl-app .vcl-bud-proc-card { border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; background: var(--paper); }
.vcl-app .vcl-bud-proc-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.vcl-app .vcl-bud-proc-card__title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.vcl-app .vcl-bud-proc-card .vcl-bud-field { margin-bottom: 10px; }
.vcl-app .vcl-bud-proc-card .vcl-bud-field:last-child { margin-bottom: 0; }
/* RA-task switch (track + thumb), Station C gates. */
.vcl-app .vcl-bud-toggle { display: inline-flex; align-items: center; gap: 10px; background: none; border: none; padding: 0; cursor: pointer; font: inherit; margin: 2px 0 0; }
.vcl-app .vcl-bud-toggle__track { width: 38px; height: 22px; border-radius: 12px; background: var(--border); position: relative; transition: background .15s; flex: none; }
.vcl-app .vcl-bud-toggle.is-on .vcl-bud-toggle__track { background: var(--budget); }
.vcl-app .vcl-bud-toggle__thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.vcl-app .vcl-bud-toggle.is-on .vcl-bud-toggle__thumb { transform: translateX(16px); }
.vcl-app .vcl-bud-toggle__label { font-size: 13px; color: var(--ink); font-weight: 500; }

.vcl-app .vcl-bud-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.vcl-app .vcl-bud-sortable:hover { color: var(--budget); }

/* --- Annual maintenance-fees table (second "Plan lines" section). Reuses the variations table's own
   classes (.vcl-bud-table, .vcl-bud-table-head, .vcl-bud-num, .vcl-bud-proc-cell/-line, .vcl-bud-cc,
   .vcl-bud-cc-chip, .vcl-bud-expcell, tfoot styling, ...) so the two tables read as one system; only
   what's genuinely new to this section gets its own rule below. --- */
.vcl-app .vcl-bud-annual { margin-top: 28px; }
/* Origin marker (🔗 auto / 📌 manual): a small square icon chip, tool-tinted for auto, neutral for a
   manually added product -- same 22px footprint as the row-action icon buttons above. */
.vcl-app .vcl-bud-annual__origin { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; flex: none; }
.vcl-app .vcl-bud-annual__origin svg { display: block; }
.vcl-app .vcl-bud-annual__origin--auto { background: var(--budget-tint); color: var(--budget); }
.vcl-app .vcl-bud-annual__origin--manual { background: var(--border-soft); color: var(--muted); }
/* Muted qualifier text -- the "· MRP/DCP" / "· national" / "· CP" track note, the tariff cell's
   "auto" / "no fee" / "turnover-based" labels, the Markets "+N" overflow, and the fee cell's
   "+ turnover-based" note all share this one small, quiet style. */
.vcl-app .vcl-bud-annual__track { color: var(--muted); font-size: 11.5px; }
/* Special case / tariff <select>: same field styling as the editor's inputs/selects, just compact
   enough to sit inline in a table cell instead of a full-width form row. */
.vcl-app .vcl-bud-select--tariff { height: 28px; width: auto; min-width: 0; max-width: 100%; font-size: 12px; padding: 3px 6px; }
/* Special-cases pick: keep the country code and its <select> on one line (they were wrapping in the
   narrow column). */
.vcl-app .vcl-bud-annual__scpick { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); white-space: nowrap; }
/* Country chip modifiers for the Markets cell (base .vcl-bud-cc-chip already exists, previously
   unused): RMS gets the same tint+border treatment as the procedures column's .vcl-bud-cc--rms;
   no-annual/turnover-based markets are dimmed rather than hidden (spec: "€0 rows stay visible"). */
.vcl-app .vcl-bud-cc-chip--rms { background: var(--budget-tint); border: 1px solid var(--budget); color: var(--budget); }
.vcl-app .vcl-bud-cc-chip--dim { opacity: 0.5; }
/* Origin legend beneath the table. */
.vcl-app .vcl-bud-annual__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; }
.vcl-app .vcl-bud-annual__legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.vcl-app .vcl-bud-annual__legend-item .vcl-bud-annual__origin { width: 18px; height: 18px; }

/* --- Annual "Add product" editor (Task 7) -- reuses the plan-line editor's takeover/station/nav/
   chip/field CSS wholesale (.vcl-bud-editor, .vcl-bud-stations, .vcl-bud-body, .vcl-bud-nav,
   .vcl-bud-chips, .vcl-bud-field, .vcl-bud-strength-note, .vcl-bud-live-result, ...); only the two
   pieces genuinely new to this editor get their own rule below. --- */
/* Station A's Budget year / Coverage this budget row -- two even columns (the line editor's own
   .vcl-bud-meta-row defaults to a 4-column template for Year/Quarter/Probability). */
.vcl-app .vcl-bud-meta-row--pair { grid-template-columns: 1fr 1fr; }
/* Live "Prorated: n of 12 months -> pct%" line under Coverage this budget -- tool-tinted so it reads
   as a computed result, not a static hint. */
.vcl-app .vcl-bud-proration-note { font-size: 12px; font-weight: 600; color: var(--budget); margin: 8px 0 0; }
/* Registration-key collision prompt (Save on Station B, when the key already matches another row) --
   replaces the station body with a tool-tinted confirmation instead of silently duplicating a row. */
.vcl-app .vcl-bud-collision { border: 1px solid var(--budget); border-radius: 10px; background: var(--budget-tint); padding: 16px 18px; }
.vcl-app .vcl-bud-collision__msg { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.vcl-app .vcl-bud-collision__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Annual-fee table rows are expandable (Task 4) -- signal it the same way as the Variations table. */
.vcl-app .vcl-bud-annual-row { cursor: pointer; }

.vcl-app .vcl-bud-table-wrap.vcl-bud-table-wrap--annual { overflow-x: clip; }

.vcl-app .vcl-bud-annual__addwrap { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.vcl-app .vcl-bud-annual__addhint { font-size: 11.5px; color: var(--muted); margin: 0; }

.vcl-app .vcl-bud-breakdown-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.vcl-app .vcl-bud-breakdown-title { font-size: 13px; color: var(--muted); }
.vcl-app .vcl-bud-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.vcl-app .vcl-bud-seg-btn { font-size: 12.5px; padding: 6px 12px; border: 0; border-left: 1px solid var(--border); background: var(--paper); color: var(--muted); cursor: pointer; }
.vcl-app .vcl-bud-seg-btn:first-child { border-left: 0; }
.vcl-app .vcl-bud-seg-btn.is-on { background: var(--budget-bg); color: var(--budget); font-weight: 600; }
