/* ==========================================================================
   PrimeCash design system
   Deep forest green + lime accent on warm off-white. Bootstrap supplies the
   grid and utilities only; every component below is PrimeCash's own.
   ========================================================================== */

:root {
    --pc-ink: #0d1f1a;
    --pc-forest: #0b3b2e;
    --pc-forest-2: #0f4a3a;
    --pc-emerald: #0e7a59;
    --pc-emerald-dark: #0a654a;
    --pc-mint: #e3f5ec;
    --pc-lime: #c5f25a;
    --pc-lime-dark: #aee03b;
    --pc-sand: #f7f6f1;
    --pc-paper: #ffffff;
    --pc-line: #e6e4dc;
    --pc-line-strong: #d6d3c8;
    --pc-muted: #5a6a64;
    --pc-danger: #b42318;
    --pc-danger-bg: #fef3f2;
    --pc-info-bg: #eef7f2;

    --pc-radius-sm: 10px;
    --pc-radius: 16px;
    --pc-radius-lg: 24px;
    --pc-shadow-sm: 0 1px 2px rgba(13, 31, 26, .06), 0 1px 3px rgba(13, 31, 26, .06);
    --pc-shadow: 0 10px 30px -12px rgba(13, 31, 26, .18), 0 2px 6px rgba(13, 31, 26, .05);
    --pc-shadow-lg: 0 30px 60px -20px rgba(4, 30, 22, .45), 0 8px 20px -8px rgba(4, 30, 22, .25);

    --pc-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --bs-body-font-family: var(--pc-font);
    --bs-body-color: var(--pc-ink);
    --bs-body-bg: var(--pc-sand);
    --bs-link-color-rgb: 14, 122, 89;
    --bs-link-hover-color-rgb: 10, 101, 74;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: var(--pc-font);
    color: var(--pc-ink);
    background: var(--pc-sand);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; color: inherit; }
h1:focus { outline: none; }
a { color: var(--pc-emerald); text-underline-offset: 3px; }
a:hover { color: var(--pc-emerald-dark); }

.container { max-width: 1200px; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px) { .container { padding-left: 24px; padding-right: 24px; } }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--pc-muted); }
.icon { flex-shrink: 0; vertical-align: -0.2em; }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 100;
    background: var(--pc-lime); color: var(--pc-forest); font-weight: 700;
    padding: 10px 16px; border-radius: var(--pc-radius-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--pc-lime-dark); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */

.pc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 1.5px solid transparent;
    font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
    cursor: pointer; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.pc-btn:active { transform: translateY(1px); }
.pc-btn .icon { transition: transform .15s ease; }
.pc-btn:hover .icon { transform: translateX(2px); }
.pc-btn-lg { padding: 15px 26px; font-size: 1.02rem; }

.pc-btn-primary { background: var(--pc-forest); color: #fff; }
.pc-btn-primary:hover { background: var(--pc-emerald); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--pc-emerald) 60%, transparent); }

.pc-btn-lime { background: var(--pc-lime); color: var(--pc-forest); }
.pc-btn-lime:hover { background: var(--pc-lime-dark); color: var(--pc-forest); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--pc-lime) 80%, transparent); }

.pc-btn-ghost { background: transparent; color: var(--pc-ink); border-color: var(--pc-line-strong); }
.pc-btn-ghost:hover { background: var(--pc-paper); color: var(--pc-ink); border-color: var(--pc-ink); }

.pc-btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.pc-btn-outline-light:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: #fff; }

.link-btn {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 2px;
    color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
    border: 1px solid var(--pc-line); background: var(--pc-paper); color: var(--pc-ink); cursor: pointer;
}
.icon-btn:hover { background: var(--pc-sand); }

/* ---------- Eyebrows, tags, notices ---------- */

.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--pc-emerald); margin-bottom: 14px;
}
.eyebrow-dark {
    color: var(--pc-lime); background: color-mix(in srgb, var(--pc-lime) 10%, transparent); border: 1px solid color-mix(in srgb, var(--pc-lime) 25%, transparent);
    padding: 6px 12px; border-radius: 999px; letter-spacing: .04em; text-transform: none; font-size: .82rem;
}
.tag {
    display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
    background: var(--pc-mint); color: var(--pc-emerald-dark); font-size: .72rem; font-weight: 700; vertical-align: middle;
}
.notice {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--pc-radius-sm);
    font-size: .92rem; margin-bottom: 18px;
}
.notice-info { background: var(--pc-info-bg); color: var(--pc-forest); border: 1px solid #cfe9dc; }
.notice-error { background: var(--pc-danger-bg); color: var(--pc-danger); border: 1px solid #fecdca; }
.notice .icon { margin-top: 2px; }

/* ---------- Header ---------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247, 246, 241, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(13, 31, 26, .06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--pc-ink); }
.brand:hover { color: var(--pc-ink); }
.brand-word { font-size: 1.28rem; font-weight: 600; letter-spacing: -0.03em; }
.brand-word strong { font-weight: 800; }
.brand-on-dark, .brand-on-dark:hover { color: #fff; }
/* A tenant's uploaded logo (/brand/logo) replaces the mark and word. On dark it sits on a white tile so any logo reads. */
.brand-logo { display: block; height: 38px; width: auto; max-width: 200px; object-fit: contain; }
.brand-on-dark .brand-logo { background: #fff; border-radius: var(--pc-radius-sm); padding: 4px 8px; height: 42px; }
.brand-letter { font: 800 19px/1 var(--pc-font); fill: var(--pc-forest); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.nav-item {
    padding: 8px 14px; border-radius: 999px; color: var(--pc-ink); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav-item:hover { background: rgba(13, 31, 26, .05); color: var(--pc-ink); }
.nav-item.active { background: var(--pc-mint); color: var(--pc-emerald-dark); }
.nav-actions { display: flex; gap: 8px; margin-left: 12px; }
.nav-actions form { display: contents; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; cursor: pointer; padding: 8px; border-radius: 10px; }
.nav-burger .when-open { display: none; }

@media (max-width: 991.98px) {
    .nav-burger { display: inline-flex; }
    .site-nav {
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 20px;
        background: var(--pc-sand); border-bottom: 1px solid var(--pc-line); box-shadow: var(--pc-shadow);
        display: none;
    }
    .nav-item { padding: 12px 14px; border-radius: 12px; }
    .nav-actions { margin: 10px 0 0; flex-direction: column; }
    .nav-actions .pc-btn { width: 100%; padding: 13px 20px; }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .nav-toggle:checked ~ .nav-burger .when-open { display: inline; }
    .nav-toggle:checked ~ .nav-burger .when-closed { display: none; }
    .nav-toggle:focus-visible ~ .nav-burger { outline: 3px solid var(--pc-lime-dark); }
}

/* ---------- Hero ---------- */

.hero, .page-hero, .auth-aside {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--pc-lime) 16%, transparent), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--pc-emerald) 55%, transparent), transparent 60%),
        linear-gradient(160deg, var(--pc-forest) 0%, #072a21 100%);
}
.hero::before, .page-hero::before, .auth-aside::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-glow {
    position: absolute; width: 520px; height: 520px; right: -120px; top: 40px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--pc-lime) 22%, transparent), transparent 65%); filter: blur(20px); pointer-events: none;
}

.hero { padding: 56px 0 72px; }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) {
    .hero { padding: 80px 0 104px; }
    .hero-grid { grid-template-columns: 1.02fr 1fr; gap: 56px; }
}
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.04; margin-bottom: 20px; }
.hero h1 .hl { color: var(--pc-lime); }
.lead-lg { font-size: clamp(1.02rem, 1.6vw, 1.18rem); line-height: 1.6; color: rgba(255, 255, 255, .78); max-width: 38rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 26px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: rgba(255, 255, 255, .86); font-weight: 600; font-size: .94rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--pc-lime); }
.hero-points-stack { flex-direction: column; gap: 14px; }
.link-light { color: var(--pc-lime); }
.link-light:hover { color: #fff; }

.page-hero { padding: 56px 0 60px; }
@media (min-width: 992px) { .page-hero { padding: 76px 0 80px; } }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; margin: 0 0 14px; max-width: 46rem; }
.page-hero .lead-lg { margin: 0; }

