@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Integrated report preview: intentionally plain, dense, and spreadsheet-like
   so what users validate on screen maps cleanly to the Excel workbook. */
.report-table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.report-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    white-space: nowrap;
}

.report-table th,
.report-table td {
    /* Thin dark borders, as the Excel export's thin borders (Keegan 10/25, #816). */
    border: 1px solid #7f7f7f;
    padding: .42rem .55rem;
    text-align: right;
}

/* Spreadsheet-density data rows (Keegan 10/21, #762): with the preview capped
   at 40 rows, a report's rows fit one screen. Headers keep their padding. */
.report-table tbody td {
    padding: .1rem .55rem;
    line-height: 1.2;
}

/* Text and dates left, numbers right, as in the Excel export (Keegan 10/27:
   "Browse - Left align LEC, Submit date and IXC", "Demand by LEC by Period -
   left align Billing Period"; #841, #843). */
.report-table td.report-text {
    text-align: left;
}

.report-table td.report-num {
    text-align: right;
}

/* Every other period shaded (Access Minutes by Period, Keegan's markup, #852). */
.report-table tr:not(.report-subtotal):not(.report-total) td.report-shade {
    background: #f2f2f2;
}

/* Keegan 10/25 (#816): "Reports on web should have same color formatting as
   excel reports" - the export's light blue (DCE6F1) with black text (#739).
   A label spanning header rows (#850) is styled as a label wherever it sits. */
.report-table thead th.report-col-label {
    background: #dce6f1;
    color: #000;
    font-weight: 700;
    /* pre-line: a label's own line break shows (Access Minutes by Period, #852). */
    white-space: pre-line;
    min-width: 5rem;
    vertical-align: middle;
}

.report-table thead th.report-group {
    background: #dce6f1;
    color: #000;
    font-weight: 700;
    text-align: center;
}

/* Un-bolded headers where AECA's markup asks (#853). */
.report-table.report-header-normal thead th {
    font-weight: 400;
}

/* Center-aligned column headers (Keegan 8/17, #443). Data cells keep their
   right/left alignment; only the headers center. */
.report-table thead th,
.report-table thead th:first-child {
    text-align: center;
}

.report-table tr.report-subtotal td {
    background: #eaf2f8;
    font-weight: 700;
}

.report-table tr.report-total td {
    background: #dce6f1;
    font-weight: 700;
}

.report-table tr.report-note td {
    color: #5b6770;
    font-style: italic;
    text-align: left;
}

.report-footnote {
    color: #455a64;
    font-style: italic;
}

/* ————————————————————————————————————————————————————————————————————————
   Sheet — dense data-entry table design system.

   Deliberately project-agnostic (no app-specific names): this is the visual
   language for forms that behave like an accounting tool — every value in a
   bordered grid, zero dead space, right-aligned numerics with thousands
   separators, formatting applied at render while the stored data stays raw.
   The design target: the page could print onto green-bar paper and read as
   a ledger. Pairs with the Sheet* components (SheetNumInput). Keep this
   block lift-able — other Delve Group projects are expected to pull it
   forward, and it may one day become a shared component library.
   ———————————————————————————————————————————————————————————————————————— */

/* Safety net only — page layouts should aim for zero horizontal scroll. */
.sheet-scroll { overflow-x: auto; max-width: 100%; }

/* Full-width variant: identity columns (Circuit) absorb the extra space —
   numeric columns pin themselves with explicit widths. */
table.sheet.sheet-full { width: 100%; }

table.sheet {
    border-collapse: collapse;
    font-size: .8rem;
    white-space: nowrap;
    width: max-content;      /* columns exactly as wide as their data */
    max-width: 100%;
}

.sheet th,
.sheet td {
    border: 1px solid #c9d2dc;
    padding: 2px 7px;
    height: 25px;
    text-align: right;       /* numbers dominate; label cells opt out */
    vertical-align: middle;
}

.sheet th {
    background: #eef3f8;
    color: #1d3a52;
    font-weight: 600;
    text-align: center;
    white-space: normal;     /* headers wrap so data columns stay narrow */
    min-width: 4.5em;
    max-width: 11em;
    padding: 3px 7px;
    line-height: 1.15;
}

.sheet th.sheet-label,
.sheet td.sheet-label { text-align: left; }
.sheet th.sheet-center,
.sheet td.sheet-center { text-align: center; }

