:root {
    color-scheme: light;
    --ink: #172d42;
    --navy: #102c43;
    --navy-2: #183e58;
    --teal: #067e78;
    --teal-dark: #05645f;
    --lime: #d5ed88;
    --paper: #f4f7f8;
    --line: #e2e9ec;
    --muted: #71808d;
    --white: #fff;
    --shadow: 0 18px 60px rgba(20, 47, 66, .07);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.topbar { min-height: 74px; padding: 0 clamp(20px, 5vw, 76px); background: var(--navy); color: var(--white); display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 245px; }
.brand-mark { display: grid; place-items: center; overflow: hidden; width: 41px; height: 41px; background: #fff; border-radius: 50%; flex: none; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: .01em; }
.brand small { color: #a8bac6; font-size: 11px; margin-top: 1px; }
.topnav, .user-menu { display: flex; align-items: center; gap: 22px; }
.topnav { margin-left: auto; }
.topnav > a:not(.button) { color: #c6d2d9; font-size: 13px; }
.topnav > a:not(.button):hover { color: var(--white); }
.user-menu { border-left: 1px solid rgba(255,255,255,.18); padding-left: 22px; color: #d3dfe5; font-size: 12px; }
.user-menu form { margin: 0; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 38px auto 64px; min-height: calc(100vh - 188px); }
.site-footer { padding: 19px 20px; text-align: center; color: #83909a; font-size: 11px; letter-spacing: .08em; }
.site-footer span { padding: 0 5px; color: #b6c4ca; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 26px; }
.page-heading h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.045em; margin: 5px 0 7px; color: var(--navy); }
.page-heading p { margin-top: 0; margin-bottom: 0; }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .17em; margin: 0 0 7px; }
.muted { color: var(--muted); }
.button { border: 1px solid transparent; border-radius: 9px; padding: 10px 15px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; transition: transform .15s, background .15s, border-color .15s; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--teal); box-shadow: 0 5px 12px rgba(6,126,120,.16); }
.button-primary:hover { background: var(--teal-dark); }
.button-dark { background: var(--navy); color: #fff; }
.button-light { background: #e9f5f2; color: #17635e; border-color: #d5e9e5; }
.button-light:hover { background: #dcf0eb; }
.button-outline { border-color: rgba(255,255,255,.3); color: #fff; background: transparent; }
.button-ghost { color: #4f6472; background: transparent; border-color: var(--line); }
.button-ghost:hover { background: #f7fafb; border-color: #cbd8de; }
.button-small { padding: 7px 11px; font-size: 11px; border-radius: 7px; }
.button-wide { width: 100%; padding: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { min-height: 145px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 7px 25px rgba(31,59,75,.025); display: flex; flex-direction: column; align-items: flex-start; }
.stat-card:hover { border-color: #a7d9d1; transform: translateY(-2px); }
.stat-label { font-size: 12px; font-weight: 650; color: #516473; }
.stat-card strong { color: var(--navy); font-size: 34px; letter-spacing: -.04em; line-height: 1.2; margin: 12px 0 6px; }
.stat-hint { color: #8c9ba5; font-size: 11px; }
.stat-amber { background: linear-gradient(135deg, #fff, #fffaf1); }
.stat-blue { background: linear-gradient(135deg, #fff, #f3f9ff); }
.stat-green { background: linear-gradient(135deg, #fff, #f2fbf8); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 7px 28px rgba(31,59,75,.025); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 23px; }
.panel-heading h2, .status-panel h2 { margin: 0 0 4px; color: var(--navy); font-size: 16px; letter-spacing: -.015em; }
.panel-heading p, .status-panel p { margin: 0; font-size: 12px; }
.text-link { color: var(--teal); font-size: 12px; font-weight: 750; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.data-table th { padding: 11px 17px; background: #f8fafb; border-top: 1px solid #f0f3f4; border-bottom: 1px solid var(--line); color: #82919a; font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.data-table td { border-bottom: 1px solid #eff2f3; padding: 13px 17px; font-size: 12px; color: #4b5c68; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfd; }
.case-number { color: var(--teal-dark); font-weight: 750; }
.icon-link { display: inline-grid; place-items: center; height: 29px; width: 29px; background: #f0f7f6; color: var(--teal); border-radius: 8px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { background: #fff4df; color: #ad7413; }
.status-submitted { background: #eaf3ff; color: #3572b5; }
.status-disbursing { background: #e9f1f5; color: #4d7183; }
.status-approved { background: #e5f6ed; color: #27834e; }
.status-completed { background: #e5f6ed; color: #27834e; }
.status-declined { background: #fff0ed; color: #bb5545; }
.empty-state { min-height: 285px; padding: 47px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h3 { margin: 12px 0 5px; color: var(--navy); font-size: 17px; }
.empty-state p { max-width: 370px; margin: 0 0 17px; color: var(--muted); font-size: 12px; }
.empty-icon { display: grid; place-items: center; width: 47px; height: 47px; background: #eaf5f3; color: var(--teal); font-size: 25px; border-radius: 15px; }
.filter-bar { display: flex; align-items: center; gap: 9px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 180px; border: 1px solid #dce4e7; border-radius: 8px; padding: 0 11px; color: #8a9aa3; }
.search-field input { height: 38px; border: 0; outline: 0; width: 100%; color: var(--ink); background: transparent; }
.filter-select select, .inline-form select { height: 40px; border: 1px solid #dce4e7; border-radius: 8px; background: #fff; padding: 0 30px 0 11px; color: #516473; }
.pagination-bar { border-top: 1px solid var(--line); padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 11px; }
.pagination-bar nav { display: flex; align-items: center; gap: 5px; }
.pagination-bar nav a, .pagination-bar nav span { display: grid; place-items: center; min-width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0 7px; color: #536875; }
.pagination-bar nav [aria-current="page"] span { background: var(--navy); color: #fff; }
.flash { padding: 12px 15px; margin-bottom: 18px; border-radius: 9px; display: flex; align-items: center; gap: 9px; font-size: 12px; }
.flash-success { background: #e9f7ef; border: 1px solid #c9ead6; color: #267345; }
.flash-error { background: #fff2ef; border: 1px solid #f0d2cc; color: #9c483c; }
.flash-error span { opacity: .9; }
.toast-region { position: fixed; z-index: 1100; top: 88px; right: 20px; display: grid; gap: 10px; width: min(410px, calc(100vw - 32px)); pointer-events: none; }
.app-toast { display: grid; grid-template-columns: 34px minmax(0, 1fr) 28px; align-items: start; gap: 11px; padding: 14px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 38px rgba(16, 44, 67, .17); pointer-events: auto; opacity: 1; transform: translateX(0); transition: opacity .18s ease, transform .18s ease; }
.app-toast-success { border-left: 4px solid #2b9b62; }
.app-toast-error { border-left: 4px solid #c65445; }
.app-toast-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e8f6ed; color: #25804c; font-size: 15px; font-weight: 800; }
.app-toast-error .app-toast-icon { background: #fff0ed; color: #a94335; }
.app-toast-copy { min-width: 0; }
.app-toast-copy strong { display: block; margin: 1px 0 3px; color: var(--navy); font-size: 12px; }
.app-toast-copy p { margin: 0; color: #61717c; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.app-toast-close { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #71808d; font-size: 20px; line-height: 1; }
.app-toast-close:hover { background: #f1f4f5; color: var(--navy); }
.app-toast-leaving { opacity: 0; transform: translateX(12px); }
.application-form { display: grid; gap: 16px; }
.form-section { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 22px 24px 25px; box-shadow: 0 6px 24px rgba(31,59,75,.025); }
.section-heading { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 18px; margin-bottom: 19px; border-bottom: 1px solid #edf1f2; }
.section-number { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; color: var(--teal-dark); background: #e8f4f1; font-size: 10px; font-weight: 800; }
.section-heading h2 { margin: 0 0 3px; color: var(--navy); font-size: 17px; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 13px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; color: #435866; font-size: 11px; font-weight: 650; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; padding: 9px 10px; background: #fff; border: 1px solid #dfe7e9; border-radius: 7px; color: #233b4d; outline: 0; font-size: 12px; font-weight: 450; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 66px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-field:focus-within { border-color: #73bab0; box-shadow: 0 0 0 3px rgba(6,126,120,.09); }
.field input::placeholder { color: #a5b0b6; }
.field-span-2 { grid-column: span 2; }
.field-span-3 { grid-column: span 3; }
.required-mark { color: #d25a48; font-size: 12px; }
.field-error { color: #bb4d3e; font-size: 10px; font-weight: 550; }
.input-prefix { display: flex; align-items: center; border: 1px solid #dfe7e9; border-radius: 7px; padding-left: 10px; color: #84949d; font-size: 12px; }
.input-prefix:focus-within { border-color: #73bab0; box-shadow: 0 0 0 3px rgba(6,126,120,.09); }
.input-prefix input { border: 0; box-shadow: none !important; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.source-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice-card { position: relative; display: flex; align-items: flex-start; gap: 8px; min-height: 39px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: #435967; font-size: 11px; line-height: 1.4; cursor: pointer; }
.choice-card:hover { background: #f8fcfb; border-color: #b7dad5; }
.choice-card input, .checklist-line input, .consent-line input { accent-color: var(--teal); flex: none; margin: 1px 0 0; }
.applicant-columns, .checklist-columns, .reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.applicant-card, .reference-card, .detail-card, .checklist-card { background: #fbfcfc; border: 1px solid #e7edef; border-radius: 10px; padding: 15px; min-width: 0; }
.applicant-card .form-grid { gap: 12px 10px; }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 13px; }
.subsection-heading h3, .checklist-card h3, .detail-card h3 { margin: 0; color: var(--navy); font-size: 12px; }
.subtle-tag { border-radius: 99px; background: #e9f5f3; color: #327b74; padding: 4px 8px; font-size: 9px; font-weight: 700; }
.top-gap { margin-top: 18px; }
.checklist-card h3 { margin-bottom: 12px; }
.checklist-line { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; color: #4e626e; font-size: 11px; line-height: 1.45; }
.checklist-line + .checklist-line { border-top: 1px solid #edf1f2; }
.check-display { display: grid; place-items: center; min-width: 17px; height: 17px; border-radius: 5px; background: #eef2f3; color: #8b999f; font-size: 10px; }
.check-display.checked { background: #def2e7; color: #27804d; }
.notice-box { padding: 14px 16px; border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0; background: #f2f8f7; color: #526771; font-size: 11px; }
.consent-line { display: flex; align-items: flex-start; gap: 9px; margin-top: 19px; padding: 12px; border: 1px solid #e7edef; border-radius: 8px; color: #485e6b; font-size: 11px; }
.form-actions { position: sticky; bottom: 0; z-index: 2; padding: 13px 17px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.96); box-shadow: 0 -6px 25px rgba(29,55,69,.06); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.form-actions > div { display: flex; gap: 8px; }
.back-link { display: inline-block; margin-bottom: 12px; color: #647984; font-size: 11px; font-weight: 650; }
.detail-heading { align-items: center; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.summary-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 1px; margin-bottom: 17px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.summary-strip > div { min-width: 0; display: flex; flex-direction: column; gap: 5px; background: #fff; padding: 15px 17px; }
.summary-strip span, .detail-grid span, .detail-list dt { color: #88969e; font-size: 10px; }
.summary-strip strong { overflow-wrap: anywhere; color: var(--navy); font-size: 12px; }
.detail-panel { margin-bottom: 16px; padding-bottom: 19px; }
.detail-panel > .panel-heading { border-bottom: 1px solid #eff2f3; margin-bottom: 16px; }
.lock-label { padding: 5px 9px; background: #eef8f5; border-radius: 99px; color: #367b6d; font-size: 10px; font-weight: 700; }
.detail-list { margin: 4px 0 0; }
.detail-list > div { display: grid; grid-template-columns: minmax(115px, .85fr) minmax(0, 1.15fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid #edf1f2; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dd { margin: 0; color: #344b5a; font-size: 11px; overflow-wrap: anywhere; }
.detail-card h3 { margin-bottom: 9px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 20px; padding: 0 22px; }
.detail-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-grid strong { color: #344b5a; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.source-list { margin: 15px 20px 0; padding-top: 13px; border-top: 1px solid #edf1f2; color: #455a67; font-size: 11px; }
.status-panel { margin: 0 0 16px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.login-shell { display: grid; grid-template-columns: 1fr .92fr; min-height: 540px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.login-art { position: relative; overflow: hidden; min-height: 540px; display: flex; flex-direction: column; justify-content: center; padding: clamp(35px, 7vw, 90px); background: radial-gradient(circle at 15% 92%, rgba(213,237,136,.16), transparent 34%), linear-gradient(145deg, #102c43, #1a4b5b); color: #fff; }
.login-art::after { content: ""; position: absolute; width: 370px; height: 370px; right: -160px; top: -125px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.03), 0 0 0 74px rgba(255,255,255,.025); }
.login-art .eyebrow { color: var(--lime); }
.login-logo { position: relative; z-index: 1; display: block; width: 94px; height: 94px; margin: 0 0 21px; border: 4px solid rgba(255,255,255,.95); border-radius: 50%; background: #fff; object-fit: cover; box-shadow: 0 9px 24px rgba(0,0,0,.13); }
.login-art h1 { position: relative; z-index: 1; margin: 5px 0 16px; font-size: clamp(35px, 4.7vw, 58px); line-height: 1.03; letter-spacing: -.055em; }
.login-art > p:not(.eyebrow) { max-width: 345px; color: #cad8df; font-size: 13px; }
.login-art-note { margin-top: 80px; color: #acc1cb; font-size: 10px; letter-spacing: .03em; }
.login-card { align-self: center; padding: clamp(30px, 6vw, 70px); }
.login-card h2 { margin: 5px 0 6px; color: var(--navy); font-size: 24px; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 25px; font-size: 12px; }
.stack-form { display: grid; gap: 15px; }
.stack-form .field { gap: 8px; }
.stack-form .field input { min-height: 43px; }
.checkbox-line { display: flex; align-items: center; gap: 8px; color: #61737e; font-size: 11px; }
.checkbox-line input { accent-color: var(--teal); }
.login-footnote { margin-top: 20px !important; font-size: 10px !important; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.print-toolbar { display: flex; align-items: center; justify-content: space-between; margin: -12px 0 15px; }
.paper-document, .receipt-document { width: min(900px, 100%); margin: 0 auto; padding: 42px 48px; background: #fff; border: 1px solid #e5eaed; box-shadow: var(--shadow); color: #263b4a; font-family: Arial, sans-serif; font-size: 10px; }
.paper-header, .receipt-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 13px; border-bottom: 2px solid var(--navy); }
.paper-logo { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #fff; }
.paper-brand { color: var(--navy); font-size: 25px; font-weight: 900; letter-spacing: -.08em; }
.paper-brand span { color: var(--teal); font-size: 12px; letter-spacing: .1em; }
.paper-company { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: #5f707a; font-size: 9px; }
.paper-company strong { color: var(--navy); font-size: 11px; }
.paper-title { text-align: center; margin: 15px 0 8px; color: var(--navy); font-size: 17px; letter-spacing: .04em; }
.paper-meta { display: flex; justify-content: space-between; gap: 10px; padding: 7px 9px; background: #f4f7f8; font-size: 9px; }
.paper-section-title { margin: 18px 0 8px; padding: 6px 8px; background: var(--navy); color: #fff; font-size: 9px; letter-spacing: .045em; }
.paper-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px 8px; padding: 6px 4px; font-size: 9px; }
.paper-row { display: flex; gap: 8px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid #e5eaed; font-size: 9px; }
.paper-table { width: 100%; border-collapse: collapse; font-size: 8.5px; }
.paper-table td, .paper-table th { padding: 4px 5px; border: 1px solid #dce3e6; text-align: left; vertical-align: top; }
.paper-table thead th { background: #eff4f5; color: var(--navy); }
.paper-table tbody th { width: 28%; background: #fafbfb; font-weight: 600; }
.paper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; font-size: 9px; }
.paper-grid > div { padding: 4px 5px; border-bottom: 1px solid #e8edef; overflow-wrap: anywhere; }
.paper-grid > div strong { color: var(--navy); }
.paper-grid > div > span { display: block; padding-top: 3px; }
.reference-print-grid > div > strong { display: block; margin-bottom: 3px; }
.paper-subtitle { margin: 12px 0 7px; color: var(--navy); font-size: 10px; }
.paper-signatures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.paper-signatures > div { min-height: 42px; padding-top: 21px; border-top: 1px solid #8b999e; text-align: center; color: #5a6b75; font-size: 8px; }
.signature-line { min-height: 14px; border-bottom: 1px solid #dce3e6; margin-top: 5px; }
.legal-list { padding-left: 18px; margin: 7px 0; color: #435560; font-size: 8px; }
.legal-list li { padding: 2px 0; }
.paper-disclaimer { padding: 6px 8px; background: #fff9e8; color: #796631; font-size: 8px; }
.paper-footer { padding-top: 8px; margin-top: 13px; border-top: 1px solid #dce3e6; color: #64747d; text-align: center; font-size: 8px; }
.receipt-document { max-width: 740px; min-height: 700px; padding: 40px 48px; }
.receipt-header > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 10px; color: #5d6d75; }
.receipt-header > div:last-child strong { color: var(--navy); font-size: 12px; }
.receipt-title { position: relative; text-align: center; padding: 25px 0 19px; }
.receipt-title h1 { margin: 0; color: var(--navy); font-size: 25px; }
.receipt-number { display: inline-block; margin-top: 7px; color: var(--teal-dark); font-weight: 700; }
.receipt-thanks { margin: 14px 0 20px; font-size: 13px; }
.receipt-amount { display: flex; justify-content: space-between; align-items: center; padding: 17px; background: #f4f8f7; border: 1px solid #dfe9e6; border-radius: 9px; }
.receipt-amount span, .receipt-words span, .receipt-details span { color: #73818a; font-size: 10px; }
.receipt-amount strong { color: var(--navy); font-size: 19px; }
.receipt-words { display: flex; flex-direction: column; gap: 5px; padding: 14px 3px; border-bottom: 1px solid #e7ecee; }
.receipt-words strong { color: #344c5b; font-size: 12px; }
.receipt-mode { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 15px 0; border-bottom: 1px solid #e7ecee; }
.receipt-mode > span { width: 100%; color: #73818a; font-size: 10px; }
.receipt-mode label { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.receipt-box { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1px solid #87979e; }
.receipt-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; padding: 17px 0; }
.receipt-details > div { display: flex; flex-direction: column; gap: 4px; }
.receipt-details strong { color: #344c5b; font-size: 11px; }
.receipt-signature { width: 245px; min-height: 85px; margin: 30px 0 8px auto; padding-top: 65px; border-top: 1px solid #77868d; text-align: center; color: #687780; font-size: 9px; }
.receipt-footnote { padding: 10px; background: #fff9e8; color: #796631; font-size: 9px; }
.create-user-form { padding: 0 23px 21px; border-bottom: 1px solid var(--line); }
.create-user-form .subsection-heading { padding-top: 3px; }
.create-user-form .row { margin-top: 0; }
.create-user-form .field { height: 100%; }
.create-user-form .field input, .create-user-form .field select { min-width: 0; }
.staff-list { display: grid; gap: 12px; padding: 18px 21px 22px; }
.staff-card { min-width: 0; padding: 16px; border: 1px solid #e5edef; border-radius: 11px; background: #fbfdfd; }
.staff-card-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.staff-avatar { width: 37px; height: 37px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #e5f2f0; color: var(--teal-dark); font-weight: 800; }
.staff-identity { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.staff-identity strong { color: var(--navy); font-size: 12px; }
.staff-identity > span { overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.staff-edit-form { padding-top: 13px; border-top: 1px solid #e9eff0; }
.staff-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; min-height: 60px; }
.self-account-note { padding: 9px 0; font-size: 10px; }
.admin-applications-panel { margin-top: 17px; }
.admin-applications-panel .panel-heading { border-bottom: 1px solid #eff2f3; }
.pagination-bar > nav { flex: none; }
.status-active { background: #e5f6ed; color: #27834e; }
.button-danger { background: #fff0ed; border-color: #f2d7d1; color: #a94335; }
.button-danger:hover { background: #ffe6e1; }
.profile-stat-grid { margin-bottom: 18px; }
.directory-panel { margin-bottom: 20px; }
.directory-panel > .panel-heading { border-bottom: 1px solid #eff2f3; }
.directory-filter { border-bottom: 1px solid var(--line); }
.directory-table .profile-person { display: inline-flex; align-items: center; gap: 10px; }
.profile-person > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.profile-person strong { color: var(--navy); font-size: 12px; }
.profile-person small { color: var(--muted); font-size: 10px; }
.profile-person:hover strong { color: var(--teal-dark); }
.profile-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; margin-bottom: 17px; }
.profile-hero-identity { display: flex; align-items: center; gap: 17px; min-width: 0; }
.profile-avatar { width: 66px; height: 66px; flex: none; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(145deg, #e2f1ee, #edf5f4); color: var(--teal-dark); font-size: 26px; font-weight: 800; }
.profile-hero h2 { margin: 3px 0; color: var(--navy); font-size: 21px; letter-spacing: -.025em; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.profile-hero-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); gap: 16px; margin-bottom: 17px; }
.profile-detail-card, .profile-activity-card { padding: 21px; }
.profile-detail-card h2, .profile-activity-card h2 { margin: 5px 0 15px; color: var(--navy); font-size: 17px; }
.profile-facts { margin: 0; }
.profile-facts > div { display: grid; grid-template-columns: minmax(105px, .7fr) minmax(0, 1.3fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1f2; }
.profile-facts > div:last-child { border-bottom: 0; }
.profile-facts dt { color: #83919a; font-size: 11px; font-weight: 500; }
.profile-facts dd { margin: 0; color: #344b5a; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.profile-activity-card { display: flex; flex-direction: column; align-items: flex-start; }
.profile-activity-card h2 { margin-bottom: 4px; font-size: 25px; }
.profile-activity-card p { margin: 0 0 17px; font-size: 11px; }
.profile-applications-panel .panel-heading { border-bottom: 1px solid #eff2f3; }
.staff-form-panel { max-width: 900px; }
.staff-form-panel > .panel-heading { border-bottom: 1px solid #eff2f3; }
.staff-account-form { padding: 23px; }
.staff-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.staff-form-grid .field { min-width: 0; }
.staff-form-grid .field input, .staff-form-grid .field select { min-height: 43px; }
.staff-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid #edf1f2; }

@media (max-width: 900px) {
    .topbar { padding: 12px 20px; flex-wrap: wrap; gap: 10px 18px; }
    .brand { min-width: 0; }
    .topnav { order: 3; width: 100%; margin: 0; }
    .user-menu { margin-left: auto; border-left: 0; padding: 0; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-strip { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: 1fr; }
    .login-art { min-height: 310px; padding: 40px; }
    .login-art h1 { font-size: 42px; }
    .login-art-note { margin-top: 25px; }
    .login-card { justify-self: center; width: min(520px, 100%); }
}
@media (max-width: 620px) {
    .toast-region { top: 12px; right: 12px; width: calc(100vw - 24px); }
    .page-shell { width: min(100% - 24px, 1180px); margin-top: 23px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
    .page-heading > .button { width: 100%; }
    .topnav { flex-wrap: nowrap; gap: 16px; overflow-x: auto; overflow-y: hidden; padding: 1px 0 5px; scrollbar-width: thin; }
    .topnav > a:not(.button) { flex: none; white-space: nowrap; }
    .topnav .desktop-new-application { display: none; }
    .user-menu > span { display: none; }
    .stat-grid { gap: 9px; }
    .stat-card { min-height: 125px; padding: 14px; }
    .stat-card strong { font-size: 29px; }
    .panel-heading { padding: 16px; }
    .filter-bar { flex-wrap: wrap; }
    .search-field { flex-basis: 100%; }
    .filter-select { flex: 1; }
    .filter-select select { width: 100%; }
    .applicant-columns, .checklist-columns, .reference-grid { grid-template-columns: 1fr; }
    .form-grid, .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
    .field-span-2, .field-span-3 { grid-column: auto; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-section { padding: 17px 14px; }
    .form-actions { align-items: stretch; flex-direction: column; }
    .form-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
    .form-actions > div .button-primary { grid-column: span 2; }
    .summary-strip { grid-template-columns: 1fr 1fr; }
    .summary-strip > div { padding: 12px; }
    .detail-heading .heading-actions { justify-content: flex-start; }
    .detail-grid { grid-template-columns: 1fr 1fr; padding: 0 15px; gap: 12px; }
    .status-panel { align-items: flex-start; flex-direction: column; }
    .inline-form { width: 100%; }
    .inline-form select { flex: 1; min-width: 0; }
    .login-shell { min-height: 0; }
    .login-art { min-height: 270px; padding: 28px; }
    .login-art h1 { font-size: 37px; }
    .login-card { padding: 27px 23px; }
    .paper-document, .receipt-document { width: 100%; padding: 22px 16px; }
    .paper-company { font-size: 7px; }
    .paper-logo { width: 58px; height: 58px; }
    .paper-product-grid { grid-template-columns: repeat(2, 1fr); }
    .paper-grid { grid-template-columns: 1fr; }
    .paper-signatures { grid-template-columns: repeat(2, 1fr); }
    .paper-meta { flex-wrap: wrap; }
    .receipt-details { grid-template-columns: 1fr; }
    .create-user-form { padding: 0 15px 17px; }
    .create-user-form .subsection-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .create-user-form .row { --bs-gutter-x: 1rem; --bs-gutter-y: .8rem; }
    .staff-list { padding: 14px 12px; }
    .staff-card { padding: 12px; }
    .staff-card-heading { align-items: flex-start; flex-wrap: wrap; }
    .staff-card-heading .status { margin-left: 48px; }
    .staff-actions { align-items: stretch; }
    .staff-actions .button { flex: 1; }
    .pagination-bar { align-items: flex-start; flex-direction: column; }
    .pagination-bar > nav { flex-wrap: wrap; }
    .profile-hero { align-items: flex-start; flex-direction: column; padding: 18px; }
    .profile-detail-grid { grid-template-columns: 1fr; }
    .profile-detail-card, .profile-activity-card { padding: 17px; }
    .staff-account-form { padding: 17px; }
    .staff-form-grid { grid-template-columns: 1fr; gap: 14px; }
    .staff-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .staff-form-actions .button { width: 100%; }
    .directory-filter .button { flex: 1; }
}
@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff; color: #111; font-size: 9pt; }
    .topbar, .site-footer, .print-toolbar, .flash, .toast-region { display: none !important; }
    .page-shell { width: 100%; margin: 0; min-height: 0; }
    .paper-document, .receipt-document { width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; border: 0; box-shadow: none; }
    .paper-section-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .paper-header, .paper-meta, .paper-grid, .paper-table, .paper-signatures, .legal-list, .receipt-document { break-inside: avoid; }
    .paper-table { font-size: 7pt; }
    .paper-table td, .paper-table th { padding: 3px 4px; }
    .paper-section-title { break-after: avoid; }
    .receipt-document { page-break-before: auto; }
    a { color: inherit; }
}