/* ---------- Calculator ---------- */

.calc {
    position: relative; background: var(--pc-paper); color: var(--pc-ink);
    border-radius: var(--pc-radius-lg); box-shadow: var(--pc-shadow-lg); overflow: hidden;
}
.calc-loading { padding: 80px 24px; text-align: center; color: var(--pc-muted); display: flex; gap: 10px; justify-content: center; align-items: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--pc-line); border-top-color: var(--pc-emerald); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.calc-head { padding: 24px 24px 6px; }
.calc-title { font-size: 1.2rem; margin: 0 0 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--pc-sand); border: 1px solid var(--pc-line); border-radius: 999px; }
.seg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 0; background: transparent; color: var(--pc-muted); font-weight: 700; font-size: .88rem;
    padding: 10px 8px; border-radius: 999px; cursor: pointer; transition: background-color .15s, color .15s, box-shadow .15s;
}
.seg-btn:hover { color: var(--pc-ink); }
.seg-btn.is-active { background: var(--pc-forest); color: #fff; box-shadow: var(--pc-shadow-sm); }
.seg-btn.is-active .icon { color: var(--pc-lime); }

.calc-body { padding: 14px 24px 22px; display: grid; gap: 22px; }
.calc-field label, .calc-field-inline label { font-weight: 700; font-size: .92rem; }
.calc-field-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }

.amount-box {
    display: inline-flex; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 12px;
    background: var(--pc-sand); border: 1.5px solid var(--pc-line); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em;
}
.amount-box:focus-within { border-color: var(--pc-emerald); background: #fff; }
.amount-box input {
    width: 5.2ch; border: 0; background: transparent; font: inherit; color: inherit; padding: 0; text-align: right;
    -moz-appearance: textfield; appearance: textfield;
}
.amount-box input:focus { outline: none; }
.amount-box input::-webkit-outer-spin-button, .amount-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.value-pill { padding: 6px 12px; border-radius: 999px; background: var(--pc-mint); color: var(--pc-emerald-dark); font-weight: 800; font-size: .95rem; }

.pc-range {
    --fill: 50%;
    width: 100%; height: 28px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; margin: 0;
}
.pc-range::-webkit-slider-runnable-track {
    height: 8px; border-radius: 999px;
    background: linear-gradient(90deg, var(--pc-emerald) 0 var(--fill), var(--pc-line) var(--fill) 100%);
}
.pc-range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--pc-line); }
.pc-range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--pc-emerald); }
.pc-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
    background: #fff; border: 7px solid var(--pc-forest); box-shadow: 0 3px 10px color-mix(in srgb, var(--pc-forest) 35%, transparent);
    transition: transform .12s ease;
}
.pc-range::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 7px solid var(--pc-forest);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--pc-forest) 35%, transparent);
}
.pc-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.pc-range:focus { outline: none; }
.pc-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px color-mix(in srgb, var(--pc-lime) 70%, transparent); }
.range-ends { display: flex; justify-content: space-between; margin-top: 4px; font-size: .8rem; color: var(--pc-muted); font-weight: 600; }

.calc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.calc-field-inline { display: flex; align-items: center; gap: 10px; }
.pc-select {
    appearance: none; -webkit-appearance: none; padding: 9px 36px 9px 12px; border-radius: 12px; border: 1.5px solid var(--pc-line);
    background: var(--pc-sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d1f1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    font: inherit; font-weight: 600; color: var(--pc-ink);
}
.pc-select:focus { border-color: var(--pc-emerald); outline: none; }

.pc-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .92rem; position: relative; }
.pc-check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.pc-check-box {
    display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; flex-shrink: 0;
    border: 1.5px solid var(--pc-line-strong); background: #fff; color: transparent; transition: all .12s ease;
}
.pc-check input:checked + .pc-check-box { background: var(--pc-forest); border-color: var(--pc-forest); color: var(--pc-lime); }
.pc-check input:focus-visible + .pc-check-box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc-lime) 80%, transparent); }
.pc-check-block { display: flex; align-items: flex-start; font-weight: 500; line-height: 1.45; margin-top: 4px; }
.pc-check-block .pc-check-box { margin-top: 1px; }

