/* ============================================================================
   LOCAL 45 — "GAME DAY" design system  ·  LIGHT, matched to the IAFF Local 45
   logo (black + gold maltese cross on white, firefighter-red energy).
   Bold athletic: condensed jersey display, scoreboard numerals, racing stripes.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Teko:wght@400;500;600;700&family=Archivo:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
    /* --- light palette --- */
    --bg:        #F6F2E9;   /* warm cream paper */
    --surface:   #FFFFFF;   /* cards */
    --surface-2: #F1E8D6;   /* insets, chips, hovers */
    --text:      #1C1813;   /* near-black, warm — headlines & body */
    --text-2:    #57503F;   /* secondary */
    --text-3:    #8E8675;   /* tertiary */
    --gold:      #C0890F;   /* logo gold (goldenrod) — signature accent */
    --gold-2:    #E0A92A;   /* brighter gold for fills */
    --gold-deep: #8F6608;
    --gold-soft: rgba(192,137,15,0.16);
    --red:       #BE2A1E;   /* firefighter red — action / energy */
    --red-deep:  #8C1810;
    --red-soft:  rgba(190,42,30,0.10);
    --green:     #2E9E55;
    --green-soft:rgba(46,158,85,0.14);
    --line:      rgba(28,24,19,0.12);
    --line-2:    rgba(28,24,19,0.22);

    /* aliases used by the picker inline styles */
    --ink: var(--bg); --ink-2: var(--surface); --ink-3: var(--surface-2);
    --bone: var(--text); --bone-dim: var(--text-2); --bone-faint: var(--text-3);

    /* legacy remaps so existing markup (app.js / dashboard inline styles) adopt the theme */
    --primary-orange: var(--red); --primary-gold: var(--gold);
    --accent-red: var(--red-deep); --accent-orange: var(--gold);
    --dark-orange: var(--red-deep); --light-orange: var(--red-soft);
    --white: var(--surface); --off-white: var(--bg);
    --light-gray: var(--surface-2); --medium-gray: var(--line-2);
    --text-dark: var(--text); --text-gray: var(--text-2); --text-light: var(--text-3);
    --text-blue: #2A6FB0;

    --font-display: 'Anton', 'Archivo', sans-serif;
    --font-num:     'Teko', 'Archivo', sans-serif;
    --font-body:    'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;

    --spacing-xs: 0.5rem; --spacing-sm: 1rem; --spacing-md: 1.5rem; --spacing-lg: 2rem; --spacing-xl: 3.5rem;
    --radius-sm: 3px; --radius-md: 6px; --radius-lg: 10px; --radius-xl: 14px; --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(28,24,19,0.06);
    --shadow-md: 0 6px 20px rgba(28,24,19,0.10);
    --shadow-lg: 0 16px 42px rgba(28,24,19,0.14);
    --shadow-xl: 0 26px 64px rgba(28,24,19,0.20);
    --shadow-orange: 0 10px 26px rgba(190,42,30,0.28);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh; min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
* { -webkit-tap-highlight-color: rgba(192,137,15,0.18); }
::selection { background: var(--gold); color: #fff; }

/* faint warm wash */
body::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(120% 70% at 50% -10%, rgba(192,137,15,0.10), transparent 60%),
        radial-gradient(80% 50% at 100% 100%, rgba(190,42,30,0.05), transparent 55%);
}

/* racing-stripe motif */
.stripe { width: 100%; height: 5px;
    background: repeating-linear-gradient(135deg, var(--red) 0 14px, var(--gold) 14px 28px, transparent 28px 30px); }

/* ---------- typography ---------- */
.eyebrow { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-deep); }
.display { font-family: var(--font-display); text-transform: uppercase; line-height: 0.92; color: var(--text); }
.num { font-family: var(--font-num); font-weight: 600; font-feature-settings: 'tnum' 1; line-height: 1; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.98; color: var(--text); }
a { color: var(--gold-deep); text-decoration: none; }
code { font-family: ui-monospace, 'SF Mono', monospace; color: var(--red-deep); background: var(--surface-2); padding: 0.1em 0.4em; border-radius: var(--radius-sm); font-size: 0.85em; }

/* ---------- container ---------- */
.container {
    max-width: 1180px; margin: 0 auto; padding: var(--spacing-md);
    padding-left: max(var(--spacing-md), env(safe-area-inset-left));
    padding-right: max(var(--spacing-md), env(safe-area-inset-right));
    position: relative; z-index: 1;
}

