:root {
    --ink: #17231f;
    --muted: #64716c;
    --paper: #f5f3ec;
    --cream: #ece8dc;
    --green: #174d3b;
    --green-light: #dce9df;
    --lime: #b8d986;
    --orange: #e3783b;
    --line: #d8d4c8;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
button, input, select { font: inherit; }
main h1:focus { outline: none; }

.site-header {
    min-height: 76px;
    padding: 0 6vw;
    display: flex;
    align-items: center;
    gap: 36px;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 243, 236, .94);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand span { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 12px; font-size: 1.25rem; }
.brand img { width: 38px; height: 38px; display: block; object-fit: cover; border-radius: 12px; }
.brand strong { font-family: Georgia, serif; font-size: 1.15rem; }
.primary-nav { display: flex; align-items: center; gap: 22px; min-width: 0; }
.primary-nav a { color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.primary-nav a.active, .primary-nav a:hover { color: var(--green); }
.header-cta { text-decoration: none; background: var(--ink); color: white; border-radius: 999px; padding: 11px 18px; font-size: .86rem; font-weight: 700; }
.header-button { border: 0; cursor: pointer; }
.header-user { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; margin-right: 16px; line-height: 1.2; }
.header-user strong { font-size: .86rem; color: var(--ink); }
.header-user small { color: var(--muted); font-size: .72rem; margin-top: 3px; }
.apartment-platform-fee { display: flex; align-items: end; gap: 10px; margin-left: auto; }
.apartment-platform-fee label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; color: var(--muted); }
.apartment-platform-fee input { width: 120px; }
.apartment-platform-fee small { color: var(--muted); white-space: nowrap; }
@media (max-width: 720px) { .apartment-platform-fee { flex-wrap: wrap; margin-left: 0; } .header-user { align-items: flex-start; margin-left: 0; } }
.login-shell { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 64px 6vw; background: radial-gradient(circle at 75% 20%, rgba(184, 217, 134, .3), transparent 28rem); }
.login-card { width: min(460px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: 0 26px 70px rgba(35, 46, 40, .1); }
.login-brand-logo { width: min(100%, 330px); height: auto; margin-bottom: 26px; display: block; }
.login-card h1 { margin: 14px 0 10px; font-family: Georgia, serif; font-size: 3rem; font-weight: 500; }
.login-card > p { color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.login-card label { display: flex; flex-direction: column; gap: 9px; color: #48534f; font-size: .82rem; font-weight: 700; }
.login-card input { width: 100%; border: 1px solid #d8ddd9; border-radius: 11px; padding: 14px; font-size: 1.05rem; outline: none; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 77, 59, .08); }
.development-otp { margin-top: 18px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-radius: 11px; background: var(--green-light); }
.development-otp span { color: var(--green); font-size: .78rem; font-weight: 700; }
.development-otp strong { font: 800 1.25rem monospace; letter-spacing: .16em; }
.text-button { width: 100%; margin-top: 14px; border: 0; color: var(--green); background: transparent; cursor: pointer; font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.dashboard-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.dashboard-grid span { display: block; margin-bottom: 14px; color: var(--muted); font-size: .78rem; }
.dashboard-grid strong { font-family: Georgia, serif; font-size: 1.8rem; }
.apartment-flats { margin-top: 26px; }
.admin-grid, .records-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.records-grid { margin-top: 2px; }
.admin-grid .form-card { height: 100%; }
.field-grid select { width: 100%; border: 1px solid #d8ddd9; border-radius: 10px; padding: 12px 13px; color: var(--ink); background: #fbfcfa; outline: none; }
.field-grid select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 77, 59, .08); }
.inline-message { margin: 18px 0 0; padding: 11px 13px; color: var(--green); background: var(--green-light); border-radius: 9px; font-size: .82rem; }
.resident-list { margin-top: 28px; border-top: 1px solid var(--line); }
.resident-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.resident-list > div > span:first-child { display: flex; flex-direction: column; gap: 5px; }
.resident-list small { color: var(--muted); }
.resident-badge { flex: none; color: var(--green); background: var(--green-light); border-radius: 99px; padding: 6px 9px; font-size: .72rem; font-weight: 800; }
.resident-row { display: grid !important; grid-template-columns: minmax(155px, .8fr) minmax(0, 2.2fr); align-items: start; gap: 22px; padding: 20px 4px !important; }
.resident-identity { min-width: 0; }
.resident-identity strong { overflow-wrap: anywhere; }
.resident-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.resident-row .resident-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
.resident-row .resident-badge { grid-column: 1 / -1; justify-self: start; margin-bottom: 2px; }
.resident-row .compact-button { width: 100%; min-height: 46px; white-space: normal; text-align: center; line-height: 1.2; }
.resident-row .compact-button:last-child:nth-child(even) { grid-column: 1 / -1; }
.resident-row .file-button { position: relative; overflow: hidden; }
.resident-row .file-button input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.finance-card { margin: 26px 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.section-heading .form-subtitle { margin-bottom: 0; }
.due-list, .payment-list { margin-top: 26px; border-top: 1px solid var(--line); }
.due-list article, .payment-list article { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; align-items: center; gap: 20px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.due-list article > div:first-child, .payment-list article > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.due-list span, .payment-list span { color: var(--muted); font-size: .8rem; }
.due-amount { display: flex; align-items: flex-end; flex-direction: column; gap: 6px; }
.status-pill { display: inline-flex; width: fit-content; color: var(--green) !important; background: var(--green-light); border-radius: 99px; padding: 5px 8px; font-size: .68rem !important; font-weight: 800; }
.compact-button { padding: 9px 13px; font-size: .75rem; }
.reminder-actions { margin-top: 20px; padding: 18px; border-radius: 14px; background: #f7f8f5; }
.reminder-actions > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.reminder-actions > div > span:last-child { display: flex; gap: 8px; }
.upi-panel { margin-top: 22px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: white; background: var(--green); border-radius: 16px; }
.upi-panel .eyebrow { color: var(--lime); }
.upi-panel h3 { margin: 8px 0 0; }
.receipt-shell { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 64px 6vw; }
.receipt-card { width: min(780px, 100%); padding: clamp(28px, 5vw, 56px); border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: 0 24px 60px rgba(35, 46, 40, .08); }
.receipt-heading { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.receipt-heading h1 { margin: 10px 0; font-family: Georgia, serif; font-size: 2.5rem; font-weight: 500; }
.receipt-heading p { max-width: 430px; margin: 0; color: var(--muted); }
.receipt-heading > div:last-child { text-align: right; }
.receipt-heading small { display: block; margin-bottom: 8px; color: var(--muted); }
.receipt-heading > div:last-child strong { font: 700 .78rem monospace; overflow-wrap: anywhere; }
.receipt-amount { padding: 34px 0; display: flex; align-items: center; justify-content: space-between; }
.receipt-amount span { color: var(--muted); }
.receipt-amount strong { font-family: Georgia, serif; font-size: 3rem; }
.receipt-card dl { margin: 0; }
.receipt-card dl div { display: flex; justify-content: space-between; gap: 24px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.receipt-card dt { color: var(--muted); }
.receipt-card dd { margin: 0; text-align: right; font-weight: 700; }
.receipt-note { margin: 28px 0; color: var(--muted); font-size: .8rem; }
.receipt-actions { display: flex; justify-content: flex-end; gap: 10px; }
.expense-card { margin: 26px 0; }
.expense-export-toolbar { display: grid; grid-template-columns: minmax(135px, 1fr) minmax(135px, 1fr) auto; align-items: end; gap: 10px; min-width: min(100%, 410px); }
.expense-export-toolbar label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.expense-export-toolbar input { min-width: 0; box-sizing: border-box; }
.expense-list { margin-top: 26px; border-top: 1px solid var(--line); }
.expense-list article { display: grid; grid-template-columns: minmax(240px, 1fr) max-content minmax(230px, auto); align-items: center; gap: 14px 18px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.expense-list article > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.expense-list article span, .expense-list article small { color: var(--muted); }
.expense-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.expense-approval-progress { color: #45606a !important; font-weight: 700; }
.expense-rejection-note { color: #a9422a !important; font-weight: 700; }
.expense-review-input { width: 100%; min-width: 230px; border: 1px solid #d8ddd9; border-radius: 10px; padding: 10px 12px; color: var(--ink); background: #fbfcfa; outline: none; }
.expense-resubmission { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto; align-items: end; gap: 12px; padding: 14px; border: 1px solid #d8ddd9; border-radius: 12px; background: #f7f8f5; }
.expense-resubmission label { display: flex; flex-direction: column; gap: 7px; color: #48534f; font-size: .79rem; font-weight: 700; }
.expense-resubmission input { width: 100%; box-sizing: border-box; }
.transparency-grid { margin: 26px 0; }
.statement-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.statement-summary div { padding: 14px; border-radius: 12px; background: #f7f8f5; }
.statement-summary span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .72rem; }
.statement-list, .audit-list { border-top: 1px solid var(--line); }
.statement-list > div, .audit-list > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.statement-list span:first-child, .audit-list span:first-child { display: flex; flex-direction: column; gap: 5px; }
.statement-list small, .audit-list small, .audit-list time { color: var(--muted); font-size: .72rem; }
.statement-list .credit { color: var(--green); }
.statement-list .debit { color: #a9422a; }
.platform-admin-grid { margin: 26px 0; }
.platform-dues-card { margin-top: 26px; }
.revenue-list { margin-top: 20px; }
.platform-due-list { border-top: 1px solid var(--line); }
.platform-due-row { display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(230px, .9fr) auto; align-items: center; gap: 16px; padding: 18px 2px; border-bottom: 1px solid var(--line); }
.platform-due-main { display: flex; flex-direction: column; gap: 6px; }
.platform-due-main span, .paid-detail { color: var(--muted); font-size: .78rem; }
.administrator-select { width: 100%; border: 1px solid #d8ddd9; border-radius: 10px; padding: 10px 12px; color: var(--ink); background: #fbfcfa; }
.platform-due-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.platform-reminder-panel { margin: 0 0 26px; border-color: #f1c986; background: #fffaf0; box-shadow: none; }
.platform-reminder-list { display: grid; gap: 12px; margin-top: 20px; }
.platform-reminder-list article { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 15px; border-radius: 12px; background: white; border: 1px solid #efe3c9; }
.platform-reminder-list p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
.platform-reminder-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; color: var(--muted); font-size: .74rem; }

.hero-shell {
    min-height: calc(100vh - 76px);
    padding: 10vh 8vw 9vh;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    align-items: center;
    gap: 8vw;
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 18%, rgba(184, 217, 134, .34), transparent 23rem),
        linear-gradient(135deg, var(--paper), #f7f5ef);
}

.hero-copy { max-width: 760px; }
.eyebrow { color: var(--orange); text-transform: uppercase; letter-spacing: .15em; font-size: .74rem; font-weight: 800; }
.hero-copy h1, .onboarding-intro h1 { margin: 24px 0; font-family: Georgia, serif; font-size: clamp(3rem, 6.5vw, 6.6rem); line-height: .96; letter-spacing: -.055em; font-weight: 500; }
.hero-copy h1 em { color: var(--green); font-weight: 500; }
.hero-copy > p { max-width: 650px; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin: 34px 0 30px; }
.button { border: 0; border-radius: 999px; padding: 14px 21px; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; cursor: pointer; font-weight: 750; }
.button-primary { background: var(--green); color: white; box-shadow: 0 12px 26px rgba(23, 77, 59, .18); }
.button-primary:hover { background: #103e2f; }
.button-secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.button-danger { background: #a23b3b; border: 1px solid #a23b3b; color: #fff; }
.button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(23, 77, 59, .28); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .58; box-shadow: none; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: .78rem; }

.balance-card {
    padding: 30px;
    color: white;
    border-radius: 30px;
    background: var(--green);
    box-shadow: 0 36px 80px rgba(23, 50, 40, .25);
    transform: rotate(2deg);
    position: relative;
}
.balance-card::before { content: ""; position: absolute; inset: -14px 18px 14px -18px; z-index: -1; border-radius: 30px; border: 1px solid rgba(23, 77, 59, .25); transform: rotate(-4deg); }
.card-topline { display: flex; justify-content: space-between; margin-bottom: 44px; font-size: .88rem; }
.live-pill { padding: 5px 10px; background: rgba(255,255,255,.12); border-radius: 99px; color: var(--lime); }
.balance-card small { display: block; color: #bfcec8; }
.balance-card > strong { display: block; font-family: Georgia, serif; font-size: clamp(3rem, 5vw, 5.4rem); margin: 8px 0 34px; font-weight: 500; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; gap: 20px; }
.mini-stats div { display: flex; flex-direction: column; gap: 7px; }
.mini-stats span, .balance-card p { color: #bfcec8; font-size: .78rem; }
.mini-stats b { font-size: 1.15rem; }
.mini-stats .warm { color: #fac092; }
.progress-track { height: 7px; background: rgba(255,255,255,.12); border-radius: 10px; margin-top: 26px; overflow: hidden; }
.progress-track span { display: block; width: 80%; height: 100%; background: var(--lime); }
.balance-card p { margin: 9px 0 0; }

.feature-section { padding: 100px 8vw; background: var(--cream); }
.feature-section > div:first-child { display: grid; grid-template-columns: .6fr 1.4fr; align-items: start; margin-bottom: 58px; }
.feature-section h2 { margin: 0; max-width: 720px; font-family: Georgia, serif; font-size: clamp(2.2rem, 4vw, 4.2rem); line-height: 1.05; font-weight: 500; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #c9c4b7; }
.feature-grid article { padding: 34px 32px 20px 0; border-right: 1px solid #c9c4b7; }
.feature-grid article + article { padding-left: 32px; }
.feature-grid article:last-child { border: 0; }
.feature-grid article > span { color: var(--orange); font: 700 .76rem monospace; }
.feature-grid h3 { font-family: Georgia, serif; font-size: 1.55rem; margin: 38px 0 12px; }
.feature-grid p { color: var(--muted); line-height: 1.65; margin: 0; }

.onboarding-shell { min-height: calc(100vh - 76px); padding: 56px 8vw 90px; display: grid; grid-template-columns: minmax(260px, .65fr) minmax(520px, 1.35fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.onboarding-intro { position: sticky; top: 132px; }
.back-link { display: inline-flex; margin-bottom: 38px; color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 750; }
.back-link:hover { color: var(--green); }
.onboarding-intro h1 { font-size: clamp(3rem, 5vw, 5.4rem); }
.onboarding-intro > p { color: var(--muted); line-height: 1.7; max-width: 420px; }
.step-list { list-style: none; padding: 0; margin: 44px 0; display: grid; gap: 22px; color: #9ca49f; font-weight: 650; }
.step-list li { display: flex; align-items: center; gap: 13px; }
.step-list span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #c9cec9; border-radius: 50%; font-size: .75rem; }
.step-list .active { color: var(--green); }
.step-list .active span { color: white; background: var(--green); border-color: var(--green); }

.form-card { background: white; border: 1px solid var(--line); border-radius: 24px; padding: clamp(26px, 4vw, 48px); box-shadow: 0 24px 60px rgba(35, 46, 40, .08); }
.platform-shell { min-height: calc(100vh - 76px); padding: 72px 8vw 100px; }
.platform-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; }
.platform-heading h1 { margin: 12px 0; font-family: Georgia, serif; font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 500; letter-spacing: -.045em; }
.platform-heading p, .platform-state, .platform-empty p { color: var(--muted); line-height: 1.65; max-width: 680px; }
.apartment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.apartment-grid article, .platform-empty { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 18px 42px rgba(35, 46, 40, .06); }
.apartment-grid h2, .platform-empty h2 { margin: 18px 0 10px; font-family: Georgia, serif; font-size: 1.75rem; }
.apartment-grid article > p { min-height: 48px; color: var(--muted); line-height: 1.5; }
.apartment-status { color: var(--green); background: var(--green-light); border-radius: 99px; padding: 6px 10px; font-size: .72rem; font-weight: 800; }
.apartment-grid dl { margin: 24px 0 0; border-top: 1px solid var(--line); }
.apartment-grid dl div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.apartment-grid dt { color: var(--muted); }
.apartment-grid dd { margin: 0; text-align: right; font-weight: 700; }
.form-card h2 { font-family: Georgia, serif; font-size: 2rem; margin: 0 0 8px; }
.form-card h3 { margin: 36px 0 18px; font-size: 1rem; }
.chart-panel { min-width: 0; }
.chart-shell { width: 100%; min-height: 260px; overflow: hidden; }
.form-subtitle { color: var(--muted); font-size: .88rem; margin: 0 0 28px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field-grid.compact { margin-top: 24px; }
.field-grid label { display: flex; flex-direction: column; gap: 8px; color: #48534f; font-size: .79rem; font-weight: 700; }
.field-grid label.wide { grid-column: 1 / -1; }
.field-grid input { width: 100%; border: 1px solid #d8ddd9; border-radius: 10px; padding: 12px 13px; color: var(--ink); background: #fbfcfa; outline: none; }
.field-grid input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 77, 59, .08); }
.submit-button { margin-top: 26px; width: 100%; }
.submit-button:disabled { opacity: .65; cursor: wait; }
.validation-message, .validation-errors, .form-error { color: #a9422a; font-size: .8rem; }
.form-error { padding: 11px 13px; border-radius: 9px; background: #fff0eb; }
.success-banner { display: flex; gap: 14px; padding: 18px; background: var(--green-light); border-radius: 14px; }
.success-banner > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); }
.success-banner p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.flat-list { margin-top: 28px; border-top: 1px solid var(--line); }
.flat-list > div { display: flex; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.flat-list small { color: var(--muted); }

footer { padding: 28px 8vw; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: .77rem; }

#blazor-error-ui { color-scheme: light only; background: #fff2cc; bottom: 0; box-shadow: 0 -1px 3px rgba(0,0,0,.2); box-sizing: border-box; display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.loading-progress { position: relative; display: block; width: 8rem; height: 8rem; margin: 20vh auto 1rem; }
.loading-progress circle { fill: none; stroke: #d6d6d6; stroke-width: .6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--green); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%; transition: stroke-dasharray .05s ease-in-out; }
.loading-progress-text { text-align: center; color: var(--muted); }
.loading-overlay { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 24px; background: rgba(23, 35, 31, .26); backdrop-filter: blur(3px); }
.loading-overlay-card { display: inline-flex; align-items: center; gap: 12px; padding: 16px 20px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(23, 35, 31, .18); font-size: .88rem; font-weight: 750; }
.loading-spinner { width: 18px; height: 18px; border: 3px solid var(--green-light); border-top-color: var(--green); border-radius: 50%; animation: loading-spin .8s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
    .site-header { padding: 0 5vw; }
    .primary-nav { order: 3; width: 100%; overflow-x: auto; padding: 0 0 12px; }
    .site-header { flex-wrap: wrap; padding-top: 14px; }
    .hero-shell { grid-template-columns: 1fr; padding-top: 70px; }
    .balance-card { max-width: 520px; transform: none; }
    .feature-section > div:first-child, .onboarding-shell { grid-template-columns: 1fr; }
    .onboarding-intro { position: static; }
    .step-list { grid-template-columns: repeat(3, 1fr); }
    .step-list li { align-items: flex-start; font-size: .75rem; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .admin-grid, .records-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .site-header { gap: 12px; }
    .header-user { display: none; }
    .hero-shell { padding: 54px 6vw 70px; }
    .hero-copy h1 { font-size: 3.35rem; }
    .trust-row { display: grid; }
    .feature-section, .onboarding-shell, .platform-shell { padding-left: 6vw; padding-right: 6vw; }
    .platform-heading { align-items: flex-start; flex-direction: column; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-grid article, .feature-grid article + article { border-right: 0; border-bottom: 1px solid #c9c4b7; padding: 28px 0; }
    .field-grid { grid-template-columns: 1fr; }
    .field-grid label.wide { grid-column: auto; }
    .step-list { display: grid; grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .resident-row { grid-template-columns: 1fr; gap: 12px; }
    .resident-row .resident-actions { width: 100%; }
    .section-heading, .upi-panel, .receipt-heading { align-items: flex-start; flex-direction: column; }
    .due-list article, .payment-list article { grid-template-columns: 1fr; }
    .expense-list article { align-items: flex-start; grid-template-columns: 1fr; }
    .platform-due-row, .platform-reminder-list article { align-items: flex-start; grid-template-columns: 1fr; }
    .platform-due-actions { justify-content: flex-start; }
    .platform-reminder-meta { align-items: flex-start; }
    .expense-actions { justify-content: flex-start; }
    .expense-export-toolbar { width: 100%; grid-template-columns: 1fr 1fr auto; }
    .expense-resubmission { grid-template-columns: 1fr; }
    .due-amount { align-items: flex-start; }
    .reminder-actions > div { align-items: flex-start; flex-direction: column; }
    .receipt-heading > div:last-child { text-align: left; }
    .receipt-amount { align-items: flex-start; flex-direction: column; gap: 12px; }
    .receipt-card dl div { align-items: flex-start; flex-direction: column; gap: 6px; }
    .receipt-card dd { text-align: left; }
    footer { flex-direction: column; gap: 8px; }
}

@media (max-width: 420px) {
    .resident-row .resident-actions { grid-template-columns: 1fr; }
    .expense-export-toolbar { grid-template-columns: 1fr; }
    .resident-row .resident-badge { grid-column: auto; }
}

@media print {
    .site-header, footer, .receipt-actions { display: none !important; }
    .receipt-shell { min-height: 0; padding: 0; }
    .receipt-card { width: 100%; border: 0; box-shadow: none; }
}