.calc-result {
    margin: 0 10px 10px; padding: 22px 20px 18px; border-radius: 18px;
    background: linear-gradient(160deg, var(--pc-forest) 0%, #072a21 100%); color: #fff;
}
.calc-error { display: flex; gap: 10px; align-items: center; padding: 18px 4px; color: #ffd9d2; font-weight: 600; }
.result-main { display: grid; gap: 2px; padding-bottom: 16px; border-bottom: 1px dashed rgba(255, 255, 255, .18); }
.result-label { font-size: .82rem; color: rgba(255, 255, 255, .65); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.result-total { font-size: clamp(2rem, 6vw, 2.5rem); font-weight: 800; color: var(--pc-lime); letter-spacing: -0.03em; line-height: 1.1; }
.result-when { color: rgba(255, 255, 255, .82); font-size: .95rem; }
.result-when b { color: #fff; }
.result-lines { display: grid; gap: 8px; margin: 14px 0 12px; }
.result-lines > div { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.result-lines dt { font-weight: 500; color: rgba(255, 255, 255, .7); }
.result-lines dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-dates { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.result-dates li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: .8rem; font-weight: 600; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.result-actions .pc-btn { flex: 1 1 auto; }
.result-actions .link-btn { color: rgba(255, 255, 255, .85); }
.result-actions .link-btn:hover { color: #fff; }
.result-note { margin: 12px 0 0; font-size: .76rem; color: rgba(255, 255, 255, .55); }

/* ---------- Modal ---------- */

.modal-backdrop-pc { position: fixed; inset: 0; background: rgba(7, 26, 20, .55); backdrop-filter: blur(3px); z-index: 1000; animation: fade .15s ease; }
.modal-pc {
    position: fixed; z-index: 1001; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: auto;
    background: var(--pc-paper); border-radius: var(--pc-radius-lg); box-shadow: var(--pc-shadow-lg); padding: 22px;
    animation: pop .18s ease;
}
.modal-pc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.modal-pc-head h2 { font-size: 1.3rem; margin: 0; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } }

/* Confirm before a submit (site.js, data-confirm): a native <dialog> in the modal's look. */
.confirm-pc {
    width: min(440px, calc(100vw - 32px)); padding: 24px; border: 0; color: var(--pc-ink);
    background: var(--pc-paper); border-radius: var(--pc-radius-lg); box-shadow: var(--pc-shadow-lg);
}
.confirm-pc[open] { animation: confirm-pop .18s ease; }
.confirm-pc::backdrop { background: rgba(7, 26, 20, .55); backdrop-filter: blur(3px); }
.confirm-pc h2 { font-size: 1.15rem; margin: 0 0 6px; }
.confirm-pc-detail { margin: 0; color: var(--pc-muted); }
.confirm-pc-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.confirm-pc-danger { background: var(--pc-danger); color: #fff; }
.confirm-pc-danger:hover { background: var(--pc-danger); color: #fff; filter: brightness(.92); }
@media (max-width: 479.98px) { .confirm-pc-actions .pc-btn { flex: 1 1 100%; justify-content: center; } }
@keyframes confirm-pop { from { opacity: 0; transform: scale(.97); } }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card-table { background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius); box-shadow: var(--pc-shadow-sm); margin-bottom: 32px; }
.table-title { font-size: 1.1rem; margin: 0 0 12px; }
.pc-table { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
.pc-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--pc-line); white-space: nowrap; text-align: left; }
.pc-table td { padding: 12px 14px; border-bottom: 1px solid var(--pc-line); white-space: nowrap; }
.pc-table tbody tr:last-child td { border-bottom: 0; }
.card-table .pc-table tbody tr:hover td { background: #fbfaf6; }
.pc-table .num { text-align: right; }
.pc-table tfoot td { border-top: 1px solid var(--pc-line); border-bottom: 0; font-weight: 600; }
.pc-table tfoot .grand td { font-weight: 800; font-size: 1.05rem; color: var(--pc-forest); }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
@media (min-width: 992px) { .section { padding: 96px 0; } }
.section-tint { background: #eeede5; }
.section-head { max-width: 42rem; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; margin-bottom: 12px; }
.section-head p { color: var(--pc-muted); font-size: 1.05rem; margin: 0; }
.h-section { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 10px; }
.h-card { font-size: 1.3rem; margin-bottom: 18px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: none; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.step {
    position: relative; padding: 28px 24px 24px; background: var(--pc-paper); border: 1px solid var(--pc-line);
    border-radius: var(--pc-radius-lg); box-shadow: var(--pc-shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--pc-shadow); }
.step-num { position: absolute; top: 18px; right: 22px; font-size: 3.2rem; font-weight: 800; line-height: 1; color: var(--pc-mint); letter-spacing: -0.04em; }
.step-icon, .feature-icon, .product-icon, .doc-icon, .fee-icon {
    display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
    background: var(--pc-mint); color: var(--pc-emerald-dark); margin-bottom: 18px;
}
.step h3, .feature h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p, .feature p { color: var(--pc-muted); margin: 0; line-height: 1.6; }

.product-grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: 1fr 1fr; } }
.product-card {
    padding: 30px 28px; background: var(--pc-paper); border: 1px solid var(--pc-line);
    border-radius: var(--pc-radius-lg); box-shadow: var(--pc-shadow-sm); display: flex; flex-direction: column;
}
.product-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.product-sub { color: var(--pc-muted); margin-bottom: 20px; }
.product-facts { display: grid; gap: 0; margin: 0 0 24px; flex: 1; }
.product-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--pc-line); }
.product-facts dt { font-weight: 500; color: var(--pc-muted); }
.product-facts dd { margin: 0; font-weight: 700; text-align: right; }
.product-card .pc-btn { align-self: flex-start; }
.product-card-dark { background: linear-gradient(160deg, var(--pc-forest) 0%, #072a21 100%); color: #fff; border-color: transparent; box-shadow: var(--pc-shadow); }
.product-card-dark .product-sub, .product-card-dark .product-facts dt { color: rgba(255, 255, 255, .68); }
.product-card-dark .product-facts > div { border-color: rgba(255, 255, 255, .12); }
.product-card-dark .product-icon { background: color-mix(in srgb, var(--pc-lime) 14%, transparent); color: var(--pc-lime); }

.feature-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature { padding: 26px 22px; border-radius: var(--pc-radius-lg); background: var(--pc-paper); border: 1px solid var(--pc-line); }

.section-cta { padding-top: 0; }
.cta-band {
    position: relative; overflow: hidden; display: grid; gap: 24px; align-items: center;
    padding: 40px 28px; border-radius: 28px; color: #fff;
    background:
        radial-gradient(600px 300px at 100% 0%, color-mix(in srgb, var(--pc-lime) 22%, transparent), transparent 60%),
        linear-gradient(135deg, var(--pc-forest) 0%, var(--pc-emerald-dark) 100%);
    box-shadow: var(--pc-shadow-lg);
}
@media (min-width: 992px) { .cta-band { grid-template-columns: 1.3fr auto; padding: 56px 56px; } }
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 8px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .78); font-size: 1.05rem; max-width: 36rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.responsible { display: flex; gap: 8px; align-items: flex-start; justify-content: center; margin: 24px auto 0; color: var(--pc-muted); font-size: .9rem; max-width: 44rem; text-align: center; }
.responsible .icon { margin-top: 2px; }

/* ---------- How it works ---------- */

.two-col { display: grid; gap: 48px; }
@media (min-width: 992px) { .two-col { grid-template-columns: 1fr 1fr; gap: 64px; } }
.check-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; line-height: 1.5; }
.check-list .icon { color: var(--pc-emerald); margin-top: 1px; }
.doc-list { display: grid; gap: 12px; margin-top: 20px; }
.doc { display: flex; gap: 16px; align-items: center; padding: 16px; background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius); }
.doc .doc-icon { margin: 0; width: 46px; height: 46px; border-radius: 14px; }
.doc h3 { font-size: 1rem; margin: 0 0 2px; }
.doc p { margin: 0; color: var(--pc-muted); font-size: .92rem; }

.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 720px; }
.timeline li { position: relative; display: flex; gap: 18px; padding-bottom: 28px; }
.timeline li::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: repeating-linear-gradient(180deg, var(--pc-line-strong) 0 6px, transparent 6px 12px); }
.timeline li.tl-last::before { display: none; }
.tl-dot { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pc-forest); color: var(--pc-lime); box-shadow: 0 0 0 6px #eeede5; }
.timeline h3 { font-size: 1.08rem; margin: 10px 0 4px; }
.timeline p { color: var(--pc-muted); margin: 0; line-height: 1.55; }

/* ---------- Fees ---------- */

.fee-list { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; }
.fee-item { display: flex; gap: 18px; padding: 22px; background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius-lg); }
.fee-item .fee-icon { margin: 0; width: 48px; height: 48px; border-radius: 14px; }
.fee-item h3 { font-size: 1.1rem; margin: 2px 0 6px; }
.fee-item p { margin: 0; color: var(--pc-muted); line-height: 1.55; }

/* ---------- FAQ ---------- */

.faq-group { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pc-emerald); margin: 36px 0 14px; }
.faq-group:first-child { margin-top: 0; }
.faq-list { display: grid; gap: 10px; }
.faq { background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius); transition: box-shadow .15s ease, border-color .15s ease; }
.faq[open] { box-shadow: var(--pc-shadow); border-color: transparent; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq-chevron { transition: transform .2s ease; color: var(--pc-muted); }
.faq[open] .faq-chevron { transform: rotate(180deg); color: var(--pc-emerald); }
.faq-body { padding: 0 20px 20px; color: var(--pc-muted); line-height: 1.65; }

/* ---------- Forms ---------- */

.card-pc { background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius-lg); padding: 28px 22px; box-shadow: var(--pc-shadow-sm); }
@media (min-width: 768px) { .card-pc { padding: 36px; } }
.pc-form { display: grid; gap: 16px; }
.form-row-2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }
.pc-field { display: grid; gap: 6px; align-content: start; }
.pc-field label { font-weight: 700; font-size: .9rem; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.pc-input {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--pc-line-strong); background: #fff;
    font: inherit; color: var(--pc-ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.pc-input:focus { outline: none; border-color: var(--pc-emerald); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc-emerald) 12%, transparent); }
.pc-input.invalid { border-color: var(--pc-danger); background: var(--pc-danger-bg); }
.hint { font-size: .82rem; color: var(--pc-muted); }

/* Password box with a show / hide button (PasswordInput.razor + js/site.js) */
.pc-password { position: relative; }
.pc-password .pc-input { padding-right: 52px; }
.pc-password-toggle {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: 10px; background: transparent; color: var(--pc-muted); cursor: pointer;
}
.pc-password-toggle:hover { color: var(--pc-ink); background: var(--pc-sand); }
.pc-password-toggle:focus-visible { outline: 2px solid var(--pc-emerald); outline-offset: 1px; color: var(--pc-ink); }
.pc-password-toggle[hidden] { display: none; }
.pc-password-toggle .when-shown,
.pc-password-toggle[aria-pressed="true"] .when-hidden { display: none; }
.pc-password-toggle[aria-pressed="true"] .when-shown { display: block; }
.validation-message { color: var(--pc-danger); font-size: .85rem; font-weight: 600; }
.valid.modified:not([type=checkbox]) { outline: none; }
.invalid { outline: none; }

/* ---------- Contact / legal ---------- */

.contact-grid { display: grid; gap: 24px; }
@media (min-width: 992px) { .contact-grid { grid-template-columns: 1.6fr 1fr; gap: 32px; } }
.contact-side { display: grid; gap: 14px; align-content: start; }
.contact-card { display: flex; gap: 16px; align-items: center; padding: 20px; background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius-lg); }
.contact-card .feature-icon { margin: 0; width: 48px; height: 48px; border-radius: 14px; }
.contact-card h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-muted); margin: 0 0 2px; }
.contact-card a { font-weight: 700; word-break: break-word; }