/* ---------- header / scoreboard bar ---------- */
.header {
    position: relative; margin-bottom: var(--spacing-lg);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-md);
    overflow: hidden; box-shadow: var(--shadow-sm);
}
.header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: repeating-linear-gradient(135deg, var(--red) 0 14px, var(--gold) 14px 28px, transparent 28px 30px); }
.header-logo { display: flex; align-items: center; gap: var(--spacing-sm); }
.header-logo img { width: 54px; height: 54px; }
.header-title { font-family: var(--font-display); font-size: 1.7rem; line-height: 0.95; text-transform: uppercase; color: var(--text); -webkit-text-fill-color: currentColor; background: none; }
.header-logo p { font-size: 0.72rem !important; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-2) !important; margin-top: 2px; }

/* ---------- nav ---------- */
.nav { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.nav-item {
    background: transparent; border: none; border-radius: var(--radius-sm);
    padding: 0.55rem 0.9rem; color: var(--text-2); font-family: var(--font-body); font-weight: 700;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
    transition: color 0.2s var(--ease), background 0.2s var(--ease); white-space: nowrap;
}
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.active { color: #fff; background: var(--red); }
.season-switch { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }

/* ---------- cards ---------- */
.card, .glass-container {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: var(--spacing-md); position: relative; box-shadow: var(--shadow-sm);
    transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover, .glass-container:hover { box-shadow: var(--shadow-md); }
.card-header { font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text); margin-bottom: var(--spacing-sm); display: flex; align-items: center; gap: var(--spacing-xs); }

/* ---------- grids ---------- */
.grid { display: grid; gap: var(--spacing-md); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- scoreboard stat ---------- */
.stat-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--spacing-md); position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--red); }
.stat-card:nth-child(2n)::before { background: var(--gold); }
.stat-value { font-family: var(--font-num); font-weight: 600; font-size: 3rem; line-height: 0.9; color: var(--text); letter-spacing: 0.01em; font-feature-settings: 'tnum' 1; -webkit-text-fill-color: currentColor; background: none; margin-bottom: 0.15rem; }
.stat-label { font-size: 0.7rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
    font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em;
    background: transparent; color: var(--text); border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
    padding: 0.7rem 1.2rem; cursor: pointer; display: inline-block; text-align: center;
    transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:hover { border-color: var(--gold); color: var(--text); transform: translateY(-1px); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; box-shadow: var(--shadow-orange); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { filter: brightness(1.06); color: #fff; }
.btn-danger { background: transparent; border-color: rgba(190,42,30,0.45); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red-deep); }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.72rem; }

/* ---------- badges ---------- */
.badge { display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.22rem 0.55rem; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge-success { background: var(--green-soft); color: #1c7a3e; border-color: transparent; }
.badge-warning { background: var(--gold-soft); color: var(--gold-deep); border-color: transparent; }
.badge-paid { background: var(--green-soft); color: #1c7a3e; border-color: transparent; }
.badge-owe  { background: var(--gold-soft); color: var(--gold-deep); border-color: transparent; }
.badge-free { background: var(--surface-2); color: var(--text-2); }

.gender-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.gchip { font-size: 0.7rem; padding: 0.12rem 0.5rem; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.gchip.m { background: rgba(42,111,176,0.12); color: #235e96; border-color: transparent; }
.gchip.f { background: rgba(190,60,130,0.12); color: #9c2a6a; border-color: transparent; }

/* ---------- tables ---------- */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; table-layout: auto; }
.table th { text-align: left; font-family: var(--font-body); font-weight: 800; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-2); padding: 0.7rem 0.75rem; border-bottom: 2px solid var(--line-2); white-space: nowrap; }
.table td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); color: var(--text); font-size: 0.92rem; }
.table tbody tr:hover { background: rgba(28,24,19,0.025); }

/* ---------- .table--compact — used for the Budget donations/expenses tables which have 6–7 columns and were overflowing horizontally. Apple-style progressive tighten as the viewport shrinks. ---------- */
.table--compact { font-size: 0.86rem; }
.table--compact th { padding: 0.55rem 0.55rem; font-size: 0.62rem; letter-spacing: 0.09em; }
.table--compact td { padding: 0.55rem 0.55rem; font-size: 0.86rem; line-height: 1.35; vertical-align: middle; }
.table--compact .badge { font-size: 0.6rem; padding: 0.18rem 0.44rem; letter-spacing: 0.06em; white-space: nowrap; }
.table--compact .btn-sm { padding: 0.28rem 0.55rem; font-size: 0.78rem; }
.table--compact .col-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--font-num, inherit); font-weight: 700; }
.table--compact .col-date { white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 0.8rem; }
.table--compact .col-actions { white-space: nowrap; text-align: right; width: 1%; }
.table--compact .col-receipt { white-space: nowrap; }
.table--compact .col-primary { max-width: 280px; }
.table--compact .col-primary .cell-sub { font-size: 0.72rem; color: var(--text-2); margin-top: 2px; line-height: 1.25; }

/* From 1200px down, get more aggressive with truncation so the primary column doesn't force overflow. */
@media (max-width: 1200px) {
    .table--compact { font-size: 0.82rem; }
    .table--compact th, .table--compact td { padding: 0.5rem 0.45rem; }
    .table--compact .col-primary { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .table--compact .col-primary .cell-sub { white-space: normal; overflow: visible; }
}

/* From ~900px down (sidebar collapses to drawer at 900px), drop the button word labels so
   Edit/Attach/View shrink to icon-only. Titles/aria-labels keep them accessible. */
@media (max-width: 900px) {
    .table--compact .btn-label { display: none; }
    .table--compact .col-actions .btn-sm { padding: 0.34rem 0.42rem; }
    .table--compact .col-date { font-size: 0.75rem; }
}

/* ---------- forms ---------- */
.form-group { margin-bottom: var(--spacing-sm); }
.form-label { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-2); margin-bottom: 0.4rem; }
.form-control { width: 100%; background: var(--surface); color: var(--text); border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; font-family: var(--font-body); font-size: 16px; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.form-control::placeholder { color: var(--text-3); }
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
select.form-control { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }

/* ---------- spinner ---------- */
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- modal / sheet ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(28,24,19,0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal.active { display: flex; align-items: center; justify-content: center; padding: var(--spacing-md); }
.modal-content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--spacing-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-xl); }
.modal-content h2 { font-size: 1.5rem; }
.modal-grab, .modal-close { display: none; }

/* ---------- motion ---------- */
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { animation: reveal 0.6s var(--ease) both; }
.fade-in { animation: reveal 0.5s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
/* ---------- sidebar layout (admin) ---------- */
.layout { display: flex; align-items: stretch; min-height: 100dvh; }
.sidebar {
    width: 252px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; position: sticky; top: 0; align-self: flex-start;
    height: 100dvh; overflow-y: auto; z-index: 50;
}
.sidebar-brand { position: relative; display: flex; align-items: center; gap: 0.7rem; padding: 1.4rem 1.25rem 1.15rem; border-bottom: 1px solid var(--line); }
.sidebar-brand::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: repeating-linear-gradient(135deg, var(--red) 0 12px, var(--gold) 12px 24px, transparent 24px 26px); }
.sidebar-brand img { width: 44px; height: 44px; }
.sb-title { font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; line-height: 0.95; color: var(--text); }
.sb-eyebrow { font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; margin-top: 4px; }
.sidebar .nav { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; padding: 0.85rem; flex: 1; }
.sidebar .nav-item { display: block; width: 100%; text-align: left; padding: 0.62rem 0.85rem; border-radius: var(--radius-md); border-left: 3px solid transparent; color: var(--text-2); font-size: 0.83rem; letter-spacing: 0.03em; }
.sidebar .nav-item:hover { background: var(--surface-2); color: var(--text); }
.sidebar .nav-item.active { background: var(--red-soft); color: var(--red-deep); border-left-color: var(--red); font-weight: 800; }
.sidebar-foot { padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.main { flex: 1; min-width: 0; padding: clamp(1.5rem, 3vw, 2.75rem); }
.main h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

.mobile-bar { display: none; align-items: center; gap: 0.75rem; }
.hamburger { display: flex; flex-direction: column; justify-content: center; gap: 4.5px; width: 42px; height: 42px; padding: 9px; background: none; border: none; cursor: pointer; }
.hamburger span { display: block; height: 2.5px; width: 100%; background: var(--text); border-radius: 2px; }
.mobile-brand { display: flex; align-items: center; gap: 0.5rem; }
.mobile-brand img { width: 30px; height: 30px; }
.mobile-brand span { font-family: var(--font-display); text-transform: uppercase; font-size: 1.05rem; color: var(--text); }
.sidebar-overlay { display: none; }

/* tablet / phone: sidebar becomes a slide-in drawer */
@media (max-width: 900px) {
    .mobile-bar {
        display: flex; position: sticky; top: 0; z-index: 60;
        padding: 0.55rem 0.9rem; padding-top: max(0.55rem, env(safe-area-inset-top));
        background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
    }
    .mobile-bar #season-badge-m { margin-left: auto; }
    .sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; height: 100dvh; width: 274px;
        transform: translateX(-100%); transition: transform 0.28s var(--ease);
        box-shadow: var(--shadow-xl); z-index: 200;
    }
    .layout.nav-open .sidebar { transform: none; }
    .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 150; background: rgba(28,24,19,0.45); opacity: 0; pointer-events: none; transition: opacity 0.28s var(--ease); }
    .layout.nav-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
    .main { padding: var(--spacing-md); padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom)); }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 2rem; }
}
@media (max-width: 700px) {
    .responsive-table thead { position: absolute; left: -9999px; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
    .responsive-table { min-width: 0 !important; }
    .responsive-table tr { border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 0.75rem; padding: 0.4rem 0.7rem; background: var(--surface); box-shadow: var(--shadow-sm); }
    .responsive-table td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: none; border-bottom: 1px solid var(--line); padding: 0.55rem 0; text-align: right; min-height: 2.1rem; }
    .responsive-table tr td:last-child { border-bottom: none; }
    .responsive-table td::before { content: attr(data-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; color: var(--text-2); text-align: left; flex-shrink: 0; }
    .responsive-table td[data-label=""]::before { content: ""; }
    /* In the stacked mobile view, the compact table's max-width/ellipsis rule would clip labels. Override. */
    .responsive-table.table--compact .col-primary { max-width: none; overflow: visible; text-overflow: clip; white-space: normal; text-align: right; }
    .responsive-table.table--compact .col-primary .cell-sub { text-align: right; }
    .responsive-table.table--compact .col-actions { text-align: right; }
    .responsive-table.table--compact .btn-label { display: inline; }
    .compare-scroll table { min-width: 480px; }
    .compare-scroll th:first-child, .compare-scroll td:first-child { position: sticky; left: 0; background: var(--surface); }

    .modal.active { align-items: flex-end; padding: 0; }
    .modal-content { max-width: 100%; max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-top: 1.4rem; padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
    .modal-grab { display: block; width: 42px; height: 5px; border-radius: 999px; background: var(--line-2); margin: -0.4rem auto 0.9rem; }
    .modal-close { display: flex; align-items: center; justify-content: center; position: absolute; top: 0.7rem; right: 0.9rem; width: 36px; height: 36px; border: none; background: var(--surface-2); color: var(--text); border-radius: 50%; font-size: 1rem; cursor: pointer; }
    .btn { min-height: 46px; }
    .form-control { min-height: 46px; }
    #lanes-grid { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
}
.nav-item:focus-visible, .btn:focus-visible, .form-control:focus-visible, a:focus-visible, .season-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- Pass C: toasts + tactile press feedback ---- */
#toast-host { position: fixed; left: 0; right: 0; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: .5rem; pointer-events: none; padding: 0 1rem; }
.toast { pointer-events: auto; max-width: 460px; background: var(--text); color: var(--bg); font-weight: 600; font-size: .92rem; padding: .85rem 1.1rem; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border-left: 4px solid var(--text-3); transform: translateY(18px); opacity: 0; transition: transform .28s var(--ease), opacity .28s var(--ease); }
.toast.show { transform: none; opacity: 1; }
.toast-success { border-left-color: var(--green); }
.toast-error { border-left-color: var(--red); }
.toast-info { border-left-color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .2s; transform: none; } }

.btn:active { transform: translateY(0) scale(.975); }
.type-card:active, .scard:active, .lane-tile:active, .ci-card:active, .stat-card:active { transform: scale(.99); }
.nav-item:active { opacity: .85; }

/* ─────────────────────────────────────────────────────────────
   REAL NET RECONCILIATION LEDGER
   Rendered inside the "Real Net for Local 45" stat-card. Reads
   like a printed receipt so the chief can trust the big green
   number: source rows → gross subtotal → fee row → real-net total.
   ───────────────────────────────────────────────────────────── */
.rn-ledger {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 4px;
    column-gap: 12px;
    align-items: baseline;
    margin: 4px 0;
    font-variant-numeric: tabular-nums;
}
.rn-ledger .rn-row,
.rn-ledger .rn-sub,
.rn-ledger .rn-total { display: contents; }
.rn-ledger .rn-label {
    color: var(--text-2, rgba(30, 41, 59, 0.72));
    font-size: 0.78rem;
    text-align: left;
    padding: 2px 0;
}
.rn-ledger .rn-val {
    color: var(--text, #1e293b);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: right;
    padding: 2px 0;
    white-space: nowrap;
}
.rn-ledger .rn-sub .rn-label,
.rn-ledger .rn-sub .rn-val {
    padding-top: 5px;
    margin-top: 3px;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-weight: 600;
    color: var(--text, #1e293b);
}
.rn-ledger .rn-total .rn-label,
.rn-ledger .rn-total .rn-val {
    padding-top: 6px;
    margin-top: 3px;
    border-top: 2px double rgba(16, 185, 129, 0.4);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--green, #10b981);
}
.rn-ledger .rn-muted .rn-label,
.rn-ledger .rn-muted .rn-val { opacity: 0.75; }
.rn-note {
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--text-gray, #64748b);
    line-height: 1.5;
    font-style: italic;
}
.rn-note::before { content: "ⓘ "; font-style: normal; opacity: 0.7; }
