/* Swadha Finlease Payments. Brand teal #17848F is fixed: the logo artwork is drawn on it. */
:root {
    --brand: #17848f;
    --brand-dark: #0f6a73;
    --brand-deep: #0a4c53;
    --brand-tint: #eef8f9;
    --brand-soft: #d6eef0;
    --ink: #0f2f33;
    --body: #3a5559;
    --muted: #6a8083;
    --line: #e2ecec;
    --line-strong: #cfdddd;
    --page: #f4f8f8;
    --surface: #fff;
    --success: #1d7f4f;
    --success-soft: #e5f6ec;
    --warning: #8a5f07;
    --warning-soft: #fff3d6;
    --danger: #b3363f;
    --danger-soft: #fdecee;
    --radius: 16px;
    --radius-small: 10px;
    --shadow-card: 0 1px 2px rgba(15, 47, 51, .04), 0 8px 24px rgba(15, 47, 51, .05);
    --shadow-raised: 0 24px 64px rgba(15, 63, 68, .16);
    --display: "Manrope", system-ui, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

/* Base */
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; color: var(--ink); background: var(--page); font-family: "DM Sans", system-ui, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-dark); }
:focus-visible { outline: 3px solid rgba(23, 132, 143, .4); outline-offset: 2px; }
.hidden { display: none !important; }
.icon { flex: 0 0 auto; display: block; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.eyebrow { color: var(--brand); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Buttons */
.button { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 12px; font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .6; cursor: wait; }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 6px 16px rgba(23, 132, 143, .24); }
.button-primary:hover { background: var(--brand-dark); box-shadow: 0 8px 22px rgba(23, 132, 143, .3); }
.button-secondary { color: var(--brand-dark); background: var(--brand-tint); border-color: var(--brand-soft); }
.button-secondary:hover { background: var(--brand-soft); }
.button-quiet { color: var(--body); background: var(--surface); border-color: var(--line-strong); }
.button-quiet:hover { border-color: var(--brand); color: var(--brand-dark); }
.button-on-brand { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); }
.button-on-brand:hover { background: rgba(255, 255, 255, .22); }
.button-small { min-height: 38px; padding: 0 14px; font-size: .85rem; border-radius: 10px; }
.button-full { width: 100%; }
.link-button { padding: 0; border: 0; background: none; color: var(--brand-dark); font-size: .85rem; font-weight: 700; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link-button:hover { text-decoration: underline; }

/* Form fields */
label, legend { display: block; margin-bottom: 8px; font-size: .86rem; font-weight: 700; }
input[type="text"], input[type="tel"], input[type="number"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], textarea { width: 100%; height: 52px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); outline: 0; transition: border-color .16s, box-shadow .16s; }
select { width: 100%; height: 52px; padding: 0 40px 0 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236a8083' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; font: inherit; color: inherit; outline: 0; appearance: none; transition: border-color .16s, box-shadow .16s; }
select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(23, 132, 143, .12); }
.field-hint { margin-top: 6px; color: var(--muted); font-size: .78rem; }
input::placeholder { color: #a3b4b5; }
input[readonly] { color: var(--body); background: #f7fafa; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(23, 132, 143, .12); }
.field-group { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); overflow: hidden; transition: border-color .16s, box-shadow .16s; }
.field-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(23, 132, 143, .12); }
.field-group input { border: 0; border-radius: 0; box-shadow: none; }
.field-prefix { align-self: stretch; display: flex; align-items: center; padding: 0 14px; border-right: 1px solid var(--line); background: var(--brand-tint); color: var(--brand-dark); font-weight: 700; }
.field-error { min-height: 26px; padding: 6px 2px 0; color: var(--danger); font-size: .82rem; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* Status chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px; font-size: .74rem; font-weight: 700; white-space: nowrap; color: var(--body); background: #edf2f2; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.success { color: var(--success); background: var(--success-soft); }
.chip.pending { color: var(--warning); background: var(--warning-soft); }
.chip.failed { color: var(--danger); background: var(--danger-soft); }
.chip.plain::before { display: none; }

/* Sign-in */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 44%) 1fr; background: var(--surface); }
.brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: clamp(36px, 4.5vw, 64px); color: #fff; background: var(--brand); }
.brand-panel::before { content: ""; position: absolute; width: 620px; height: 620px; right: -260px; bottom: -220px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 70px rgba(255, 255, 255, .035), 0 0 0 150px rgba(255, 255, 255, .025); }
.brand-panel > * { position: relative; }
.hero-logo { width: min(300px, 76%); height: auto; display: block; margin-left: -10px; }
.brand-panel .eyebrow { color: #a6e6ea; }
.brand-panel h1 { margin: 16px 0 18px; font: 800 clamp(2.4rem, 4.2vw, 3.9rem)/1.05 var(--display); letter-spacing: -.045em; }
.brand-panel__lead { max-width: 440px; color: rgba(255, 255, 255, .8); font-size: 1.06rem; line-height: 1.65; }
.promise-list { margin-top: 36px; display: grid; gap: 14px; }
.promise-list li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .92); font-weight: 500; }
.promise-list .icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.brand-panel__footer { color: rgba(255, 255, 255, .6); font-size: .78rem; }