.legal-grid { display: grid; gap: 24px; }
@media (min-width: 992px) { .legal-grid { grid-template-columns: 280px 1fr; gap: 32px; align-items: start; } }
.legal-nav { display: grid; gap: 4px; background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius-lg); padding: 8px; }
@media (min-width: 992px) { .legal-nav { position: sticky; top: 96px; } }
.legal-nav a { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; color: var(--pc-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.legal-nav a:hover { background: var(--pc-sand); }
.legal-nav a.is-active { background: var(--pc-forest); color: #fff; }
.legal-nav a.is-active .icon { color: var(--pc-lime); }
.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--pc-line); }
@media (min-width: 640px) { .kv > div { grid-template-columns: 240px 1fr; } }
.kv dt { color: var(--pc-muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 700; }
.legal-updated { color: var(--pc-muted); font-size: .88rem; margin: 0 0 8px; }
.legal-body h2 { font-size: 1.2rem; margin: 32px 0 10px; }
.legal-body h2:first-of-type { margin-top: 16px; }
.legal-body p, .legal-body li { line-height: 1.65; }
.legal-body ul, .legal-body ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.legal-body li + li { margin-top: 6px; }
.legal-body .kv { margin-bottom: 1rem; }

/* ---------- Auth ---------- */

.auth { padding: 32px 0 64px; }
@media (min-width: 992px) { .auth { padding: 56px 0 96px; } }
.auth-grid { display: grid; gap: 24px; align-items: stretch; }
@media (min-width: 992px) { .auth-grid { grid-template-columns: 1fr 1.15fr; gap: 0; } }
.auth-aside { border-radius: var(--pc-radius-lg); padding: 36px 30px; display: none; }
.auth-aside h2 { position: relative; font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: 1.12; margin: 0 0 28px; }
.auth-aside .eyebrow, .auth-aside ul { position: relative; }
@media (min-width: 992px) {
    .auth-aside { display: block; padding: 56px 48px; border-radius: var(--pc-radius-lg) 0 0 var(--pc-radius-lg); }
    .auth-card { border-radius: 0 var(--pc-radius-lg) var(--pc-radius-lg) 0 !important; }
}
.auth-card { background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius-lg); padding: 28px 20px; box-shadow: var(--pc-shadow); }
@media (min-width: 768px) { .auth-card { padding: 48px; } }
.auth-card h1 { font-size: clamp(1.7rem, 3vw, 2.1rem); margin-bottom: 6px; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-foot { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 18px 0 0; font-size: .85rem; color: var(--pc-muted); text-align: center; }

.pc-input-code { font-size: 1.5rem; font-weight: 700; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.pc-link-btn { background: none; border: 0; padding: 0; color: var(--pc-emerald); font-weight: 700; text-decoration: underline; cursor: pointer; }
.pc-link-btn:hover { color: var(--pc-emerald-dark); }

.mini-steps { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.mini-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--pc-sand); color: var(--pc-muted); font-size: .84rem; font-weight: 600; }
.mini-steps span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pc-line); color: var(--pc-ink); font-size: .74rem; font-weight: 800; }
.mini-steps .is-active { background: var(--pc-mint); color: var(--pc-emerald-dark); }
.mini-steps .is-active span { background: var(--pc-forest); color: var(--pc-lime); }

.quote-chip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 18px; border-radius: var(--pc-radius-sm); background: var(--pc-forest); color: rgba(255, 255, 255, .85); font-size: .9rem; }
.quote-chip .icon { color: var(--pc-lime); margin-top: 2px; }
.quote-chip strong { color: var(--pc-lime); }

/* ---------- 404 ---------- */

.not-found .nf-code { display: block; font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; letter-spacing: -0.06em; color: var(--pc-mint); -webkit-text-stroke: 2px var(--pc-emerald); }
.not-found h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 12px 0 8px; }
.error-ref { display: inline-block; margin: 8px 0 4px; padding: 6px 14px; border: 1px dashed var(--pc-emerald); border-radius: 8px; font-variant-numeric: tabular-nums; }
.error-detail { margin-top: 28px; text-align: left; }
.error-detail pre { max-height: 360px; overflow: auto; padding: 12px; font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; background: rgba(0, 0, 0, 0.04); border-radius: 8px; }

/* ---------- Footer ---------- */

