:root {
    --navy: #0b1220;
    --navy-2: #152238;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #e3e8ef;
    --success: #087a55;
    --success-bg: #e9f8f1;
    --danger: #c52b3b;
    --danger-bg: #fff0f2;
    --warning: #a15c00;
    --radius: 16px;
    --shadow: 0 14px 35px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.15; letter-spacing: -.025em; }
h2 { margin-bottom: 5px; font-size: 1.14rem; }
small { color: var(--muted); display: block; }
code { background: #eef2ff; border-radius: 5px; color: #3730a3; padding: 2px 5px; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); color: #d9e2f2; display: flex; flex-direction: column; padding: 22px 16px; z-index: 20; }
.sidebar-brand { align-items: center; color: white; display: flex; gap: 12px; padding: 0 7px 24px; }
.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand small { color: #8fa3c4; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark { align-items: center; background: linear-gradient(135deg, var(--blue), var(--cyan)); border-radius: 18px; box-shadow: 0 10px 25px rgba(37, 99, 235, .35); color: white; display: inline-flex; font-size: 1.5rem; font-weight: 900; height: 62px; justify-content: center; letter-spacing: -.08em; width: 62px; }
.brand-mark.small { border-radius: 11px; font-size: .9rem; height: 38px; width: 38px; }
.nav-list { display: grid; gap: 6px; }
.nav-list a { border-radius: 10px; color: #b8c5da; display: block; font-weight: 650; padding: 11px 13px; }
.nav-list a:hover, .nav-list a.active { background: rgba(255, 255, 255, .09); color: white; text-decoration: none; }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .1); display: grid; gap: 6px; margin-top: auto; padding: 18px 10px 0; }
.sidebar-footer a, .link-button { color: #aebdd4; font-weight: 600; }
.link-button { background: transparent; border: 0; padding: 0; }
.main-panel { min-width: 0; }
.topbar { align-items: center; background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); display: flex; gap: 14px; justify-content: flex-end; min-height: 76px; padding: 14px clamp(18px, 4vw, 42px); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.topbar p { margin-bottom: 0; }
.menu-button { background: white; border: 1px solid var(--line); border-radius: 9px; display: none; font-size: 1.2rem; height: 40px; margin-right: auto; width: 40px; }
.role-pill { background: #eaf0ff; border-radius: 999px; color: var(--blue-dark); font-size: .75rem; font-weight: 800; padding: 7px 11px; text-transform: capitalize; }
.content { margin: 0 auto; max-width: 1500px; padding: clamp(22px, 4vw, 42px); }
.page-heading { align-items: flex-end; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 24px; }
.page-heading p { color: var(--muted); margin-bottom: 0; }
.eyebrow { color: var(--blue); font-size: .72rem; font-weight: 850; letter-spacing: .12em; margin-bottom: 7px; text-transform: uppercase; }
.muted { color: var(--muted); }

.card { background: var(--card); border: 1px solid rgba(210, 219, 232, .8); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; padding: clamp(18px, 3vw, 28px); }
.card-heading { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 20px; }
.card-heading p { color: var(--muted); margin-bottom: 0; }
.narrow-card { max-width: 650px; }
.stat-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 132px; padding: 23px; position: relative; overflow: hidden; }
.stat-card::after { background: linear-gradient(135deg, rgba(37, 99, 235, .22), rgba(6, 182, 212, .06)); border-radius: 50%; content: ""; height: 100px; position: absolute; right: -45px; top: -40px; width: 100px; }
.stat-card span { color: var(--muted); display: block; font-weight: 650; }
.stat-card strong { display: block; font-size: clamp(1.45rem, 2.4vw, 2rem); margin-top: 16px; }

.button { align-items: center; border: 1px solid transparent; border-radius: 9px; display: inline-flex; font-weight: 750; justify-content: center; min-height: 41px; padding: 9px 15px; text-decoration: none; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button.primary { background: var(--blue); box-shadow: 0 8px 18px rgba(37, 99, 235, .22); color: white; }
.button.primary:hover { background: var(--blue-dark); }
.button.secondary { background: white; border-color: var(--line); color: var(--text); }
.button.danger { background: var(--danger); color: white; }
.button.danger-outline { background: white; border-color: #f4bbc2; color: var(--danger); }
.button.tiny { font-size: .78rem; min-height: 32px; padding: 5px 9px; }
.button.large { min-height: 50px; padding-inline: 23px; }
.button.wide { width: 100%; }
.actions { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; }
.actions form { margin: 0; }

.alert { border: 1px solid; border-radius: 11px; margin-bottom: 20px; padding: 13px 16px; }
.alert.success { background: var(--success-bg); border-color: #b7ebd2; color: var(--success); }
.alert.danger { background: var(--danger-bg); border-color: #f5c4ca; color: #9e2030; }
.badge { border-radius: 999px; display: inline-block; font-size: .7rem; font-weight: 850; letter-spacing: .04em; padding: 5px 9px; text-transform: uppercase; }
.badge.active, .badge.finalized { background: var(--success-bg); color: var(--success); }
.badge.inactive, .badge.suspended, .badge.cancelled { background: var(--danger-bg); color: var(--danger); }

.stack-form { display: grid; gap: 20px; }
.form-grid { display: grid; gap: 17px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label, .stack-form > label { color: #344054; display: grid; font-size: .84rem; font-weight: 700; gap: 7px; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
.form-section:last-of-type { border-bottom: 0; }
.form-section h2 { margin-bottom: 17px; }
input, select, textarea { background: white; border: 1px solid #ccd5e2; border-radius: 9px; color: var(--text); min-height: 43px; outline: none; padding: 9px 11px; width: 100%; }
textarea { resize: vertical; }
textarea[lang="hi"] { font-family: "Nirmala UI", Mangal, "Noto Sans Devanagari", sans-serif; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.form-actions { display: flex; justify-content: flex-end; }
.filter-bar { align-items: center; display: flex; flex: 1; gap: 10px; margin-bottom: 18px; }
.filter-bar input { max-width: 390px; }
.filter-bar select { max-width: 190px; }
.split-toolbar { align-items: flex-start; display: flex; gap: 14px; justify-content: space-between; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 13px 12px; text-align: left; vertical-align: top; }
th { color: #596579; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
td small { margin-top: 3px; }
tbody tr:hover { background: #f9fbff; }
.empty { color: var(--muted); padding: 32px; text-align: center; }

.auth-body { background: radial-gradient(circle at 15% 15%, #1c3c75, transparent 35%), var(--navy); min-height: 100vh; }
.auth-shell { align-items: center; display: grid; gap: clamp(30px, 7vw, 100px); grid-template-columns: minmax(0, 1.1fr) minmax(360px, 500px); margin: auto; min-height: 100vh; max-width: 1200px; padding: 40px; }
.auth-brand { color: white; max-width: 650px; }
.auth-brand .brand-mark { margin-bottom: 35px; }
.auth-brand h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
.auth-brand > p:last-child { color: #b7c5da; font-size: 1.1rem; max-width: 570px; }
.auth-card { background: white; border-radius: 22px; box-shadow: 0 25px 80px rgba(0, 0, 0, .3); padding: clamp(25px, 5vw, 48px); }
.auth-card h2 { font-size: 1.8rem; }

.invoice-item { background: #f8faff; border: 1px solid #dbe4f1; border-radius: 13px; margin-bottom: 16px; padding: 18px; }
.item-row-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 14px; }
.icon-button { background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--danger); font-size: 1.25rem; height: 32px; line-height: 1; width: 32px; }
.item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.item-grid .span-2 { grid-column: span 2; }
.line-total { align-self: end; background: var(--navy); border-radius: 9px; color: white; min-height: 67px; padding: 10px 13px; }
.line-total span, .line-total strong { display: block; }
.line-total span { color: #aebdd4; font-size: .74rem; }
.line-total strong { font-size: 1.15rem; }
.invoice-submit { align-items: center; bottom: 16px; display: flex; gap: 25px; justify-content: space-between; position: sticky; z-index: 5; }
.live-totals { align-items: center; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.live-totals span { color: var(--muted); }
.live-totals strong { color: var(--text); display: block; }
.live-totals .grand strong { font-size: 1.45rem; color: var(--blue-dark); }

.invoice-preview { padding: 0; overflow: hidden; }
.invoice-preview-head { align-items: flex-start; background: var(--navy); color: white; display: flex; justify-content: space-between; padding: 30px; }
.invoice-preview-head p { color: #c2cede; margin-bottom: 5px; }
.invoice-preview-head .eyebrow { color: #70dded; }
.invoice-meta { align-items: flex-end; display: flex; flex-direction: column; gap: 6px; }
.invoice-meta strong { font-size: 1.2rem; }
.customer-box { background: #f7f9fc; display: grid; gap: 20px; grid-template-columns: 1fr 1fr; padding: 20px 30px; }
.customer-box p { margin: 0; }
.customer-box span { color: var(--muted); display: block; font-size: .75rem; text-transform: uppercase; }
.invoice-table td:first-child, .invoice-table th:first-child { padding-left: 30px; }
.invoice-table td:last-child, .invoice-table th:last-child { padding-right: 30px; text-align: right; }
.invoice-bottom { display: grid; gap: 30px; grid-template-columns: 1fr minmax(300px, .6fr); padding: 25px 30px 30px; }
.invoice-bottom > div > span { color: var(--muted); display: block; font-size: .75rem; margin-bottom: 4px; text-transform: uppercase; }
.invoice-bottom > div > p { color: var(--muted); margin-top: 25px; }
.invoice-bottom dl { margin: 0; }
.invoice-bottom dl div { display: flex; justify-content: space-between; padding: 7px 0; }
.invoice-bottom dl .grand { border-top: 2px solid var(--navy); font-size: 1.15rem; font-weight: 850; margin-top: 5px; padding-top: 12px; }
.danger-zone { border-color: #efb8bf; }

.minimal-body { align-items: center; background: var(--navy); display: flex; justify-content: center; min-height: 100vh; padding: 25px; }
.error-card { background: white; border-radius: 20px; max-width: 560px; padding: 45px; text-align: center; width: 100%; }
.error-code { color: var(--blue); font-size: 3rem; font-weight: 900; margin-bottom: 0; }

.print-body { background: #e5e7eb; }
.print-toolbar { display: flex; gap: 10px; justify-content: center; padding: 20px; }
.a4-invoice { background: white; box-shadow: 0 8px 35px rgba(0, 0, 0, .18); margin: 0 auto 30px; min-height: 297mm; position: relative; width: 210mm; }
.modern-invoice { color: #172033; display: flex; flex-direction: column; overflow: hidden; padding: 0 12mm 5mm; }
.invoice-accent { background: linear-gradient(90deg, #123568 0 68%, #2f6fed 68% 91%, #17a6b6 91% 100%); flex: 0 0 5mm; height: 5mm; margin: 0 -12mm 5mm; }
.invoice-page--has-next { break-after: page; page-break-after: always; }
.modern-header { align-items: stretch; display: grid; gap: 8mm; grid-template-columns: minmax(0, 1fr) 59mm; }
.seller-brand { align-items: flex-start; display: flex; gap: 5mm; min-width: 0; }
.seller-mark { align-items: center; background: #edf3ff; border: .4mm solid #d4e1f7; border-radius: 4mm; color: #123568; display: flex; flex: 0 0 18mm; font-size: 17pt; font-weight: 900; height: 18mm; justify-content: center; overflow: hidden; }
.seller-mark img { height: 100%; object-fit: contain; padding: 1.5mm; width: 100%; }
.seller-copy { min-width: 0; }
.document-kicker, .section-label { color: #2f6fed; display: block; font-size: 7.2pt; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.seller-copy h1 { color: #123568; font-family: Georgia, "Times New Roman", serif; font-size: 20.5pt; letter-spacing: -.025em; line-height: 1.05; margin: 1mm 0 1.4mm; }
.seller-copy > p { color: #596579; font-size: 8.5pt; line-height: 1.45; margin: 0; }
.seller-meta { display: flex; flex-wrap: wrap; gap: 1mm 5mm; margin-top: 2.3mm; }
.seller-meta span { color: #344054; font-size: 8.2pt; }
.seller-meta b { color: #123568; margin-right: 1mm; }
.invoice-identity { background: #123568; border-radius: 4mm; color: white; display: flex; flex-direction: column; padding: 4mm 5mm; }
.invoice-identity > span { color: #aebfda; font-size: 7pt; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.invoice-identity > strong { font-size: 15pt; letter-spacing: -.02em; margin-top: 1.2mm; }
.invoice-identity dl { border-top: .25mm solid rgba(255, 255, 255, .2); margin: 2mm 0 0; padding-top: 2mm; }
.invoice-identity dl div { display: flex; font-size: 7.8pt; justify-content: space-between; padding: .6mm 0; }
.invoice-identity dt { color: #b9c7dc; }.invoice-identity dd { font-weight: 750; margin: 0; }
.invoice-context { display: grid; gap: 4mm; grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr); margin-top: 4mm; }
.bill-to-card, .supply-card { background: #f7f9fc; border: .3mm solid #dfe6f0; border-radius: 3.5mm; min-height: 23mm; padding: 2.8mm 4mm; }
.bill-to-card h2 { color: #172033; font-size: 12pt; margin: .8mm 0 .4mm; }
.bill-to-card p, .supply-card p { color: #667085; font-size: 8.2pt; line-height: 1.4; margin: 0; }
.customer-meta { display: flex; flex-wrap: wrap; gap: .5mm 5mm; margin-top: 1mm; }
.customer-meta span { color: #475467; font-size: 8pt; }.customer-meta b { color: #172033; margin-right: 1mm; }
.supply-card > strong { color: #123568; display: block; font-size: 10pt; margin: 1mm 0 .6mm; }
.modern-items-table { border-collapse: separate; border-spacing: 0; font-size: 7.9pt; margin-top: 4mm; table-layout: fixed; }
.modern-items-table th { background: #123568; border: 0; color: white; font-size: 6.8pt; letter-spacing: .055em; padding: 2mm; text-transform: uppercase; }
.modern-items-table th:first-child { border-radius: 2.5mm 0 0 0; }.modern-items-table th:last-child { border-radius: 0 2.5mm 0 0; }
.modern-items-table th:nth-child(1) { width: 8mm; }.modern-items-table th:nth-child(2) { width: 69mm; }.modern-items-table th:nth-child(3) { width: 15mm; }.modern-items-table th:nth-child(4) { width: 10mm; }.modern-items-table th:nth-child(5) { width: 10mm; }.modern-items-table th:nth-child(6) { width: 21mm; }.modern-items-table th:nth-child(7) { width: 14mm; }.modern-items-table th:nth-child(8) { width: 27mm; }
.modern-items-table td { border: 0; border-bottom: .3mm solid #dfe6f0; color: #344054; padding: 2.2mm 2mm; vertical-align: top; }
.modern-items-table tbody tr:nth-child(even) td { background: #fafbfc; }
.modern-items-table .col-number { color: #667085; text-align: center; }
.modern-items-table .number { text-align: right; }
.modern-items-table .line-amount { color: #123568; font-weight: 850; }
.item-description strong { color: #172033; display: block; font-size: 8.4pt; line-height: 1.35; }
.item-description div { display: block; margin-top: .7mm; }
.item-description span { color: #667085; display: inline-block; font-size: 7.1pt; white-space: nowrap; }
.item-description span + span { margin-left: 2mm; }
.modern-financials { break-inside: avoid; display: grid; gap: 8mm; grid-template-columns: minmax(0, 1fr) 67mm; margin-top: 3.5mm; }
.invoice-narrative > strong { color: #123568; display: block; font-size: 9.3pt; line-height: 1.5; margin-top: 1.5mm; }
.totals-card { border: .35mm solid #d4deeb; border-radius: 3.5mm; overflow: hidden; }
.totals-card > div { align-items: center; display: flex; justify-content: space-between; padding: 1.6mm 3.5mm; }
.totals-card > div + div { border-top: .25mm solid #e4e9f1; }
.totals-card span { color: #667085; font-size: 7.7pt; }.totals-card strong { color: #172033; font-size: 8.7pt; }
.totals-card .grand-total { background: #123568; border-top: 0; color: white; padding: 2.4mm 3.5mm; }
.totals-card .grand-total span { color: #c8d4e7; font-size: 8pt; font-weight: 800; text-transform: uppercase; }.totals-card .grand-total strong { color: white; font-size: 14pt; }
.modern-terms { background: #f7f9fc; border: .3mm solid #d7e1ef; border-radius: 3.5mm; break-inside: avoid; font-family: "Nirmala UI", Mangal, "Noto Sans Devanagari", sans-serif; margin-top: 3mm; padding: 2.7mm 3.5mm; page-break-inside: avoid; }
.modern-terms-heading { align-items: baseline; border-bottom: .25mm solid #d7e1ef; display: flex; gap: 3mm; justify-content: space-between; margin-bottom: 1.6mm; padding-bottom: 1.2mm; }
.modern-terms-heading strong { color: #123568; font-size: 9pt; }
.modern-terms-columns { display: grid; gap: 6mm; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.modern-terms ol { color: #3f4b5f; font-size: 6.8pt; line-height: 1.35; margin: 0; padding-left: 4.5mm; }
.modern-terms li { padding-left: .7mm; }
.modern-terms li + li { margin-top: .75mm; }
.modern-terms-plain { color: #3f4b5f; font-size: 7pt; line-height: 1.4; margin: 0; }
.modern-terms-notices { background: #eaf1fd; border-left: .9mm solid #2f6fed; border-radius: 1.5mm; margin-top: 1.5mm; padding: 1.2mm 2.5mm; }
.modern-terms-notices p { color: #344054; font-size: 6.6pt; line-height: 1.35; margin: 0; }
.modern-terms-notices p + p { margin-top: .4mm; }
.modern-footer { align-items: flex-end; border-top: .35mm solid #dfe6f0; display: grid; gap: 6mm; grid-template-columns: 1fr 1.2fr 1fr; margin-top: auto; padding-top: 3.5mm; }
.signature-block { color: #475467; font-size: 7.5pt; }.signature-block i { border-top: .3mm solid #98a2b3; display: block; margin-top: 5mm; width: 42mm; }.signature-block b { color: #172033; display: block; margin-top: 1mm; }
.signature-block.authorised { text-align: right; }.signature-block.authorised i { margin-left: auto; }
.invoice-note { text-align: center; }.invoice-note strong { color: #123568; display: block; font-size: 8.5pt; }.invoice-note span { color: #98a2b3; display: block; font-size: 6.8pt; margin-top: .8mm; }
.cancel-watermark { color: rgba(190, 24, 43, .12); font-size: 55pt; font-weight: 900; left: 28mm; position: absolute; top: 118mm; transform: rotate(-30deg); z-index: 3; }
.continuation-header { align-items: center; border-bottom: .35mm solid #d7e1ef; display: grid; gap: 8mm; grid-template-columns: minmax(0, 1fr) 73mm; padding: 1mm 0 4mm; }
.continuation-header > div > strong { color: #123568; display: block; font-family: Georgia, "Times New Roman", serif; font-size: 17pt; line-height: 1.1; margin-top: 1mm; }
.continuation-header small { color: #667085; font-size: 7.5pt; margin-top: 1mm; }
.continuation-header dl { background: #f7f9fc; border: .3mm solid #d7e1ef; border-radius: 2.5mm; margin: 0; padding: 2mm 3mm; }
.continuation-header dl div { display: flex; font-size: 7.5pt; justify-content: space-between; }
.continuation-header dl div + div { margin-top: .6mm; }
.continuation-header dt { color: #667085; }.continuation-header dd { color: #123568; font-weight: 800; margin: 0; }
.continuation-note { align-items: center; border-top: .3mm solid #d7e1ef; color: #667085; display: flex; font-size: 7.5pt; justify-content: space-between; margin-top: auto; padding-top: 3mm; }
.continuation-note strong { color: #123568; }

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .app-shell { display: block; }
    .sidebar { box-shadow: 15px 0 40px rgba(0, 0, 0, .3); left: -270px; position: fixed; transition: left .2s ease; width: 250px; }
    .sidebar.open { left: 0; }
    .menu-button { display: block; }
    .topbar { justify-content: flex-start; }
    .content { padding: 20px 15px; }
    .page-heading, .card-heading, .split-toolbar, .invoice-submit { align-items: stretch; flex-direction: column; }
    .page-heading { align-items: flex-start; }
    .form-grid, .item-grid, .customer-box, .invoice-bottom { grid-template-columns: 1fr; }
    .form-grid .span-2, .item-grid .span-2, .customer-box > *, .invoice-bottom > * { grid-column: span 1; }
    .filter-bar { align-items: stretch; flex-direction: column; }
    .filter-bar input, .filter-bar select { max-width: none; }
    .auth-shell { display: block; padding: 20px; }
    .auth-brand { display: none; }
    .auth-card { margin: 30px auto; max-width: 500px; }
    .invoice-submit { position: static; }
}

@media print {
    @page { margin: 0; size: A4 portrait; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .print-toolbar { display: none !important; }
    .print-body { background: white; }
    .a4-invoice { box-shadow: none; margin: 0; min-height: 297mm; width: 210mm; }
    .modern-invoice { display: block; }
    .invoice-page--final .modern-footer { margin-top: 3.5mm; }
    .invoice-page--has-next .continuation-note { margin-top: 3mm; }
    .modern-items-table thead { display: table-header-group; }
    .modern-items-table tr, .modern-financials, .modern-terms, .modern-footer { break-inside: avoid; page-break-inside: avoid; }
}