/* Non-editable cells sit on the section tint so entry cells read white. */
.sheet td { background: #f6f8fb; }

/* An editable cell: the input fills the cell, so the gridline IS the field
   border — spreadsheet-style: white against the section tint, with the same
   thin gridline as every other cell, and a blue outline on focus. (The thick
   blue underline added for #501 is gone - Keegan 10/19, #744: "have it
   normal"; the heavier line above a Total row stays.) */
.sheet td.sheet-edit { padding: 0; background: #fff; min-width: 8em; }
.sheet td.sheet-edit:focus-within { box-shadow: inset 0 0 0 2px #2f6fb0; }
.sheet td.sheet-edit.sheet-narrow { min-width: 5.5em; }
.sheet td.sheet-edit.sheet-wide { min-width: 12em; }

.sheet-input {
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    width: 100%;
    height: 100%;
    min-height: 24px;
    padding: 2px 7px;
    box-sizing: border-box;
    border-radius: 0;
}

.sheet-input:focus {
    outline: 2px solid #2f6fb2;   /* the active cell, like a spreadsheet */
    outline-offset: -2px;
    background: #fffdf0;
}

.sheet-input.sheet-num { text-align: right; }
input.sheet-input.sheet-invalid { background: #fdecea; color: #b3261e; }
select.sheet-input { padding: 2px 4px; }

/* Merged identity cells (Circuit, Wire Center): header-tinted, top-aligned. */
.sheet td.sheet-id {
    background: #eef3f8;
    font-weight: 600;
    text-align: left;
    vertical-align: top;
    padding: 3px 7px;
}

/* Identity columns are pinned, not content-sized. `table.sheet` is
   width:max-content, so an auto-sized Circuit column gets re-measured for
   every rate-type group table — which is why the numeric columns drift left
   and right between tables as you scroll. Keegan 8/20: a reviewer reads down
   a column of PIUs/PSUs and "doesn't want to be bouncing left and right."

   Widths come from the client's own data, not taste:
     EF&DT / ESALT circuit names   max 55 chars, 97.9% within 36  -> 40ch
                                   (36 for the name + room for the two
                                    per-circuit icon buttons that share the
                                    cell while the section is unlocked)
     FGA VG-2W circuit names       max 23 chars                   -> 24ch
     Tandem / Common Transport WC  max 14 chars                   -> 18ch
   The handful of names past the cap wrap to a second line rather than
   widening the column for everyone. */
.sheet th.sheet-circuit,
.sheet td.sheet-circuit,
.sheet th.sheet-circuit-sm,
.sheet td.sheet-circuit-sm,
.sheet th.sheet-wirecenter,
.sheet td.sheet-wirecenter {
    white-space: normal;
    overflow-wrap: anywhere;
}

.sheet th.sheet-circuit,
.sheet td.sheet-circuit { width: 40ch; min-width: 40ch; max-width: 40ch; }

/* VG 2-Wire circuit column: twice the former 24ch (Keegan 10/21, #775), so a
   circuit name isn't cut off; the same on the CABS form and Manage CABS Input. */
.sheet th.sheet-circuit-sm,
.sheet td.sheet-circuit-sm { width: 48ch; min-width: 48ch; max-width: 48ch; }

/* Twice the former 18ch (Keegan 10/14, #660: "Widen Wire Center column
   (double the width)"). */
.sheet th.sheet-wirecenter,
.sheet td.sheet-wirecenter { width: 36ch; min-width: 36ch; max-width: 36ch; }

/* Grouped column headers (Originating / Terminating spans). */
.sheet tr.sheet-group th { background: #dbe7f1; }

/* Section-title rows inside a table (the Summary's group captions). */
.sheet tr.sheet-section td {
    background: #e6edf4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #33526d;
    text-align: left;
}

/* Totals: every footer row reads as a total; in-body total rows (Summary)
   opt in with .sheet-total. */
.sheet tfoot td {
    font-weight: 600;
    background: #eaf2f8;
}
.sheet tfoot tr:first-child td { border-top: 2px solid #6b8aa5; }
.sheet tr.sheet-total td {
    font-weight: 700;
    background: #eaf2f8;
    border-top: 2px solid #6b8aa5;
}

/* Light column re-titles inside the body (e.g. the Summary's TSF / TST). */
.sheet td.sheet-colnote {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #607a90;
}

/* Muted annotations: n/a cells, Original/Δ stacks on adjustments. */
.sheet .sheet-na { color: #93a1ad; }
.sheet-sub {
    display: block;
    font-size: .68rem;
    font-weight: 400;
    color: #7c8b98;
    text-align: right;
    line-height: 1.2;
}

/* Inline error state for a computed cell (e.g. a formula that failed). */
.sheet .sheet-error { color: #b3261e; font-weight: 600; }

/* Mud icon buttons embedded in cells must not inflate the row height. */
.sheet td .mud-icon-button { padding: 1px; }
.sheet td .mud-icon-button .mud-icon-root { font-size: 1.05rem; }

/* Section titles: compact, with inline controls (lock, add).
   Keegan 8/20: most companies skip straight to Feature Group D or entrance
   facilities, and at .85rem against .8rem body text the headings read as
   ordinary rows — "you really have to try to pick out, okay, that says
   Feature Group D... oops, went too far, I gotta scroll back up." Kyle's
   call on the same pass was to go a couple of points higher, enough that
   the eye catches it while scrolling without restyling the sheet. */
.sheet-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 3px;
    font-size: 1rem;
    font-weight: 700;
}
.sheet-title .sheet-title-note { font-weight: 400; color: #78909c; font-size: .8rem; }

/* The single control row above a sheet page: pickers, status, actions. */
.sheet-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Keegan 10/27 (#837): the pickers keep one fixed spacing whatever else the
   toolbar holds (nothing while a form loads, chips and buttons once it has). */
.cabs-pickers {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: none;
}

@media print {
    .sheet-toolbar { display: none !important; }
    table.sheet { font-size: 8pt; }
    .sheet-scroll { overflow: visible; }
    .sheet td.sheet-edit { background: #fff; }
    /* Keegan 10/31 (#867, #868): a table's totals print once, at its end.
       As a footer group the browser repeats them at the foot of every page
       the table runs onto (UUI x GCI 06/19/2026: 'Total EF DS1' at the bottom
       of page 1; MTA x GCI 11/19/2026: the ESALT 50 Mbps totals on page 1,
       ahead of the circuits, and again on page 2). */
    .sheet tfoot { display: table-row-group; }
    /* A row never splits across a page break (UUI's 493 TOGIAK printed on
       both pages), and a section title stays with the table under it. */
    .sheet tr { break-inside: avoid; page-break-inside: avoid; }
    .sheet-title { break-after: avoid; page-break-after: avoid; }
    /* The test site's banner (Delve Group's session recorder, never on the
       production site) doesn't print: fixed to the top of each page, it
       covered the first rows there (MTA's 'tesd' EF ESALT 50 Mbps line). */
    [data-delve-recorder] { display: none !important; }
}

@media print {
    .mud-appbar,
    .mud-drawer,
    .report-parameters,
    .report-actions,
    .report-result-summary .mud-button-root,
    #blazor-error-ui {
        display: none !important;
    }

    .mud-main-content,
    .reports-page {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }

    .report-sheet {
        box-shadow: none !important;
        break-after: page;
    }

    .report-table-scroll { overflow: visible; }
    .report-table { font-size: 7pt; }
}

.fade {
    animation-duration: 0.75s;
    animation-delay: 0.5s;
    animation-name: fadeIn;
    animation-timing-function: cubic-bezier(.26, .53, .74, 1.48);
    animation-fill-mode: backwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.fade-out {
    animation-duration: 0.5s;
    animation-name: fadeOut;
    animation-timing-function: cubic-bezier(.26, .53, .74, 1.48);
    animation-fill-mode: backwards;
}

.delay-1 { animation-delay: 0.6s; }
.delay-2 { animation-delay: 0.7s; }
.delay-3 { animation-delay: 0.8s; }
.delay-4 { animation-delay: 0.9s; }
.delay-5 { animation-delay: 1s; }

.centered-element {
    display: block;
    margin: 0 auto;
}

.centering-container {
    align-items: center;
    display: flex;
    width: 100%;
    height: calc(100vh - var(--delve-shim-height, 0px));
}

.centering-container-inapp {
    align-items: center;
    display: flex;
    width: 100%;
    height: calc(100vh - var(--delve-shim-height, 0px) - 80px);
}

.cursor-pointer {
    cursor: pointer;
}

/* Taller dropdowns (Keegan 8/17, #404): MudSelect caps its popover at 300px
   via an inline max-height on the popover root ("only showing half the length
   of my screen"); let list-bearing popovers use most of the viewport instead.
   :has scopes this to option lists so date pickers and menus are untouched;
   !important out-ranks the component's inline style. */
/* Keegan 9/18 lens: lists that nearly filled the window flipped above their
   field when opened low on the page and ran off the top with no scroll. Half
   the window — still well past the old 300px — always fits on one side, and
   the list scrolls within it. Rows are tighter too. */
.mud-popover:has(.mud-list) {
    max-height: 50vh !important;
}

.mud-popover:has(.mud-list) .mud-list {
    max-height: 50vh !important;
    overflow-y: auto !important;
}

.mud-popover .mud-list .mud-list-item {
    padding-top: 3px;
    padding-bottom: 3px;
    min-height: 0;
}

/* Half the space between dropdown items, app-wide (Keegan 10/15, #678): the
   gap between two options was the row padding plus the text's own 4px
   margins; both are trimmed, and the option text sits on a tighter line. */
.mud-popover .mud-list .mud-list-item {
    padding-top: 1px;
    padding-bottom: 1px;
}

.mud-popover .mud-list .mud-list-item .mud-list-item-text {
    margin-top: 1px;
    margin-bottom: 1px;
}

.mud-popover .mud-list .mud-list-item .mud-typography {
    line-height: 1.3;
}

/* Clicking a dropdown quickly, twice or three times, selected text across
   the page header and the side menu (Keegan 10/15, #679: "Frequently
   clicking on a drop down will highlight the menu and top section"). The
   browser treats fast clicks as a word / paragraph selection. Nothing in the
   app bar, the side menu or a closed dropdown is text anyone copies, so
   selection is switched off there; data tables and forms are untouched. */
.mud-appbar,
.mud-drawer,
.mud-select,
.mud-select .mud-input-slot,
.mud-popover .mud-list {
    -webkit-user-select: none;
    user-select: none;
}

/* Denser rows where AECA asked for tighter lists (Keegan 8/17-18,
   #429/#453): trims MudTable's dense padding further. Opt-in per table. */
.rows-compact .mud-table-cell {
    padding: 2px 12px;
}

/* Rate-set editor: fields whose value differs from the previous set, so the
   admin's eye is drawn to exactly what they changed before saving. */
.rate-changed input.mud-input-slot {
    background-color: #fff3cd;
}

/* #161 (AECA 7/1 testing): no spinner arrows on form numeric fields — minutes
   run into the hundreds of thousands, so up/down steppers are never useful
   and only add clutter. Applied via a wrapper class on the form pages; hides
   both MudBlazor's spin buttons and the native number-input spinners. */
.no-spinners .mud-input-numeric-spin {
    display: none !important;
}

.no-spinners input[type=number]::-webkit-outer-spin-button,
.no-spinners input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Keegan (7/22): the CABS form should feel like the legacy site — tight,
   utilitarian, spreadsheet-dense. MudBlazor's dense tables still pad cells
   like a consumer product; cut the padding so the 13-column adjustment
   tables (Original | Adjustment | New ×2 + billing columns) fit on screen
   without horizontal scrolling. Scoped to the form page only.
   (The form's tables now run on the Sheet design system above; these rules
   remain for the few Mud pickers still on the page.) */
.cabs-form-page .mud-input-control {
    margin: 0;
}

.no-spinners input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Print ("Print this page" → Save as PDF): drop the app chrome so the
   printout is just the form. Elements marked .d-print-none — the toolbar,
   selectors, and action buttons — plus the layout's app bar and navigation
   drawer are hidden. (.d-print-none / .d-print-block are defined here rather
   than relying on a MudBlazor utility, so they work regardless of MudBlazor
   version.) #121 (AECA 7/1): the print layout is flattened and compressed —
   no cards/shadows, tight spacing, buttons and icons gone, chips as plain
   text — so the form prints legibly in far fewer pages. */
.d-print-block {
    display: none;
}

@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-drawer-overlay,
    .mud-overlay,
    .mud-snackbar,
    .mud-button-root, /* every button and icon-button — actions don't print */
    .d-print-none {
        display: none !important;
    }

    .d-print-block {
        display: block !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Full width, compact type. */
    .mud-container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body {
        font-size: 12px !important;
    }

    /* Cards flatten to plain sections. */
    .mud-paper {
        box-shadow: none !important;
        border: none !important;
        padding: 2px 0 !important;
        margin-bottom: 4px !important;
    }

    /* Section headings stay with their content. */
    .mud-typography-h6 {
        font-size: 13px !important;
        margin: 8px 0 2px 0 !important;
        break-after: avoid;
    }

    /* Inputs print as bordered value boxes, but tight. */
    .mud-input-control {
        margin: 0 !important;
    }

    .mud-input-slot {
        padding: 1px 4px !important;
        font-size: 12px !important;
    }

    /* Chips (rate factors, statuses) print as plain bold text — colored
       chip backgrounds smudge on grayscale printers. */
    .mud-chip {
        background: none !important;
        color: #000 !important;
        font-weight: 700;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
    }

    /* The compact EF rows: label the otherwise-bare rate factor value and
       never split a circuit row across pages; keep rate-type headers with
       their first row. */
    .rf-cell::before {
        content: "Rate Factor ";
        font-size: 10px;
        color: #444;
    }

    [data-testid="circuit"] {
        break-inside: avoid;
    }

    [data-testid="rate-type-header"] {
        break-after: avoid;
    }

    /* Table headers repeat on every printed page (FGC/FGD/ASR/Tandem/FGA). */
    thead {
        display: table-header-group;
    }

    tr {
        break-inside: avoid;
    }
}

/* Date pickers: constrain the INPUT, never the picker root. MudDatePicker
   renders its open calendar popover inside the picker's root element, so a
   width limit styled onto the root crops the calendar itself — days become
   unreachable and the next-month arrow lands off-screen. (Same defect and
   fix as nsti-workforce A1, commit 6d4a175 there.) Pickers that need a
   different input width set --date-input-max in their Style — a CSS variable
   on the root is harmless; a width on the root is not. */
.date-input-limited .mud-input-control {
    max-width: var(--date-input-max, 170px);
}

/* Fixed-width columns: the <col> widths hold regardless of cell content, so
   tabbed tables that share column kinds line up (Keegan 9/15 lens). */
.table-fixed-cols table { table-layout: fixed; width: 100%; }
.table-fixed-cols td { overflow: hidden; text-overflow: ellipsis; }

/* Right-aligned numeric entry (Keegan 9/19 lens): amounts line up under
   right-aligned column titles and read like the printed form. */
.num-right input { text-align: right; }

/* Adjustment forms (Keegan 9/15 meeting): the legacy form's visual
   hierarchy. Original figures are orange, New figures green, the Adjustment
   itself black — the same theme on every adjustment table and the NAF form.
   Color is a convenience, never the only cue: the column titles still say
   Original / Adjustment / New, and New is also bold. A white gutter opens
   each Original | Adjustment | New group (and the Old | New total pair) so
   Originating, Terminating and Total read as separate blocks, and rows band
   gray / white like the legacy site so a row is easy to follow across. */
.adj-orig, .sheet .adj-orig, .sheet-sub.adj-orig { color: #b45309; }
.adj-new, .sheet .adj-new { color: #15803d; }
/* .adj-gap (Keegan 11/01, #877, #882): the same gutter and edges as an
   Original cell, without its color - VG 2-Wire's Total Minutes after Assumed
   Terminating on an adjustment, and the blocks of a split portion's table. */
.sheet th.adj-orig, .sheet td.adj-orig, .sheet .adj-gap { border-left: 8px solid #fff; }
.sheet tr.sheet-group th { border-left: 8px solid #fff; }
.cabs-adjusting .sheet tbody tr:nth-child(even) td:not(.sheet-edit):not(.sheet-id) { background: #e8ecf1; }
.cabs-adjusting .sheet tbody tr:nth-child(odd) td:not(.sheet-edit):not(.sheet-id) { background: #fff; }
/* EF & DT and ESALT circuit tables on an adjustment (Keegan 10/21, #780):
   no gray / white banding - the white entry boxes broke it up - but a
   heavier rule between rate elements, each element's Old / Adj / New reading
   as one block. Same weight as the line above a Total row. */
.cabs-adjusting .sheet[data-testid="circuit-table"] tbody tr td:not(.sheet-edit):not(.sheet-id) { background: #fff; }
.cabs-adjusting .sheet[data-testid="circuit-table"] tbody tr[data-testid="circuit"] + tr[data-testid="circuit"] > td { border-top: 2px solid #6b8aa5; }
/* Keegan 10/26 (#827): "Left/Right borders between tables" - each block keeps
   its own left and right border at the white gutter, so the Originating,
   Terminating and Total blocks read as bordered tables, as on the original
   CABS form. The gutter cell draws both lines: its own left edge (::before)
   and the right edge of the block before it (::after, across the gutter). */
/* Keegan 10/30 (#863): "Remove white spaces in cells between tables" - the
   shading fills each cell to its border. Clipped to the padding box, Firefox
   left a white margin inside every shaded cell beside the gutter (the header
   titles, the total row); Chromium didn't. */
.sheet th.adj-orig, .sheet td.adj-orig, .sheet .adj-gap, .sheet tr.sheet-group th { position: relative; }
.sheet th.adj-orig::before, .sheet td.adj-orig::before, .sheet .adj-gap::before, .sheet tr.sheet-group th::before {
    content: ""; position: absolute; top: -1px; bottom: -1px; left: -1px;
    border-left: 1px solid #c9d2dc; pointer-events: none;
}
.sheet th.adj-orig:not(:first-child)::after, .sheet td.adj-orig:not(:first-child)::after,
.sheet .adj-gap:not(:first-child)::after, .sheet tr.sheet-group th:not(:first-child)::after {
    content: ""; position: absolute; top: -1px; bottom: -1px; left: -9px;
    border-left: 1px solid #c9d2dc; pointer-events: none;
}
.sheet tr.sheet-group th.ct-no-gutter::after, .sheet tr.sheet-group th.adj-span-label::after { content: none; }
/* Under a header merged down from the group row (Traffic Type, Circuit, Wire
   Center) the second header row starts with an Original cell; it still draws
   the merged header's right edge. */
.sheet:has(tr.sheet-group th[rowspan]) thead tr:not(.sheet-group) th.adj-orig:first-child::after,
.sheet:has(tr.sheet-group th[rowspan]) thead tr:not(.sheet-group) th.adj-gap:first-child::after {
    content: ""; position: absolute; top: -1px; bottom: -1px; left: -9px;
    border-left: 1px solid #c9d2dc; pointer-events: none;
}

/* Keegan 11/01 (#878): "Bottom border should go across the full circuit
   section with no breaks (EF, ESALT, ASR)". The heavier rule above the totals
   of VG 2-Wire, EF & DT / ESALT and ASR on an adjustment runs the full width:
   drawn over the gutters that end at it (VG 2-Wire's blocks) and across the
   one that opens the totals' Original column, where an 8px white border
   otherwise wins the corner and cuts the line. FGC / FGD keep their gutters
   on the total row (#863) - their blocks are separate tables top to bottom. */
.sheet tr.adj-totals-head > td { position: relative; }
.sheet tr.adj-totals-head > td:not(.adj-orig)::before {
    content: ""; position: absolute; top: -2px; left: -1px; right: -1px;
    border-top: 2px solid #6b8aa5; pointer-events: none;
}
/* Across the gutter: the rule as the box's top border, and the block edge
   as a 1px background under it - a gray border-left would miter into the
   blue corner (Chromium). */
.sheet tr.adj-totals-head > td.adj-orig::after {
    top: -2px; width: 9px; box-sizing: border-box;
    border-left: none; border-top: 2px solid #6b8aa5;
    background: linear-gradient(#c9d2dc, #c9d2dc) left top / 1px 100% no-repeat;
}

/* Print (Keegan 11/01, #880: "Print split adj/adj: double column borders
   should be single, EF section page break header has goofy borders").
   AECA prints without background shading, so on paper each white gutter read
   as two borders with a gap; there the blocks meet at one line. The gutters
   stay on screen (#827, #863, #877, #882). */
@media print {
    .sheet th.adj-orig, .sheet td.adj-orig, .sheet .adj-gap, .sheet tr.sheet-group th { border-left: 1px solid #c9d2dc; }
    .sheet th.adj-orig::before, .sheet td.adj-orig::before, .sheet .adj-gap::before, .sheet tr.sheet-group th::before,
    .sheet th.adj-orig:not(:first-child)::after, .sheet td.adj-orig:not(:first-child)::after,
    .sheet .adj-gap:not(:first-child)::after, .sheet tr.sheet-group th:not(:first-child)::after,
    .sheet:has(tr.sheet-group th[rowspan]) thead tr:not(.sheet-group) th.adj-orig:first-child::after,
    .sheet:has(tr.sheet-group th[rowspan]) thead tr:not(.sheet-group) th.adj-gap:first-child::after,
    .sheet tr.adj-totals-head > td:not(.adj-orig)::before { content: none; }
    /* The EF & DT / ESALT column titles repeat at the top of each page the
       table runs onto. Firefox paints a collapsed-border table's lines for
       the first copy only - the repeats came out with no top, left or column
       lines, over a doubled rule. Here each cell draws its own top and left
       line (the table the right and bottom), so every copy prints alike. */
    .sheet-scroll.sheet-freeze > table.sheet {
        border-collapse: separate; border-spacing: 0;
        border-right: 1px solid #c9d2dc; border-bottom: 1px solid #c9d2dc;
    }
    .sheet-scroll.sheet-freeze > table.sheet th,
    .sheet-scroll.sheet-freeze > table.sheet td { border-right-width: 0; border-bottom-width: 0; }
    .sheet-scroll.sheet-freeze > table.sheet > thead th { position: static; box-shadow: none; }
}

/* Collapsible CABS form sections (Keegan, 9/15 meeting). */
.sec-toggle { display: inline-flex; align-items: center; gap: 2px; cursor: pointer; margin-right: 6px; border-radius: 4px; padding-right: 4px; }
.sec-toggle:hover { background: #e3eaf2; }
/* Keegan 10/19 (#793): a table's left border lines up with the first letter
   of its section title. The open/close arrow (20px + the 2px gap) hangs in
   the page margin, so the title text starts where the tables start. The
   arrow is hidden on paper (d-print-none), and the title prints flush too. */
.sheet-title .sec-toggle > .mud-icon-root { margin-left: -22px; }

/* #543: while the header pickers switch to another filing, the outgoing
   form fades and stops taking input, so nothing on screen contradicts the
   pickers during the load. */
.cabs-switching .sheet-toolbar ~ * { opacity: .25; pointer-events: none; transition: opacity .1s; }

/* Switches and checkboxes: only the control and its label text are clickable.
   MudBlazor's column container stretches the label across its parent, so a
   click anywhere on the row (e.g. blank space in a dialog) flipped Active
   (Keegan 10/7, #573). Looks the same; the hit area shrinks to the content. */
.mud-input-control-boolean-input > .mud-input-control-input-container {
    align-items: flex-start;
}

/* EF & DT / ESALT lines on an adjustment (#586; workbook "CABS Adjustment -
   New" rows 337-355; legacy EFDT adjustment): every value cell stacks the
   Old figure, the entry box (Adj) and the New figure, read across against
   the Old / Adj / New labels at the left of the line. */
.sheet .adj-stack { display: flex; flex-direction: column; align-items: stretch; text-align: right; gap: 1px; }
/* Figures and the entry box share one right edge: the box's 1px border plus
   4px padding equals the figures' 5px (Keegan 10/13, #620: "alignment of
   numbers in fields is off"). */
.sheet .adj-stack > span { line-height: 1.35; padding: 0 5px; white-space: nowrap; }
.sheet .adj-stack > input.sheet-input { padding: 0 4px; min-height: 20px; line-height: 1.35; }
/* Inline Old / Adj / New labels on a totals stack with no label column. */
.sheet .adj-stack .adj-lbl { float: left; margin-right: 10px; font-size: .68rem; font-weight: 400; color: #607a90; }
.sheet .adj-stack > .adj-o { color: #b45309; }
/* #809: an ASR order on an adjustment - Old block (orange) above New block
   (green), each order framed by a heavier rule, as legacy and the workbook. */
.sheet td.asr-o { color: #b45309; }
.sheet td.asr-n { color: #15803d; }
.sheet td.asr-label { font-size: .75rem; color: #607a90; vertical-align: middle; }
/* Keegan 10/28 (#830): the New block's PSU mid-block, as the Old block's. */
.sheet td.sheet-id.asr-new-psu { vertical-align: middle; }
.sheet tr.asr-order-start > td { border-top: 2px solid #1f3a5f; }
.sheet .adj-stack > .adj-n { color: #15803d; font-weight: 600; }
.sheet td.adj-labels { font-size: .72rem; color: #607a90; text-align: right; white-space: nowrap; }
.sheet td.adj-labels > span { display: block; line-height: 1.6; }
.sheet td.adj-labels.adj-labels-tight > span { line-height: 1.35; }
/* A New amount below zero reads red until it is fixed (#615). */
.sheet .adj-stack > .adj-n.sheet-error, .sheet .adj-new .sheet-error, .sheet span.sheet-error { color: #b3261e; }
.sheet td.sheet-edit .adj-stack > input.sheet-input { border: 1px solid #c9d2dc; background: #fff; }

/* Entry fields that sit in identity columns (ASR Number, ASR PSU) read as
   entry fields, not header-tinted labels; free-text entries (Wire Center,
   ASR Number) are boxed like the circuit-name field (Keegan 10/8, #593). */
.sheet td.sheet-edit.sheet-id { background: #fff; padding: 0; }
.sheet .sheet-input.sheet-boxed { background: #fff; border: 1px solid #c9d2dc; min-height: 22px; }

/* How to enter an adjustment, under each section title (Keegan 10/13, #617;
   legacy's own instruction lines). */
.adj-instructions { font-size: .8rem; color: #1d3a52; background: #fff8e1; border-left: 3px solid #f0b429; padding: 4px 8px; margin: 2px 0 6px; max-width: 70em; }

/* Frozen header row on the CABS form's EF & DT / ESALT tables (Keegan 10/13,
   #624). The table scrolls inside its own box once it is taller than the
   window, so the header row can stay put; a short table looks as before. */
.sheet-scroll.sheet-freeze { max-height: calc(100vh - 210px); overflow: auto; }
.sheet-scroll.sheet-freeze > table.sheet > thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 #c9d2dc; }
@media print { .sheet-scroll.sheet-freeze { max-height: none; overflow: visible; } }

/* NAF adjustment entry boxes (#684/#685): the CABS form's number box, given
   an outline here because it sits in an ordinary table cell, not a sheet. */
/* A negative New amount on the NAF adjustment shows red, not the New green (#684). */
.adj-new.sheet-error { color: #b3261e; font-weight: 600; }

.naf-adj-box {
    width: 10em;
    margin-left: auto;
    border: 1px solid #c9d2dc;
    border-radius: 4px;
    background: #fff;
    padding: 4px 8px;
}

.naf-adj-box .sheet-input {
    width: 100%;
    text-align: right;
}

/* Manage CABS Input (Keegan 10/16, #705): under the sticky company / IXC
   header, the section tabs and the Common Transport column headers stay in
   view too. The header has a fixed height so these know where to sit. */
.input-section-tabs .mud-tabs-tabbar {
    position: sticky;
    top: calc(48px + var(--delve-shim-height, 0px) + var(--input-header-h, 112px));
    z-index: 10;
    background: var(--mud-palette-surface, #FFF);
}
/* MudBlazor's .mud-tabs-rounded clips (overflow:hidden), which defeats
   sticky; these win on specificity. */
.mud-tabs.input-section-tabs,
.mud-tabs.input-section-tabs .mud-tabs-panels,
.mud-table.input-ct-table .mud-table-container { overflow: visible; }
.input-ct-table .mud-table-head .mud-table-cell {
    position: sticky;
    top: calc(48px + var(--delve-shim-height, 0px) + var(--input-header-h, 112px) + 48px);
    z-index: 9;
    background: var(--mud-palette-surface, #FFF);
}
/* #726: the input tables are now the CABS form's sheet grids; their column
   headings stay in view under the company / IXC header and the section tabs,
   as the Common Transport headings did (#705). The sheet-scroll overflow would
   defeat sticky, so it is lifted here. */
.sheet-scroll.input-sheet { overflow: visible; }
.sheet-scroll.input-sheet > table.sheet > thead th {
    position: sticky;
    top: calc(48px + var(--delve-shim-height, 0px) + var(--input-header-h, 112px) + 48px);
    z-index: 9;
    box-shadow: inset 0 -1px 0 #c9d2dc;
}

/* Home (Keegan 10/16, #721): the title, period picker, notices and the
   "Current Billing Period Reports" heading stay in view, and the status grid's
   column headings stick right under them (--home-head-h, set from app.js). */
.home-sticky-head {
    position: sticky;
    top: calc(48px + var(--delve-shim-height, 0px));
    z-index: 12;
    background: var(--mud-palette-background, #FFF);
    padding-top: 6px;
}
.report-status-grid.home-current-grid > thead th {
    position: sticky;
    top: calc(48px + var(--delve-shim-height, 0px) + var(--home-head-h, 0px));
    z-index: 11;
    background: var(--mud-palette-surface, #FFF);
    box-shadow: inset 0 -2px 0 #E0E0E0;
}


/* NAF form header (#777): buttons stay on one line, as on the CABS form. */
.naf-header-buttons .mud-button-root { white-space: nowrap; }

/* Shared column widths for the VG 2-Wire and Common Transport tables, used by
   the CABS form and Manage CABS Input alike so the two pages' tables match
   column for column (Keegan 10/21, #766). */
.sheet th.col-billno { width: 11em; min-width: 11em; }
.sheet th.col-minutes { width: 10em; min-width: 10em; }
.sheet th.col-total { width: 7em; min-width: 7em; }
.sheet th.col-element { width: 7em; min-width: 7em; }
.sheet th.col-qty { width: 5em; min-width: 5em; }
.sheet th.col-pct { width: 10em; min-width: 10em; }
.sheet th.col-factor { width: 8.5em; min-width: 8.5em; }

/* NAF form print (Keegan 10/21, #778): the general print rule squeezes every
   input to 1px padding, which collapsed the NAF boxes so the "$" sat on the
   "NAF Monthly Revenue" label. These two keep their size, a little wider. */
@media print {
    .naf-fields { max-width: 26em !important; }
    .naf-fields .mud-input-slot { padding: 10px 10px !important; font-size: 13px !important; }
}

/* Adjustment form, Common Transport & Tandem Switched (Keegan 10/21, #781):
   the Wire Center column and the label column of the Rate Factors totals
   table below it share one width, and the groups after Terminating FGD
   Minutes open without the white gutter. */
.sheet th.ct-adj-label,
.sheet td.ct-adj-label { width: 24em; min-width: 24em; max-width: 24em; white-space: normal; }
.sheet tr.sheet-group th.ct-no-gutter { border-left: 1px solid #c9d2dc; }
/* Keegan 10/22 (#792): the merged Wire Center title sits centered, like the
   group titles beside it. (Only the title; wire center names stay left.) */
.sheet tr.sheet-group th.sheet-wirecenter.ct-adj-label { text-align: center; vertical-align: middle; }
/* Keegan 10/26 (#828): on the adjustment form, FGA's Circuit and Billing Number
   and FGC / FGD's Traffic Type merge with the group row, like Wire Center. */
.sheet tr.sheet-group th.adj-span-label { text-align: center; vertical-align: middle; border-left: 1px solid #c9d2dc; }

/* Keegan 10/28 (#832): Percent Wholesale Sold & Percent State Usage - every
   table as wide as the widest one, as on the old site, so the section reads as
   one block. The wrapper shrinks to the widest table; the tables fill it. */
.pws-block { width: max-content; max-width: 100%; }
.pws-block table.sheet { width: 100%; }