.site-footer { background: #06231b; color: rgba(255, 255, 255, .72); padding: 56px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-brand p { margin: 16px 0; max-width: 22rem; line-height: 1.6; }
.footer-contact { display: grid; gap: 8px; }
.footer-contact a, .footer-col a { color: rgba(255, 255, 255, .8); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.footer-contact a:hover, .footer-col a:hover { color: var(--pc-lime); }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: #fff; margin: 0 0 6px; }
.footer-disclosure { padding-top: 24px; font-size: .8rem; line-height: 1.65; color: rgba(255, 255, 255, .55); }
.footer-disclosure strong { color: rgba(255, 255, 255, .85); font-weight: 700; }
.footer-bottom { margin: 16px 0 0; }

/* ---------- Blazor chrome ---------- */

#blazor-error-ui {
    color-scheme: light only; background: #fff7d6; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    box-sizing: border-box; display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; border-radius: var(--pc-radius-sm); }
.blazor-error-boundary::after { content: "Something went wrong."; }

/* ---------- Dashboards (/my, /admin) ---------- */

/* Key figures (StatTile in a .kpi-band): one card split into cells by hairline dividers, each with a small
   label, the figure and a line of context. Desktop: all cells in one row. Narrower: two across, and a last
   odd cell runs full width so nothing is left hanging. The dividers are the band's background showing through
   a 1px gap, so they stay right however the cells wrap. */
.kpi-band {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
    background: var(--pc-line); border: 1px solid var(--pc-line); border-radius: var(--pc-radius);
    box-shadow: var(--pc-shadow-sm); overflow: hidden;
}
.kpi-band > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 992px) {
    .kpi-band { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    .kpi-band > .kpi:last-child:nth-child(odd) { grid-column: auto; }
}

.kpi {
    position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0;
    padding: 18px 20px 20px; background: var(--pc-paper); color: var(--pc-ink); text-decoration: none;
}
.kpi-link { transition: background-color .15s; }
.kpi-link:hover { background: #fbfaf6; color: var(--pc-ink); }
.kpi-label {
    display: flex; align-items: center; gap: 7px; min-width: 0;
    font-size: .8rem; font-weight: 600; color: var(--pc-muted); line-height: 1.3;
}
.kpi-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-label > .icon { color: var(--pc-emerald); }
.kpi-go { margin-left: auto; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.kpi-link:hover .kpi-go, .kpi-link:focus-visible .kpi-go { opacity: 1; transform: none; }
.kpi-value {
    font-size: clamp(1.55rem, 2.1vw, 1.95rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em;
    font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi-value .money-sym { font-size: .6em; color: var(--pc-muted); vertical-align: baseline; margin-right: .1em; }
.kpi-value .money-unit { font-size: .6em; font-weight: 700; color: var(--pc-muted); margin-left: .06em; }
.kpi-note { font-size: .8rem; color: var(--pc-muted); line-height: 1.35; }
.kpi-meter { display: block; height: 4px; margin: 2px 0; border-radius: 999px; background: var(--pc-sand); overflow: hidden; }
.kpi-meter span { display: block; height: 100%; min-width: 3px; border-radius: 999px; background: var(--pc-emerald); }

/* Something needs attention: amber figure, icon and a short accent along the top of the cell. */
.kpi-warning::before { content: ""; position: absolute; left: 20px; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: #e0a43a; }
.kpi-warning .kpi-label > .icon, .kpi-warning .kpi-value { color: #9a5b00; }
.kpi-warning .kpi-meter span { background: #e0a43a; }

/* Secondary band: counts rather than money, a step smaller. */
.kpi-band-sm .kpi { padding: 14px 20px 16px; gap: 4px; }
.kpi-band-sm .kpi-value { font-size: clamp(1.3rem, 1.7vw, 1.55rem); }

@media (max-width: 575.98px) {
    .kpi, .kpi-band-sm .kpi { padding: 14px 14px 16px; }
    .kpi-warning::before { left: 14px; }
    .kpi-value { font-size: 1.4rem; }
    .kpi-band-sm .kpi-value { font-size: 1.25rem; }
}

/* Rand amounts (MoneyText) */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-sym { font-size: .62em; font-weight: 700; color: var(--pc-muted); margin-right: .12em; vertical-align: .32em; }
.money-unit { font-size: .7em; font-weight: 700; margin-left: .04em; }
.money-cents { font-size: .7em; font-weight: 600; color: var(--pc-muted); }
td .money-sym, .money-inline .money-sym { font-size: .85em; vertical-align: baseline; margin-right: .06em; }
td .money-cents, .money-inline .money-cents { font-size: .85em; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 992px) {
    .dash-grid { grid-template-columns: 1.3fr 1fr 1fr; }
    .dash-grid-wide { grid-template-columns: 1.5fr 1fr; }
}
.dash-panel { display: flex; flex-direction: column; min-width: 0; border-radius: 0; box-shadow: none; }
.dash-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-panel-head .h-card { margin: 0; }
.dash-panel-figure { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dash-panel-figure small { font-size: .78rem; font-weight: 600; color: var(--pc-muted); }

.dash-empty { display: flex; gap: 16px; align-items: flex-start; }
.dash-empty h3 { font-size: 1.1rem; margin: 4px 0 6px; }
.dash-empty p { color: var(--pc-muted); margin-bottom: 16px; }
.dash-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0; }
.dash-facts dt { font-size: .8rem; color: var(--pc-muted); font-weight: 600; }
.dash-facts dd { margin: 2px 0 0; font-weight: 700; }

.meter { height: 8px; border-radius: 999px; background: var(--pc-line); overflow: hidden; margin-bottom: 16px; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--pc-emerald); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--pc-line); font-weight: 600; font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
.checklist li:last-child { border-bottom: 0; }
.checklist-mark { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--pc-sand); color: var(--pc-muted); border: 1px solid var(--pc-line); }
.checklist .is-done .checklist-mark { background: var(--pc-mint); color: var(--pc-emerald-dark); border-color: #cfe9dc; }
.checklist-state { margin-left: auto; flex: none; font-size: .8rem; font-weight: 600; color: var(--pc-muted); }
.checklist .is-done .checklist-state { color: var(--pc-emerald-dark); }
.dash-logout { margin-top: auto; padding-top: 16px; }

.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--pc-mint); color: var(--pc-emerald-dark); white-space: nowrap; }
.status-good { background: var(--pc-mint); color: var(--pc-emerald-dark); }
.status-warn { background: #fff4e0; color: #8a5200; }

.col-chart { margin: 0; }
.col-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.col-grid { stroke: var(--pc-line); stroke-width: 1; }
.col-baseline { stroke: var(--pc-line-strong); stroke-width: 1; }
.col-axis { fill: var(--pc-muted); font-size: 11px; font-family: var(--pc-font); }
.col-fill { fill: var(--pc-emerald); transition: fill .15s; }
.col-hit { fill: transparent; }
.col-bar:hover .col-hit { fill: color-mix(in srgb, var(--pc-emerald) 6%, transparent); }
.col-bar:hover .col-fill { fill: var(--pc-forest); }

.hbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(96px, 9rem) 1fr 2.2rem; align-items: center; gap: 10px; font-size: .88rem; }
.hbars-label { color: var(--pc-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars-track { height: 10px; border-radius: 0 4px 4px 0; background: var(--pc-sand); overflow: hidden; }
.hbars-track span { display: block; height: 100%; min-width: 0; border-radius: 0 4px 4px 0; background: var(--pc-emerald); }
.hbars li:hover .hbars-track span { background: var(--pc-forest); }
.hbars-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.dash-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dash-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pc-muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--pc-line); white-space: nowrap; }
.dash-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--pc-line); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table .mono { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.dash-mini-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 8px; border-radius: 9px; background: var(--pc-forest); color: var(--pc-lime); font-size: .72rem; font-weight: 800; vertical-align: middle; }

/* ---------- Form errors (register, login, verify) ---------- */

.form-alert {
    display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 14px 16px;
    border: 1px solid #f5b5ae; border-left: 5px solid var(--pc-danger); border-radius: var(--pc-radius-sm);
    background: var(--pc-danger-bg); color: #7a1a12; box-shadow: 0 6px 18px -10px rgba(180, 35, 24, .45);
    animation: form-alert-in .45s ease-out both;
}
.form-alert-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--pc-danger); color: #fff; }
.form-alert-icon .icon { width: 20px; height: 20px; }
.form-alert-text { display: grid; gap: 2px; font-size: .92rem; line-height: 1.45; min-width: 0; }
.form-alert-text strong { font-size: 1rem; color: var(--pc-danger); }
.form-alert-text a { color: #7a1a12; font-weight: 700; }
@keyframes form-alert-in {
    0% { opacity: 0; transform: translateY(-6px); }
    40% { opacity: 1; transform: translateX(-6px); }
    60% { transform: translateX(5px); }
    80% { transform: translateX(-3px); }
    100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .form-alert { animation: none; } }

/* The field itself shouts too: red label, thicker border, and an icon before the message. */
.pc-field:has(.invalid) label { color: var(--pc-danger); }
.pc-input.invalid { box-shadow: 0 0 0 1px var(--pc-danger), 0 0 0 5px rgba(180, 35, 24, .1); }
.validation-message { display: flex; gap: 6px; align-items: flex-start; font-size: .88rem; }
.validation-message::before {
    content: "!"; display: grid; place-items: center; flex: none; width: 17px; height: 17px; margin-top: 1px;
    border-radius: 50%; background: var(--pc-danger); color: #fff; font-size: .72rem; font-weight: 800; line-height: 1;
}
.pc-check-block:has(input.invalid) .pc-check-box { border-color: var(--pc-danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, .1); }
.pc-form-failed .pc-input { border-color: var(--pc-danger); background: var(--pc-danger-bg); box-shadow: 0 0 0 1px var(--pc-danger), 0 0 0 5px rgba(180, 35, 24, .1); }

/* ---------- Customer portal (/my/...) ---------- */

.portal { min-height: 100vh; }
.portal-main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.portal-content { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px 40px; }
@media (min-width: 768px) { .portal-content { padding: 40px 32px 56px; } }

/* Sidebar: desktop only. */
.portal-side { display: none; }
@media (min-width: 992px) {
    .portal { display: grid; grid-template-columns: 256px minmax(0, 1fr); }
    .portal-side {
        position: sticky; top: 0; height: 100vh; overflow-y: auto;
        display: flex; flex-direction: column; gap: 28px; padding: 24px 16px 16px;
        background: linear-gradient(180deg, var(--pc-forest) 0%, #072a21 100%); color: rgba(255, 255, 255, .8);
    }
    .portal-side .brand { padding: 0 10px; }
}

.portal-nav { display: grid; gap: 4px; }
.portal-nav .portal-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 600;
}
.portal-nav a.portal-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.portal-nav .portal-link.active { background: var(--pc-lime); color: var(--pc-forest); }
.portal-link.is-soon { opacity: .45; cursor: default; }
.portal-link small {
    margin-left: auto; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor;
}

.portal-help { margin-top: auto; display: grid; gap: 6px; padding: 14px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); font-size: .88rem; }
.portal-help strong { color: #fff; }
.portal-help a { color: rgba(255, 255, 255, .8); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.portal-help a:hover { color: var(--pc-lime); }

.portal-user { display: flex; align-items: center; gap: 10px; padding: 14px 4px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.portal-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--pc-lime); color: var(--pc-forest); font-size: .82rem; font-weight: 800; }
.portal-user-text { display: flex; flex-direction: column; min-width: 0; font-size: .82rem; line-height: 1.35; }
.portal-user-text strong { color: #fff; font-size: .9rem; }
.portal-user-text span, .portal-user-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-user form { margin-left: auto; }
.portal-icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .75); cursor: pointer; }
.portal-icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* Phones and tablets: slim top bar + bottom tab bar. */
.portal-topbar {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; background: rgba(247, 246, 241, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--pc-line);
}
.portal-topbar .brand-word { font-size: 1.12rem; }
.portal-topbar-logout { padding: 8px 14px; font-size: .88rem; }

.portal-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    background: var(--pc-paper); border-top: 1px solid var(--pc-line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.portal-tabs .portal-link {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px;
    color: var(--pc-muted); text-decoration: none; font-size: .7rem; font-weight: 700;
}
.portal-tabs .portal-link.active { color: var(--pc-emerald-dark); background: var(--pc-mint); }
.portal-tabs .portal-link small { display: none; }
.portal-main { padding-bottom: 68px; }

@media (min-width: 992px) {
    .portal-topbar, .portal-tabs { display: none; }
    .portal-main { padding-bottom: 0; }
}

.portal-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 20px 16px; font-size: .8rem; color: var(--pc-muted); border-top: 1px solid var(--pc-line); }
.portal-foot a { color: var(--pc-muted); text-decoration: none; }
.portal-foot a:hover { color: var(--pc-ink); text-decoration: underline; }

/* Page content */
.portal-head { margin-bottom: 24px; }
.portal-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin: 0 0 4px; }
.portal-head p { margin: 0; }

.portal-stack { display: grid; gap: 20px; }
.portal-pair { display: grid; gap: 20px; }
@media (min-width: 768px) { .portal-pair { grid-template-columns: 1fr 1fr; } }

.portal-card { padding: 24px !important; min-width: 0; }
.portal-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.portal-card-head h2 { font-size: 1.1rem; margin: 0; }
.portal-card-note { font-size: .88rem; margin: 0 0 4px; }
.portal-done { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--pc-emerald-dark); }

.focus-card {
    position: relative; overflow: hidden; display: grid; gap: 6px; justify-items: start;
    padding: 28px 24px; border-radius: var(--pc-radius-lg); color: rgba(255, 255, 255, .8);
    background:
        radial-gradient(500px 240px at 100% 0%, color-mix(in srgb, var(--pc-lime) 18%, transparent), transparent 65%),
        linear-gradient(150deg, var(--pc-forest) 0%, #072a21 100%);
}
@media (min-width: 768px) { .focus-card { padding: 32px; } }
.focus-card p { margin: 0; }
.focus-card .pc-btn { margin-top: 12px; }
.focus-label { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pc-lime); }
.portal-card .focus-label { color: var(--pc-emerald-dark); }
.focus-figure { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.portal-card .focus-figure { color: var(--pc-ink); font-size: 1.6rem; }
.focus-figure small { font-size: .95rem; font-weight: 600; opacity: .7; }
.focus-foot { margin-top: 10px !important; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); width: 100%; font-size: .9rem; }
.focus-ref { margin-left: 6px; font-size: .88rem; font-variant-numeric: tabular-nums; }

.portal-details { display: grid; gap: 14px; margin: 0; }
.portal-details dt { font-size: .8rem; font-weight: 600; color: var(--pc-muted); }
.portal-details dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.portal-details .status-pill { margin-left: 6px; vertical-align: 1px; }

/* Profile (/my/profile) */
.profile-grid { gap: 14px 24px; }
@media (min-width: 640px) { .profile-grid { grid-template-columns: 1fr 1fr; } }
.profile-contact { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--pc-line); }
.profile-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; }
.profile-saved { margin-bottom: 20px; }
.bank-card { margin-top: 20px; }
.bank-card .pc-form { margin-top: 4px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 639.98px) { .profile-actions .pc-btn { flex: 1 1 100%; justify-content: center; } }
.pc-select-field {
    appearance: none; -webkit-appearance: none; padding-right: 40px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d1f1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.pc-select-field.invalid { background-color: var(--pc-danger-bg); }

/* Apply readiness (dashboard, /my/apply) */
.status-bad { background: var(--pc-danger-bg); color: var(--pc-danger); }
.checklist a { color: var(--pc-ink); }
.checklist a:hover { color: var(--pc-emerald-dark); }
.checklist-text { display: flex; flex-direction: column; min-width: 0; }
.checklist-note { font-size: .8rem; font-weight: 600; color: var(--pc-danger); }
.ready-actions { margin-top: 20px; }
.apply-calc { max-width: 560px; }

/* Documents (/my/documents) */
.doc-slot { scroll-margin-top: 24px; }
.doc-head { display: flex; align-items: flex-start; gap: 14px; }
.doc-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--pc-mint); color: var(--pc-emerald-dark); }
.doc-title { flex: 1; min-width: 0; }
.doc-title h2 { font-size: 1.05rem; margin: 2px 0 4px; }
.doc-title p { margin: 0; font-size: .9rem; }
.doc-optional { font-size: .85rem; font-weight: 500; }
.doc-head .status-pill { margin-top: 4px; }
.doc-files { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.doc-files li { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 10px 12px; border-radius: var(--pc-radius-sm); background: var(--pc-sand); font-weight: 600; font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.doc-meta { font-size: .8rem; font-weight: 500; }
.doc-notice { margin: 14px 0 0; }
.doc-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--pc-line); }
.doc-file-input { flex: 1 1 240px; min-width: 0; padding: 9px 12px; font-size: .9rem; }
.doc-file-input::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 1px solid var(--pc-line-strong); border-radius: 8px; background: var(--pc-sand); color: var(--pc-ink); font: inherit; font-weight: 600; cursor: pointer; }
@media (max-width: 639.98px) { .doc-upload .pc-btn { flex: 1 1 100%; justify-content: center; } }