.login-area { min-height: 100vh; padding: 48px clamp(24px, 7vw, 110px); display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 85% 0%, rgba(23, 132, 143, .09), transparent 34%), var(--page); }
.mobile-brand { display: none; }
.login-card { width: min(100%, 460px); padding: 40px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-raised); }
.step-indicator { display: flex; gap: 6px; margin-bottom: 32px; }
.step { width: 28px; height: 4px; border-radius: 10px; background: var(--line); transition: width .25s, background .25s; }
.step.active { width: 48px; background: var(--brand); }
.login-card h2 { margin: 8px 0 8px; font: 800 1.75rem/1.2 var(--display); letter-spacing: -.035em; }
.card-copy { margin-bottom: 28px; color: var(--muted); }
.card-copy strong { color: var(--ink); }
.back-button { margin-bottom: 24px; }
.otp-input { text-align: center; font: 700 1.4rem var(--display); letter-spacing: .5em; padding-left: calc(15px + .5em) !important; }
.test-otp { margin-bottom: 24px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; border: 1px dashed #9fd3d8; border-radius: 14px; background: var(--brand-tint); }
.test-otp strong { font-size: .84rem; }
.test-otp small { grid-column: 1; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.test-otp button { grid-column: 2; grid-row: 1 / span 2; padding: 9px 14px; border: 1px solid var(--brand-soft); border-radius: 10px; background: var(--surface); color: var(--brand-dark); font: 800 1.15rem var(--display); letter-spacing: .16em; cursor: pointer; }
.test-otp button:hover { border-color: var(--brand); }
.resend-row { min-height: 22px; margin-top: 20px; text-align: center; color: var(--muted); font-size: .84rem; }
.login-card__footer { display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; margin: 30px -40px -40px; padding: 18px 40px; border-top: 1px solid var(--line); border-radius: 0 0 24px 24px; background: #f8fbfb; color: var(--muted); font-size: .8rem; }
.login-card__footer .icon { color: var(--brand); }
.help-text { margin-top: 22px; color: var(--muted); font-size: .82rem; text-align: center; }
.help-text a { font-weight: 700; text-decoration: none; }

/* App header */
.site-header { position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(16px, 4vw, 48px); background: var(--brand); box-shadow: 0 4px 18px rgba(11, 79, 87, .18); }
.brand { display: flex; align-items: center; }
.brand img { height: 50px; width: auto; display: block; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 100px; color: #fff; background: rgba(255, 255, 255, .12); font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Page layout */
.page { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 72px; }
.page-narrow { width: min(760px, calc(100% - 32px)); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading h1 { margin-top: 6px; font: 800 clamp(1.75rem, 2.6vw, 2.3rem)/1.15 var(--display); letter-spacing: -.04em; }
.page-heading p { margin-top: 6px; color: var(--muted); }
.banner { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid #b6e2c8; border-radius: 12px; background: var(--success-soft); color: var(--success); font-weight: 600; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font: 800 1.08rem var(--display); letter-spacing: -.02em; }
.panel-heading p { margin-top: 2px; color: var(--muted); font-size: .85rem; }

/* Dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: flex-start; gap: 14px; padding: 22px; }
.stat-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--brand-dark); background: var(--brand-tint); }
.stat-card.is-primary .stat-icon { color: #fff; background: var(--brand); }
.stat-card span { color: var(--muted); font-size: .84rem; }
.stat-card strong { display: block; margin: 2px 0; font: 800 1.6rem/1.2 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--muted); font-size: .78rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.dashboard-main { display: grid; gap: 20px; min-width: 0; }

.payment-list li + li { border-top: 1px solid var(--line); }
.payment-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto 20px; align-items: center; gap: 16px; padding: 14px 24px; color: inherit; text-decoration: none; transition: background .14s; }
a.payment-row:hover { background: #f7fbfb; }
.payment-row .row-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.row-icon.success { color: var(--success); background: var(--success-soft); }
.row-icon.pending { color: var(--warning); background: var(--warning-soft); }
.row-icon.failed { color: var(--danger); background: var(--danger-soft); }
.payment-row .row-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-row .row-meta { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-row .row-amount { font: 700 1rem var(--display); font-variant-numeric: tabular-nums; text-align: right; min-width: 76px; }
.payment-row .row-chevron { color: #a9bcbd; transform: rotate(-90deg); }
.empty-state { padding: 52px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.empty-state .stat-icon { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 8px; }
.empty-state h3 { font: 800 1.05rem var(--display); }
.empty-state p { color: var(--muted); font-size: .9rem; }
.empty-state .button { margin-top: 14px; }

.side-card { padding: 24px; }
.side-card + .side-card { margin-top: 16px; }
.account-line { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); }
.account-line strong { display: block; font: 700 .98rem var(--display); }
.account-line span { color: var(--muted); font-size: .8rem; }
.side-card .chip { margin-top: 14px; }
.side-card h2 { font: 800 .98rem var(--display); }
.side-card p { margin: 4px 0 12px; color: var(--muted); font-size: .86rem; }

/* Payment dialog */
.payment-modal { width: min(480px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 22px; color: var(--ink); box-shadow: 0 30px 90px rgba(8, 35, 38, .32); }
.payment-modal::backdrop { background: rgba(9, 36, 39, .55); backdrop-filter: blur(3px); }
.payment-modal[open] { animation: modal-in .2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 26px 28px 0; }
.modal-heading h2 { margin-top: 4px; font: 800 1.45rem/1.2 var(--display); letter-spacing: -.03em; }
.modal-close { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #eef3f3; cursor: pointer; }
.modal-close:hover { background: var(--line-strong); }
.modal-body { padding: 18px 28px 28px; }
.notice { display: flex; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-deep); font-size: .84rem; line-height: 1.45; }
.notice .icon { margin-top: 1px; color: var(--brand); }
.amount-input { height: 60px !important; font: 800 1.5rem var(--display); letter-spacing: -.02em; }
.amount-group .field-prefix { font: 800 1.3rem var(--display); }
.quick-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-amounts button { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 100px; background: var(--surface); color: var(--body); font-size: .84rem; font-weight: 700; cursor: pointer; }
.quick-amounts button:hover, .quick-amounts button.active { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.payment-modal label[for="purpose"], .payment-modal label[for="bank"], .payment-modal legend { margin-top: 18px; }
.payment-modal fieldset { margin: 0; padding: 0; border: 0; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.method-card { margin: 0; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--muted); font-weight: 600; cursor: pointer; }
.method-card:has(input:checked) { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); }
.method-card input { position: absolute; opacity: 0; }
.modal-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; color: var(--muted); font-size: .78rem; }

/* Receipt */
.receipt { padding: 36px 36px 30px; text-align: center; }
.receipt-icon { width: 68px; height: 68px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; }
.receipt-icon.success { color: var(--success); background: var(--success-soft); box-shadow: 0 0 0 8px rgba(29, 127, 79, .07); }
.receipt-icon.pending { color: var(--warning); background: var(--warning-soft); box-shadow: 0 0 0 8px rgba(138, 95, 7, .07); }
.receipt-icon.failed { color: var(--danger); background: var(--danger-soft); box-shadow: 0 0 0 8px rgba(179, 54, 63, .07); }
.receipt-icon.pending .icon { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.receipt h1 { font: 800 1.55rem/1.25 var(--display); letter-spacing: -.03em; }
.receipt-amount { margin: 6px 0 8px; font: 800 2.6rem/1.1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.receipt > p { max-width: 46ch; margin: 0 auto; color: var(--muted); }
.receipt .chip { margin-top: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 28px 0 4px; text-align: center; }
.steps li { position: relative; padding-top: 30px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.steps li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { border-color: var(--success); background: var(--success); }
.steps li.done::after { background: var(--success); }
.steps li.failed { color: var(--danger); }
.steps li.failed::before { border-color: var(--danger); background: var(--danger); }
.steps li.current::before { border-color: var(--warning); background: var(--warning-soft); }
.receipt-list { margin: 24px 0; text-align: left; border: 1px solid var(--line); border-radius: 14px; }
.receipt-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 12px 16px; }
.receipt-list div + div { border-top: 1px solid var(--line); }
.receipt-list dt { flex: 0 0 auto; color: var(--muted); font-size: .88rem; }
.receipt-list dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.receipt-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Worldline activity */
.trail { margin-top: 20px; }
.trail-item { border-top: 1px solid var(--line); }
.trail-item:first-of-type { border-top: 0; }
.trail-item summary { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 20px; align-items: center; gap: 14px; padding: 13px 24px; cursor: pointer; list-style: none; }
.trail-item summary::-webkit-details-marker { display: none; }
.trail-item summary:hover { background: #f7fbfb; }
.trail-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--brand-dark); background: var(--brand-tint); }
.trail-title { display: block; font-weight: 600; }
.trail-meta { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail-item .row-chevron { color: #a9bcbd; transition: transform .18s; }
.trail-item[open] .row-chevron { transform: rotate(180deg); }
.trail-item[open] summary { background: #f7fbfb; }
.trail-body { padding: 4px 24px 20px 74px; background: #f7fbfb; }
.trail-block + .trail-block { margin-top: 14px; }
.trail-block header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.trail-block header span { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.trail-block pre { margin: 0; padding: 12px 14px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); color: var(--ink); font: .78rem/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.trail-empty { padding: 28px 24px; color: var(--muted); font-size: .9rem; }

/* Toast */
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 380px; padding: 13px 18px; border-radius: 12px; color: #fff; background: var(--ink); box-shadow: 0 12px 36px rgba(0, 0, 0, .22); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .22s, transform .22s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }

/* Smaller screens */
@media (max-width: 980px) {
    .login-shell { grid-template-columns: 40% 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .side-card + .side-card { margin-top: 0; }
}
@media (max-width: 720px) {
    .login-shell { display: block; }
    .brand-panel { display: none; }
    .login-area { min-height: 100svh; padding: 20px 16px 32px; justify-content: flex-start; }
    .mobile-brand { width: 100%; display: flex; justify-content: center; margin-bottom: 24px; padding: 10px; border-radius: 16px; background: var(--brand); }
    .mobile-brand img { height: 60px; width: auto; }
    .login-card { padding: 28px 22px; border-radius: 20px; }
    .login-card__footer { margin: 26px -22px -28px; padding: 16px 22px; border-radius: 0 0 20px 20px; }
    .site-header { height: 60px; }
    .brand img { height: 44px; }
    .header-pill { display: none; }
    .page { width: calc(100% - 28px); padding: 24px 0 96px; }
    .page-heading { margin-bottom: 20px; }
    .page-heading .button { position: fixed; z-index: 15; left: 14px; right: 14px; bottom: 14px; min-height: 52px; box-shadow: 0 10px 28px rgba(23, 132, 143, .4); }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; flex-direction: column; gap: 10px; }
    .stat-card.is-primary { grid-column: 1 / -1; flex-direction: row; }
    .stat-card strong { font-size: 1.35rem; }
    .dashboard-side { grid-template-columns: 1fr; }
    .panel-heading { padding: 16px 18px; }
    .payment-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; padding: 13px 18px; }
    .payment-row .row-icon { width: 36px; height: 36px; }
    .payment-row .chip, .payment-row .row-chevron, .payment-row .row-ref { display: none; }
    .modal-heading { padding: 22px 20px 0; }
    .modal-body { padding: 16px 20px 22px; }
    .receipt { padding: 28px 20px 24px; }
    .receipt-amount { font-size: 2.2rem; }
    .receipt-actions .button { width: 100%; }
    .trail-item summary { grid-template-columns: 32px minmax(0, 1fr) 20px; gap: 12px; padding: 12px 18px; }
    .trail-item summary .chip { grid-column: 2; grid-row: 2; justify-self: start; margin-top: -6px; }
    .trail-item summary .row-chevron { grid-column: 3; grid-row: 1; }
    .trail-icon { width: 32px; height: 32px; }
    .trail-body { padding: 4px 18px 18px; }
    .toast { left: 14px; right: 14px; bottom: 80px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Admin console */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.muted { color: var(--muted); font-weight: 400; }
.wrap { overflow-wrap: anywhere; }
textarea { height: auto; padding: 12px 15px; resize: vertical; line-height: 1.5; font: inherit; color: inherit; }
textarea:focus, input[type="search"]:focus, input[type="date"]:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(23, 132, 143, .12); }
.admin-header { gap: 24px; }
.admin-nav { display: flex; gap: 2px; margin-right: auto; overflow-x: auto; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-header .header-pill { white-space: nowrap; }
.admin-nav a { padding: 8px 12px; border-radius: 10px; color: rgba(255, 255, 255, .82); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.admin-nav a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.admin-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .2); }
.admin-who { color: rgba(255, 255, 255, .85); font-size: .88rem; font-weight: 600; }
.admin-main > .banner, .admin-main > .panel { margin-bottom: 20px; }
.admin-main .dashboard-main > .panel + .panel { margin-top: 20px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { padding: 12px 16px; color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(120px, 1fr)) auto auto; gap: 10px; align-items: center; padding: 14px; }
.filter-bar input, .filter-bar select { height: 42px; border-radius: 10px; font-size: .9rem; font-weight: 400; }
.filter-bar label { margin: 0; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 16px; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); }
.back-link { margin-bottom: 14px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.detail-grid > .panel.form-panel { max-width: none; }
.receipt.receipt-left { text-align: left; padding: 28px; }
.receipt-head { display: flex; align-items: center; gap: 16px; }
.receipt-head .receipt-icon { margin: 0; width: 56px; height: 56px; }
.receipt-head h1 { margin: 0; }
.receipt-head p { margin: 2px 0 0; }
.receipt-left .receipt-actions { justify-content: flex-start; flex-wrap: wrap; }
.receipt-actions form { margin: 0; }
.receipt-list.compact { margin: 16px 0 0; font-size: .9rem; }
.receipt-list.compact div { padding: 10px 14px; }
.form-panel { padding: 28px; }
.form-panel h1 { font: 800 1.5rem var(--display); letter-spacing: -.02em; }
.form-panel form { margin-top: 20px; display: grid; gap: 6px; }
.form-panel label { margin-top: 12px; }
.form-panel .button { margin-top: 18px; justify-self: start; }
.form-panel .notice { margin: 18px 0; }
.page-narrow-block { max-width: 760px; margin: 0 auto; }
.secret-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border: 1px dashed var(--brand); border-radius: 12px; background: var(--brand-tint); }
.secret-box code { font-family: var(--mono); font-size: .92rem; overflow-wrap: anywhere; }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.docs-toc { position: sticky; top: 88px; display: grid; gap: 2px; padding: 12px; }
.docs-toc a { padding: 7px 10px; border-radius: 8px; color: var(--body); font-size: .88rem; text-decoration: none; }
.docs-toc a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.docs { padding: 28px 32px; line-height: 1.65; }
.docs h2 { margin: 32px 0 10px; font: 800 1.2rem var(--display); letter-spacing: -.02em; scroll-margin-top: 90px; }
.docs h2:first-child { margin-top: 0; }
.docs p { margin: 10px 0; }
.docs code { font-family: var(--mono); font-size: .86em; padding: 1px 5px; border-radius: 5px; background: #eef4f4; }
.docs pre { margin: 12px 0; padding: 16px; overflow-x: auto; border-radius: 12px; background: #0f2f33; color: #e2f3f4; font-size: .84rem; line-height: 1.55; }
.docs pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.docs-steps { padding-left: 22px; list-style: decimal; }
.docs-steps li, .docs-list li { margin: 6px 0; }
.docs-list { padding-left: 20px; list-style: disc; }
.docs-list.checklist { list-style: "☐  "; }
.docs-table { margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 980px) {
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .filter-bar .filter-search { grid-column: 1 / -1; }
    .detail-grid, .docs-layout { grid-template-columns: 1fr; }
    .docs-toc { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .admin-who, .admin-header .header-pill { display: none; }
}
@media (max-width: 720px) {
    .admin-header { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
    .admin-nav { order: 3; width: 100%; }
    .docs { padding: 20px; }
}
@media (max-width: 1240px) {
    .admin-who { display: none; }
    .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filter-bar .filter-search { grid-column: 1 / -1; }
}
/* Date filters: a calendar icon, and the picker in the brand colour. */
.filter-bar [data-date-input] { padding-right: 38px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236a8083' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.flatpickr-calendar { font-family: inherit; border-radius: 14px; box-shadow: var(--shadow-raised); }
.flatpickr-calendar .flatpickr-day.selected, .flatpickr-calendar .flatpickr-day.selected:hover, .flatpickr-calendar .flatpickr-day.selected:focus { background: var(--brand); border-color: var(--brand); }
.flatpickr-calendar .flatpickr-day.today { border-color: var(--brand); }
.flatpickr-calendar .flatpickr-day.today:hover { background: var(--brand-tint); color: var(--ink); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 700; }
/* Hosted payment page: nothing to do but pay or go back. */
.checkout-page .brand { cursor: default; }
.checkout-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); }
.button.is-disabled { opacity: .5; pointer-events: none; }
