/* ========== Statement of Income v2 ========== */

.s2-wrap {
  flex: 1; min-height: 0; min-width: 0;
  display: flex; flex-direction: column;
  position: relative;
  background: var(--background, #F8F9FA);
  font-family: 'Inter', sans-serif;
  color: #1E293B;
  --s2-fav: #15803D;
  --s2-unf: #B91C1C;
  --s2-hair: #E7E5F0;
  --s2-ink: #0F172A;
  --s2-mute: #64748B;
}

/* ── Context bar ─────────────────────────────────────────────── */
.s2-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border, #E5E7EB);
  padding: 10px 20px 8px;
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0; z-index: 30;
}
.s2-bar-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.s2-bar-row.controls { flex-wrap: wrap; }
.s2-bar-spacer { flex: 1; }
.s2-title-block { display: flex; flex-direction: column; gap: 2px; }
.s2-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--s2-ink); display: flex; align-items: center; gap: 7px; }
.s2-v2-pill {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  background: var(--accent, #E0E7FF); color: var(--accent-fg, #3730A3);
  padding: 2px 7px; border-radius: 99px; text-transform: uppercase;
}
.s2-subtitle { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--s2-mute); }
.s2-dot-sep { width: 3px; height: 3px; border-radius: 50%; background: #CBD5E1; display: inline-block; }
.s2-status { font-weight: 600; padding: 1px 8px; border-radius: 99px; font-size: 10.5px; }
.s2-status.final { background: #ECFDF5; color: #047857; }
.s2-status.prelim { background: #FFFBEB; color: #B45309; }

.s2-bar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.s2-ver { display: inline-flex; align-items: center; gap: 6px; }
.s2-ver .s2-select { max-width: 220px; }
.s2-ver-btn { padding: 5px 7px; }

/* Segmented control */
.s2-seg {
  display: flex; align-items: center;
  background: #F1F5F9; border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px; padding: 2px; gap: 2px;
}
.s2-seg button {
  border: 1px solid transparent; background: transparent; cursor: pointer;
  font: 600 11.5px 'Inter', sans-serif; color: #3D2975;
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}
.s2-seg button:hover { color: var(--s2-ink); }
.s2-seg button.on { background: #F3EEFF; color: #3D2975; border: 1px solid #3D2975; font-weight: 700; }
.s2-seg button:focus-visible, .s2-chip:focus-visible, .s2-ghost-btn:focus-visible { outline: 2px solid var(--primary, #3D2975); outline-offset: 1px; }

.s2-select {
  font: 600 12px 'Inter', sans-serif; color: var(--s2-ink);
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 8px;
  background: #FFFFFF; padding: 5px 8px; cursor: pointer;
}
.s2-num {
  font: 600 12px 'Inter', sans-serif; color: var(--s2-ink);
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 8px;
  background: #FFFFFF; padding: 5px 4px 5px 8px; width: 52px;
}
.s2-num:focus-visible { outline: 2px solid var(--primary, #3D2975); outline-offset: 1px; }
.s2-trail-join { font: 600 11.5px 'Inter', sans-serif; color: #94A3B8; padding: 0 1px; }
.s2-asof-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 11.5px 'Inter', sans-serif; cursor: pointer;
  border: 1px solid var(--primary-300, #A5B4FC); border-radius: 8px;
  background: var(--accent, #E0E7FF); color: var(--accent-fg, #3730A3);
  padding: 4px 9px; white-space: nowrap;
}
.s2-asof-chip:hover { border-color: var(--primary, #3D2975); }
.s2-asof-chip:focus-visible { outline: 2px solid var(--primary, #3D2975); outline-offset: 1px; }
.s2-param { display: inline-flex; align-items: center; gap: 4px; }
.s2-param-unit { font: 600 11px 'Inter', sans-serif; color: #94A3B8; }
.s2-ctrl-div { width: 1px; height: 20px; background: var(--s2-hair); margin: 0 2px; }
.s2-ctrl-lbl { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #3D2975; }

.s2-chips { display: flex; align-items: center; gap: 6px; }
.s2-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 11.5px 'Inter', sans-serif; cursor: pointer;
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 99px;
  background: #FFFFFF; color: var(--s2-mute); padding: 4px 11px;
}
.s2-chip:hover { border-color: var(--primary, #3D2975); color: var(--primary, #3D2975); }
.s2-chip.on { background: var(--accent, #E0E7FF); border-color: transparent; color: var(--accent-fg, #3730A3); }

.s2-ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 11.5px 'Inter', sans-serif; cursor: pointer;
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 8px;
  background: #FFFFFF; color: #475569; padding: 5px 10px; white-space: nowrap;
}
.s2-ghost-btn:hover { background: #F8FAFC; color: var(--s2-ink); }
.s2-ghost-btn.primary { background: var(--primary, #3D2975); border-color: var(--primary, #3D2975); color: #FFFFFF; }
.s2-ghost-btn.primary:hover { background: var(--primary-700, #3730A3); }
.s2-icon-btn {
  border: none; background: transparent; cursor: pointer; color: var(--s2-mute);
  width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
}
.s2-icon-btn:hover { background: #F1F5F9; color: var(--s2-ink); }

/* ── Page scroller ───────────────────────────────────────────── */
.s2-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px 28px; }

/* ── KPI band ────────────────────────────────────────────────── */
.s2-kpis {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.25fr);
  gap: 8px; margin-bottom: 12px;
}
.s2-kpi {
  background: #FFFFFF; border: 1px solid var(--border, #E5E7EB);
  border-radius: 9px; padding: 7px 11px 6px;
  display: flex; flex-direction: column; gap: 1px; cursor: pointer; min-width: 0;
}
.s2-kpi:hover { border-color: var(--primary-300, #A5B4FC); box-shadow: 0 2px 8px rgba(61, 41, 117, 0.07); }
.s2-kpi.drilled { border-color: var(--primary, #3D2975); box-shadow: 0 0 0 1px var(--primary, #3D2975), 0 2px 10px rgba(61, 41, 117, 0.12); }
.s2-kpi.cluster { cursor: default; gap: 2px; }
.s2-kpi.cluster:hover { border-color: var(--border, #E5E7EB); box-shadow: none; }
.s2-kpi-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #94A3B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2-kpi-mid { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.s2-kpi-value { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--s2-ink); font-variant-numeric: tabular-nums; }
.s2-kpi-var { font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--s2-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2-kpi-var.fav { color: var(--s2-fav); }
.s2-kpi-var.unf { color: var(--s2-unf); }
.s2-kpi-var .vs { color: #94A3B8; font-weight: 500; }
.s2-spark { color: #6D7A93; flex-shrink: 0; }

.s2-cluster-row { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.s2-cluster-lbl { font-size: 10.5px; color: var(--s2-mute); width: 64px; flex-shrink: 0; }
.s2-cluster-val { font-size: 12px; font-weight: 700; color: var(--s2-ink); }
.s2-cluster-var { font-size: 10.5px; font-weight: 600; color: var(--s2-mute); margin-left: auto; }
.s2-cluster-var.fav { color: var(--s2-fav); }
.s2-cluster-var.unf { color: var(--s2-unf); }

.s2-note {
  font-size: 12px; color: #92740C; background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
}

/* ── The statement sheet ─────────────────────────────────────── */
.s2-sheet {
  background: #FFFFFF; border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px; overflow: visible;
}
.s2-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 12.5px;
}
.s2-table th, .s2-table td { padding: 7px 12px; }
.s2-wrap[data-density="compact"] .s2-table th, .s2-wrap[data-density="compact"] .s2-table td { padding: 3.5px 12px; }
.s2-table .num {
  text-align: right; font-variant-numeric: tabular-nums;
  white-space: nowrap; font-feature-settings: 'tnum';
}

.s2-table thead th {
  position: sticky; top: -17px; z-index: 20;
  background: #FBFAFE;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: #7C7A94; border-bottom: 1px solid var(--border-strong, #D6D3E8);
  padding-top: 9px; padding-bottom: 9px;
  border-top-left-radius: 0; text-align: right;
}
.s2-table thead th.s2-c-label { text-align: left; border-top-left-radius: 10px; }
.s2-table thead th:last-child { border-top-right-radius: 10px; }

.s2-c-label {
  position: sticky; left: 0; z-index: 10; background: inherit;
  text-align: left; font-weight: inherit; min-width: 290px;
}
.s2-table tbody tr { background: #FFFFFF; }
.s2-table tbody td, .s2-table tbody th { border-bottom: 1px solid #F1EFF8; }

.s2-grp-start { border-left: 1px solid #F1EFF8; }
.s2-c-actual { font-weight: 600; color: var(--s2-ink); }
.s2-comp { color: #6B7280; font-weight: 450; }
.s2-metric { color: #6B7280; font-size: 11.5px; }

/* Row hierarchy — the spine you can feel */
.s2-row-section td {
  padding-top: 18px; padding-bottom: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #8A87A3; border-bottom: 1px solid var(--border-strong, #D6D3E8) !important;
  background: #FFFFFF;
}
.s2-table tbody tr:first-child td { padding-top: 10px; }

.s2-row-line { }
.s2-row-line:hover, .s2-row-detail:hover { background: #FAFAFE; }
.s2-row-detail { color: #5B6472; font-size: 12px; }
.s2-row-detail .s2-c-actual { font-weight: 450; color: #475569; }

.s2-row-subtotal { font-weight: 650; }
.s2-row-subtotal td, .s2-row-subtotal th { border-top: 1px solid var(--border-strong, #D6D3E8); border-bottom: 1px solid #F1EFF8; }
.s2-row-subtotal .s2-c-actual { font-weight: 700; }
.s2-row-subtotal.quiet { font-weight: 550; color: #475569; }
.s2-row-subtotal.emphasis { background: #FBFAFE; }
.s2-row-subtotal.emphasis td, .s2-row-subtotal.emphasis th { border-bottom: 1px solid var(--border-strong, #D6D3E8); }

.s2-row-key {
  background: var(--muted, #F0EDFD); font-weight: 750; font-size: 13px;
}
.s2-row-key td, .s2-row-key th {
  border-top: 2px solid var(--primary, #3D2975);
  border-bottom: 2px solid var(--primary, #3D2975);
  padding-top: 9px; padding-bottom: 9px;
}
.s2-row-key .s2-c-actual { font-size: 13.5px; }
.s2-row-key .s2-label-btn { color: var(--accent-fg, #3730A3); }

.s2-row-final { background: #FBFAFE; font-weight: 700; }
.s2-row-final td, .s2-row-final th { border-top: 1px solid var(--s2-ink); border-bottom: 3px double var(--s2-ink); }

tr.drilled td, tr.drilled th { background: var(--accent, #E0E7FF) !important; }

/* Variance colors — meaning only, AA on white */
.s2-fav { color: var(--s2-fav); font-weight: 600; }
.s2-unf { color: var(--s2-unf); font-weight: 600; }
.s2-zero { color: #9CA3AF; }
.s2-arr { font-size: 8px; vertical-align: 1px; margin-right: 3px; }
.s2-fav-t { color: var(--s2-fav); }
.s2-unf-t { color: var(--s2-unf); }
.s2-dim { color: #9CA3AF; }

/* Label cell internals */
.s2-label-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.s2-exp {
  border: none; background: transparent; cursor: pointer; color: #94A3B8;
  width: 18px; height: 18px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.s2-exp:hover { background: var(--accent, #E0E7FF); color: var(--accent-fg, #3730A3); }
.s2-exp:focus-visible { outline: 2px solid var(--primary, #3D2975); }
.s2-exp-gap { width: 18px; flex-shrink: 0; display: inline-block; }
.s2-label-btn {
  border: none; background: transparent; cursor: pointer; padding: 0;
  font: inherit; color: inherit; text-align: left; border-radius: 3px;
}
.s2-label-btn:hover { color: var(--primary, #3D2975); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.s2-label-btn:focus-visible { outline: 2px solid var(--primary, #3D2975); outline-offset: 2px; }

/* Reconciliation chip */
.s2-recon {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em;
  border-radius: 99px; padding: 1.5px 7px; cursor: help; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.s2-recon.tied { background: #ECFDF5; color: #047857; }
.s2-recon.flag { background: #FFFBEB; color: #B45309; }

/* ── Daily Report (Reporting · days-as-columns) ───────────────── */
.s2d-sheet { overflow: visible; }
.s2d-table { width: max-content; min-width: 100%; }
.s2d-tie-note { color: #047857; background: #ECFDF5; border-color: #A7F3D0; display: flex; align-items: center; gap: 6px; }
.s2d-col-label { width: 236px; }
.s2d-col-total { width: 118px; }
.s2d-table th.s2d-c-label, .s2d-table td.s2d-c-label { min-width: 236px; width: 236px; }
/* ARC #1339 · the description header is frozen in both directions: `.s2-table thead th` gives it the day
 * headers' z-index (20), so a day header scrolled under it painted on top (later in the row). */
.s2d-table thead th.s2d-c-label { z-index: 23; }
/* The page's 20px gutter (`.s2-scroll` padding) sits left of the frozen column, and the days scrolled under
 * it showed through there; the frozen cells paint the page colour over it. A section heading spans the whole
 * row, so its td cannot stick: its text does. */
.s2d-table thead th.s2d-c-label, .s2d-table tbody th.s2d-c-label, .s2d-table tbody td.s2d-c-label { box-shadow: -21px 0 0 0 var(--background, #F8F9FA); }
.s2d-table .s2d-sec-txt { position: sticky; left: 12px; }
/* ARC #1336 · the ‹ › month buttons beside the Year and Month pickers take the pickers' height. */
.s2d-month-step { align-self: stretch; min-height: 26px; }
/* Day columns — narrow, tabular */
.s2d-table .s2d-day, .s2d-table .s2d-cell { font-size: 11px; padding-left: 8px; padding-right: 10px; }
.s2-wrap[data-density="compact"] .s2d-table th, .s2-wrap[data-density="compact"] .s2d-table td { padding-top: 3px; padding-bottom: 3px; }
.s2d-day { min-width: 60px; line-height: 1.05; }
.s2d-day-n { display: block; font-size: 11px; font-weight: 700; color: #475569; }
.s2d-day-w { display: block; font-size: 8.5px; font-weight: 600; letter-spacing: 0.04em; color: #A5A3B8; }
.s2d-day.weekend .s2d-day-n { color: #3D2975; }
.s2d-cell.weekend { background: #FAF9FE; }
.s2d-table .s2-row-line:hover .s2d-cell.weekend, .s2d-table .s2-row-detail:hover .s2d-cell.weekend { background: #F4F2FC; }
/* Sticky Month Total column — pinned LEFT beside the label column (left: 236px
 * = .s2d-col-label width) so the last day of the month is never hidden under a
 * right-edge overlay; totals sit together with the categories. */
.s2d-table thead th.s2d-c-total, .s2d-table td.s2d-total {
  position: sticky; left: 236px; z-index: 12; background: inherit;
  border-right: 1px solid var(--border-strong, #D6D3E8);
  font-weight: 700; color: var(--s2-ink);
}
.s2d-table thead th.s2d-c-total { z-index: 22; background: #FBFAFE; }
/* GL Accounts column (app-wide toggle) — sits between the label and Month Total,
 * sticky like both of them, and pushes the total's offset right by its width. */
.s2-c-gl { text-align: left; font-variant-numeric: tabular-nums; font-size: 11px; color: #7A7690; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #F1EFF8; width: 96px; min-width: 96px; max-width: 96px; }
.s2-table thead th.s2-c-gl { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: #8A87A3; vertical-align: bottom; }
.s2-row-section .s2-c-gl { display: none; }
.s2d-col-gl { width: 96px; }
.s2d-table th.s2d-c-gl, .s2d-table td.s2d-c-gl { position: sticky; left: 236px; z-index: 12; background: inherit; }
.s2d-table thead th.s2d-c-gl { z-index: 22; background: #FBFAFE; }
.s2d-table.s2d-gl-on thead th.s2d-c-total, .s2d-table.s2d-gl-on td.s2d-total { left: 332px; }
.pl-gl-toggle { white-space: nowrap; }
.s2d-table thead th.s2d-c-total { text-align: right; vertical-align: bottom; }
.s2d-table thead th.s2d-day { text-align: right; vertical-align: bottom; }
.s2d-row-line { }
.s2d-label-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.theo-neg { color: #DC2626; }

/* ── Daily Report v2 · Room Stats (days-as-rows) ──────────────── */
.drs-wrap { background: #FFFFFF; }
.drs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 22px 10px; border-bottom: 1px solid var(--border, #E5E7EB); }
.drs-head-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.drs-logo { width: 40px; height: 40px; flex-shrink: 0; }
.drs-wordmark { display: flex; flex-direction: column; line-height: 1.05; border-right: 1px solid var(--s2-hair); padding-right: 14px; }
.drs-wm1 { font-size: 15px; font-weight: 800; letter-spacing: 0.02em; color: var(--s2-ink); }
.drs-wm2 { font-size: 8px; font-weight: 700; letter-spacing: 0.16em; color: #8A87A3; }
.drs-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: var(--s2-ink); margin: 0; }
/* ARC #1341 · #1340 · THEO's and Room Stats' hotel picker sits on the title's line. */
.drs-head-brand .drs-title { display: inline-flex; align-items: center; white-space: nowrap; }
.drs-head-brand .drs-title .pg-title-dot { margin: 0 4px; }
.drs-head-right { text-align: right; flex-shrink: 0; }
.drs-asof-lbl { font-size: 11px; color: var(--s2-mute); }
.drs-asof-val { font-size: 12.5px; font-weight: 600; color: var(--s2-ink); font-variant-numeric: tabular-nums; }
.drs-head-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.drs-filters { display: flex; flex-wrap: wrap; gap: 14px 18px; padding: 12px 22px 12px; border-bottom: 1px solid var(--border, #E5E7EB); background: #FBFAFE; }
.drs-filter { display: flex; flex-direction: column; gap: 4px; }
.drs-filter > span { font-size: 12px; font-weight: 600; color: #4B5563; }
.drs-filter .s2-select { min-width: 150px; }
.drs-filter .s2-select:disabled { background: #F3F4F6; color: #6B7280; cursor: default; }
/* FX methodology note beside the Currency slicer's label — states the rate the
 * report's amounts convert at (see currency-fx.js). Sits on the existing label
 * line, so the slicer row's height is unchanged. */
.drs-fx-note { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em; color: #6D28D9; cursor: help; }
.drs-fx-note::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #8A6FD6; }
.drs-fx-note.plan { color: #92400E; }
.drs-fx-note.plan::before { background: #C9922A; }
.drs-fx-note.monthly::before { background: #2F9E7A; }

/* Currency slicer (shared, app.jsx CurrencySlicer) — the same note styling as the
 * Room Stats daily; a single-currency property shows it disabled with a "USD only" tag. */
.fb-cur-note { display: inline-flex; align-items: center; gap: 4px; margin-left: 7px; white-space: nowrap; font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; color: #6D28D9; cursor: help; }
.fb-cur-note::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #8A6FD6; }
.fb-cur-note.plan { color: #92400E; }
.fb-cur-note.plan::before { background: #C9922A; }
.fb-cur-note.monthly::before { background: #2F9E7A; }
.fb-cur-note.locked { color: #A5A3B8; cursor: default; }
.fb-cur-note.locked::before { background: #C7C3DE; }
.fb-cur-sel:disabled, .s2-select.fb-cur-locked { color: #A5A3B8; background: #F6F5FA; border-color: #E4E1F0; cursor: not-allowed; }
.fb-cur-field .s2-select { min-width: 132px; }

.drs-scroll { padding: 14px 22px 28px; }
.drs-caption { font-size: 15px; font-weight: 700; color: var(--s2-ink); margin-bottom: 10px; }
.drs-sheet { border: 1px solid var(--border, #E5E7EB); border-radius: 8px; overflow: visible; width: max-content; min-width: 100%; }
.drs-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
.drs-table th, .drs-table td { padding: 5px 12px; white-space: nowrap; }
.drs-table .num { text-align: right; }
.drs-table thead th {
  position: sticky; top: -14px; z-index: 5; background: #FFFFFF;
  font-size: 12px; font-weight: 600; color: #4B5563; vertical-align: bottom;
  border-bottom: 1.5px solid #C9C3E0; line-height: 1.15;
}
.drs-c-day { position: sticky; left: 0; z-index: 6; background: inherit; text-align: left; font-weight: 500; color: var(--s2-ink); }
.drs-table thead th.drs-c-day { z-index: 7; background: #FFFFFF; }
.drs-table tbody tr { background: #FFFFFF; }
.drs-table tbody tr:nth-child(even) { background: #F6F5FB; }
.drs-table tbody tr.drs-weekend { background: #FBFAFE; }
.drs-table tbody tr:hover { background: #EFEBFA; }
.drs-table tbody td, .drs-table tbody th { border-bottom: 1px solid #EEEDF6; }
/* Lavender-highlighted Occ / Comparison Occ / Occ Var columns */
.drs-hl { background: rgba(124, 106, 196, 0.13); }
.drs-table tbody tr:hover .drs-hl { background: rgba(124, 106, 196, 0.20); }
.drs-bw-neg { color: var(--s2-unf); }
.drs-occvar { display: inline-flex; align-items: center; gap: 5px; justify-content: flex-end; }
.drs-tri { font-size: 8px; }
.drs-tri.up { color: var(--s2-fav); }
.drs-tri.dn { color: var(--s2-unf); }
.drs-total { font-weight: 700; }
.drs-total td, .drs-total th { border-top: 1.5px solid var(--s2-ink); border-bottom: none; color: var(--s2-ink); background: #FFFFFF; }
.drs-total .drs-hl { background: rgba(124, 106, 196, 0.18); }
.drs-tie-note { color: #047857; background: #ECFDF5; border-color: #A7F3D0; display: flex; align-items: center; gap: 6px; margin-top: 12px; }


/* Drill-through mini buttons — appear on row hover */
.s2-row-links { display: none; align-items: center; gap: 4px; }
tr:hover .s2-row-links { display: inline-flex; }
.s2-mini {
  display: inline-flex; align-items: center; gap: 3px;
  font: 600 10px 'Inter', sans-serif; cursor: pointer;
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 6px;
  background: #FFFFFF; color: var(--primary, #3D2975); padding: 2px 7px;
}
.s2-mini:hover { background: var(--accent, #E0E7FF); border-color: transparent; }

/* Skeleton */
.s2-skel {
  display: inline-block; height: 11px; border-radius: 4px;
  background: linear-gradient(90deg, #EEECF6 25%, #F7F6FB 50%, #EEECF6 75%);
  background-size: 200% 100%;
  animation: s2shimmer 1.1s linear infinite;
}
@keyframes s2shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .s2-skel { animation: none; } }

/* ── Supporting visuals band ─────────────────────────────────── */
.s2-viz-band {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-top: 16px;
}
.s2-viz-card {
  background: #FFFFFF; border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px; padding: 12px 14px 8px; min-width: 0;
}
.s2-viz-title { font-size: 12px; font-weight: 700; color: var(--s2-ink); margin-bottom: 8px; }
.s2-viz-title span { font-weight: 500; color: #94A3B8; font-size: 11px; margin-left: 7px; }
.s2-chart { width: 100%; height: auto; display: block; }
.s2-chart-lbl { font: 500 9.5px 'Inter', sans-serif; fill: #8A8FA3; }
.s2-chart-lbl.s2-strong { font-weight: 700; fill: #1E293B; }
.s2-chart-val { font: 600 9.5px 'Inter', sans-serif; fill: #475569; font-variant-numeric: tabular-nums; }
.s2-chart-val.s2-onbar { fill: #FFFFFF; }
.s2-axis { stroke: #D8D5E6; stroke-width: 1; }
.s2-conn { stroke: #CBD5E1; stroke-dasharray: 2 2; }
.s2-wf-total { fill: var(--primary, #3D2975); opacity: 0.88; }
.s2-wf-down { fill: #A8B0C2; }
.s2-br-fav { fill: #34A06A; }
.s2-br-unf { fill: #D2554B; }
.s2-fav-t { fill: var(--s2-fav); color: var(--s2-fav); }
.s2-unf-t { fill: var(--s2-unf); color: var(--s2-unf); }
.s2-t-rev { color: #64748B; }
.s2-t-gop { color: var(--primary, #3D2975); }
.s2-t-ebitda { color: #0E7490; }
.s2-t-rev .s2-chart-lbl, .s2-t-gop .s2-chart-lbl, .s2-t-ebitda .s2-chart-lbl { fill: currentColor; }
.s2-focus-band { fill: var(--accent, #E0E7FF); opacity: 0.45; }
.s2-mix-0 { fill: #3D2975; } .s2-mix-1 { fill: #7C73E0; } .s2-mix-2 { fill: #B3ADEE; } .s2-mix-3 { fill: #DBD8F6; }
.s2-dr-bar { fill: #C2BEE8; }
.s2-dr-bar.focus { fill: var(--primary, #3D2975); }
.s2-dr-bud { stroke: #334155; stroke-width: 1.4; }

/* ── Drill slide-over ────────────────────────────────────────── */
.s2-drill {
  position: absolute; top: 96px; right: 16px; bottom: 16px;
  width: 408px; z-index: 40;
  background: #FFFFFF; border: 1px solid var(--border-strong, #D6D3E8);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(30, 27, 75, 0.16);
  padding: 14px 16px; overflow: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.s2-drill-head { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.theo-wrap { display: flex; flex-direction: column; overflow-y: auto; }
/* Theo canvases size to content — the PAGE scrolls, never a grid */
.theo-canvas { position: relative; flex: 0 0 auto; min-height: 0; background: #FFFFFF; border: 1px solid var(--border-strong, #E4DEF3); border-radius: 10px; margin: 8px 12px 10px; padding: 12px 14px; overflow: visible; }
.theo-grid { border-collapse: collapse; width: 100%; max-width: 620px; }
.theo-calc { max-width: 640px; }
.theo-calc-title { font-size: 15.5px; font-weight: 700; color: var(--s2-ink, #1E1B4B); margin-bottom: 8px; }
/* F&B Theo — Step 1 + Step 2 side by side (stacks when narrow) */
.theo-fb-flex { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.theo-fb-step1 { flex: 1 1 480px; max-width: 640px; }
.theo-fb-step2 { flex: 0 1 360px; }
.theo-fb-step2 .theo-grid { max-width: 320px; }
.theo-step-lbl { font-size: 12.5px; font-weight: 700; color: #64748B; margin-bottom: 6px; }
/* Undistributed Theo — 4 dept groups side by side */
.theo-undist { max-width: 1100px; }
.theo-undist-depts th { padding: 4px 8px 6px; }
.theo-undist-dept { text-align: center; font-size: 11px; font-weight: 800; color: #3D2975; border-left: 1px solid #EDE9F8; padding: 3px 6px; }
.theo-undist .grp-l { border-left: 1px solid #EDE9F8; }
/* Theo hover tooltip — GL-level account drill */
.theo-tiprow td:first-child { cursor: help; text-decoration: underline dotted #C9B8E8; text-underline-offset: 3px; }
.theo-tiprow:hover td { background: #FBFAFE; }
.theo-tip { position: fixed; z-index: 220; background: #fff; border: 1px solid #E4DEF3; border-radius: 10px; box-shadow: 0 16px 44px rgba(30,20,60,0.22); padding: 10px 12px; max-width: 600px; }
.theo-tip-title { font-size: 12px; font-weight: 800; color: #1E1B4B; margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: move; user-select: none; }
.theo-tip-x { border: none; background: none; color: #94A3B8; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px; border-radius: 4px; }
.theo-tip-x:hover { color: #3D2975; background: #F3EEFF; }
.theo-tip-scroll { max-height: 400px; overflow-y: auto; }
.theo-tip-grid { border-collapse: collapse; font-size: 11.5px; width: 100%; }
.theo-tip-grid th { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: #94A3B8; text-align: left; padding: 3px 8px; border-bottom: 1px solid #EDE9F8; position: sticky; top: 0; background: #fff; }
.theo-tip-grid th.num, .theo-tip-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.theo-tip-grid td { padding: 3px 8px; color: #334155; white-space: nowrap; }
/* The 180px min-width is for the GL drill's Description column; the 2-column
 * "simple" tooltip's second cell is the Amount, which must not be widened or the
 * panel gains a horizontal scrollbar and the sticky total row covers the row above. */
.theo-tip-grid td:nth-child(2):not(.num) { white-space: normal; min-width: 180px; }
.theo-tip-excl td { color: #B6BDC9; font-style: italic; }
.theo-tip-head td { font-weight: 800; color: #3D2975; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 9px; }
.theo-tip-total td { font-weight: 800; color: #0F172A; border-top: 1px solid #E4DEF3; position: sticky; bottom: 0; background: #fff; box-shadow: 0 -1px 0 #E4DEF3; }
.theo-tip-note { font-size: 10px; color: #94A3B8; font-style: italic; margin-top: 6px; }
/* Expandable tooltip sections — sub-department detail under a component row */
.theo-tip-exp { cursor: pointer; }
.theo-tip-exp:hover td { background: #F7F4FE; }
.theo-tip-exp td:first-child { font-weight: 600; color: #3D2975; }
.theo-tip-caret { display: inline-block; width: 11px; color: #9B8AC4; font-size: 9px; }
.theo-tip-kid td { color: #64748B; font-size: 11px; }
.theo-tip-kid td:first-child { padding-left: 27px; }
.theo-tip-kidmuted td { font-style: italic; color: #94A3B8; }
/* Theo Trend — filter table + monthly bars */
.theo-trend-flex { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.theo-trend-flex .theo-trend-chart { margin-left: 40px; }
/* Section title — sits ON the top border line of the card below it (legend style) */
.theo-sec { display: flex; align-items: center; margin: 20px 26px -17px; position: relative; z-index: 3; pointer-events: none; }
.theo-sec::before, .theo-sec::after { content: none; }
.theo-sec span { font-size: 15px; line-height: 18px; font-weight: 800; color: var(--s2-ink, #1E1B4B); white-space: nowrap; background: #FFFFFF; padding: 0 9px; }
/* THEO slicers size to their content rather than a fixed 150px column */
.theo-wrap .drs-filter .s2-select { min-width: 0; width: auto; }
.theo-wrap .drs-filter input.s2-select { max-width: 132px; }
.theo-wrap .drs-filters { gap: 12px 14px; }
/* THEO Visualize panel — right-edge drawer */
.theo-aside { position: fixed; top: 0; right: 0; bottom: 0; width: 408px; z-index: 120; background: #fff; border-left: 1px solid #E4DEF3; box-shadow: -14px 0 36px rgba(30,20,60,0.14); display: flex; flex-direction: column; }
.theo-aside-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #EDE9F8; }
.theo-aside-head h3 { margin: 0; font-size: 14px; color: #1E1B4B; }
.theo-aside-head .dv-drawer-close { margin-left: auto; }
.theo-aside-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 14px 18px; }
.theo-aside-sub { font-size: 10.5px; color: #8A7DB0; font-weight: 700; margin-bottom: 10px; }
.theo-ai-card { background: #FBFAFE; border: 1px solid #EDE9F8; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.theo-ai-line { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.5; color: #334155; }
.theo-ai-line i { flex: 0 0 6px; height: 6px; border-radius: 50%; background: #3D2975; margin-top: 6px; }
.theo-movers { display: flex; flex-direction: column; gap: 5px; }
.theo-mover { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.theo-mover:hover { background: #FBFAFE; }
.theo-mover-lbl { flex: 0 0 88px; font-size: 11px; font-weight: 700; color: #334155; }
.theo-mover-bar { flex: 1 1 auto; height: 8px; background: #F1EFF8; border-radius: 4px; overflow: hidden; }
.theo-mover-bar i { display: block; height: 100%; border-radius: 4px; }
.theo-mover-val { flex: 0 0 56px; text-align: right; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.theo-aside-note { font-size: 9.5px; color: #94A3B8; font-style: italic; margin-top: 4px; }
.theo-trend-table { flex: 0 0 215px; }
.theo-trend-filter { max-width: 215px; }
.theo-trend-chart { flex: 1 1 420px; min-width: 400px; }
.theo-trend-opt { cursor: pointer; }
.theo-trend-opt:hover td { background: #FBFAFE; }
.theo-trend-opt.on td { background: #F3EEFF; color: #3D2975; font-weight: 800; }
/* Card "i" commentary popover */
.theo-card-info { position: absolute; top: 10px; right: 12px; z-index: 30; }
.theo-info-pop { width: 350px; right: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
/* Right-rail commentary blocks */
.theo-card-flex { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.theo-card-main { flex: 1 1 auto; min-width: 0; }
.theo-card-rail { flex: 0 0 330px; display: flex; flex-direction: column; gap: 10px; }
.theo-rail-blk { background: #FBFAFE; border: 1px solid #EDE9F8; border-radius: 8px; padding: 9px 11px; }
.theo-rail-lbl { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: #8A7DB0; margin-bottom: 4px; }
.theo-rail-txt { font-size: 11.5px; line-height: 1.5; color: #334155; text-wrap: pretty; }
.theo-trend-chart { max-width: 880px; }
.theo-calc-note { font-size: 10.5px; font-style: italic; color: #64748B; margin-top: 8px; }
.theo-calc-note strong { font-style: normal; font-weight: 700; color: #475569; }
.theo-th-scope { display: block; font-size: 9px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: #A78BC8; }
.theo-calc .theo-grid-head th { text-align: right; }
.theo-calc .theo-grid-head th:first-child { text-align: left; }
.theo-calc td:first-child { color: #64748B; }
.theo-calc .theo-grid-total td:first-child { color: var(--s2-ink, #1E1B4B); }
.theo-grid-toggle-row th { padding: 0 0 12px; }
.theo-dept-seg { display: flex; gap: 4px; }
.theo-dept-btn { flex: 0 0 auto; padding: 7px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; border: 1px solid var(--border-strong, #E4DEF3); border-radius: 8px; background: #fff; color: #64748B; transition: background .14s, border-color .14s, color .14s; }
.theo-dept-btn:hover { border-color: #C9B8E8; background: #FAF8FF; }
.theo-dept-btn.on { background: #3D2975; border-color: #3D2975; color: #fff; }
.theo-grid-head th { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #94A3B8; text-align: left; padding: 4px 8px; white-space: nowrap; border-bottom: 1.5px solid var(--border-strong, #D6D3E8); }
.theo-grid-head th.num { text-align: right; }
.theo-grid td { padding: 4px 8px; font-size: 12px; color: var(--s2-ink, #1E1B4B); border-bottom: 1px solid #F1EFF8; white-space: nowrap; }
.theo-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.theo-grid-total td { font-weight: 700; border-top: 1.5px solid var(--border-strong, #D6D3E8); border-bottom: none; }
.s2-ai { width: 420px; overflow: hidden; padding-bottom: 14px; }
.s2-ai-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -16px -14px; padding: 0 16px 14px; }
.s2-drill-kicker { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #94A3B8; }
.s2-drill-title { font-size: 15px; font-weight: 700; color: var(--s2-ink); }
.s2-drill-figures { display: flex; gap: 10px; }
.s2-drill-fig {
  flex: 1; background: #FBFAFE; border: 1px solid #F1EFF8; border-radius: 8px;
  padding: 7px 9px; display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.s2-drill-fig-lbl { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #94A3B8; }
.s2-drill-fig-val { font-size: 13px; font-weight: 700; color: var(--s2-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.s2-drill-fig-val em { font-style: normal; font-size: 10.5px; font-weight: 600; opacity: 0.8; }
.s2-drill-sec { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8A87A3; margin-top: 8px; }
.s2-drill-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.s2-drill-table th { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #94A3B8; text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border-strong, #D6D3E8); }
.s2-drill-table td { padding: 5px 6px; border-bottom: 1px solid #F1EFF8; }
.s2-drill-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.s2-drill-table .s2-sign-col { width: 16px; text-align: center; font-weight: 700; padding-left: 2px; padding-right: 2px; }
.s2-drill-table .s2-drill-total td { font-weight: 700; color: var(--s2-ink); border-top: 1.5px solid var(--border-strong, #cbd5e1); border-bottom: none; }
.s2-drill-links { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.s2-link-btn {
  display: flex; align-items: center; gap: 7px;
  font: 600 11.5px 'Inter', sans-serif; cursor: pointer;
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 8px;
  background: #FFFFFF; color: var(--primary, #3D2975); padding: 7px 10px; text-align: left;
}
.s2-link-btn:hover { background: var(--accent, #E0E7FF); border-color: transparent; }
.s2-link-btn > svg:last-child { margin-left: auto; color: #94A3B8; }

/* ── Calc tooltip ────────────────────────────────────────────── */
.s2-tip {
  position: fixed; z-index: 100;
  transform: translate(-50%, calc(-100% - 9px));
  max-width: 330px; pointer-events: none;
  background: #1E1B4B; color: #EDEBFB;
  font: 500 11px/1.5 'Inter', sans-serif;
  padding: 7px 10px; border-radius: 7px;
  box-shadow: 0 6px 24px rgba(30, 27, 75, 0.3);
}

/* ── Context bar sections (Focus Period / Dept / Compare / Show) — label sits
   inline-left of its controls, matching the Daily/Monthly pages ── */
.s2-bar-row.controls { align-items: center; gap: 0; row-gap: 8px; }
.s2-sec { display: flex; flex-direction: row; align-items: center; gap: 9px; min-width: 0; }
.s2-sec-lbl {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #3D2975; white-space: nowrap;
}
/* Slicer-label typography is normalised app-wide in styles.css. */
.s2-sec-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s2-sec-div { width: 1px; height: 22px; background: var(--s2-hair); margin: 0 12px; flex-shrink: 0; }
.s2-msel-btn { min-width: 132px; justify-content: space-between; }

/* Dept filter popover */
.s2-dept { position: relative; }
.s2-dept-active { border-color: var(--primary, #3D2975); color: var(--primary, #3D2975); background: var(--accent, #E0E7FF); }
.s2-pop-catch { position: fixed; inset: 0; z-index: 55; }
.s2-dept-pop {
  position: absolute; top: calc(100% + 5px); left: 0; z-index: 60;
  width: 232px; background: #FFFFFF;
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 10px;
  box-shadow: 0 10px 32px rgba(30, 27, 75, 0.16);
  padding: 6px; display: flex; flex-direction: column;
}
.s2-dept-pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px 6px; border-bottom: 1px solid #F1EFF8; margin-bottom: 4px;
}
.s2-dept-pop-head span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #8A87A3; }
.s2-dept-pop-head button {
  border: none; background: transparent; cursor: pointer;
  font: 600 11px 'Inter', sans-serif; color: var(--primary, #3D2975); padding: 2px 4px; border-radius: 4px;
}
.s2-dept-pop-head button:hover { background: var(--accent, #E0E7FF); }
.s2-selall {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: 600 11px 'Inter', sans-serif; color: var(--primary, #3D2975);
  padding: 2px 4px; border-radius: 4px; text-transform: none; letter-spacing: 0;
}
.s2-selall:hover { background: var(--accent, #E0E7FF); }
.s2-selall input { width: 13px; height: 13px; accent-color: var(--primary, #3D2975); cursor: pointer; }
.s2-selall span { font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--primary, #3D2975); }
.s2-pop-grid { min-width: 218px; }
.s2-qp {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 2px 4px 6px; border-bottom: 1px solid #F1EFF8; margin-bottom: 5px;
}
.s2-qp button {
  border: 1px solid var(--border, #E5E7EB); background: #FFFFFF; cursor: pointer;
  font: 600 10.5px 'Inter', sans-serif; color: #6B7280; border-radius: 999px; padding: 2px 9px;
}
.s2-qp button:hover { border-color: var(--primary-300, #A5B4FC); color: var(--primary, #3D2975); background: #F8F7FF; }
.s2-opt-grid { display: grid; gap: 4px; padding: 2px 4px 4px; }
.s2-gopt {
  border: 1px solid var(--border, #E5E7EB); background: #FFFFFF; cursor: pointer;
  font: 600 11.5px 'Inter', sans-serif; color: #475569; border-radius: 7px; padding: 6px 4px;
  text-align: center; transition: background 0.1s, border-color 0.1s, color 0.1s; white-space: nowrap;
}
.s2-gopt:hover { border-color: var(--primary-300, #A5B4FC); color: var(--primary, #3D2975); }
.s2-gopt.on {
  background: var(--accent, #E0E7FF); border-color: var(--primary, #3D2975); color: var(--accent-fg, #3730A3);
}
.s2-dept-opt {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 12px 'Inter', sans-serif; color: #334155;
  padding: 5px 8px; border-radius: 6px;
}
.s2-dept-opt:hover { background: #F8FAFC; }
.s2-dept-opt input { accent-color: var(--primary, #3D2975); margin: 0; cursor: pointer; }

/* Expand/collapse tools in the account header cell */
.s2-th-flex { display: flex; align-items: center; gap: 7px; }
.s2-th-tools { display: inline-flex; align-items: center; gap: 2px; }
.s2-th-tools button {
  border: 1px solid var(--border-strong, #D6D3E8); background: #FFFFFF; cursor: pointer;
  color: #64748B; width: 19px; height: 19px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.s2-th-tools button:hover { color: var(--primary, #3D2975); border-color: var(--primary-300, #A5B4FC); }
.s2-th-tools button:focus-visible { outline: 2px solid var(--primary, #3D2975); }

/* ── Compare-months mode ─────────────────────────────────────── */
.s2-mode button.on { color: var(--accent-fg, #3730A3); }
/* Panel triggers (Log · AI Assistant) sit at the far right of the toolbar, the
   same place every other view puts them; no label, no divider. */
.s2-sec-end { margin-left: auto; }
.s2-sec-end .s2-sec-controls { padding-top: 0; }
/* Currency slicer reuses the shared title-row control, sized for the toolbar. */
.s2-sec .pg-cur-toggle,
.s2-sec .pg-fx-chip { position: static; }
/* The FX methodology reads as plain text here, not a pill — the toolbar already
   carries enough chrome. Title rows on other views keep the chip treatment. */
.s2-sec .pg-fx-chip {
  padding: 0; background: none; border: 0; border-radius: 0;
  font-size: 11.5px; font-weight: 500; color: #6B6478; cursor: help;
}
.s2-sec .pg-fx-chip:hover { color: #3D2975; border: 0; }
.s2-sec .pg-fx-chip .pg-fx-dot { display: none; }

.s2-presets { display: flex; align-items: center; gap: 3px; }
.s2-preset {
  border: 1px dashed var(--border-strong, #D6D3E8); border-radius: 6px;
  background: #FFFFFF; cursor: pointer; color: #64748B;
  font: 600 10.5px 'Inter', sans-serif; padding: 4px 8px; white-space: nowrap;
}
.s2-preset:hover { color: var(--primary, #3D2975); border-color: var(--primary-300, #A5B4FC); background: #FBFAFE; }

.s2-mchips { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.s2-mchip {
  border: 1px solid var(--border-strong, #D6D3E8); border-radius: 6px;
  background: #FFFFFF; cursor: pointer; color: #64748B;
  font: 600 10.5px 'Inter', sans-serif; padding: 4px 7px; min-width: 32px;
}
.s2-mchip:hover { border-color: var(--primary-300, #A5B4FC); color: var(--primary, #3D2975); }
.s2-mchip.on { background: var(--primary, #3D2975); border-color: var(--primary, #3D2975); color: #FFFFFF; }
.s2-mchip:focus-visible, .s2-preset:focus-visible { outline: 2px solid var(--primary, #3D2975); outline-offset: 1px; }

/* Multi-month sheet scrolls both axes; header + label column stay pinned */
.s2-wrap[data-view="multi"] .s2-sheet { overflow: auto; max-height: calc(100vh - 330px); min-height: 300px; }
.s2-wrap[data-view="multi"] .s2-table thead th { top: 0; position: sticky; }
.s2-multi thead th.s2-c-label { z-index: 22; }
.s2-multi .s2-c-label { min-width: 268px; max-width: 330px; }
.s2-multi .num { min-width: 78px; }
.s2-multi .s2-sub-hdr { font-size: 9.5px; color: #A5A3BD; }
.s2-multi .s2-sub-cell { font-size: 11px; min-width: 70px; }
.s2-multi .s2-c-total { font-weight: 700; background: rgba(61, 41, 117, 0.04); }
.s2-multi thead .s2-c-total { background: #F4F2FC; }

.s2-c-spark { width: 96px; min-width: 96px; text-align: center; }
.s2-rowspark { color: #9AA1B5; display: inline-block; vertical-align: middle; }
.s2-row-key .s2-rowspark { color: var(--primary, #3D2975); }
.s2-row-subtotal .s2-rowspark, .s2-row-final .s2-rowspark { color: #6D7A93; }

.s2-recon-mini {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 50%;
  font-size: 8.5px; font-weight: 800; cursor: help;
  margin-right: 5px; vertical-align: 1px;
}
.s2-recon-mini.tied { background: #ECFDF5; color: #047857; }
.s2-recon-mini.flag { background: #FFFBEB; color: #B45309; }

/* Charts toolbar (total of selection / step through months) */
.s2-viz-toolbar { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; }
.s2-viz-toolbar + .s2-viz-band { margin-top: 8px; }
.s2-step {
  display: flex; align-items: center;
  background: #F1F5F9; border: 1px solid var(--border, #E5E7EB);
  border-radius: 8px; padding: 2px; gap: 2px;
}
.s2-step button {
  border: none; background: transparent; cursor: pointer; color: #64748B;
  width: 24px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
}
.s2-step button:hover { background: #FFFFFF; color: var(--s2-ink); }
.s2-step span { font: 600 11.5px 'Inter', sans-serif; color: #94A3B8; min-width: 84px; text-align: center; }
.s2-step span.on { color: var(--primary, #3D2975); }

/* ── Change Log button + consolidated panel ──────────────────── */
.s2-log-count {
  margin-left: 5px; min-width: 16px; height: 16px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #3D2975; color: #fff; border-radius: 8px;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.s2-log-aside {
  background: #fff; box-shadow: -12px 0 32px rgba(15, 23, 42, 0.16);
  border-left: 1px solid var(--s2-hair, #E7E5F0);
}
.s2-log-view {
  color: #3D2975; font-weight: 700;
}
.s2-log-aside .dv-log-group-source { font-weight: 600; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1480px) { .s2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1280px) {
  .s2-sheet { overflow-x: auto; }
  .s2-table thead th { position: static; }
  .s2-viz-band { grid-template-columns: minmax(0, 1fr); }
}

/* THEO — Focus Period control (same period model as the Statement of Income) */
.theo-fp{flex:1 1 100%;}
.theo-fp-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.theo-fp-sum,
.s2-fp-sum{font-size:11.5px;font-weight:700;color:#3D2975;background:#F3EEFF;border:1px solid #E4DEF3;border-radius:6px;padding:4px 9px;white-space:nowrap;}