/* Shared status tones */
.status-muted { background: var(--pc-sand); color: var(--pc-muted); border: 1px solid var(--pc-line); }
.portal-card .focus-card .pc-btn, .portal-card > .pc-btn { margin-top: 12px; }
.focus-card a:not(.pc-btn) { color: var(--pc-lime); }
.portal-back { margin: 0 0 12px; font-size: .88rem; font-weight: 600; }
.portal-back a { display: inline-flex; align-items: center; gap: 4px; color: var(--pc-muted); text-decoration: none; }
.portal-back a:hover { color: var(--pc-ink); }
.icon.flip { transform: scaleX(-1); }
.portal-head-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.portal-head-row .status-pill { margin-top: 10px; font-size: .85rem; padding: 4px 12px; }
.portal-section-title { font-size: 1.15rem; margin: 8px 0 0; }

/* Apply (/my/apply, /my/apply/review) */
.apply-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: -8px 0 20px; counter-reset: none; }
.apply-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--pc-paper); border: 1px solid var(--pc-line); font-size: .86rem; font-weight: 700; color: var(--pc-muted); }
.apply-steps li a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.apply-steps li > span, .apply-steps li a > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--pc-sand); font-size: .78rem; }
.apply-steps .is-current { color: var(--pc-forest); border-color: var(--pc-forest); }
.apply-steps .is-current > span { background: var(--pc-forest); color: var(--pc-lime); }
.apply-steps .is-done { color: var(--pc-emerald-dark); }
.apply-steps .is-done a > span { background: var(--pc-mint); }
.apply-draft { margin-bottom: 20px; }
.apply-note { margin-bottom: 16px; }
.apply-submit { margin-top: 20px; }
.apply-discard { text-align: center; }
.apply-discard .link-btn { color: var(--pc-muted); font-size: .88rem; }
.apply-discard .link-btn:hover { color: var(--pc-danger); }
.pc-input-prefix { position: relative; }
.pc-input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--pc-muted); pointer-events: none; }
.pc-input-prefix .pc-input { padding-left: 32px; width: 100%; }

/* Quote (review and application detail) */
.quote-sub { font-size: .95rem; margin: 24px 0 8px; }
.quote-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.quote-dates li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--pc-radius-sm); background: var(--pc-sand); font-size: .92rem; font-variant-numeric: tabular-nums; }
.quote-dates li span { display: inline-flex; align-items: center; gap: 8px; }
.quote-note { margin-top: 14px; }

/* My loans (/my/loans) */
.pc-table a { color: var(--pc-emerald-dark); font-weight: 700; }
.pc-table .text-overdue { font-size: .8rem; font-weight: 600; color: var(--pc-danger); }
/* A short progress bar with its percentage, for a table cell (/my/loans "Repaid"). */
.table-meter { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--pc-muted); }
.table-meter .meter { width: 72px; height: 6px; margin: 0; }
.pc-table tr.is-reversed td { color: var(--pc-muted); text-decoration: line-through; }
.pc-table tr.is-reversed .tag { text-decoration: none; }

