/* ========== Reporting · Profit & Loss ==========
 * Two independent period blocks (left / right), each with the same
 * user-chosen dataset columns. Reuses the s2-* table vocabulary; only the
 * dual-block header chrome and the section-hide affordances are new. */

.pl-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; --pl-fav: #15803D; --pl-unf: #B91C1C; --pl-hair: #E7E5F0; --pl-ink: #0F172A; --pl-mute: #64748B; }

/* ── Toolbar ─────────────────────────────────────────────────── */
.pl-bar { background: #FFFFFF; border-bottom: 1px solid var(--border, #E5E7EB); padding: 10px 20px 8px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; position: relative; z-index: 40; }
.pl-bar-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pl-bar-row.top { align-items: flex-start; flex-wrap: nowrap; }
.pl-bar-row.controls { flex-wrap: wrap; }
.pl-bar-spacer { flex: 1; }
.pl-title-block { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--pl-ink); display: flex; align-items: center; gap: 7px; }
.pl-subtitle { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--pl-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-bar .s2-chip, .pl-bar .s2-ghost-btn, .pl-bar .s2-seg button { white-space: nowrap; }
.pl-ctrl-lbl { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #3D2975; }
.pl-ctrl-div { width: 1px; height: 20px; background: var(--pl-hair); margin: 0 2px; }

/* ── Side (period block) pickers ─────────────────────────────── */
.pl-sides { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.pl-side-card { display: flex; align-items: center; gap: 7px; border: 1px solid var(--border-strong, #D6D3E8); border-radius: 9px; background: #FFFFFF; padding: 5px 9px; }
.pl-side-card.b { background: #FBFAFE; }
.pl-side-tag { font-size: 9.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #8A87A3; border-right: 1px solid var(--pl-hair); padding-right: 8px; }
.pl-side-card.b .pl-side-tag { color: #3D2975; }
.pl-swap { border: 1px solid var(--border-strong, #D6D3E8); background: #FFFFFF; border-radius: 9px; cursor: pointer; color: #3D2975; width: 30px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.pl-swap:hover { background: #F3EEFF; }

/* ── Sheet ───────────────────────────────────────────────────── */
.pl-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 16px 24px; }
.pl-sheet { background: #FFFFFF; border: 1px solid var(--border, #E5E7EB); border-radius: 10px; overflow: visible; margin-top: 12px; }
/* Fixed layout + width 100% — every column always fits the pane, no side scroll */
.pl-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; font-size: 12.5px; }
.pl-table th, .pl-table td { padding: 5px 10px; vertical-align: middle; overflow: hidden; }
.pl-wrap[data-density="compact"] .pl-table th, .pl-wrap[data-density="compact"] .pl-table td { padding-top: 2.5px; padding-bottom: 2.5px; }
.pl-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-feature-settings: 'tnum'; }
/* Fit tiers — type size and gutters step down as columns are added */
.pl-wrap[data-fit="1"] .pl-table { font-size: 11.5px; }
.pl-wrap[data-fit="1"] .pl-table th, .pl-wrap[data-fit="1"] .pl-table td { padding-left: 8px; padding-right: 8px; }
.pl-wrap[data-fit="2"] .pl-table { font-size: 10.5px; }
.pl-wrap[data-fit="2"] .pl-table th, .pl-wrap[data-fit="2"] .pl-table td { padding-left: 6px; padding-right: 6px; }
.pl-wrap[data-fit="3"] .pl-table { font-size: 9.5px; }
.pl-wrap[data-fit="3"] .pl-table th, .pl-wrap[data-fit="3"] .pl-table td { padding-left: 4px; padding-right: 5px; }
.pl-wrap[data-fit="4"] .pl-table { font-size: 8.5px; letter-spacing: -0.015em; }
.pl-wrap[data-fit="4"] .pl-table th, .pl-wrap[data-fit="4"] .pl-table td { padding-left: 3px; padding-right: 4px; }
.pl-wrap[data-fit="5"] .pl-table { font-size: 8px; letter-spacing: -0.02em; }
.pl-wrap[data-fit="5"] .pl-table th, .pl-wrap[data-fit="5"] .pl-table td { padding-left: 1px; padding-right: 2px; }

/* Header — three sticky rows: side · dataset · unit */
.pl-table thead th { background: #FBFAFE; position: sticky; z-index: 20; color: #7C7A94; text-align: right; }
.pl-table thead tr.pl-h-side th:first-child { border-top-left-radius: 9px; }
.pl-table thead tr.pl-h-side th:last-child { border-top-right-radius: 9px; }
.pl-table thead tr.pl-h-side th { top: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; color: var(--pl-ink); text-align: left; padding-top: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--pl-hair); }
.pl-table thead tr.pl-h-ds th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; top: var(--pl-htop, 34px); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; padding-top: 6px; padding-bottom: 5px; border-bottom: 1px solid var(--pl-hair); }
.pl-table thead tr.pl-h-unit th { white-space: nowrap; overflow: hidden; top: var(--pl-htop, 56px); box-shadow: 0 1px 0 var(--border-strong, #D6D3E8), 0 6px 10px -6px rgba(30, 27, 75, 0.18); font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--border-strong, #D6D3E8); }
.pl-table thead th.pl-c-label { left: 0; z-index: 30; text-align: left; border-top-left-radius: 10px; }
.pl-table thead th.pl-side-hdr.b { background: #F5F2FE; }
.pl-table thead th.pl-ds-var { color: #8A87A3; }
/* Each block's title pins just right of the frozen Line Item column, so both
 * side labels stay on screen while the sheet scrolls horizontally. */
.pl-side-hdr-in { display: inline-flex; flex-direction: column; gap: 1px; align-items: flex-start; max-width: 100%; }
.pl-side-hdr-sub { font-size: 9.5px; font-weight: 600; letter-spacing: 0.02em; color: #8A87A3; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pl-wrap[data-fit="3"] .pl-side-hdr-sub, .pl-wrap[data-fit="4"] .pl-side-hdr-sub, .pl-wrap[data-fit="5"] .pl-side-hdr-sub { font-size: 8.5px; }
.pl-wrap[data-fit="3"] .pl-table thead tr.pl-h-side th, .pl-wrap[data-fit="4"] .pl-table thead tr.pl-h-side th, .pl-wrap[data-fit="5"] .pl-table thead tr.pl-h-side th { font-size: 10px; }
.pl-wrap[data-fit="3"] .pl-table thead tr.pl-h-ds th, .pl-wrap[data-fit="4"] .pl-table thead tr.pl-h-ds th, .pl-wrap[data-fit="5"] .pl-table thead tr.pl-h-ds th { font-size: 8.5px; letter-spacing: 0.01em; }
.pl-wrap[data-fit="3"] .pl-table thead tr.pl-h-unit th, .pl-wrap[data-fit="4"] .pl-table thead tr.pl-h-unit th, .pl-wrap[data-fit="5"] .pl-table thead tr.pl-h-unit th { font-size: 7.5px; letter-spacing: 0.02em; }

/* Body */
.pl-table tbody tr { background: #FFFFFF; }
.pl-table tbody td, .pl-table tbody th { border-bottom: 1px solid #F1EFF8; }
.pl-c-label { background: inherit; text-align: left; font-weight: inherit; border-left: 1px solid var(--border-strong, #D6D3E8); border-right: 1px solid var(--border-strong, #D6D3E8); }
.pl-table thead th.pl-h-lbl { vertical-align: bottom; padding-bottom: 7px; }
.pl-table tbody tr .pl-c-label { background: #FCFBFF; }
/* GL Accounts column — sits beside the line-item spine; only accounts have one */
.pl-c-gl { text-align: left; font-variant-numeric: tabular-nums; font-size: 0.9em; color: #7A7690; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--border-strong, #D6D3E8); background: #FCFBFF; }
.pl-table thead th.pl-h-gl { vertical-align: bottom; padding-bottom: 7px; text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; color: #8A87A3; }
.pl-table tbody tr.pl-row-dhead .pl-c-gl { background: var(--primary, #3D2975); border-right-color: var(--primary, #3D2975); }
.pl-table tbody tr.pl-row-lab .pl-c-gl { background: #F1EDFC; }
.pl-table tbody tr.pl-row-dsub .pl-c-gl { background: #F7F5FE; }
.pl-table tbody tr.pl-row-dtotal .pl-c-gl { background: #F0ECFB; }
.pl-table tbody tr.pl-row-section .pl-c-gl { background: #FFFFFF; }
.pl-table tbody tr.pl-row-section .pl-c-label { background: #FFFFFF; }
.pl-spacer td { border: none !important; padding: 0 !important; background: #FFFFFF; }
/* ── Portfolio: properties as columns ─────────────────────────────────────── */
.plf-table thead th.pl-side-hdr { text-align: right; }
.plf-table .plf-total, .plf-table thead th.plf-total-hdr { background: #F3F0FD; font-weight: 700; }
.plf-table thead th.plf-total { background: #EDE9FA; }
.pl-wrap[data-frozen="no"] .plf-table thead th { position: static; }
.plf-pager { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.pl-pop.plf-pop { left: auto; right: 0; width: min(620px, calc(100vw - 40px)); padding: 12px 14px 14px; max-height: 78vh; overflow: auto; }
.plf-pop .plf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 22px; }
.plf-pop .plf-grid-ds { grid-template-columns: 1fr; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-strong, #D6D3E8); }
.plf-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.plf-grp { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6D5BA8; text-align: center; margin-bottom: 2px; }
.plf-opt { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 8px; }
.plf-opt > .plf-opt-lbl { font-size: 11px; font-weight: 600; color: #6B6884; text-align: right; }
.plf-opt .s2-select, .plf-opt .fb-dsl-trigger { width: 100%; min-width: 0; }
.plf-static { font-size: 11px; color: #4A4763; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-grp-start { border-left: 1px solid var(--pl-hair); }
.pl-side-start { border-left: 2px solid var(--border-strong, #D6D3E8); }
.pl-c-base { font-weight: 600; color: var(--pl-ink); }
.pl-comp { color: #6B7280; font-weight: 450; }
.pl-metric { color: #6B7280; font-size: 0.92em; }

/* Dataset / Comparison slicers — label above its select, like the other
   toolbar fields, so the three read as one group. */
.pl-ds-field { display: inline-flex; flex-direction: column; gap: 3px; }
.pl-ds-field .pl-ctrl-lbl { margin: 0; }
.pl-ds-field .s2-select { min-width: 118px; }
.pl-asof-inp { font: inherit; font-size: 12px; }

/* ── Profit & Loss — Monthly ──────────────────────────────────────────────
   Line Item far left, then the chosen dataset month by month, a Total, its
   metric, and each remaining dataset's total / metric / variance. Month cells
   read lighter than the Total so the eye lands on the year figure. */
.plm-table .plm-mo { color: #5B6472; font-variant-numeric: tabular-nums; }
.plm-table thead th.plm-mo-h { text-align: right; color: #6B7280; }
/* Sub-label under the abbreviation: what this column reads (ACT / FCST / BUD / year).
   Quieter than the month, with the actualized months weighted so the closed part of
   the year reads as settled at a glance. */
.plm-table thead th.plm-mo-h .plm-mo-lbl { display: block; }
.plm-table thead th.plm-mo-h .plm-mo-tag { display: block; margin-top: 1px; font-size: 8px; font-weight: 600; letter-spacing: 0.05em; color: #7C7A94; }
.plm-table thead th.plm-mo-h .plm-mo-tag.act { color: #574F8C; font-weight: 700; }
.pl-wrap[data-fit="4"] .plm-table thead th.plm-mo-h .plm-mo-tag, .pl-wrap[data-fit="5"] .plm-table thead th.plm-mo-h .plm-mo-tag { font-size: 7px; letter-spacing: 0.02em; }
/* A month the Actual dataset can't answer for yet (still open). */
.plm-table .plm-open { color: #B9B4C8; }
.plm-table thead th.plm-open { color: #B9B4C8; }
/* The fiscal-year total closes the breakout — ruled and weighted. */
.plm-table .plm-tot, .plm-table thead th.plm-tot-h {
  border-left: 1px solid var(--border-strong, #D6D3E8);
  background: #FBFAFF; font-weight: 700; color: var(--pl-ink);
}
.plm-table thead th.plm-tot-h { background: #F6F3FD; }
.plm-wrap .pl-side-hdr-in > span:first-child { text-transform: none; letter-spacing: 0.01em; }

/* ── Multi Year: one column block per year (newest left). Each block header
   stacks dataset · period range · reach note, right-aligned over its numbers.
   The current year's amounts are weighted like the Monthly's Total. The table
   sits at its NATURAL width (the view sets it in px) rather than stretching to
   the pane, and its headers run a size up from the other P&L views. */
.ply-table { width: auto; max-width: 100%; }
.ply-table thead th.ply-year-h { text-align: right; vertical-align: bottom; padding-top: 10px; padding-bottom: 8px; }
.ply-year-in { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 100%; }
.ply-year-ds { text-transform: none; letter-spacing: 0.01em; font-size: 13px; font-weight: 700; }
.ply-year-rng { font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em; color: #6B6884; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ply-year-note { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; color: #B9B4C8; text-transform: uppercase; white-space: nowrap; }
.ply-table thead tr.pl-h-side th.pl-h-lbl { font-size: 13px; }
.ply-table thead tr.pl-h-unit th { font-size: 10.5px; letter-spacing: 0.06em; padding-top: 6px; padding-bottom: 6px; }
.pl-wrap[data-fit="2"] .ply-year-ds { font-size: 12px; }
.pl-wrap[data-fit="2"] .ply-year-rng { font-size: 10.5px; }
.pl-wrap[data-fit="3"] .ply-year-ds, .pl-wrap[data-fit="4"] .ply-year-ds, .pl-wrap[data-fit="5"] .ply-year-ds { font-size: 11px; }
.pl-wrap[data-fit="3"] .ply-year-rng, .pl-wrap[data-fit="4"] .ply-year-rng, .pl-wrap[data-fit="5"] .ply-year-rng { font-size: 9px; }
.pl-wrap[data-fit="3"] .ply-table thead tr.pl-h-unit th, .pl-wrap[data-fit="4"] .ply-table thead tr.pl-h-unit th, .pl-wrap[data-fit="5"] .ply-table thead tr.pl-h-unit th { font-size: 8.5px; }
.ply-table .ply-amt.pl-c-base { background: #FBFAFF; }
.ply-wrap .pl-sheet { display: inline-block; max-width: 100%; min-width: 0; vertical-align: top; }
.ply-wrap .pl-bar-row.controls { flex-wrap: wrap; row-gap: 8px; }
.ply-wrap .pl-ds-field .s2-select { min-width: 108px; }
.ply-wrap .ply-years { min-width: 90px; }

/* ── Monthly · Time Period → Custom Period picker: one block per year, twelve
   month chips each; actualized months carry a subtle tint so the closed part of
   a year reads at a glance. */
.plm-tp-pop { min-width: 316px; }
.plm-tp-year + .plm-tp-year { margin-top: 4px; }
.plm-tp-year .pl-pop-grp > span { white-space: nowrap; }
.plm-tp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 2px 6px 6px; }
.plm-tp-mo { border: 1px solid var(--border-strong, #D6D3E8); background: #FFFFFF; border-radius: 6px; cursor: pointer; font: 600 11px 'Inter', sans-serif; color: #1E293B; padding: 4px 0; text-align: center; }
.plm-tp-mo.closed { background: #F8F7FC; }
.plm-tp-mo:hover { background: #F3EEFF; border-color: #B9B4C8; }
.plm-tp-mo.on { background: var(--primary, #3D2975); border-color: var(--primary, #3D2975); color: #FFFFFF; }
.plm-wrap .pl-bar-row.controls { flex-wrap: wrap; row-gap: 8px; }
.plm-wrap .s2-num { width: 52px; }

/* ── Multi Period: the two-period P&L's block (dataset · comparison · variance)
   repeated once per period, plus a Total block. Three sticky header rows:
   period · dataset · unit. */
.plp-table thead th.plp-per-h { text-align: left; }
.plp-table thead th.plp-per-h .pl-side-hdr-in > span:first-child { text-transform: none; letter-spacing: 0.01em; font-size: 12px; white-space: nowrap; }
.plp-table thead th.plp-per-h.plm-tot-h .pl-side-hdr-in > span:first-child { color: var(--pl-ink); }
.plp-table .plm-tot.pl-metric { font-weight: 600; }
.plp-wrap .plp-total { min-width: 64px; }
.plp-custom { display: inline-flex; flex-direction: column; gap: 3px; }
.plp-custom > .s2-ghost-btn { align-self: flex-start; }

/* ── Forecast Accuracy: three 1st-of-month snapshot date fields. */
.plfa-snap-row { display: inline-flex; align-items: center; gap: 4px; }
.plfa-snap-x { border: none; background: transparent; cursor: pointer; font: 700 14px 'Inter', sans-serif; color: #A5A3B8; padding: 0 2px; line-height: 1; }
.plfa-snap-x:hover { color: #3D2975; }
.plfa-reset { align-self: flex-end; }
.plfa-table thead th.plfa-per-h { text-align: left; }
.plfa-table thead th.plfa-per-h .pl-side-hdr-in > span:first-child { text-transform: none; letter-spacing: 0.01em; font-size: 12px; white-space: nowrap; }
.plfa-table thead th.plfa-per-h.plm-tot-h .pl-side-hdr-in > span:first-child { color: var(--pl-ink); }
.plfa-table .plm-tot.pl-metric { font-weight: 600; }
.plfa-wrap .plfa-total { min-width: 64px; }
.plfa-custom { display: inline-flex; flex-direction: column; gap: 3px; }
.plfa-custom > .s2-ghost-btn { align-self: flex-start; }


.pl-row-section .pl-c-label .pl-label-txt, .pl-row-dhead .pl-c-label .pl-label-txt { overflow: visible; }
.pl-row-section td, .pl-row-section th { vertical-align: bottom; padding-bottom: 4px; font-size: 0.84em; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8A87A3; border-bottom: 1px solid var(--border-strong, #D6D3E8); background: #FFFFFF; }
/* Departmental detail section band */
.pl-row-dhead td, .pl-row-dhead th { vertical-align: bottom; padding-bottom: 5px; font-size: 0.9em; font-weight: 700; letter-spacing: 0.04em; color: #FFFFFF; background: var(--primary, #3D2975); border-bottom: 1px solid var(--primary, #3D2975); }
.pl-table tbody tr.pl-row-dhead .pl-c-label { border-left-color: var(--primary, #3D2975); border-right-color: var(--primary, #3D2975); background: var(--primary, #3D2975); color: #FFFFFF; }
/* Workbook LAB sub-header inside a detail section */
.pl-row-lab td, .pl-row-lab th { vertical-align: bottom; padding-bottom: 3px; font-size: 0.82em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6D5BA8; background: #F5F2FE; border-bottom: 1px solid #E3DCF7; }
.pl-table tbody tr.pl-row-lab .pl-c-label { background: #F1EDFC; }
.pl-dhead-dept { font-weight: 600; font-size: 0.82em; letter-spacing: 0.02em; opacity: 0.72; margin-left: 8px; }
.pl-row-dsub { font-weight: 650; background: #FBFAFE; }
.pl-row-dsub td, .pl-row-dsub th { border-top: 1px solid #EDEAF7; }
.pl-table tbody tr.pl-row-dsub .pl-c-label { background: #F7F5FE; }
.pl-row-dtotal { font-weight: 700; background: #F4F1FD; }
.pl-row-dtotal td, .pl-row-dtotal th { border-top: 1px solid var(--border-strong, #D6D3E8); border-bottom: 1px solid var(--border-strong, #D6D3E8); }
.pl-table tbody tr.pl-row-dtotal .pl-c-label { background: #F0ECFB; }
.pl-row-detail { color: #5B6472; }
.pl-row-detail:hover, .pl-row-dsub:hover { background: #FAFAFE; }
.pl-d1 .pl-label-txt { padding-left: 0; }
.pl-d2 .pl-label-txt { padding-left: 10px; }
.pl-d3 .pl-label-txt { padding-left: 20px; }
.pl-d4 .pl-label-txt { padding-left: 30px; }
.pl-count { font-size: 11px; font-weight: 600; color: #8A87A3; white-space: nowrap; }
.pl-row-line:hover { background: #FAFAFE; }
.pl-row-stat { color: #475569; }
.pl-row-stat .pl-c-base { font-weight: 600; color: var(--pl-ink); }
.pl-row-subtotal { font-weight: 650; }
.pl-row-subtotal td, .pl-row-subtotal th { border-top: 1px solid var(--border-strong, #D6D3E8); }
.pl-row-subtotal .pl-c-base { font-weight: 700; }
.pl-row-subtotal.emphasis { background: #FBFAFE; }
.pl-row-key { background: var(--muted, #F0EDFD); font-weight: 750; font-size: 1.03em; }
.pl-row-key td, .pl-row-key th { border-top: 2px solid var(--primary, #3D2975); border-bottom: 2px solid var(--primary, #3D2975); padding-top: 8px; padding-bottom: 8px; }
.pl-row-final { background: #FBFAFE; font-weight: 700; }
.pl-row-final td, .pl-row-final th { border-top: 1px solid var(--pl-ink); border-bottom: 3px double var(--pl-ink); }

.pl-fav { color: var(--pl-fav); font-weight: 600; }
.pl-unf { color: var(--pl-unf); font-weight: 600; }
.pl-zero { color: #9CA3AF; }
.pl-arr { font-size: 8px; vertical-align: 1px; margin-right: 3px; }

.pl-label-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pl-label-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-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; }
.pl-exp:hover { background: var(--accent, #E0E7FF); color: var(--accent-fg, #3730A3); }
.pl-exp-gap { width: 18px; flex-shrink: 0; display: inline-block; }
.pl-hidden-note { font-size: 0.76em; font-weight: 600; letter-spacing: 0.03em; color: #A5A3B8; text-transform: none; }

/* Dataset multi-select popover */
.pl-pop-wrap { position: relative; }
.pl-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; background: #FFFFFF; border: 1px solid var(--border-strong, #D6D3E8); border-radius: 10px; box-shadow: 0 12px 30px rgba(30, 27, 75, 0.14); padding: 8px; min-width: 244px; }
.pl-pop-hd { font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8A87A3; padding: 2px 6px 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pl-pop-row { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: transparent; cursor: pointer; font: 600 12px 'Inter', sans-serif; color: #1E293B; padding: 5px 6px; border-radius: 6px; text-align: left; }
.pl-pop-row:hover { background: #F7F5FF; }
.pl-pop-row .pl-box { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #C7C3DE; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #FFFFFF; font-size: 9px; }
.pl-pop-row.on .pl-box { background: var(--primary, #3D2975); border-color: var(--primary, #3D2975); }
.pl-pop-row .pl-pop-ord { margin-left: auto; font-size: 9.5px; font-weight: 700; color: #A5A3B8; }
.pl-pop-wide { min-width: 296px; }
.pl-pop-scroll { max-height: 340px; overflow-y: auto; }
.pl-pop-hd .pl-pop-acts { display: flex; gap: 4px; }
.pl-pop-hd button, .pl-pop-grp button { border: 1px solid var(--border-strong, #D6D3E8); background: #FFFFFF; border-radius: 6px; cursor: pointer; font: 700 9px 'Inter', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #3D2975; padding: 2px 6px; }
.pl-pop-hd button:hover, .pl-pop-grp button:hover { background: #F3EEFF; }
.pl-pop-grp { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #A5A3B8; padding: 8px 6px 4px; }
.pl-pop-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Find-a-section box (the slicer lists ~100 rows). */
.pl-pop-find { position: relative; display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; padding: 5px 8px; border: 1px solid var(--border-strong, #D6D3E8); border-radius: 7px; background: #FFF; }
.pl-pop-find svg { flex: none; stroke: #8A87A3; }
.pl-pop-find input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 11.5px 'Inter', sans-serif; color: #241F3D; }
.pl-pop-find input::placeholder { color: #A5A3B8; }
.pl-pop-findx { border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; color: #8A87A3; }
.pl-pop-findx:hover { color: #3D2975; }
.pl-pop-none { font-size: 11px; color: #8A87A3; padding: 8px 6px; }
.pl-pop-note { font-size: 10.5px; color: #8A87A3; padding: 6px 6px 2px; line-height: 1.35; border-top: 1px solid #F1EFF8; margin-top: 6px; }
.pl-pop-date { display: flex; align-items: center; gap: 6px; padding: 2px 6px 4px 28px; }
.pl-pop-date input { font: 600 11.5px 'Inter', sans-serif; border: 1px solid var(--border-strong, #D6D3E8); border-radius: 7px; padding: 4px 6px; color: #1E293B; }

/* Export menu */
.pl-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; background: #FFFFFF; border: 1px solid var(--border-strong, #D6D3E8); border-radius: 10px; box-shadow: 0 12px 30px rgba(30, 27, 75, 0.14); padding: 6px; min-width: 190px; }
.pl-menu button { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: transparent; cursor: pointer; font: 600 12px 'Inter', sans-serif; color: #1E293B; padding: 7px 8px; border-radius: 6px; text-align: left; }
.pl-menu button:hover { background: #F7F5FF; }

/* Print — the statement only, at full width, one SECTION per page.
   Three fixes, Sep 2026 (user review of an exported PDF):
   · the app shell was merely invisible, so the nav column reserved a blank
     third of every page — it is now REMOVED from the print layout;
   · amounts print in WHOLE DOLLARS (pl-report.jsx forces scale 1 while
     `printing`), and cells no longer clip them;
   · every department section starts a new page, the paper equivalent of the
     Excel "a tab each" export. */
@media print {
  @page { size: landscape; margin: 8mm; }
  html, body { height: auto !important; overflow: visible !important; }
  body * { visibility: hidden !important; }
  .pl-wrap, .pl-wrap * { visibility: visible !important; }
  /* The shell is REMOVED, not merely invisible: left in the layout, the nav
     reserved a blank 300px column down the left of every printed page.
     (Named selectors on purpose — a `:not(:has(…))` sweep here registered a
     :has() invalidation set across the whole app and froze the page.) */
  .nav, .nav2-fly, .nav2-subfly, .scn-dock, .fb-pending-chip, .fb-save-toast, .fb-back-fab, .fb-viewload, .scn-ribbon { display: none !important; }
  .app, .main, .main > *, .pl-wrap { display: block !important; position: static !important; width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; transform: none !important; background: #FFFFFF !important; }
  .pl-bar, .pl-pop, .pl-menu, .pl-spacer, .fb-back-fab, .fbg-dock, .scn-ribbon { display: none !important; }
  .pl-scroll { overflow: visible !important; height: auto !important; padding: 0 !important; }
  .pl-sheet { border: none !important; border-radius: 0 !important; margin-top: 0 !important; overflow: visible !important; }
  .pl-print-head { display: block !important; }
  .pl-table { font-size: 7px !important; width: 100% !important; }
  .pl-table th, .pl-table td { padding: 1px 2px !important; overflow: visible !important; }
  .pl-table .num { white-space: nowrap !important; }
  .pl-table thead th { position: static !important; }
  .pl-c-label { position: static !important; }
  .pl-table thead { display: table-header-group; }
  .pl-table tbody tr { break-inside: avoid; }
  .pl-row-section { break-after: avoid; }
  /* One page per section — the department head opens it, its own rows follow. */
  .pl-table tbody tr.pl-row-dhead { break-before: page; }
  .pl-table tbody tr.pl-row-dhead:first-child { break-before: auto; }
}
.pl-print-head { display: none; margin: 12px 0 10px; }
.pl-print-head h2 { font-size: 15px; font-weight: 700; margin: 0 0 2px; color: #0F172A; }
.pl-print-head p { font-size: 10.5px; color: #64748B; margin: 0; }

/* Deferred model build */
.pl-loading { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; font: 600 13px 'Inter', sans-serif; color: #8A87A3; }
.pl-loading-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #C7C3DE; border-top-color: #3D2975; animation: plspin 0.8s linear infinite; }
@keyframes plspin { to { transform: rotate(360deg); } }

/* ARC #1067 · on screen every column is as wide as its widest figure and
   header, nothing is cut, and the sheet scrolls sideways with the line names
   frozen on the left (Juxhin Xhuxha, 2026-10-22). P&L Standard keeps its line
   names between the two blocks; scrolled past, they stick to the left edge.
   Print keeps the fixed, page-wide layout above (the views hand their percent
   widths to <col> only while printing). The views draw a zero-height sizer row
   (PlFitSizer) that holds each column at the widest it has been, so the rows
   that scroll in cannot make the columns jump narrower. */
@media screen {
  .pl-scroll { overflow-x: auto; }
  .pl-sheet { width: max-content; min-width: 100%; box-sizing: border-box; }
  .pl-table, .ply-table { table-layout: auto; width: auto; min-width: 100%; max-width: none; }
  /* Multi Year keeps its natural width: four years do not stretch across the pane. */
  .ply-wrap .pl-sheet { display: inline-block; min-width: 0; max-width: none; }
  .ply-table { min-width: 0; }
  .pl-table th, .pl-table td { overflow: visible; }
  .pl-table thead tr.pl-h-ds th, .pl-table thead tr.pl-h-unit th, .pl-side-hdr-sub, .pl-c-gl, .pl-label-txt, .ply-year-rng { overflow: visible; text-overflow: clip; white-space: nowrap; max-width: none; }
  .pl-table tbody .pl-c-label { position: sticky; left: 0; z-index: 5; box-shadow: -17px 0 0 0 var(--background, #F8F9FA); }
  .pl-table thead th.pl-c-label { box-shadow: -17px 0 0 0 var(--background, #F8F9FA); }
  .pl-wrap[data-frozen="no"] .pl-table tbody .pl-c-label { position: static; }
  .pl-table tbody tr.pl-sizer, .pl-table tbody tr.pl-sizer td { height: 0; padding: 0 !important; border: 0 !important; line-height: 0; background: transparent; }
  .pl-table tbody tr.pl-sizer div { height: 0; }
  .pl-dec-toggle { white-space: nowrap; }
  /* ARC #1372 · Profit & Loss (Standard) only. The Line Item column sits between
     the two blocks, so the -17px page-colour shadow above (there to hide the
     gutter left of a FIRST column) painted over the left block's last column.
     Here the frozen column instead sticks 16px into the gutter, which covers it
     the same way without a shadow (16px on screen: inside the zoomed sheet that
     is 16 / zoom). Compact gutters and 11px figures let both blocks fit; the
     sheet's shrink-to-fit zoom is in pl-report.jsx. */
  .pl-std .pl-table tbody .pl-c-label, .pl-std .pl-table thead th.pl-c-label { box-shadow: none; left: calc(-16px / var(--pl-zoom, 1)); }
  .pl-std .pl-table th, .pl-std .pl-table td { padding-left: 5px; padding-right: 5px; }
  .pl-std .pl-table tbody td, .pl-std .pl-table tbody th { font-size: 11px; }
}
@media print {
  .pl-sizer { display: none !important; }
}
