/* Custom Styles for Glorious Homes Accounting */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar-bg: #0f172a;
    --surface: #ffffff;
    --border: #e2e8f0;
}

body,
body.font-sans,
.font-sans {
    font-family: 'Inter', 'Hind Siliguri', 'Noto Sans Bengali', ui-sans-serif, system-ui, sans-serif;
    background-color: #f1f5f9;
    color: #0f172a;
}

/* Ensure Bangla (Avro) text — typed or displayed — always uses a Bengali-capable
   font, including in form controls which inherit from body. */
input,
textarea,
select,
button {
    font-family: 'Inter', 'Hind Siliguri', 'Noto Sans Bengali', ui-sans-serif, system-ui, sans-serif;
}

/* ---------- LOGIN LOCK ----------
   While not signed in, the app shell (sidebar + topbar) is hidden so the
   only interactive elements on screen are the login card's username and
   password fields. The class is removed as soon as authentication succeeds. */
body.auth-locked #sidebar,
body.auth-locked header,
body.auth-locked .app-footer,
body.auth-locked #notifPanel {
    display: none !important;
}

/* ---------- MOBILE SIDEBAR ---------- */
.sidebar {
    transition: transform 0.25s ease;
}
@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 0 10px 40px rgba(2, 6, 23, 0.4);
    }
    .sidebar.open {
        transform: translateX(0);
    }
}

/* ---------- NAV SECTIONS ---------- */
.nav-section {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    padding: 14px 12px 4px;
}

.nav-scroll {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* ---------- VIEW TRANSITION ---------- */
.view-fade {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Glassmorphism & Shadow Cards */
.card-shadow {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

/* Financial Table Formatting */
.table-finance {
    width: 100%;
    border-collapse: collapse;
}

.table-finance th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table-finance td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8rem;
}

.table-finance tbody tr {
    transition: background 0.15s ease;
}

.table-finance tr:hover {
    background-color: #f0f6ff;
}

@media screen {
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
    }
    .table-scroll table {
        width: 100%;
        border-collapse: collapse;
    }
    /* On phones, let wide tables scroll inside their card instead of cramming or overflowing the page. */
    @media (max-width: 767px) {
        .table-scroll table {
            min-width: 620px;
        }
    }
    /* Statement preview: fill + scroll on screen, but print rules take over when printing. */
    .print-container {
        overflow-x: auto;
    }
}

/* Brand-colored text selection on every device/browser. */
::selection {
    background: #2563eb;
    color: #ffffff;
}
::-moz-selection {
    background: #2563eb;
    color: #ffffff;
}

/* Keyboard navigation: clear focus ring, but never on mouse. */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 6px;
}