/* Application detail (/my/loans/applications/...) */
.app-pair { align-items: start; }
.app-timeline { list-style: none; margin: 0; padding: 0; }
.app-timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.app-timeline li:last-child { padding-bottom: 0; }
.app-timeline li::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--pc-line); }
.app-timeline li:last-child::before { display: none; }
.app-timeline-dot { flex: none; width: 14px; height: 14px; margin-top: 4px; border-radius: 50%; background: var(--pc-mint); border: 2px solid var(--pc-emerald); }
.app-timeline li:last-child .app-timeline-dot { background: var(--pc-emerald); }
.app-timeline div { display: flex; flex-direction: column; min-width: 0; }
.app-timeline .muted { font-size: .82rem; }
.app-timeline p { margin: 4px 0 0; font-size: .9rem; }

/* ---------- Admin portal (/admin/...) ---------- */

.portal-admin .portal-content { max-width: 1240px; }
.portal-role span { color: rgba(255, 255, 255, .7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-role strong { display: inline-flex; align-items: center; gap: 8px; }
.portal-role .icon { color: var(--pc-lime); }

.admin-focus-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-focus-actions .pc-btn { margin-top: 12px; }

/* Queue (/admin/applications) */
.pc-btn-sm { padding: 7px 14px; font-size: .84rem; border-width: 1px; }
.pc-btn-sm:hover .icon { transform: none; }

.queue-toolbar { padding: 0 !important; border-radius: var(--pc-radius); margin-bottom: 20px; overflow: visible; position: relative; z-index: 5; }

/* Quick filters: underline tabs across the top of the toolbar */
.queue-tabs {
    display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--pc-line);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.queue-tabs::-webkit-scrollbar { display: none; }
.queue-tabs a {
    flex: none; position: relative; display: inline-flex; align-items: center;
    padding: 12px 10px; color: var(--pc-muted); font-size: .84rem; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
}
.queue-tabs a::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent;
}
.queue-tabs a:hover { color: var(--pc-ink); }
.queue-tabs a.is-active { color: var(--pc-forest); font-weight: 700; }
.queue-tabs a.is-active::after { background: var(--pc-emerald); }

/* Filter bar (shared by admin lists): one compact row of search, a select or two, "More filters" and Apply.
   Controls keep their natural width instead of stretching across the page. Extra filters open in a small
   pop-over panel; active filters show underneath as removable chips. */
.filter-bar { padding: 12px 16px; display: grid; gap: 10px; }
.filter-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-bar input, .filter-bar select {
    height: 34px; padding: 0 10px; border: 1px solid var(--pc-line-strong); border-radius: 8px; background: var(--pc-paper);
    color: var(--pc-ink); font: inherit; font-size: .85rem;
}
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--pc-emerald); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc-emerald) 12%, transparent); }
.filter-bar select {
    appearance: none; padding-right: 28px; cursor: pointer;
    background: var(--pc-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6a64' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
}
.filter-search { position: relative; flex: 1 1 240px; max-width: 340px; margin: 0; }
.filter-search > .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--pc-muted); pointer-events: none; }
.filter-search input { width: 100%; padding-left: 32px; }
.filter-select { margin: 0; }
.filter-select select { max-width: 200px; }
.filter-bar .pc-btn { height: 34px; }

.filter-more { position: relative; }
.filter-more > summary {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; list-style: none; cursor: pointer; user-select: none;
    border: 1px solid var(--pc-line-strong); border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--pc-ink); background: var(--pc-paper);
}
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more > summary:hover, .filter-more[open] > summary { border-color: var(--pc-emerald); color: var(--pc-forest); }
.filter-count {
    display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--pc-emerald); color: #fff; font-size: .7rem; font-weight: 700;
}
.filter-panel {
    position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(380px, calc(100vw - 48px));
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px;
    background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: 12px; box-shadow: var(--pc-shadow);
}
.filter-field { display: grid; gap: 4px; min-width: 0; }
.filter-field-wide { grid-column: 1 / -1; }
.filter-field label { font-size: .72rem; font-weight: 600; color: var(--pc-muted); text-transform: uppercase; letter-spacing: .04em; }
.filter-field input, .filter-field select { width: 100%; }

.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px; border-radius: 999px;
    background: var(--pc-mint); color: var(--pc-forest); font-size: .78rem; font-weight: 600; text-decoration: none;
}
.filter-chip:hover { background: #cfeedd; color: var(--pc-forest); }
.filter-clear { margin-left: 4px; font-size: .78rem; font-weight: 600; color: var(--pc-muted); }
.filter-clear:hover { color: var(--pc-danger); }

@media (max-width: 575.98px) {
    .filter-search { flex-basis: 100%; max-width: none; }
    .filter-panel { left: auto; right: 0; }
}

.pc-input-icon { position: relative; }
.pc-input-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--pc-muted); pointer-events: none; }
.pc-input-icon .pc-input { padding-left: 42px; }

.queue-table-head { padding: 18px 18px 0; }
.queue-customer { display: flex; flex-direction: column; line-height: 1.35; }
.queue-customer .muted { font-size: .8rem; }
.queue-table td { vertical-align: middle; }

