* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #f7f5f0; color: #22252b; font: 1rem/1.55 system-ui, sans-serif; }
main { max-width: 52rem; margin: 2rem auto; padding: clamp(1rem, 4vw, 2.5rem); background: white; border-radius: 1rem; }
header, nav { display: flex; flex-wrap: wrap; gap: .8rem; }
header { justify-content: space-between; border-bottom: 1px solid #e0ddd5; padding-bottom: .8rem; }
a { color: #234474; }
.button, button { display: inline-block; background: #203352; color: white; padding: .65rem 1rem; border: 0; border-radius: .4rem; font: inherit; text-decoration: none; cursor: pointer; }
form { max-width: 36rem; }
label { display: block; margin-bottom: 1rem; }
input, select, textarea { display: block; width: 100%; padding: .65rem; font: inherit; border: 1px solid #777; border-radius: .4rem; }
article { border-bottom: 1px solid #e0ddd5; overflow-wrap: anywhere; }
#tm2-review { white-space: pre-wrap; overflow-wrap: anywhere; }

body { min-height: 100vh; background: #f5f2eb; }
main { width: calc(100% - 2rem); border: 1px solid #e6e0d4; }
header { align-items: center; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 750; text-decoration: none; }
.brand span { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .65rem; background: #17283f; color: #f6d99d; font-size: .8rem; letter-spacing: .06em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #2872b6; outline-offset: 4px; }
.public-entry main { max-width: 69rem; margin-top: clamp(1rem, 7vh, 5rem); }
.entry { display: block; }
.entry-hero { margin-top: 1.25rem; padding: clamp(1.4rem, 5vw, 3.75rem); border-radius: 1rem; background: radial-gradient(ellipse at top right, #354963, transparent 62%), #15253b; color: #fff; }
.entry-kicker { color: #f3d694; font-size: .74rem; font-weight: 750; letter-spacing: .16em; }
.entry-hero h1 { margin: .55rem 0 .7rem; font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.08; letter-spacing: -.04em; }
.entry-hero p { max-width: 32rem; margin: 0 0 1.45rem; color: #e2e8f2; font-size: 1.06rem; }
.entry-login { display: inline-flex; align-items: center; gap: 1.5rem; background: #f4d697; color: #17283f; border-radius: .55rem; padding: .75rem 1rem; font-weight: 750; text-decoration: none; }
.entry-login:hover { background: #ffe5b0; }
.entry-hero small { display: block; margin-top: .7rem; color: #e2e8f2; }
.entry-options h2 { margin: 1.65rem 0 .85rem; font-size: 1.15rem; }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.entry-card { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; min-width: 0; padding: 1.15rem; border: 1px solid #e5dfd2; border-radius: .8rem; background: #fffdf9; color: #17283f; text-decoration: none; }
.entry-card:hover { border-color: #96773d; background: #fff9ec; }
.entry-icon { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .6rem; background: #f5ead3; color: #62481e; margin-bottom: .25rem; }
.entry-description { color: #485466; font-size: .93rem; margin-bottom: .55rem; }
.entry-soon { margin-top: auto; border-radius: 2rem; padding: .18rem .55rem; background: #eeeae1; color: #524a3b; font-size: .74rem; font-weight: 650; }
@media (max-width: 680px) {
    .entry-grid { grid-template-columns: 1fr; }
    .entry-card { padding: 1rem; }
}

.staff-portal main { max-width: 64rem; margin-top: clamp(1rem, 6vh, 4rem); }
.staff-heading { margin-top: 1.25rem; padding: clamp(1.25rem, 4vw, 2.5rem); border-radius: 1rem; color: white; background: radial-gradient(ellipse at top right, #354963, transparent 65%), #15253b; }
.staff-heading h1 { margin: .4rem 0; font-size: clamp(1.7rem, 4vw, 2.75rem); line-height: 1.13; }
.staff-heading p { color: #e2e8f2; margin: .65rem 0 0; }
.staff-case { border: 1px solid #e5dfd2; border-radius: .85rem; background: #fffdf9; padding: clamp(1rem, 3vw, 1.5rem); margin-top: 1rem; }
.staff-case-top { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.staff-case-top h2 { margin: 0; color: #17283f; font-size: 1.3rem; }
.staff-case-title { margin: .45rem 0 .85rem; color: #485466; }
.case-status { border-radius: 2rem; padding: .25rem .7rem; background: #eeeae1; color: #524a3b; font-size: .8rem; font-weight: 700; }
.case-status.status-new { background: #f5ead3; color: #62481e; }
.case-status.status-in_progress { background: #e5eff9; color: #204b76; }
.case-status.status-closed { background: #e4f1e8; color: #24553a; }
.staff-back { font-weight: 650; }

.staff-portal { display: grid; grid-template-columns: 14rem minmax(0, 1fr); background: #edf3fa; }
.office-sidebar { background: linear-gradient(155deg, #17375c, #0c1f37 70%); padding: 1.65rem 1rem; color: #fff; }
.office-sidebar .brand { color: #fff; font-size: 1.18rem; }
.office-sidebar .brand span { background: #1767bf; color: white; }
.office-caption { margin: 2.2rem .65rem .65rem; color: #b9cde5; font-size: .7rem; letter-spacing: .12em; font-weight: 700; }
.office-sidebar nav { display: grid; gap: .35rem; }
.office-sidebar nav a { color: #e6effa; text-decoration: none; padding: .65rem .75rem; border-radius: .55rem; font-weight: 650; }
.office-sidebar nav a:hover, .office-sidebar .office-active { background: #175da8; color: #fff; }
.staff-portal main { max-width: 88rem; width: 100%; margin: 0 auto; padding: clamp(1rem, 3vw, 2.25rem); background: transparent; border: 0; }
.staff-portal header { border: 1px solid #dbe5f1; border-radius: .75rem; background: #fff; padding: .65rem 1rem; }
.staff-heading { background: transparent; color: #102a49; padding: .6rem 0 0; }
.staff-heading .entry-kicker { color: #245e98; }
.staff-heading p { color: #435875; }
.office-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1.35rem 0; }
.office-metric { border: 1px solid #dbe5f1; border-top: 4px solid #1767bf; border-radius: .8rem; background: #fff; padding: 1rem; }
.office-metric dt { color: #435875; font-size: .88rem; font-weight: 650; }
.office-metric dd { margin: .25rem 0 0; color: #102a49; font-size: 1.9rem; line-height: 1; font-weight: 800; }
.metric-new { border-top-color: #7551bb; }
.metric-in_progress { border-top-color: #197c8c; }
.metric-closed { border-top-color: #24805b; }
.office-list { border: 1px solid #dbe5f1; border-radius: .85rem; background: white; padding: clamp(.9rem, 2vw, 1.4rem); }
.office-list > h2 { margin: 0; color: #102a49; font-size: 1.2rem; }
.office-list > p { margin: .35rem 0 .9rem; color: #435875; font-size: .9rem; }
.staff-case { background: white; border-color: #dbe5f1; }
.office-list .staff-case { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; gap: .75rem; margin-top: .55rem; }
.office-list .staff-case-title { margin: 0; }
.staff-case .button { background: #175da8; font-size: .85rem; }
@media (max-width: 980px) { .office-list .staff-case { grid-template-columns: 1fr; } .office-list .button { justify-self: start; } }
@media (max-width: 740px) {
    .staff-portal { grid-template-columns: 1fr; }
    .office-sidebar { padding: .8rem 1rem; }
    .office-caption { display: none; }
    .office-sidebar nav { display: flex; margin-top: .5rem; }
    .office-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.public-entry { background: #edf3fa; color: #102a49; }
.public-entry main { border: 0; background: transparent; padding: clamp(.25rem, 2vw, 1.15rem); }
.public-entry header { background: #fff; border: 1px solid #dbe5f1; border-radius: .8rem; padding: .7rem 1rem; }
.public-entry .brand span { background: #175da8; color: #fff; }
.public-entry header > a:not(.brand) { padding: .4rem .65rem; border-radius: .45rem; background: #eaf3ff; color: #174f89; font-weight: 650; text-decoration: none; }
.public-entry .entry-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; gap: 1rem; background: radial-gradient(ellipse at top right, #235586, transparent 75%), #102741; }
.public-entry .entry-kicker { color: #b8dbff; }
.public-entry .entry-login { background: #1664b5; color: #fff; }
.public-entry .entry-login:hover { background: #104c90; }
.entry-art svg { display: block; width: 100%; max-width: 22rem; margin: auto; }
.public-entry .entry-card { background: #fff; border-color: #dbe5f1; }
.public-entry .entry-card:hover { border-color: #528ac4; background: #f8fbff; }
.public-entry .entry-icon { background: #e6f1ff; color: #19558e; }
.public-entry .entry-soon { background: #edf2f8; color: #435875; }
.access-panel { max-width: 31rem; margin: 1.35rem auto 0; padding: clamp(1.1rem, 5vw, 2.4rem); border: 1px solid #dbe5f1; border-top: 4px solid #1767bf; border-radius: .85rem; background: #fff; }
.access-panel h1 { margin: .9rem 0 .4rem; line-height: 1.15; }
.access-panel p { margin: 0 0 1.4rem; color: #435875; }
.access-panel label { font-weight: 650; }
.access-panel input { margin-top: .35rem; border-color: #a8bdd3; }
.access-panel button { width: 100%; background: #175da8; margin-bottom: .85rem; }
.access-panel form > a { display: inline-block; }
@media (max-width: 680px) {
    .public-entry .entry-hero { grid-template-columns: 1fr; }
    .entry-art { display: none; }
}

.brand .portal-logo { display: block; width: auto; max-width: min(14rem, 42vw); height: var(--tm2-logo-height, 48px); object-fit: contain; }
.office-sidebar .portal-logo { background: #fff; padding: .25rem .45rem; border-radius: .45rem; }
.entry-custom img { display: block; width: 100%; height: auto; max-height: 19rem; object-fit: contain; margin: auto; }
@media (max-width: 680px) {
    .entry-art.entry-custom { display: block; }
    .entry-custom img { max-height: 13rem; }
}

.appearance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.appearance-card { max-width: none; }
.appearance-card h2 { margin: 0; }
.appearance-preview { background: #edf3fa; border-radius: .5rem; padding: .75rem; margin-bottom: 1rem; }
.appearance-preview img { display: block; max-width: 100%; height: auto; max-height: 11rem; object-fit: contain; }
.appearance-clear { background: #eaf3ff; color: #174f89; }
@media (max-width: 740px) { .appearance-grid { grid-template-columns: 1fr; } }

.office-sidebar .portal-logo { max-width: 100%; }
.appearance-card input[type="number"] { max-width: 9rem; }

.portal-welcome main, .customer-portal main { position: relative; z-index: 1; }
.portal-company { font-size: clamp(.85rem, 2vw, 1.15rem); overflow-wrap: anywhere; }
.public-entry header .brand { min-width: 0; }
.public-entry .entry-hero.has-cover { overflow: hidden; padding-block-end: 0; }
.has-cover .entry-intro { padding-block-end: clamp(1.4rem, 5vw, 3.75rem); }
.has-cover .entry-custom { align-self: end; }
.has-cover .entry-custom img { max-height: 23rem; object-position: center bottom; }
.office-decor { position: fixed; inset: 0; pointer-events: none; color: #4279b3; }
.office-decor svg { position: absolute; width: clamp(2.8rem, 6vw, 5.5rem); opacity: .2; transform: rotate(var(--tilt)); animation: tm2-drift 9s ease-in-out infinite alternate; }
.customer-portal .office-decor svg { animation-duration: 22s; }
.decor-clip { top: 17%; left: 5%; --tilt: -23deg; }
.decor-paper { top: 13%; right: 5%; --tilt: 18deg; animation-delay: -4s !important; }
.decor-folder { bottom: 17%; left: 6%; --tilt: 13deg; animation-delay: -2s !important; }
.decor-note { bottom: 12%; right: 6%; --tilt: -17deg; animation-delay: -6s !important; }
@keyframes tm2-drift { to { transform: translateY(-.85rem) rotate(calc(var(--tilt) + 6deg)); } }
@media (max-width: 1230px) { .office-decor { display: none; } }
@media (max-width: 680px) {
    .has-cover .entry-intro { padding-block-end: 0; }
    .has-cover .entry-custom img { max-height: 14rem; }
}
@media (prefers-reduced-motion: reduce) { .office-decor svg { animation-name: none; } }

.customer-portal { background: #edf3fa; color: #102a49; }
.customer-portal main { max-width: 61rem; background: transparent; border: 0; padding: clamp(.25rem, 2vw, 1.15rem); }
.customer-portal header { background: #fff; border: 1px solid #dbe5f1; border-radius: .8rem; padding: .7rem 1rem; }
.customer-heading { margin: 1.25rem 0; padding: clamp(1.25rem, 4vw, 2.4rem); border-radius: 1rem; background: linear-gradient(125deg,#102741,#234f7c); color: #fff; }
.customer-heading h1 { margin: .35rem 0; font-size: clamp(1.8rem,4vw,2.7rem); line-height: 1.12; }
.customer-heading a, .customer-heading p { color: #e2edfa; }
.customer-heading p { margin: .65rem 0 0; }
.customer-portal .button, #tm2-wizard button { background: #175da8; font-weight: 650; }
.customer-case, .case-empty, #tm2-wizard { background: #fff; border: 1px solid #dbe5f1; border-radius: .85rem; padding: clamp(1rem, 4vw, 2rem); margin: 1rem 0; }
.customer-case h2 { margin: 0; font-size: 1.2rem; }
#tm2-wizard { max-width: none; }
.wizard-progress { display: grid; gap: .5rem; margin-bottom: 1.6rem; font-weight: 700; color: #175da8; }
.wizard-progress progress { display: block; width: 100%; height: .7rem; accent-color: #1767bf; }
#tm2-wizard label { font-weight: 700; }
#tm2-wizard label :is(input,select,textarea) { margin-top: .55rem; border-color: #a8bdd3; font-weight: 400; }
.wizard-actions { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid #dbe5f1; padding-top: 1rem; }
#tm2-wizard [data-back] { background: #eaf3ff; color: #174f89; }
.wizard-counter { color: #435875; text-align: right; font-size: .85rem; }
#tm2-review { background: #edf3fa; padding: 1rem; border-radius: .6rem; }

.attachment-controls { display: flex; flex-wrap: wrap; gap: .65rem; }
[data-file-count] { font-weight: 650; }
[data-file-queue] { list-style: none; padding: 0; }
[data-file-queue] li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem; padding: .65rem; margin-bottom: .4rem; border-radius: .5rem; background: #edf3fa; overflow-wrap: anywhere; }
[data-file-queue] span { min-width: 0; }
#tm2-wizard [data-file-queue] button { background: #fff; color: #174f89; padding: .35rem .6rem; }

.case-documents { display: grid; gap: .7rem; list-style: none; padding: 0; }
.case-documents li { background: #edf3fa; border-radius: .65rem; padding: .85rem 1rem; overflow-wrap: anywhere; }
.case-documents summary { cursor: pointer; font-weight: 700; margin-bottom: .45rem; }
.case-documents img { display: block; max-width: 100%; max-height: 35rem; object-fit: contain; margin: .75rem 0; border-radius: .4rem; }

#tm2-wizard .accuracy-confirmation { display: flex; align-items: flex-start; gap: .65rem; background: #edf3fa; padding: .8rem; border-radius: .55rem; }
#tm2-wizard .accuracy-confirmation input { display: inline-block; width: auto; margin: .28rem 0 0; }
.internal-notes { margin-top: 1.3rem; padding: 1rem; background: #edf3fa; border-radius: .65rem; }
.internal-notes h3 { margin-top: 0; }
.internal-notes li { margin-top: 1rem; }

.case-money { display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.case-money dt, .receipt-data dt { font-weight: 700; }
.case-money dd { margin: 0; }
#case-management form, .case-money ~ form { margin-bottom: 1rem; }
.receipt-data { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .65rem; }
.receipt-data dd { margin: 0; overflow-wrap: anywhere; }
@media print {
    .staff-portal:has(.printable-case), .receipt-page { display: block; background: white; }
    .staff-portal:has(.printable-case) main, .receipt-page main { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; }
    .staff-portal:has(.printable-case) :is(.office-sidebar, header, .staff-heading, .staff-back, .case-print, form, [role="alert"]), .receipt-actions { display: none; }
    .printable-case { padding: 0; border: 0; }
    .printable-case .case-documents details::details-content { content-visibility: visible; }
    .printable-case img { max-height: 16rem; }
}

.case-print-brand { display: none; }
.case-detail-actions, .receipt-actions, .receipt-masthead, .receipt-company {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem;
}
.case-customer { display: grid; margin: .5rem 0 1rem; }
.case-customer span { color: #435875; font-size: .85rem; }
.case-jumps { padding: .65rem 0; border-block: 1px solid #dbe5f1; }
.case-jumps a { padding: .3rem .65rem; border-radius: .35rem; background: #edf3fa; font-weight: 650; text-decoration: none; }
.printable-case .case-summary, .printable-case .internal-notes { margin-top: 1rem; padding: clamp(.9rem, 2vw, 1.4rem); background: #f8fbff; border: 1px solid #dbe5f1; border-radius: .75rem; }
.printable-case .case-summary > h3 { margin-top: 0; }
.printable-case .case-money > div { flex: 1 1 9rem; padding: .65rem; border: 1px solid #dbe5f1; border-radius: .5rem; background: #fff; }
.printable-case .case-money dd { font-size: 1.2rem; font-weight: 750; }
.billing-forms { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.receipt-page { background: #edf3fa; }
.receipt-page main { max-width: 46rem; border: 1px solid #dbe5f1; border-top: .35rem solid #175da8; }
.receipt-actions { margin-bottom: 1.25rem; }
.receipt-masthead { border-bottom: 1px solid #dbe5f1; padding-bottom: 1rem; color: #102a49; }
.receipt-masthead h1 { font-size: clamp(1.35rem, 3vw, 2rem); margin: 0; line-height: 1.2; }
.receipt-masthead p { margin: .3rem 0 0; font-weight: 700; }
.receipt-total { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .85rem 1rem; margin: 1rem 0; border: 1px solid #cbdcf1; border-radius: .55rem; background: #edf3fa; color: #102a49; }
.receipt-total strong { font-size: 1.25rem; }
.receipt-data { margin: 0; }
.receipt-data :is(dt,dd) { border-bottom: 1px solid #dbe5f1; padding: .4rem 0; }
@media (max-width: 620px) { .billing-forms { grid-template-columns: 1fr; } }
@media print {
    .case-jumps, .receipt-page .receipt-actions { display: none; }
    .case-print-brand { display: flex; align-items: center; gap: .7rem; border-bottom: 2px solid #175da8; padding-bottom: .55rem; margin-bottom: .75rem; }
    .case-print-brand span:last-child { margin-left: auto; }
    .case-print-brand .portal-logo, .receipt-masthead .portal-logo { max-height: 52px; }
    .printable-case .case-summary, .printable-case .internal-notes { background: white; padding: .65rem; margin-top: .65rem; }
    .printable-case :is(h2,h3,h4) { break-after: avoid; }
    .printable-case .case-documents li, .receipt-masthead, .receipt-total { break-inside: avoid; }
    .receipt-page main { border-top: 3px solid #175da8; padding-top: .7rem; }
}

.print-annex { display: none; }

@media print {
    @page { margin: 0; }
    .staff-portal:has(.printable-case) main, .receipt-page main { padding: 0; }
    .printable-case, .receipt-page main {
        box-sizing: border-box;
        padding: 12mm 14mm;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
        color: #14293d;
        font: 10pt/1.4 system-ui, sans-serif;
    }
    .printable-case .case-print-brand {
        display: grid; grid-template-columns: auto 1fr auto;
        gap: 3mm; padding-bottom: 3mm; margin-bottom: 4mm;
        border-bottom: 2pt solid #1d5080;
    }
    .case-print-brand div > span { display: block; margin: 0; color: #465a6d; }
    .printable-case .staff-case-top h2 { font-size: 16pt; }
    .printable-case .case-customer { margin: 2mm 0; }
    .printable-case p { margin: 2mm 0; }
    .printable-case :is(.case-summary, .internal-notes) { padding: 0 0 2mm; margin: 3mm 0 0; border: 0; border-top: .6pt solid #d2dce6; border-radius: 0; }
    .printable-case h3 { margin: 2mm 0; font-size: 11pt; color: #173e63; }
    .printable-case .case-summary > h3 { margin-top: 2mm; }
    .printable-case .case-money { margin: 2mm 0; gap: 2mm; }
    .printable-case .case-money > div { padding: 2mm; }
    .printable-case .case-money dd { font-size: 11pt; }
    .printable-case .internal-notes li { margin-top: 1mm; }
    .printable-case :is(.case-documents-heading, .case-documents) { display: none; }
    .printable-case .print-annex { display: block; border-top: .6pt solid #d2dce6; margin-top: 3mm; }
    .print-annex figure { display: inline-block; width: 47%; margin: 1mm 2% 2mm 0; padding: 2mm; border: .6pt solid #d2dce6; vertical-align: top; break-inside: avoid; }
    .printable-case .print-annex img { display: block; max-width: 100%; max-height: 43mm; object-fit: contain; margin: 0 auto 1mm; }
    .print-annex figcaption { font-size: 8pt; overflow-wrap: anywhere; }
    .receipt-page main { padding: 12mm 14mm; border: 0; }
}

.case-pagination { display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; margin: 1rem 0 0; font-weight: 650; }
.income-report { margin-top: 1rem; padding: clamp(1rem, 3vw, 2rem); background: #fff; border: 1px solid #dbe5f1; border-radius: .85rem; }
.income-report h1 { margin: 0; }
.income-filters { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; max-width: none; }
.income-filters label { margin: 0; }
.income-total { display: grid; padding: .8rem 1rem; background: #edf3fa; border-radius: .55rem; }
.income-total strong { font-size: 1.45rem; }
.income-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.income-table caption { text-align: left; font-weight: 700; padding: .5rem 0; }
.income-table :is(th,td) { border-bottom: 1px solid #dbe5f1; text-align: right; padding: .45rem; }
.income-table tr > :first-child { text-align: left; }
.income-table tfoot td { font-weight: 700; }
.income-bar { width: 42%; }
.income-bar svg { display: block; width: 100%; height: .65rem; }
@media (max-width: 500px) { .income-bar { width: 20%; } .income-table { font-size: .8rem; } }
@media print {
    @page {
        margin: 0 0 9mm;
        @bottom-left { content: ""; }
        @bottom-center { content: ""; }
        @bottom-right {
            content: counter(page) " / " counter(pages);
            font: 9pt system-ui, sans-serif;
            padding-right: 14mm;
            color: #465a6d;
        }
    }
    .income-page { display: block; background: white; }
    .income-page :is(.office-sidebar, header, .income-filters) { display: none; }
    .income-page main { max-width: none; width: 100%; margin: 0; padding: 0; }
    .income-report { margin: 0; padding: 12mm 14mm; border: 0; font: 10pt/1.35 system-ui,sans-serif; }
    .income-report .case-print-brand { margin-bottom: 5mm; }
    .income-table tr { break-inside: avoid; }
    .income-table :is(th,td) { padding: 2mm; }
}

.income-heading { border-radius: .7rem; padding: 1.35rem 1.5rem; background: linear-gradient(120deg,#102a49,#18518c); color: #fff; }
.income-heading > span { color: #b8dbff; font-size: .74rem; font-weight: 750; letter-spacing: .13em; }
.income-heading h1 { margin-top: .2rem; }
.income-heading p { margin: .3rem 0 0; color: #e2effc; }
.income-filters { margin: 1rem 0; }
.income-filters button { background: #175da8; }
.income-kpis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; margin: 1rem 0; }
.income-kpis > div { display: block; padding: .85rem 1rem; border: 1px solid #dbe5f1; border-top: 3px solid #1767bf; border-radius: .65rem; background: #f8fbff; }
.income-kpis dt, .income-kpis small, .income-chart p { color: #435875; }
.income-kpis dt { font-size: .85rem; font-weight: 650; }
.income-kpis dd { margin: .2rem 0; color: #102a49; font-size: clamp(1rem,2vw,1.55rem); font-weight: 800; overflow-wrap: anywhere; }
.income-chart { margin: 1rem 0; padding: 1rem; border: 1px solid #dbe5f1; border-radius: .7rem; }
.income-chart h2 { font-size: 1.15rem; margin: 0; }
.income-chart p { margin: .15rem 0 .5rem; }
.income-chart-scroll { overflow-x: auto; }
.income-chart svg { display: block; width: 100%; min-width: 34rem; max-height: 23rem; }
.income-chart text { font: 12px system-ui, sans-serif; fill: #34516e; }
@media (max-width: 630px) { .income-kpis { grid-template-columns: 1fr; } }
@media print {
    .income-heading { padding: 0 0 2mm; background: white; color: #102a49; border-bottom: 1px solid #dbe5f1; }
    .income-heading :is(span,p) { color: #435875; }
    .income-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); margin: 2mm 0; }
    .income-kpis > div, .income-chart { padding: 2mm; }
    .income-chart { margin: 2mm 0; break-inside: avoid; }
    .income-chart-scroll { overflow: visible; }
    .income-chart svg { min-width: 0; max-height: 58mm; }
    .income-table :is(th,td) { padding: 1mm 2mm; }
}

.income-charts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: .75rem; align-items: stretch; margin: 1rem 0; }
.income-charts > .income-chart { margin: 0; min-width: 0; }
.income-breakdown .income-donut { width: min(10rem, 100%); min-width: 0; height: auto; margin: .4rem auto; }
.income-donut text:first-of-type { font-size: 24px; font-weight: 800; fill: #102a49; }
.income-donut text:last-of-type { font-size: 9px; }
.income-legend { list-style: none; padding: 0; margin: .4rem 0 0; }
.income-legend li { display: grid; grid-template-columns: minmax(0,1fr) auto 3.4em; align-items: center; gap: .4rem; padding: .4rem 0; border-top: 1px solid #e0eaf4; font-size: .81rem; }
.income-category { display: flex; align-items: center; gap: .45rem; min-width: 0; overflow-wrap: anywhere; }
.income-swatch { width: .65rem; height: .65rem; flex: none; border-radius: 50%; background: var(--swatch); print-color-adjust: exact; }
.income-share { text-align: right; color: #435875; }
@media screen and (max-width: 1100px) { .income-charts { grid-template-columns: 1fr; } }
@media print {
    .income-charts { grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 2mm; margin: 2mm 0; }
    .income-breakdown .income-donut { max-width: 25mm; margin: 0 auto; }
    .income-legend li { font-size: 7.5pt; padding: .6mm 0; }
}

.office-search { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.office-search label { flex: 1 1 16rem; margin: 0; }
.office-search input[type="search"] { display: block; width: 100%; margin: .25rem 0 0; }
.office-search a { align-self: center; }
.office-list .case-list-identity { min-width: 0; overflow-wrap: anywhere; }
.office-list .case-list-identity h2,
.office-list .case-list-receipt { display: block; font-size: .85rem; color: #435875; }

.tm2-install-float {
    position: fixed;
    z-index: 10;
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: .55rem;
    max-width: calc(100vw - 2rem - env(safe-area-inset-right, 0px));
}
.tm2-install-float button {
    width: auto;
    margin: 0;
    border-radius: 999px;
    background: #173856;
    color: #fff;
    box-shadow: 0 4px 14px #17385638;
}
.tm2-install-float p {
    width: min(19rem, 100%);
    margin: 0;
    padding: .8rem 1rem;
    border: 1px solid #dbe5f1;
    border-radius: .75rem;
    background: #fff;
    color: #173856;
    box-shadow: 0 4px 14px #17385620;
}
.tm2-install-float [hidden] { display: none; }
.public-entry main:has(.tm2-install-float button:not([hidden])) { padding-bottom: 5rem; }