/* Respect OS 'reduce motion' setting. */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Badges */
.badge-active { background-color: #dcfce7; color: #15803d; }
.badge-completed { background-color: #dbeafe; color: #1d4ed8; }
.badge-pending { background-color: #fef3c7; color: #b45309; }
.badge-closed { background-color: #f1f5f9; color: #475569; }

/* Primary Buttons */
.btn-primary {
    background-color: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

/* PRINT MEDIA STYLES FOR REPORT GENERATION */
@page {
    size: A4 portrait;
    margin: 20mm 12mm 16mm 12mm;
    @bottom-right {
        content: "Page " counter(page) " of " counter(pages);
        font-size: 8pt;
        color: #64748b;
        font-family: Arial, Helvetica, sans-serif;
    }
}

@media print {
    html,
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    /* No screen animations/transitions on paper. */
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
    #mainContent {
        padding: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
    /* Hide the app shell so only the report document is printed. */
    #sidebar,
    aside,
    nav,
    header,
    #topbar,
    .topbar,
    .modal-backdrop,
    #notifPanel {
        display: none !important;
        visibility: hidden !important;
    }
    /* Let the report expand fully — no clipped pages from any scroll container. */
    html,
    body,
    main,
    #mainContent,
    #reportContainer,
    .view-fade,
    .overflow-hidden,
    .overflow-auto,
    .overflow-x-hidden,
    .overflow-y-auto,
    .flex-1,
    .flex.flex-1 {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
    }
    .page-break {
        page-break-before: always;
        break-before: page;
    }
    /* Each major statement section starts on a fresh page — no mid-section cuts. */
    .print-section {
        page-break-before: always;
        break-before: page;
    }
    .print-section:first-child {
        page-break-before: auto;
        break-before: auto;
    }
    .print-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-container * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    /* Tables: repeat headers on every page, never split a row, compact cells. */
    .print-container table {
        width: 100% !important;
        border-collapse: collapse;
        table-layout: auto;
    }
    .print-container thead {
        display: table-header-group;
    }
    .print-container tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .print-container th,
    .print-container td {
        padding: 4px 5px !important;
        font-size: 9pt !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    /* Keep summary cards & visual blocks intact on one page. */
    .print-container .sum-card,
    .print-container .meet-member-card,
    .print-container .recon-chip,
    .print-container .bar-track {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .print-container .meet-member-card {
        overflow: visible !important;
    }
    .print-container .meet-member-card > .card-head {
        page-break-after: avoid;
        break-after: avoid;
    }
    .print-container h3.meeting-section-title {
        font-size: 12pt !important;
    }
    .print-container .meeting-section-title {
        page-break-after: avoid;
        break-after: avoid;
    }
    .print-container .sec-num {
        box-shadow: none;
        min-width: 24px;
        height: 18px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    /* Statement tables: full grid borders, dark repeating header, soft zebra. */
    .print-container .meet-table th,
    .print-container .meet-table td {
        border: 0.75pt solid #cbd5e1 !important;
    }
    .print-container .meet-table thead {
        display: table-header-group;
    }
    .print-container .meet-table thead th {
        background: #e2edfd !important;
        color: #1e3a8a !important;
        border-bottom: 1.5pt solid #93c5fd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-container .meet-card-head {
        background: #dbeafe !important;
        color: #0f172a !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-container .totals-row {
        background: #eef4ff !important;
        color: #1e3a8a !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-container .sec-page {
        background: #f1f5f9 !important;
        color: #475569 !important;
        border: 0.5pt solid #cbd5e1 !important;
    }
    /* Every logical section starts a fresh report page. */
    .print-container .print-section {
        page-break-before: always;
        break-before: page;
    }
    .print-container .print-section:first-child {
        page-break-before: auto;
        break-before: auto;
    }
    /* Cover band prints at full colour, no shadow, no radius. */
    .print-container .stmt-cover {
        border-radius: 0;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-container .stmt-cover-band {
        background: linear-gradient(90deg, #f6d77c, #d4a238, #f6d77c) !important;
    }
    .print-container .stmt-monogram,
    .print-container .stmt-audit-box {
        background: #1e3a8a !important;
        border-color: rgba(255, 255, 255, .35) !important;
    }
    .print-container .stmt-meta-chips > div {
        background: rgba(255, 255, 255, .16) !important;
        border-color: rgba(255, 255, 255, .28) !important;
    }
    /* Repeating header + footer on every physical page. */
    .print-container .stmt-print-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 11mm;
        padding: 0 12mm;
        background: #ffffff;
        border-bottom: 1pt solid #cbd5e1;
        font-size: 8pt;
        color: #475569;
        z-index: 20;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-container .stmt-print-head .ph-left {
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #1e3a8a;
    }
    .print-container .stmt-print-head .ph-right {
        font-weight: 700;
        color: #475569;
    }
    .print-container .stmt-print-foot {
        display: block;
        position: fixed;
        left: 24mm;
        right: 24mm;
        bottom: 2mm;
        text-align: center;
        font-size: 8pt;
        color: #64748b;
        border-top: 0.5pt solid #cbd5e1;
        padding-top: 3px;
        background: #fff;
    }
    .print-container .print-section:last-child {
        margin-bottom: 28px;
    }
    /* Tighter statement tables so 7-9 column grids fit A4 cleanly. */
    .print-container .meet-table th,
    .print-container .meet-table td {
        font-size: 8pt !important;
        padding: 3px 4px !important;
    }
    .print-container .meet-table td {
        white-space: normal;
        font-variant-numeric: tabular-nums;
    }
    .print-container .meet-table th {
        white-space: nowrap;
    }
    /* Cover + highlights scale down to fit page 1. */
    .print-container .stmt-cover-main h1 {
        font-size: 19pt;
    }
    .print-container .stmt-cover-main h2 {
        font-size: 10.5pt;
    }
    .print-container .stmt-org-name {
        font-size: 15pt;
    }
    .print-container .stmt-meta-chips b {
        font-size: 9pt;
    }
    .print-container .stmt-meta-chips span {
        font-size: 7.5pt;
    }
    .print-container .stmt-highlights {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
        margin-top: 10px;
    }
    .print-container .hl-card {
        padding: 6px 6px 6px 8px;
        border-radius: 8px;
    }
    .print-container .hl-icon {
        width: 22px;
        height: 22px;
        font-size: 9px;
        border-radius: 6px;
    }
    .print-container .hl-meta b {
        font-size: 10pt;
    }
    .print-container .hl-meta i {
        font-size: 6.5pt;
    }
    .print-container .sum-card .sum-value {
        font-size: 12.5pt;
        margin-top: 1px;
    }
    /* ---- Page 1 compaction: cover + highlights + KPI + reconciliation all on ONE page ---- */
    .print-container .stmt-cover {
        padding: 12px 18px 9px !important;
    }
    .print-container .stmt-cover::before,
    .print-container .stmt-cover::after {
        display: none !important;
    }
    .print-container .stmt-cover-head {
        gap: 10px;
    }
    .print-container .stmt-monogram {
        width: 38px;
        height: 38px;
        font-size: 14px;
        border-radius: 9px;
    }
    .print-container .stmt-org-name {
        font-size: 12.5pt;
    }
    .print-container .stmt-org-sub {
        font-size: 9pt;
        margin-top: 1px;
    }
    .print-container .stmt-org-contact {
        font-size: 8pt;
        margin-top: 3px;
    }
    .print-container .stmt-audit-box {
        padding: 4px 8px;
        gap: 2px;
    }
    .print-container .stmt-audit-box span {
        font-size: 6.5pt;
        letter-spacing: .16em;
    }
    .print-container .stmt-cover-band {
        margin: 8px -18px 0;
        height: 2px;
    }
    .print-container .stmt-cover-main {
        margin-top: 9px;
    }
    .print-container .stmt-cover-main h1 {
        font-size: 15.5pt;
        margin: 4px 0 0;
    }
    .print-container .stmt-cover-main h2 {
        font-size: 9pt;
        margin: 2px 0 0;
    }
    .print-container .stmt-proj {
        margin-top: 5px;
        font-size: 9.5pt;
    }
    .print-container .stmt-kicker {
        font-size: 8pt;
    }
    .print-container .stmt-meta-chips {
        margin-top: 9px;
        gap: 5px;
    }
    .print-container .stmt-meta-chips > div {
        padding: 4px 8px;
    }
    .print-container .stmt-meta-chips b {
        font-size: 8pt;
        margin-top: 2px;
    }
    .print-container .stmt-meta-chips span {
        font-size: 6.5pt;
    }
    .print-container .stmt-highlights {
        margin-top: 8px;
        gap: 5px;
    }
    .print-container .hl-icon {
        width: 18px;
        height: 18px;
        font-size: 8px;
        border-radius: 5px;
    }
    .print-container .hl-card {
        padding: 5px 6px 5px 8px;
        gap: 6px;
    }
    .print-container .hl-meta b {
        font-size: 9pt;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .print-container .hl-meta i {
        font-size: 6pt;
        margin-top: 1px;
    }
    .print-container .sum-card {
        padding: 7px 5px;
        border-radius: 7px;
    }
    .print-container .sum-card::before {
        display: none !important;
    }
    .print-container .sum-card .sum-label {
        font-size: 6.5pt;
    }
    /* KPI card row + reconciliation card pack tightly on page 1. */
    .print-container .stmt-summary-grid {
        gap: 5px;
        margin-bottom: 10px;
    }
    .print-container .card-shadow.border-l-4.border-l-blue-600 {
        padding: 10px 13px !important;
        margin-bottom: 10px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .grid {
        gap: 6px !important;
    }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .mb-3 {
        margin-bottom: 5px !important;
    }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .mt-2 {
        margin-top: 3px !important;
    }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .space-y-1\\.5 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 1px !important;
    }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .py-1 {
        padding-top: 1px !important;
        padding-bottom: 1px !important;
    }
    /* Professional letterhead keeps together with title row. */
    .print-letterhead,
    .print-letterhead .print-title-row {
        page-break-after: avoid;
        break-after: avoid;
    }
    /* Report tables with dark header: repeat header on every page. */
    .print-report-table thead {
        display: table-header-group;
    }
    .print-report-table th {
        background-color: #0f172a !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-report-table tbody td,
    .print-report-table thead th {
        border: 1px solid #cbd5e1 !important;
        padding: 5px 6px !important;
        font-size: 9pt !important;
    }
    .print-report-table tbody tr,
    .print-report-table tfoot tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .print-footer-line {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    /* Soft zebra rows make long ledgers easy to scan on paper. */
    .print-container table tbody tr:nth-child(even) {
        background-color: #f1f5f9 !important;
    }
    /* Grids keep their screen layout on paper (no flattening). */
    /* Voucher printing: only the voucher document is printed. */
    body.print-voucher-mode #sidebar,
    body.print-voucher-mode header,
    body.print-voucher-mode #mainContent {
        display: none !important;
    }
    body.print-voucher-mode #modalBackdrop {
        position: static !important;
        display: block !important;
        padding: 0 !important;
        background: #ffffff !important;
        overflow: visible !important;
    }
    body.print-voucher-mode #modalContainer {
        width: 100% !important;
        max-width: none !important;
    }
    body.print-voucher-mode .print-area {
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.print-voucher-mode .print-area h1 {
        font-size: 20pt !important;
    }
    body.print-voucher-mode .print-area table {
        font-size: 10pt !important;
    }
    /* ---------------------------------------------------------------
       FINAL MEMBER MEETING STATEMENT - PROFESSIONAL COLOUR PRINT
       The statement prints in its screen colours (blue cover, gold band,
       light-blue table headers) thanks to print-color-adjust: exact on
       every element inside. To reproduce colour on paper, enable
       background graphics in Chrome/Edge print dialog, or print
       this report as PDF first and then print the PDF.

    /* Generic running footer injected for reports that lack their own.
       position:fixed makes it repeat on every physical page in Chrome. */
    .print-running-foot {
        display: flex;
        justify-content: space-between;
        position: fixed;
        left: 12mm;
        right: 12mm;
        bottom: 0;
        padding: 4px 0;
        border-top: 0.5pt solid #cbd5e1;
        font-size: 7.5pt;
        color: #64748b;
        background: #ffffff;
        z-index: 15;
    }
    .print-running-foot .prf-left {
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #1e3a8a;
    }
    .print-running-foot .prf-right {
        font-weight: 600;
    }
    /* Statement grids match the on-screen preview on paper. The print
       frame viewport (A4 content width) is narrower than Tailwind's
       md/lg breakpoints, so restore the same columns the user sees in
       the preview so nothing flattens to single column when printing. */
    .print-container .stmt-doc .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .print-container .stmt-doc .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .print-container .stmt-doc .md\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
    /* ------------------------------------------------------------------
       The statement is now a proper 8-page document: cover alone on
       page 1 and each section on its own page. The older "page-1 cram"
       overrides below were tuned for the old single-page cover block,
       so restore the natural preview sizes here so the print dialog
       matches the on-screen preview exactly.
       ------------------------------------------------------------------ */
    .print-container .stmt-cover {
        padding: 22px 24px 16px !important;
    }
    .print-container .stmt-cover::before,
    .print-container .stmt-cover::after {
        display: block !important;
    }
    .print-container .stmt-cover-head { gap: 14px; }
    .print-container .stmt-monogram {
        width: 52px; height: 52px; font-size: 20px; border-radius: 14px;
    }
    .print-container .stmt-org-name { font-size: 20px; }
    .print-container .stmt-org-sub { font-size: 11px; margin-top: 2px; }
    .print-container .stmt-org-contact { font-size: 10px; margin-top: 5px; }
    .print-container .stmt-audit-box { padding: 6px 10px; gap: 3px; transform: rotate(2deg); }
    .print-container .stmt-audit-box span { font-size: 8px; letter-spacing: .22em; }
    .print-container .stmt-cover-band { height: 3px; margin: 16px -24px 0; }
    .print-container .stmt-cover-main { margin-top: 18px; }
    .print-container .stmt-cover-main h1 { font-size: 26px; margin: 0; }
    .print-container .stmt-cover-main h2 { font-size: 14px; margin: 4px 0 0; }
    .print-container .stmt-proj { margin-top: 10px; font-size: 11.5px; }
    .print-container .stmt-kicker { font-size: 12px; }
    .print-container .stmt-meta-chips { margin-top: 18px; gap: 10px; }
    .print-container .stmt-meta-chips > div { padding: 9px 12px; }
    .print-container .stmt-meta-chips span { font-size: 8.5px; }
    .print-container .stmt-meta-chips b { font-size: 11px; margin-top: 3px; }
    .print-container .stmt-highlights { gap: 10px; margin-top: 14px; }
    .print-container .hl-card { padding: 12px 12px 12px 14px; border-radius: 14px; gap: 10px; }
    .print-container .hl-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
    .print-container .hl-meta b { font-size: 15px; }
    .print-container .hl-meta i { font-size: 8.5px; margin-top: 2px; }
    .print-container .sum-card { padding: 14px 12px; border-radius: 14px; }
    .print-container .sum-card .sum-label { font-size: 10px; }
    .print-container .sum-card .sum-value { font-size: 20px; margin-top: 4px; }
    .print-container .stmt-summary-grid { gap: 12px; margin-bottom: 16px; }
    .print-container .card-shadow.border-l-4.border-l-blue-600 {
        padding: 20px 24px !important;
        margin-bottom: 16px !important;
    }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .grid { gap: 16px !important; }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .mb-3 { margin-bottom: 12px !important; }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .mt-2 { margin-top: 8px !important; }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 6px !important; }
    .print-container .card-shadow.border-l-4.border-l-blue-600 .py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
    }

/* ---------- MEETING STATEMENT: SHARED HEADER / TABLE HELPERS ---------- */
.statement-filters { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px; }
.meeting-section-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: .04em; }
.meeting-section-title::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; margin-left: 4px; }
.sec-left { display: inline-flex; align-items: center; gap: 10px; }
.table-head-light th { background: #f8fafc; color: #475569; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 9px 8px; white-space: nowrap; border-bottom: 1.5px solid #0f172a; }
.table-head-light th:last-child { text-align: right; }
.totals-row td { border-top: 1.5px solid #0f172a !important; background: #f1f5f9 !important; }
.verify-ok { color: #047857; }
.verify-bad { color: #b45309; }

/* ============================================================
   FINAL MEMBER MEETING STATEMENT — PREMIUM CORPORATE REDESIGN
   Clean, minimal, print-first A4 financial statement.
   All data comes from the existing report payload — nothing here
   invents figures. Designed to stay elegant in black & white.
   ============================================================ */
.stmt-doc {
    background: #ffffff;
    color: #1e293b;
    font-family: 'Inter', 'Hind Siliguri', 'Noto Sans Bengali', 'Segoe UI', Arial, sans-serif;
    font-size: 12.5px;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 18px 44px -26px rgba(15, 23, 42, .22);
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

/* ---------- Cover letterhead ---------- */
.st-cover { position: relative; padding: 0 26px 20px; }
.st-cover-band { height: 5px; background: #0f172a; margin: 0 -26px 20px; }
.st-cover-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.st-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.st-logo { height: 54px; max-width: 190px; object-fit: contain; }
.st-monogram { width: 50px; height: 50px; border-radius: 12px; flex: none; background: #0f172a; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; letter-spacing: .5px; }
.st-org { min-width: 0; }
.st-org-name { font-size: 17px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #0f172a; line-height: 1.15; }
.st-org-sub { font-size: 11px; color: #475569; margin-top: 3px; }
.st-org-contact { font-size: 10px; color: #64748b; margin-top: 4px; }
.st-badge { flex: none; text-align: center; border: 1px solid #0f172a; border-radius: 8px; padding: 7px 14px; line-height: 1.4; background: #fff; }
.st-badge span:first-child { display: block; font-size: 8px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #64748b; }
.st-badge span:last-child { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #0f172a; margin-top: 2px; }
.st-cover-body { margin-top: 4px; }
.st-kicker { font-size: 10px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: #1d4ed8; }
.st-title { font-size: 26px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; color: #0f172a; margin: 6px 0 0; }
.st-subtitle { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #475569; margin: 3px 0 0; }
.st-proj { font-size: 12.5px; color: #475569; margin-top: 10px; }
.st-proj i { color: #1d4ed8; margin-right: 6px; }

/* ---------- Report information panel ---------- */
.st-meta { border: 1px solid #e2e8f0; border-radius: 12px; margin: 16px 26px 0; overflow: hidden; }
.st-meta-head { padding: 9px 14px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #475569; }
.st-meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.st-meta-cell { padding: 9px 14px; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; }
.st-meta-cell:nth-child(3n) { border-right: none; }
.st-meta-cell:nth-last-child(-n+3) { border-bottom: none; }
.st-meta-cell span { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; }
.st-meta-cell b { display: block; font-size: 11.5px; color: #0f172a; margin-top: 2px; font-weight: 700; }

/* ---------- Sections ---------- */
.st-section { padding: 16px 26px; }
.st-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.st-sec-num { flex: none; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 5px; background: #0f172a; color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .04em; }
.st-sec-label { font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #0f172a; margin: 0; }
.st-sec-head::after { content: ''; flex: 1; height: 1.5px; background: #0f172a; margin-left: 6px; opacity: .18; }
.st-subtl { font-weight: 600; font-size: 10.5px; text-transform: none; letter-spacing: 0; color: #64748b; }
.st-desc { color: #64748b; font-size: 11.5px; margin: -6px 0 14px; line-height: 1.55; }
.st-note { font-size: 11.5px; color: #64748b; line-height: 1.6; }
.st-note-inline { padding: 12px 16px; }
.st-empty { color: #94a3b8; font-size: 11.5px; }
.st-empty-cell { text-align: center; color: #94a3b8; padding: 18px !important; }
.st-empty-block { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 18px; text-align: center; color: #94a3b8; font-size: 11.5px; }
.st-col-head { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #475569; margin: 0 0 8px; }
.st-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ---------- KPI summary ---------- */
.st-kpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.st-kpi-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.st-kpi-card { border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; padding: 10px 12px; }
.st-kpi-l { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.st-kpi-v { display: block; font-size: 15px; font-weight: 800; color: #0f172a; margin-top: 3px; white-space: nowrap; }
.st-kpi-inc { color: #047857; }
.st-kpi-exp { color: #b91c1c; }
.st-kpi-net { color: #1d4ed8; }
.st-kpi-due { color: #b45309; }

/* ---------- Highlight band ---------- */
.st-high { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.st-high-card { border: 1.5px solid #1e293b; border-radius: 9px; padding: 9px 10px; text-align: center; background: #fff; }
.st-high-card.st-high-net { background: #eef2f7; }
.st-high-v { display: block; font-size: 13.5px; font-weight: 800; color: #0f172a; white-space: nowrap; }
.st-high-l { display: block; font-size: 7.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin-top: 3px; }

/* ---------- Financial tables ---------- */
.st-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.st-table th { text-align: left; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #475569; background: #f8fafc; padding: 7px 10px; border-bottom: 1.5px solid #0f172a; white-space: nowrap; }
.st-table .th-amt { text-align: right; }
.st-table td { padding: 6px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; color: #1e293b; overflow-wrap: break-word; }
.st-table tr:last-child td { border-bottom: none; }
.st-table .ta-r { text-align: right; white-space: nowrap; }
.td-date, .td-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; color: #475569; white-space: nowrap; }
.td-code, .td-name { font-weight: 600; }
.st-inc { color: #047857 !important; font-weight: 700; }
.st-exp { color: #b91c1c !important; font-weight: 700; }
.st-warn { color: #b45309 !important; font-weight: 700; }
.st-wd { display: inline-block; font-size: 9px; color: #b45309; font-weight: 700; }
.st-total td { border-top: 1.5px solid #0f172a; border-bottom: none; background: #f8fafc; font-weight: 800; font-size: 11px; color: #0f172a; padding-top: 8px; padding-bottom: 8px; }
.st-total-net td { border-top: 2.5px double #0f172a; background: #eef2f7; }
.st-row td { border-color: #eef2f7; }

/* Directory (9-col) */
.st-table-dir { font-size: 10px; }
.st-table-dir th, .st-table-dir td { padding: 4.5px 6px; }
.st-table-dir td:nth-child(2), .st-table-dir td:nth-child(3), .st-table-dir td:nth-child(5), .st-table-dir td:nth-child(6) { overflow-wrap: break-word; word-break: break-word; }

/* Summary table */
.st-summary-table { font-size: 12px; margin-top: 6px; }
.st-summary-table td { padding: 9px 12px; border-bottom: 1px solid #e2e8f0; }
.tsum-name { font-weight: 700; color: #334155; }
.tsum-val { text-align: right; font-weight: 800; white-space: nowrap; }
.tsum-net td { background: #eef2f7; border-top: 2.5px double #0f172a; border-bottom: none !important; }
.tsum-net .tsum-name { font-weight: 800; color: #0f172a; font-size: 13px; }
.tsum-net .tsum-val { font-size: 15px; font-weight: 900; color: #0f172a; }

/* ---------- Bars ---------- */
.st-bars { display: flex; flex-direction: column; gap: 9px; }
.st-bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 11px; margin-bottom: 3px; }
.st-bar-label { font-weight: 600; color: #334155; }
.st-bar-val { font-weight: 800; color: #0f172a; white-space: nowrap; }
.st-bar-track { height: 7px; background: #eef2f7; border-radius: 4px; overflow: hidden; border: 1px solid #e2e8f0; }
.st-bar-fill { height: 100%; border-radius: 3px; background: #0f172a; }
.st-bar-fill.st-tone-inc { background: #1f6d50; }
.st-bar-fill.st-tone-exp { background: #475569; }

/* ---------- Totals line ---------- */
.st-total-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 13px; padding-top: 9px; border-top: 1.5px solid #0f172a; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #0f172a; }
.st-total-line b { font-size: 13px; white-space: nowrap; }

/* ---------- Panels ---------- */
.st-panel { border: 1px solid #e2e8f0; border-top: 3px solid #0f172a; border-radius: 10px; padding: 14px 16px; margin-top: 14px; background: #fff; }
.st-panel:first-of-type { margin-top: 0; }
.st-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.st-panel-title { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #0f172a; }
.st-panel-meta { font-size: 10px; color: #64748b; font-weight: 700; }
.st-rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.st-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; border-bottom: 1px solid #f1f5f9; font-size: 10.5px; color: #334155; }
.st-line b { font-weight: 700; color: #0f172a; white-space: nowrap; }
.st-line b.st-inc { color: #047857; }
.st-line b.st-exp { color: #b91c1c; }
.st-line b.st-warn { color: #b45309; }
.st-line-total { border-top: 1.5px solid #0f172a; border-bottom: none; padding-top: 7px; margin-top: 2px; }
.st-line-total b { font-weight: 800; font-size: 11.5px; }
.st-line-total.st-ok b { color: #047857; }
.st-line-total.st-warn b { color: #b45309; }
.st-verify { margin-top: 12px; font-size: 10.5px; font-weight: 700; color: #334155; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; background: #f8fafc; }
.st-verify.st-ok { color: #047857; background: #ecfdf5; border-color: #bbf7d0; }
.st-verify.st-bad { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.st-verify-hint { font-size: 10px; color: #b45309; font-weight: 600; margin-top: 6px; }
.st-badge-pill { border-radius: 999px; padding: 4px 12px; font-size: 9.5px; font-weight: 800; border: 1px solid; white-space: nowrap; display: inline-block; }
.st-badge-pill.st-ok { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.st-badge-pill.st-warn { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.st-progress { margin-top: 12px; }
.st-progress-bar { height: 8px; background: #eef2f7; border-radius: 5px; overflow: hidden; border: 1px solid #e2e8f0; }
.st-progress-fill { height: 100%; background: #0f172a; border-radius: 4px; }
.st-progress-labels { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; color: #475569; margin-top: 6px; }

/* ---------- Member blocks ---------- */
.st-member { border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.st-member-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.st-mcode { font-size: 10px; font-weight: 800; color: #1d4ed8; background: #eef4ff; padding: 2px 8px; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.st-mname { font-size: 13px; font-weight: 800; color: #0f172a; }
.st-mmob { font-size: 11px; color: #64748b; }
.st-mnet { margin-left: auto; text-align: right; flex: none; }
.st-mnet-label { display: block; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.st-mnet b { display: block; font-size: 14px; font-weight: 800; color: #0f172a; white-space: nowrap; }
.st-member .st-table td, .st-member .st-table th { padding: 5.5px 14px; }
.st-wd-row td { background: #fffaf5; }

/* Member financial position strip (Payable vs Paid -> Due / Overpaid) */
.st-member-pos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: #eef2f7; padding: 10px 14px 12px; border-bottom: 1px solid #e2e8f0; }
.st-pos-item { text-align: center; }
.st-pos-item + .st-pos-item { border-left: 1px solid #e2e8f0; }
.st-pos-label { display: block; font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748b; }
.st-pos-item b { display: block; font-size: 13px; font-weight: 800; color: #0f172a; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-pos-adv b { color: #047857; }
.st-pos-dues b { color: #b91c1c; }
.st-pos-ok b { color: #475569; }
.st-adv { color: #047857; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-muted { color: #cbd5e1; }
.st-kpi-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Unallocated income ---------- */
.st-unalloc { border: 1px solid #e2e8f0; border-left: 3px solid #b45309; border-radius: 10px; margin-top: 12px; overflow: hidden; background: #fff; }
.st-unalloc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 14px; background: #fffbeb; border-bottom: 1px solid #e2e8f0; font-weight: 800; font-size: 12px; color: #0f172a; }
.st-unalloc-head b { white-space: nowrap; }

/* ---------- Signature ---------- */
.st-sig { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin-top: 26px; text-align: center; }
.st-sig-line { border-bottom: 1.5px solid #0f172a; height: 54px; margin-bottom: 8px; }
.sig-title { font-size: 12px; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.sig-role { font-size: 10px; color: #64748b; margin: 3px 0 0; }
.st-sig-section { padding-bottom: 28px; }
.st-end { margin-top: 26px; padding-top: 12px; border-top: 1px solid #e2e8f0; text-align: center; }
.st-end-line { font-size: 9.5px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #475569; }
.st-end-note { font-size: 9px; color: #64748b; margin-top: 5px; }

.stmt-print-foot, .stmt-print-head { display: none; }

@media (max-width: 860px) {
    .st-cols-2, .st-rec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .st-kpi, .st-high { grid-template-columns: repeat(2, 1fr); }
    .st-kpi-3 { grid-template-columns: 1fr; }
    .st-meta-grid { grid-template-columns: repeat(2, 1fr); }
    .st-meta-cell:nth-child(3n) { border-right: 1px solid #f1f5f9; }
    .st-sig { grid-template-columns: 1fr; gap: 22px; }
    .st-badge { display: none; }
    .st-title { font-size: 20px; }
}

/* ============================================================
   LIGHT THEME REFRESH — softer, brighter, easier to read
   ============================================================ */
body {
    background: linear-gradient(180deg, #f6f9fc 0%, #eef3f9 100%) fixed;
}

/* ---- Sidebar: light glass panel ---- */
#sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%) !important;
    border-right: 1px solid #e6edf7;
    color: #334155 !important;
    box-shadow: 2px 0 22px rgba(15, 23, 42, 0.05);
}
#sidebar .border-b,
#sidebar .border-t {
    border-color: #eef2f8 !important;
}
#sidebar h1 {
    color: #0f172a !important;
}
#sidebar .text-blue-400 {
    color: #2563eb !important;
}
#sidebar .nav-section {
    color: #9aa9bd !important;
}
#sidebar .nav-link {
    color: #475569 !important;
    border-radius: 10px;
    font-weight: 600;
}
#sidebar .nav-link:hover {
    background: linear-gradient(90deg, #eaf1ff 0%, #f4f8ff 100%) !important;
    color: #1d4ed8 !important;
}
#sidebar .nav-link:active {
    transform: scale(0.98);
}
#sidebar .nav-link.bg-blue-800,
#sidebar .nav-link.bg-blue-800:hover {
    background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
#sidebar #userName {
    color: #0f172a !important;
}
#sidebar #userRole {
    color: #64748b !important;
}
#sidebar .text-slate-400 {
    color: #94a3b8 !important;
}
#sidebar button:hover .fa-cog {
    color: #1d4ed8 !important;
}
#sidebar button:hover .fa-sign-out-alt {
    color: #dc2626 !important;
}
#sidebar .nav-scroll {
    scrollbar-color: #cbd5e1 transparent;
}

/* ---- Topbar: soft elevation ---- */
header.sticky {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #eef2f8 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

/* ---- Cards: lighter, airier ---- */
.card-shadow {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.06);
    border: 1px solid #eef2f8;
}

/* ---- Table headers: soft tint ---- */
.table-finance th {
    background: linear-gradient(180deg, #f8fbfe 0%, #f1f6fc 100%);
    color: #5b6b82;
}

/* ---- Inputs & selects: gentle focus glow ---- */
input,
select,
textarea {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---- Summary cards: subtle tinted top border for scannability ---- */
.sum-card {
    border: 1px solid #eef2f8;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.sum-card::before {
    content: "";
    display: block;
    height: 3px;
    width: 34px;
    margin: 0 auto 8px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

/* ---- Buttons: more satisfying ---- */
button,
.btn-primary {
    transition: all 0.18s ease;
    cursor: pointer;
}
button:active,
.btn-primary:active {
    transform: translateY(1px) scale(0.99);
}
.bg-blue-600 {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}
.bg-blue-600:hover {
    background-color: #2563eb !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
    transform: translateY(-1px);
}
.bg-blue-700:hover {
    background-color: #1d4ed8 !important;
}
.bg-indigo-600 {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.22);
}
.bg-indigo-600:hover {
    background-color: #4f46e5 !important;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.32);
    transform: translateY(-1px);
}
.bg-indigo-700:hover {
    background-color: #4338ca !important;
}
.bg-emerald-600 {
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.22);
}
.bg-emerald-600:hover {
    background-color: #059669 !important;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.32);
    transform: translateY(-1px);
}
.bg-emerald-700:hover {
    background-color: #047857 !important;
}
.bg-red-600 {
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}
.bg-red-600:hover {
    background-color: #dc2626 !important;
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.3);
    transform: translateY(-1px);
}
.bg-red-700:hover {
    background-color: #b91c1c !important;
}
.bg-amber-500 {
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}
.bg-amber-500:hover {
    background-color: #f59e0b !important;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.3);
    transform: translateY(-1px);
}
.bg-slate-900:hover {
    background-color: #1e293b !important;
    transform: translateY(-1px);
}

/* ---- Badges: slightly richer ---- */
.badge-active,
.badge-completed,
.badge-pending,
.badge-closed {
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

/* ---- Dashboard KPI cards: softer colored glow ---- */
.kpi-card {
    position: relative;
    overflow: hidden;
}
.kpi-card::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.06);
}

/* ============================================================
   PROFESSIONAL RESPONSIVE LAYOUT — every view scales cleanly
   ============================================================ */
/* Keep content readable and organized on very wide screens. */
#mainContent {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* Page headers (title left, actions right) wrap gracefully on small screens. */
@media (max-width: 640px) {
    #mainContent .flex.justify-between.card-shadow:not(.kpi-card) {
        flex-wrap: wrap;
        gap: 12px;
    }
    #mainContent .flex.justify-between.card-shadow:not(.kpi-card) > div {
        min-width: 100%;
    }
    #mainContent .flex.justify-between.card-shadow:not(.kpi-card) > .flex,
    #mainContent .flex.justify-between.card-shadow:not(.kpi-card) > button {
        width: 100%;
    }
    #mainContent .flex.justify-between.card-shadow:not(.kpi-card) > .flex > button {
        flex: 1;
    }
    #mainContent .grid.gap-4,
    #mainContent .grid.gap-6 {
        row-gap: 12px;
    }
}

/* Nicer multi-column grids on tablets: two columns instead of a squeeze. */
@media (min-width: 641px) and (max-width: 1023px) {
    #mainContent .grid.md\:grid-cols-3,
    #mainContent .grid.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Interactive cards lift slightly on hover (project / stat cards). */
.raise-hover {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.raise-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

/* Consistent, modern empty states. */
.empty-state {
    padding: 28px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}
.empty-state i {
    display: block;
    font-size: 26px;
    margin-bottom: 8px;
    color: #cbd5e1;
}

/* ============================================================
   SETTINGS PAGE — overflow-safe, balanced layout
   ============================================================ */
/* Grid children can shrink so long values never inflate a column and
   push the whole page into horizontal overflow. */
.settings-brick {
    min-width: 0;
}
/* Label/value rows: allow the value side to wrap instead of spilling. */
.settings-dl {
    gap: 12px;
    align-items: baseline;
}
.settings-dl dt {
    flex-shrink: 0;
}
.settings-dl dd {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: right;
}
@media (max-width: 640px) {
    .settings-dl {
        flex-wrap: wrap;
    }
    .settings-dl dd {
        text-align: left;
    }
}
/* Keep left cards even-height with the stacked right column. */
.card-stretch {
    display: flex;
    flex-direction: column;
}
.push-bottom {
    margin-top: auto;
}

/* Settings cards: on tablet widths stack every row full-width so no
   grid cell is left empty and nothing overflows. */
@media (min-width: 641px) and (max-width: 1023px) {
    #settingsView .grid.lg\:grid-cols-3 {
        grid-template-columns: minmax(0, 1fr);
    }
    #settingsView .grid.lg\:grid-cols-3 > .lg\:col-span-2 {
        grid-column: auto;
    }
}

/* ============================================================
   FINAL MEMBER MEETING STATEMENT — PROFESSIONAL BLACK & WHITE
   Replaces the colourful screen palette with a monochrome,
   audit-grade ledger look for paper. Scoped to .stmt-doc only,
   so every other report keeps its colours.

   NOTE: ReportEngine.doPrint() sends the statement html into an
   off-screen iframe via PrintEngine.fromHtml({ ownHeader:true }),
   so the document's body is <body class="pd-body"> — there is NO
   .print-container ancestor. Everything here is therefore scoped
   to .stmt-doc directly.
   ============================================================ */
@media print {
    /* Force backgrounds to ink so black headers/bands actually print. */
    .stmt-doc,
    .stmt-doc * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* ---- 0. Pagination: one fresh page per statement section ---- */
    .stmt-doc .print-section {
        page-break-before: always;
        break-before: page;
    }
    .stmt-doc .print-section:first-child {
        page-break-before: auto;
        break-before: auto;
    }
    .stmt-doc .meeting-section-title {
        page-break-after: avoid;
        break-after: avoid;
    }
    .stmt-doc .meet-table {
        border-collapse: collapse;
    }
    .stmt-doc .meet-table thead {
        display: table-header-group;
    }
    .stmt-doc .meet-table tr,
    .stmt-doc .meet-member-card,
    .stmt-doc .sum-card,
    .stmt-doc .recon-chip,
    .stmt-doc .hl-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .stmt-doc {
        box-shadow: none !important;
    }

    /* ---- 1. Neutralise every decorative colour to ink ---- */
    .stmt-doc .text-emerald-700,
    .stmt-doc .text-red-700,
    .stmt-doc .text-red-600,
    .stmt-doc .text-amber-700,
    .stmt-doc .text-amber-800,
    .stmt-doc .text-amber-600,
    .stmt-doc .text-indigo-700,
    .stmt-doc .text-blue-700,
    .stmt-doc .text-blue-800,
    .stmt-doc .text-blue-900 {
        color: #0f172a !important;
    }
    .stmt-doc .bg-red-50,
    .stmt-doc .bg-emerald-50,
    .stmt-doc .bg-blue-50 {
        background: #f1f5f9 !important;
    }
    .stmt-doc .bg-amber-50 {
        background: #e2e8f0 !important;
    }
    .stmt-doc .bg-amber-100,
    .stmt-doc .bg-emerald-100 {
        background: #f1f5f9 !important;
    }
    .stmt-doc .bg-emerald-600 {
        background: #0f172a !important;
        box-shadow: none !important;
    }
    .stmt-doc .bg-blue-100.text-blue-800 {
        background: #ffffff !important;
        color: #0f172a !important;
        border: 1pt solid #0f172a;
        border-radius: 4px;
    }
    .stmt-doc .bar-fill {
        background: #0f172a !important;
    }
    .stmt-doc .bar-fill.red {
        background: #475569 !important;
    }
    .stmt-doc .bar-fill.green {
        background: #0f172a !important;
    }
    .stmt-doc .bar-track {
        background: #dbe1e8 !important;
        border: 0.5pt solid #cbd5e1;
    }

    /* ---- 2. Borders: coloured edges become black or slate ---- */
    .stmt-doc .border-blue-700 {
        border-color: #0f172a !important;
    }
    .stmt-doc .border-l-blue-600 {
        border-left: 4pt solid #0f172a !important;
    }
    .stmt-doc .border-amber-200,
    .stmt-doc .border-amber-100 {
        border-color: #334155 !important;
    }
    .stmt-doc .border-slate-300,
    .stmt-doc .border-slate-400 {
        border-color: #0f172a !important;
    }
    .stmt-doc .border-dashed {
        border-style: dashed !important;
        border-color: #0f172a !important;
    }
    .stmt-doc .h-16.border-dashed {
        border-bottom-width: 2pt !important;
    }

    /* ---- 3. Cards: flat, no lift, crisp 1pt outlines ---- */
    .stmt-doc .card-shadow {
        box-shadow: none !important;
        border-radius: 6px;
    }
    .stmt-doc .sum-card {
        background: #ffffff !important;
        border-color: #475569 !important;
        box-shadow: none !important;
    }
    .stmt-doc .sum-card::before {
        display: none !important;
    }
    .stmt-doc .sum-card .sum-value {
        color: #0f172a !important;
    }

    /* ---- 4. Section titles: black tiles + solid rule ---- */
    .stmt-doc .meeting-section-title {
        color: #0f172a !important;
    }
    .stmt-doc .meeting-section-title::after {
        background: #0f172a !important;
    }
    .stmt-doc .sec-num {
        background: #0f172a !important;
        color: #ffffff !important;
        border-radius: 3px;
        box-shadow: none !important;
    }
    .stmt-doc .sec-page {
        background: #ffffff !important;
        color: #0f172a !important;
        border: 1pt solid #0f172a !important;
        font-weight: 800;
        box-shadow: none !important;
    }

    /* ---- 5. Tables: solid ink headers, strong grid, double-rule totals ---- */
    .stmt-doc .meet-table th,
    .stmt-doc .meet-table td {
        border-color: #334155 !important;
    }
    .stmt-doc .meet-table thead th,
    .stmt-doc .table-head-light th {
        background: #0f172a !important;
        color: #ffffff !important;
        border-bottom: 2pt solid #0f172a !important;
        letter-spacing: .06em;
    }
    .stmt-doc .totals-row {
        background: #eef2f7 !important;
        color: #0f172a !important;
    }
    .stmt-doc .totals-row td {
        border-top: 3pt double #0f172a !important;
    }
    .stmt-doc tr.bg-red-50 td,
    .stmt-doc tr.bg-emerald-50 td,
    .stmt-doc tr.bg-amber-50 td {
        border-top: 3pt double #0f172a !important;
    }

    /* ---- 6. Member income cards: inverted black headings ---- */
    .stmt-doc .meet-card-head {
        background: #0f172a !important;
        color: #ffffff !important;
        border-bottom: 2.5pt solid #0f172a;
    }
    .stmt-doc .meet-card-head .text-slate-900,
    .stmt-doc .meet-card-head .text-slate-500,
    .stmt-doc .meet-card-head .text-blue-700,
    .stmt-doc .meet-card-head .text-blue-800,
    .stmt-doc .meet-card-head .text-blue-900 {
        color: #ffffff !important;
    }

    /* ---- 7. Reconciliation: boxed verdicts, solid left rule ---- */
    .stmt-doc .recon-chip {
        background: #ffffff !important;
        color: #0f172a !important;
        border: 1.5pt solid #0f172a;
    }
    .stmt-doc .recon-chip.bg-amber-100 {
        border-style: dashed;
        background: #f1f5f9 !important;
    }
    .stmt-doc .verify-ok {
        color: #0f172a !important;
        border: 1pt solid #0f172a;
        background: #ffffff;
        padding: 4px 8px;
        border-radius: 3px;
    }
    .stmt-doc .verify-bad {
        color: #0f172a !important;
        border: 1pt dashed #0f172a;
        background: #f8fafc;
        padding: 4px 8px;
        border-radius: 3px;
        font-weight: 800 !important;
    }

    /* ---- 8. Cover: white sheet, black frame, solid ink band ---- */
    .stmt-doc .stmt-cover {
        background: #ffffff !important;
        color: #0f172a !important;
        border: 2.5pt solid #0f172a;
        border-radius: 2px;
        box-shadow: none !important;
        padding: 20px 22px 14px !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .stmt-doc .stmt-cover::before,
    .stmt-doc .stmt-cover::after {
        display: none !important;
    }
    .stmt-doc .stmt-monogram {
        background: #0f172a !important;
        border-color: #0f172a !important;
        color: #ffffff !important;
        border-radius: 6px;
        box-shadow: none !important;
    }
    .stmt-doc .stmt-org-name {
        color: #0f172a !important;
    }
    .stmt-doc .stmt-org-sub {
        color: #475569 !important;
    }
    .stmt-doc .stmt-org-contact {
        color: #64748b !important;
    }
    .stmt-doc .stmt-audit-box {
        background: #ffffff !important;
        border: 1.5pt solid #0f172a !important;
        color: #0f172a !important;
    }
    .stmt-doc .stmt-audit-box span {
        color: #0f172a !important;
    }
    .stmt-doc .stmt-cover-band {
        background: #0f172a !important;
        height: 3.5pt !important;
    }
    .stmt-doc .stmt-cover-main h1 {
        color: #0f172a !important;
        border-left: 5px solid #0f172a;
        padding-left: 12px;
    }
    .stmt-doc .stmt-cover-main h2 {
        color: #334155 !important;
        border-left: 5px solid #0f172a;
        padding-left: 12px;
    }
    .stmt-doc .stmt-kicker {
        color: #0f172a !important;
        border-bottom: 2pt solid #0f172a;
        padding-bottom: 6px;
    }
    .stmt-doc .stmt-proj {
        color: #334155 !important;
    }
    .stmt-doc .stmt-meta-chips > div {
        background: #ffffff !important;
        border: 1pt solid #94a3b8 !important;
        border-radius: 3px;
    }
    .stmt-doc .stmt-meta-chips span {
        color: #64748b !important;
    }
    .stmt-doc .stmt-meta-chips b {
        color: #0f172a !important;
    }

    /* ---- 9. Highlights band: hero card printed solid black ---- */
    .stmt-doc .hl-card {
        --hl: #0f172a;
        background: #ffffff !important;
        border: 1.5pt solid #0f172a;
        box-shadow: none !important;
        border-radius: 6px;
    }
    .stmt-doc .hl-card::before {
        width: 5px;
        background: var(--hl, #0f172a);
    }
    .stmt-doc .hl-icon {
        background: var(--hl, #0f172a) !important;
        color: #ffffff !important;
        box-shadow: none !important;
        border-radius: 6px;
    }
    .stmt-doc .hl-card.hl-net {
        background: #0f172a !important;
        border-color: #0f172a !important;
    }
    .stmt-doc .hl-card.hl-net .hl-icon {
        background: #ffffff !important;
        color: #0f172a !important;
    }
    .stmt-doc .hl-card.hl-net .hl-meta b {
        color: #ffffff !important;
    }
    .stmt-doc .hl-card.hl-net .hl-meta i {
        color: #cbd5e1 !important;
    }

    /* ---- 10. Final figure: Net Available Funds on a black band ---- */
    .stmt-doc .text-indigo-700.text-lg {
        background: #0f172a !important;
        color: #ffffff !important;
        border-radius: 5px;
        padding: 8px 16px;
    }

    /* ---- 11. Signature page: heavy ruled lines ---- */
    .stmt-doc .grid.border-t-2.border-slate-300 {
        border-top: 2.5pt solid #0f172a !important;
    }

    /* ---- 12. Running header & footer repeat on every physical page ---- */
    .stmt-doc .stmt-print-head {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 11mm;
        padding: 0 12mm;
        background: #ffffff;
        border-bottom: 1.5pt solid #0f172a;
        font-size: 8pt;
        color: #475569;
        z-index: 20;
    }
    .stmt-doc .stmt-print-head .ph-left {
        color: #0f172a !important;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
    .stmt-doc .stmt-print-head .ph-right {
        color: #334155 !important;
    }
    .stmt-doc .stmt-print-foot {
        display: block;
        position: fixed;
        left: 24mm;
        right: 24mm;
        bottom: 2mm;
        text-align: center;
        font-size: 8pt;
        color: #475569;
        border-top: 1pt solid #0f172a;
        padding-top: 3px;
        background: #ffffff;
    }
    .stmt-doc .statement-hr {
        border-top-color: #0f172a !important;
    }

    /* ---- 13. Restore multi-column grids inside the A4 print frame ---- */
    .stmt-doc .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .stmt-doc .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .stmt-doc .md\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
}
/* =====================================================================
   FINAL MEMBER MEETING STATEMENT - pagination override (APPENDED LAST)
   Supersedes every earlier statement print rule for .stmt-doc:
   * content flows, fills each A4 page, overflows naturally (no section
     is force-pushed onto a fresh page);
   * tables split at row boundaries and repeat their header;
   * headings/rows/totals keep together; the running head + foot repeat
     on every physical page.
   ===================================================================== */
@media print {
    /* ---- fluid pagination: never force a new page for a section ---- */
    .stmt-doc .print-section,
    .stmt-doc .st-section,
    .stmt-doc .print-section > div {
        page-break-before: auto !important;
        break-before: auto !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
    }
    .stmt-doc .print-section:first-child {
        page-break-before: auto !important;
        break-before: auto !important;
    }

    /* ---- sheet: clean continuous paper ---- */
    .stmt-doc {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        background: #ffffff !important;
        font-size: 9pt;
        line-height: 1.45;
    }
    .stmt-doc * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* ---- running head / foot: repeat on every physical page ---- */
    .stmt-doc .stmt-print-head {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 11mm !important;
        padding: 0 12mm !important;
        background: #ffffff !important;
        border-bottom: 0.5pt solid #cbd5e1 !important;
        font-size: 7.5pt !important;
        color: #475569 !important;
        z-index: 20 !important;
    }
    .stmt-doc .stmt-print-head .ph-left { color: #0f172a !important; font-weight: 800 !important; text-transform: uppercase !important; letter-spacing: .04em !important; }
    .stmt-doc .stmt-print-head .ph-right { color: #334155 !important; font-weight: 700 !important; }
    .stmt-doc .stmt-print-foot {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        position: fixed !important;
        bottom: 2mm !important;
        left: 20mm !important;
        right: 20mm !important;
        font-size: 6.5pt !important;
        color: #64748b !important;
        border-top: 0.5pt solid #cbd5e1 !important;
        padding-top: 2px !important;
        background: #ffffff !important;
        z-index: 20 !important;
    }
    .stmt-doc .stmt-print-foot .pf-center { text-align: center !important; }

    /* ---- vertical rhythm ---- */
    .stmt-doc .st-cover { padding: 3mm 4mm 4mm !important; }
    .stmt-doc .st-cover-band { height: 2.5pt !important; margin: 0 -4mm 3mm !important; }
    .stmt-doc .st-meta { margin: 3mm 4mm 0 !important; }
    .stmt-doc .st-section { padding: 3.5mm 4mm !important; }
    .stmt-doc .st-desc { font-size: 8pt !important; margin: -2px 0 8px !important; }
    .stmt-doc .st-note { font-size: 8pt !important; }

    /* ---- type scale ---- */
    .stmt-doc .st-title { font-size: 21pt !important; margin: 4px 0 0 !important; }
    .stmt-doc .st-subtitle { font-size: 10pt !important; }
    .stmt-doc .st-kicker { font-size: 8pt !important; }
    .stmt-doc .st-org-name { font-size: 14pt !important; }
    .stmt-doc .st-org-sub { font-size: 8.5pt !important; }
    .stmt-doc .st-org-contact { font-size: 7.5pt !important; }
    .stmt-doc .st-badge { padding: 4px 10px !important; }
    .stmt-doc .st-badge span:first-child { font-size: 6.5pt !important; }
    .stmt-doc .st-badge span:last-child { font-size: 8pt !important; }
    .stmt-doc .st-sec-label { font-size: 10.5pt !important; }
    .stmt-doc .st-sec-num { font-size: 8.5pt !important; min-width: 21px !important; height: 17px !important; }
    .stmt-doc .st-kpi-v { font-size: 11pt !important; }
    .stmt-doc .st-kpi-l { font-size: 6.8pt !important; }
    .stmt-doc .st-high-v { font-size: 10pt !important; }
    .stmt-doc .st-high-l { font-size: 6.2pt !important; }
    .stmt-doc .st-meta-cell { padding: 5.5px 10px !important; }
    .stmt-doc .st-meta-cell span { font-size: 6.8pt !important; }
    .stmt-doc .st-meta-cell b { font-size: 9pt !important; }

    /* ---- tables: repeat head, rows atomic, totals stay ---- */
    .stmt-doc table { width: 100% !important; border-collapse: collapse !important; }
    .stmt-doc thead { display: table-header-group !important; }
    .stmt-doc .st-table th,
    .stmt-doc .st-table td { padding: 2.2pt 4pt !important; font-size: 8pt !important; }
    .stmt-doc .st-table th { font-size: 7pt !important; }
    .stmt-doc .st-table-dir th,
    .stmt-doc .st-table-dir td { padding: 2pt 3.5pt !important; font-size: 7.5pt !important; }
    .stmt-doc .st-table-dir th { font-size: 6.8pt !important; }
    .stmt-doc .st-member .st-table td,
    .stmt-doc .st-member .st-table th { padding: 3pt 6pt !important; }
    .stmt-doc .st-member-head { padding: 5px 8px !important; }
    .stmt-doc .st-summary-table { font-size: 9.5pt !important; }
    .stmt-doc .st-summary-table td { padding: 6px 10px !important; }

    /* ---- keep-together ---- */
    .stmt-doc tr,
    .stmt-doc .st-row,
    .stmt-doc .st-total,
    .stmt-doc .st-total-net {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .stmt-doc .st-sec-head,
    .stmt-doc .st-member-head,
    .stmt-doc .st-unalloc-head,
    .stmt-doc .st-col-head,
    .stmt-doc .st-panel-head {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    .stmt-doc .st-kpi-card,
    .stmt-doc .st-high-card,
    .stmt-doc .st-badge-pill,
    .stmt-doc .st-total-line,
    .stmt-doc .st-sig,
    .stmt-doc .st-sig-item {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .stmt-doc .st-member,
    .stmt-doc .st-panel,
    .stmt-doc .st-unalloc,
    .stmt-doc .st-bars,
    .stmt-doc .st-rec-grid {
        page-break-inside: auto !important;
        break-inside: auto !important;
    }

    /* ---- force intended multi-column layouts on paper ---- */
    .stmt-doc .st-cols-2 { grid-template-columns: 1fr 1fr !important; }
    .stmt-doc .st-rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .stmt-doc .st-kpi { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
    .stmt-doc .st-kpi-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .stmt-doc .st-high { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
    .stmt-doc .st-meta-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .stmt-doc .st-sig { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 28px !important; margin-top: 6mm !important; }
    .stmt-doc .st-sig-line { height: 17mm !important; }
    .stmt-doc .st-end { margin-top: 5mm !important; }

    /* ---- restore colour accents for the new palete ---- */
    .stmt-doc .st-inc { color: #047857 !important; }
    .stmt-doc .st-exp { color: #b91c1c !important; }
    .stmt-doc .st-warn { color: #b45309 !important; }
    .stmt-doc .st-kpi-inc { color: #047857 !important; }
    .stmt-doc .st-kpi-exp { color: #b91c1c !important; }
    .stmt-doc .st-kpi-net { color: #1d4ed8 !important; }
    .stmt-doc .st-kpi-due { color: #b45309 !important; }
    .stmt-doc .st-mcode { color: #1d4ed8 !important; background: #eef4ff !important; }
}
/* Member financial position strip for print — compact and atomic. */
@media print {
    .stmt-doc .st-member-pos { grid-template-columns: 1fr 1fr 1fr !important; padding: 5px 10px 6px !important; page-break-inside: avoid !important; break-inside: avoid !important; }
    .stmt-doc .st-pos-item b { font-size: 9pt !important; margin-top: 1px !important; }
    .stmt-doc .st-pos-label { font-size: 6.4pt !important; }
    .stmt-doc .st-adv { color: #047857 !important; }
}
@media print {
    .stmt-doc .st-kpi.st-kpi-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* =====================================================================
   STATEMENT - WHOLE-BLOCK PAGINATION (APPENDED LAST)
   When a logical block (cover, meta, member card, unallocated, panel,
   chart, grid, summary table, signatures) does not fit in the remaining
   page space, move the ENTIRE block to the next page instead of cutting
   it mid-way. Long tables (member directory) still split at row
   boundaries with repeating headers.
   ===================================================================== */
@media print {
    .stmt-doc .st-cover,
    .stmt-doc .st-meta,
    .stmt-doc .st-member,
    .stmt-doc .st-member-head,
    .stmt-doc .st-member-pos,
    .stmt-doc .st-unalloc,
    .stmt-doc .st-panel,
    .stmt-doc .st-bars,
    .stmt-doc .st-col,
    .stmt-doc .st-rec-grid,
    .stmt-doc .st-high,
    .stmt-doc .st-summary-table,
    .stmt-doc .st-verify,
    .stmt-doc .st-sig,
    .stmt-doc .st-end {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .stmt-doc .st-member-head,
    .stmt-doc .st-sec-head {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    .stmt-doc tfoot {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .stmt-doc td,
    .stmt-doc th,
    .stmt-doc p {
        orphans: 3 !important;
        widows: 3 !important;
    }
    .stmt-doc table,
    .stmt-doc tbody {
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
    }
}

/* Prevent card-level overflow clipping from cutting content whenever a
   block must split across pages (member card, unallocated box, meta). */
@media print {
    .stmt-doc .st-member,
    .stmt-doc .st-member-head,
    .stmt-doc .st-unalloc,
    .stmt-doc .st-meta,
    .stmt-doc .st-panel,
    .stmt-doc .st-bars,
    .stmt-doc .st-col {
        overflow: visible !important;
    }
}