/* Pager (Pager.razor): summary on the left, rows per page and page numbers on the right. */
.pager {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 18px;
    border-top: 1px solid var(--pc-line); font-size: .84rem; color: var(--pc-muted);
}
.pager-summary { margin-right: auto; }
.pager-summary strong { color: var(--pc-ink); font-variant-numeric: tabular-nums; }
.pager-sizes, .pager-pages { display: inline-flex; align-items: center; gap: 2px; }
.pager-sizes .muted { margin-right: 6px; }
.pager-sizes a, .pager-pages a, .pager-pages span {
    display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px;
    color: var(--pc-ink); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums;
}
.pager-sizes a:hover, .pager-pages a:hover { background: var(--pc-sand); }
.pager-sizes a.is-active, .pager-pages .is-active { background: var(--pc-forest); color: #fff; }
.pager-pages .is-disabled { color: var(--pc-line-strong); }
.pager-pages .pager-gap { min-width: 20px; padding: 0; color: var(--pc-muted); }
@media (max-width: 575.98px) {
    .pager { justify-content: center; }
    .pager-summary { margin-right: 0; width: 100%; text-align: center; }
}

/* Decision panel and notes (/admin/applications/{reference}, F33–F36) */
.decision { border: 1px solid var(--pc-line); border-radius: 12px; margin-top: 10px; background: var(--pc-paper); }
.decision > summary {
    display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer; list-style: none;
    font-weight: 700; font-size: .92rem; color: var(--pc-ink);
}
.decision > summary::-webkit-details-marker { display: none; }
.decision > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--pc-muted); border-bottom: 2px solid var(--pc-muted); transform: rotate(45deg); transition: transform .15s; }
.decision[open] > summary::after { transform: rotate(-135deg); }
.decision > summary .icon { color: var(--pc-emerald); }
.decision-danger > summary .icon { color: var(--pc-danger); }
.decision-body { display: grid; gap: 12px; padding: 0 14px 14px; }
.decision-body .pc-btn { justify-self: start; }
.decision-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.decision-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; padding: 0; border: 0; }
.decision-checks legend { font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.decision-checks label { display: flex; align-items: center; gap: 8px; font-size: .88rem; }

.admin-note-form { display: grid; gap: 8px; }
.admin-note-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.admin-note-actions .pc-check { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; }
.admin-notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.admin-notes li { padding: 10px 12px; border-radius: var(--pc-radius-sm); background: var(--pc-sand); border-left: 3px solid var(--pc-line-strong); }
.admin-notes li.is-shared { background: var(--pc-info-bg); border-left-color: var(--pc-emerald); }
.admin-notes p { margin: 0 0 4px; font-size: .9rem; white-space: pre-line; }
.admin-notes .muted { font-size: .78rem; }

/* Disbursements (/admin/disbursements, F39) */
.payout-card { margin-bottom: 20px; border: 1px solid var(--pc-emerald); }
.payout-summary { margin-bottom: 12px; }
.payout-summary .muted { margin-left: 6px; font-size: .85rem; }
.payout-account-number { font-variant-numeric: tabular-nums; letter-spacing: .04em; user-select: all; }
.payout-form { display: grid; gap: 12px; grid-template-columns: minmax(0, 180px) minmax(0, 280px) auto; align-items: end; }
.payout-form .pc-btn { height: 44px; }
.payout-note { margin-top: 10px; font-size: .84rem; }
.queue-table tr.is-selected td { background: var(--pc-info-bg); }
@media (max-width: 767.98px) { .payout-form { grid-template-columns: 1fr; } }

/* Loans and payments (/admin/loans, /admin/payments, F40–F45) */
.loan-stats { margin-bottom: 0; }
.capture-form { display: grid; gap: 12px; }
.capture-form .pc-btn { justify-self: start; }
.reverse-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reverse-form .pc-input { flex: 1 1 260px; height: 34px; padding: 4px 10px; font-size: .86rem; }
.payments-actions { display: grid; gap: 20px; margin-bottom: 20px; align-items: start; }
@media (min-width: 1100px) { .payments-actions { grid-template-columns: 1fr 1fr; } }
.import-result { margin-top: 14px; }
.import-problems td { font-size: .84rem; }
tr.is-reversed td { color: var(--pc-muted); text-decoration: line-through; }
tr.is-reversed td:last-child { text-decoration: none; }

/* Users (/admin/users, F11) */
.add-user { margin-bottom: 16px; }
.add-user-form { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.user-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.user-actions form { margin: 0; }
.one-time-password code { font-size: 1.05rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--pc-paper); color: var(--pc-forest); letter-spacing: .04em; }

/* Staff acting for a customer (CustomerPortal): the banner on /my and the customer forms in admin */
.notice-warn { background: #fff4e0; color: #8a5200; border: 1px solid #f5d9a8; }
.acting-banner { align-items: center; flex-wrap: wrap; }
.acting-banner > span { flex: 1 1 260px; }
.acting-banner form { margin: 0; }
.add-customer-form { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.add-customer-form .pc-check, .add-customer-form .add-customer-actions { grid-column: 1 / -1; }
.act-for { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.verify-mobile { display: inline-block; margin: 0 0 0 6px; }

.report-empty { padding: 0 18px 18px; margin: 0; }
.filter-select { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--pc-muted); }

/* Settings (/admin/settings/..., F18, F21, F37) and messages */
.settings-tabs { margin-bottom: 20px; border-radius: var(--pc-radius); border: 1px solid var(--pc-line); }
.price-form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.price-actions { display: flex; gap: 8px; grid-column: 1 / -1; }
.text-up { color: var(--pc-danger); }
.text-down { color: var(--pc-emerald-dark); }
.faq-form { display: grid; gap: 12px; grid-template-columns: 1fr 120px; }
.faq-form .faq-wide { grid-column: 1 / -1; }
.faq-form .pc-btn { justify-self: start; }
.message-list { display: grid; gap: 14px; margin-bottom: 16px; }
.message.is-new { border-left: 4px solid var(--pc-emerald); }
.message-body { white-space: pre-line; margin: 0 0 12px; }

/* Audit log (/admin/audit, F48) */
.audit-table td { vertical-align: top; font-size: .84rem; }
.audit-changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-width: 520px; }
.audit-changes li { overflow-wrap: anywhere; }
.audit-old { color: var(--pc-danger); text-decoration: line-through; }
.audit-new { color: var(--pc-emerald-dark); }
.profile-data-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }

.narrow-stack { display: grid; gap: 20px; max-width: 560px; }
.password-form { display: grid; gap: 12px; }
.password-form .pc-btn { justify-self: start; }
.profile-password-link { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 600; font-size: .9rem; }
.label-link { font-size: .84rem; font-weight: 600; }
.doc-links { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; }
.doc-links a { display: inline-flex; align-items: center; gap: 4px; }

/* Messages and offer on the customer's application page */
.app-offer { display: grid; gap: 12px; }
.app-offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.app-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-messages li { padding: 12px 14px; border-radius: var(--pc-radius-sm); background: var(--pc-info-bg); }
.app-messages p { margin: 0 0 4px; white-space: pre-line; }
.app-messages .muted { font-size: .8rem; }

/* Review (/admin/applications/{reference}) */
.admin-review { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-review > * { min-width: 0; }
@media (min-width: 1100px) { .admin-review { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

.admin-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.admin-docs li { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--pc-radius-sm); background: var(--pc-sand); min-width: 0; }
.admin-docs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.admin-docs-file { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-weight: 600; font-size: .9rem; color: var(--pc-emerald-dark); overflow-wrap: anywhere; }
.admin-docs-file.is-selected { color: var(--pc-ink); text-decoration: underline; text-underline-offset: 3px; }
.admin-docs-card .notice { margin-bottom: 14px; }

/* The document being checked, with its Accept / Reject, is exactly one screen tall (less the phone top and tab bars),
   so opening #doc-viewer shows the whole page and the buttons together. The document takes whatever height is left. */
.admin-doc-review {
    display: flex; flex-direction: column; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--pc-line);
    height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 480px; scroll-margin-top: 64px;
}
@media (min-width: 992px) {
    .admin-doc-review { height: calc(100vh - 32px); height: calc(100dvh - 32px); scroll-margin-top: 16px; }
}
.admin-doc-review > * { flex: none; }
.admin-doc-review .quote-sub { margin: 0; }
.admin-doc-review .form-alert { margin: 0; }
.admin-doc-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.admin-doc-actions .pc-field { flex: 1 1 260px; min-width: 0; }
.admin-doc-actions .hint { font-size: .78rem; }
.admin-doc-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-btn-danger { color: var(--pc-danger); border-color: #f5b5ae; }
.pc-btn-danger:hover { background: var(--pc-danger-bg); }

.admin-doc-review > .doc-viewer { flex: 1 1 auto; min-height: 0; }
.doc-viewer { display: flex; flex-direction: column; gap: 8px; }
.doc-viewer > * { flex: none; }
.doc-viewer-frame, .doc-viewer-image, .doc-viewer-none { flex: 1 1 auto; min-height: 200px; }
.doc-viewer-frame { display: block; width: 100%; height: 100%; border: 1px solid var(--pc-line); border-radius: var(--pc-radius-sm); background: var(--pc-sand); }
.doc-viewer-image { display: block; border: 1px solid var(--pc-line); border-radius: var(--pc-radius-sm); background: var(--pc-sand); overflow: hidden; }
.doc-viewer-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.doc-viewer-none { display: grid; place-content: center; place-items: center; gap: 8px; margin: 0; padding: 40px 16px; border: 1px dashed var(--pc-line-strong); border-radius: var(--pc-radius-sm); text-align: center; }
.doc-viewer-foot { margin: 0; font-size: .88rem; font-weight: 600; }
.doc-viewer-foot a { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }

.admin-ready { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--pc-emerald-dark); }
.admin-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-todo li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 600; }

.admin-assignee { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.05rem; }
.admin-assign { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--pc-line); }
.admin-assign .pc-input { flex: 1; min-width: 0; }

.admin-sums { margin: 0; display: grid; font-variant-numeric: tabular-nums; }
.admin-sums > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--pc-line); }
.admin-sums > div:last-child { border-bottom: 0; }
.admin-sums dt { font-weight: 500; color: var(--pc-muted); }
.admin-sums dd { margin: 0; font-weight: 700; }
.admin-sums .is-total dt, .admin-sums .is-total dd { color: var(--pc-ink); font-weight: 800; }

/* ---------- Platform (/platform): tenant set-up ---------- */

.platform-form { display: grid; gap: 14px 18px; grid-template-columns: 1fr; }
.platform-form .wide, .platform-form h3, .platform-form > .pc-btn { grid-column: 1 / -1; }
.platform-form > .pc-btn { justify-self: start; }
.platform-form h3 { font-size: 1rem; margin: 10px 0 0; }
@media (min-width: 768px) { .platform-form { grid-template-columns: 1fr 1fr; } }
.platform-colors { display: flex; flex-wrap: wrap; gap: 18px; }
.platform-colors .pc-field { min-width: 140px; }
.platform-colors input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--pc-line-strong); border-radius: var(--pc-radius-sm); background: #fff; cursor: pointer; }
.platform-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .12); }
.platform-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.platform-logo img { max-height: 64px; max-width: 240px; background: #fff; border: 1px solid var(--pc-line); border-radius: var(--pc-radius-sm); padding: 6px 10px; }
.platform-logo form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.platform-login { max-width: 440px; margin: 48px auto; }
