/* ═══════════════════════════════════════════════════════════════
   PayChain Wallet — Design System  (PayChain "Cloud", one shared look;
   the active domain contributes only a restrained accent — see tokens)
   Light theme "Cloud" by default; dark via the header toggle
   (<html data-theme>). Domain accent tokens (--app-*, --wallet-primary)
   are injected per request by DomainTheme.CssVars.
   ═══════════════════════════════════════════════════════════════ */

/* ── PayChain base (one shared look for every domain) ──
   Light theme "Cloud" (#F1F4F8 soft blue-grey off-white, chosen 2026-11-11 over the
   original warm Ivory) with Obsidian and Trust Gold from the PayChain identity.
   A domain adds ONLY its accent (--app-*), injected per request by
   DomainTheme.CssVars; the values below are the PayChain fallbacks
   (Trust Gold), used when no domain theme is resolved. */
:root {
    --pc-obsidian:   #111111;
    --pc-ivory:      #F1F4F8;   /* light ink on the dark card (name kept for compatibility) */
    --pc-gold:       #B58A45;
    --pc-gold-light: #D8BC85;
    --pc-stone:      #5B6779;
    --pc-mist:       #E2E8F0;

    --app-accent:          #B58A45;
    --app-accent-rgb:      181, 138, 69;
    --app-accent-text:     #886834;   /* gold darkened to 4.5:1 on Ivory */
    --app-accent-soft:     #E9E5DF;
    --app-accent-on-dark:  #B58A45;
    --app-on-accent:       #111111;
    --app-on-accent-dark:  #111111;
    --app-focus-ring:      #886834;

    /* Older views use --wallet-primary as text/icon colour: it is the accessible accent. */
    --wallet-primary:         #886834;
    --wallet-primary-dark:    #6A5129;
    --wallet-primary-rgb:     136, 104, 52;
    --wallet-on-primary:      #FFFFFF;
    --wallet-secondary:       #886834;
    --wallet-secondary-dark:  #6A5129;
    --wallet-secondary-rgb:   136, 104, 52;

    --wallet-success:  #1E7A55;
    --wallet-danger:   #B53A3A;
    --wallet-warning:  #A66A14;
    --wallet-info:     #2D66C3;

    --wallet-header-h: 64px;
    --wallet-nav-h:    68px;
    --wallet-radius:   20px;
    --wallet-radius-sm:14px;
    --wallet-radius-xs:10px;

    --wallet-glass-blur: blur(14px) saturate(140%);

    --wallet-bg:          #F1F4F8;   /* Cloud */
    --wallet-bg-2:        #F1F4F8;
    --wallet-surface:     #FAFBFD;
    --wallet-surface-2:   #E9EEF4;
    --wallet-card-bg:     #FAFBFD;
    --wallet-input-bg:    #FFFFFF;
    --wallet-text:        #111111;
    --wallet-muted:       #5B6779;
    --wallet-border:      #DDE3EB;
    --wallet-border-2:    #CDD5E0;
    --wallet-hover:       rgba(17,17,17,.04);

    --wallet-glass:        rgba(241,244,248,.92);
    --wallet-glass-border: #DDE3EB;
    --wallet-header-bg:    rgba(241,244,248,.92);

    --wallet-shadow-sm:  0 1px 2px rgba(16,24,40,.04);
    --wallet-shadow:     0 6px 18px -10px rgba(16,24,40,.16);
    --wallet-shadow-lg:  0 18px 40px -20px rgba(16,24,40,.24);

    --wallet-app-bg: #F1F4F8;
    --wallet-btn-close-filter: none;

    --pc-ease: cubic-bezier(.2, .7, .2, 1);

    /* Semantic surfaces — flip in dark mode */
    --pc-strong:       #111111;   /* primary buttons, debit tiles */
    --pc-on-strong:    #F1F4F8;
    --pc-strong-hover: #2A2A2A;
    --pc-chip:         #E2E8F0;   /* avatars, payee icon */
    --pc-on-chip:      #111111;
    --pc-card:         #111111;   /* the balance card */
    --pc-card-border:  transparent;
    --pc-ok-bg:        #DCEBE3;
    --pc-warn-bg:      #F3E6CF;
    --pc-err-bg:       #F2DADA;
    --app-fill:        #B58A45;
    --app-on-fill:     #111111;
}

/* ── Dark mode (toggle in the header; ivory is the default) ── */
:root[data-theme="dark"] {
    --wallet-bg:          #0D1015;
    --wallet-bg-2:        #0D1015;
    --wallet-surface:     #171B22;
    --wallet-surface-2:   #20252E;
    --wallet-card-bg:     #171B22;
    --wallet-input-bg:    #12161C;
    --wallet-text:        #F1F4F8;
    --wallet-muted:       #9AA3B2;
    --wallet-border:      #2A303B;
    --wallet-border-2:    #363D4A;
    --wallet-hover:       rgba(241,244,248,.05);
    --wallet-glass:        rgba(13,16,21,.92);
    --wallet-glass-border: #2A303B;
    --wallet-header-bg:    rgba(13,16,21,.92);
    --wallet-shadow-sm:  0 2px 10px rgba(0,0,0,.35);
    --wallet-shadow:     0 10px 30px -14px rgba(0,0,0,.6);
    --wallet-shadow-lg:  0 24px 60px -24px rgba(0,0,0,.75);
    --wallet-app-bg: #0D1015;
    --wallet-btn-close-filter: invert(1) grayscale(1) brightness(1.8);

    --wallet-success: #4CC38A;
    --wallet-warning: #E0A54A;
    --wallet-danger:  #F07B7B;

    --pc-strong:       #F1F4F8;
    --pc-on-strong:    #111111;
    --pc-strong-hover: #FFFFFF;
    --pc-chip:         #2A303B;
    --pc-on-chip:      #F1F4F8;
    --pc-card:         #1A1F27;
    --pc-card-border:  rgba(241,244,248,.08);
    --pc-ok-bg:        rgba(76,195,138,.16);
    --pc-warn-bg:      rgba(224,165,74,.16);
    --pc-err-bg:       rgba(240,123,123,.16);

    /* PayChain gold fallbacks for dark (DomainTheme overrides per domain) */
    --app-accent-text: #B58A45;
    --app-accent-soft: #433A2C;
    --app-focus-ring:  #B58A45;
    --wallet-primary:  #B58A45;
    --wallet-primary-rgb: 181, 138, 69;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    background: var(--wallet-bg);
    color: var(--wallet-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* Cross-document (MPA) page transitions — native crossfade between screens */
@view-transition { navigation: auto; }

/* ═══════════════════════════════════════════════════════════════
   AUTH SCREENS
   ═══════════════════════════════════════════════════════════════ */
.auth-page {
    min-height: 100vh;      /* for browsers that do not know dvh — see .wallet-app */
    min-height: 100dvh;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 1.25rem;
    background: var(--wallet-bg);
    position: relative;
}
/* A single thin accent line across the top — the only domain colour on sign-in. */
.auth-page::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--app-accent);
    pointer-events: none;
}
.auth-wrapper { width: 100%; max-width: 400px; position: relative; z-index: 1; margin: auto; }
.auth-card {
    background: var(--wallet-surface);
    color: var(--wallet-text);
    border: 1px solid var(--wallet-border);
    border-radius: var(--wallet-radius);
    padding: 2.25rem 1.75rem 2rem;
    box-shadow: var(--wallet-shadow-lg);
    backdrop-filter: blur(12px);
}
.auth-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 1.75rem; }
.auth-logo { display: block; margin: 0 auto .75rem; height: 52px; width: auto; max-width: 200px; object-fit: contain; }
.auth-logo-placeholder {
    width: 60px; height: 60px; border-radius: 18px;
    background: linear-gradient(135deg, var(--wallet-primary), var(--wallet-primary-dark));
    display: flex; align-items: center; justify-content: center;
    margin-bottom: .75rem; color: #fff; font-size: 1.6rem;
    box-shadow: 0 8px 24px rgba(var(--wallet-primary-rgb),.45);
}
.auth-brand h5 { font-size: 1.1rem; font-weight: 700; color: var(--wallet-text); letter-spacing: -.01em; }
.auth-card .form-label {
    font-size: .8rem; font-weight: 600; color: var(--wallet-muted);
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem;
}
.auth-card .form-control {
    border-radius: var(--wallet-radius-sm);
    border: 1.5px solid var(--wallet-border-2);
    padding: .7rem .9rem; font-size: .95rem;
    background: var(--wallet-input-bg); color: var(--wallet-text);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-card .form-control:focus {
    border-color: var(--wallet-primary);
    box-shadow: 0 0 0 3px rgba(var(--wallet-primary-rgb),.2);
    background: var(--wallet-surface); outline: none;
}
.auth-card .btn-wallet-primary { margin-top: .25rem; }

/* ═══════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════ */
.wallet-app {
    /* BOTH lines are needed, in this order. A browser that does not know the dvh unit
       (Chromium before 108 — which includes the Huawei Browser many of our users are on —
       and Safari before 15.4) throws the whole declaration away. With only the dvh line
       the shell then has no height at all, and because it is overflow:hidden the page
       cannot scroll: anything below the first screen is unreachable. vh is the answer for
       those browsers; dvh overrides it wherever it is understood. */
    height: 100vh;
    height: 100dvh;
    background: var(--wallet-app-bg);
    background-attachment: fixed;
    display: flex; flex-direction: column; overflow: hidden;
}

/* ── Header ── */
.wallet-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    height: var(--wallet-header-h);
    background: var(--wallet-header-bg);
    backdrop-filter: var(--wallet-glass-blur);
    -webkit-backdrop-filter: var(--wallet-glass-blur);
    border-bottom: 1px solid var(--wallet-glass-border);
    padding: 0 1rem;
    display: flex; align-items: center; justify-content: space-between;
}
/* Tenant logo — the server hands back a per-surface version (see LogoSurfaceAdapter),
   so the header only has to show the one that matches the active theme. */
.wallet-header-logo { display: block; height: 34px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.brand-logo--on-light { display: none !important; }
:root[data-theme="light"] .brand-logo--on-dark  { display: none !important; }
:root[data-theme="light"] .brand-logo--on-light { display: block !important; }
/* SVG logos can't be pixel-adapted server-side — on dark surfaces they get a clean plate. */
.brand-logo--svg-plate { background: #fff; padding: 5px 10px; border-radius: 10px; box-sizing: content-box; }
.wallet-header-brand { text-decoration: none; }
.wallet-header-logo-fallback {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--wallet-primary), var(--wallet-primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(var(--wallet-primary-rgb),.4);
}
.wallet-header-brand { display: flex; align-items: center; gap: .6rem; }
.wallet-header-name { font-size: 1rem; font-weight: 700; color: var(--wallet-text); letter-spacing: -.01em; }
.wallet-header-actions { display: flex; align-items: center; gap: .25rem; }
.btn-icon-ghost {
    width: 44px; height: 44px; border-radius: 22px;
    background: transparent; padding: 0; /* <button> otherwise gets the browser's grey/white face */
    -webkit-tap-highlight-color: transparent;
    display: flex; align-items: center; justify-content: center;
    color: var(--wallet-muted); font-size: 1.15rem; cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
/* Hover only where a real pointer exists — on phones :hover sticks after a tap. */
@media (hover: hover) {
    .btn-icon-ghost:hover {
        background: rgba(var(--wallet-primary-rgb),.14);
        color: var(--wallet-primary);
        border-color: rgba(var(--wallet-primary-rgb),.28);
    }
}
.btn-icon-ghost:focus { outline: none; }
.btn-icon-ghost:focus-visible { outline: 2px solid rgba(var(--wallet-primary-rgb),.6); outline-offset: 2px; }
.btn-icon-ghost:active { transform: scale(.92); }

/* ── Header: domain identity, notifications, avatar ── */
.hdr-avatar {
    width: 44px; height: 44px; border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    background: var(--pc-chip); color: var(--pc-on-chip);
    font-size: .9rem; font-weight: 700; letter-spacing: .02em;
}
.hdr-avatar:hover { color: var(--pc-on-chip); }

/* ── Bottom tab bar: Home · Payments · Market (Activity on government wallets) · Profile ──
   Active tab = accessible accent colour AND the filled icon, so state is never colour alone. */
.wallet-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    height: var(--wallet-nav-h);
    background: var(--wallet-glass);
    backdrop-filter: var(--wallet-glass-blur);
    -webkit-backdrop-filter: var(--wallet-glass-blur);
    border-top: 1px solid var(--wallet-glass-border);
    display: flex; align-items: center; justify-content: space-around;
    padding: 0 .5rem;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    flex: 1; min-height: 52px; padding: 6px 2px;
    color: var(--wallet-muted); font-size: .72rem; font-weight: 500;
    transition: color .18s;
}
.bottom-nav-item i { font-size: 1.4rem; line-height: 1; }
.bottom-nav-item.active { color: var(--app-accent-text); font-weight: 700; }
@media (hover: hover) { .bottom-nav-item:hover { color: var(--wallet-text); } }

/* ── Focus: the domain accent, visible on every interactive element ── */
.wallet-app a:focus-visible,
.wallet-app button:focus-visible,
.wallet-app input:focus-visible,
.wallet-app select:focus-visible,
.wallet-app textarea:focus-visible {
    outline: 2px solid var(--app-focus-ring); outline-offset: 2px;
}

/* ── "Powered by PayChain" ── */
/* The official PayChain lockup (CI: min 140px wide, clear space >= 16px). The primary
   version shows on ivory, the reverse version in dark mode (brand-logo--on-* rules). */
.powered-by {
    margin: 2rem 1rem .5rem; padding: 1rem 0;
    display: flex; flex-direction: column; align-items: center; gap: .375rem;
    font-size: .75rem; color: var(--wallet-muted);
}
.powered-by-logo { width: 140px; height: auto; }

/* ═══════════════════════════════════════════════════════════════
   BALANCE CARD  (the one hero surface with a light glass sheen)
   ═══════════════════════════════════════════════════════════════ */
.balance-card {
    background: linear-gradient(150deg, var(--wallet-primary) 0%, rgba(var(--wallet-primary-rgb),.55) 100%);
    color: #fff;
    border-radius: var(--wallet-radius);
    padding: 1.5rem 1.5rem 1.35rem;
    margin: 1rem;
    position: relative; overflow: hidden;
    box-shadow: 0 18px 40px -18px rgba(var(--wallet-primary-rgb),.7);
}
/* gentle one-off specular sheen (no looping bob — keeps the card stable) */
.balance-card::before {
    content: ''; position: absolute; top: -60%; left: -30%;
    width: 45%; height: 220%; transform: rotate(20deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
    animation: sheen 2.4s ease-out .15s 1 both; pointer-events: none;
}
@keyframes sheen { from { left: -40%; } to { left: 135%; } }
.balance-card::after {
    content: ''; position: absolute; bottom: -50px; right: 40px;
    width: 130px; height: 130px; border-radius: 50%;
    background: rgba(255,255,255,.08); pointer-events: none;
}
.balance-card-inner { position: relative; z-index: 1; }
.balance-label { font-size: .75rem; font-weight: 500; opacity: .85; margin-bottom: .2rem; position: relative; z-index: 1; }
.balance-amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: .15rem; position: relative; z-index: 1; }
.balance-currency { font-size: 1.1rem; font-weight: 600; opacity: .85; vertical-align: super; margin-right: 4px; }
.balance-card-actions { display: flex; gap: .65rem; margin-top: 1.1rem; }
.balance-card-actions .balance-action-btn,
.balance-card .btn-light {
    flex: 1; padding: .55rem .5rem;
    background: rgba(255,255,255,.18) !important;
    border: 1px solid rgba(255,255,255,.28) !important;
    border-radius: var(--wallet-radius-xs);
    color: #fff !important; font-size: .82rem; font-weight: 600;
    text-align: center; cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .2s, transform .15s;
}
.balance-card-actions .balance-action-btn:hover,
.balance-card .btn-light:hover { background: rgba(255,255,255,.28) !important; transform: translateY(-1px); }
.balance-card-actions .balance-action-btn:active,
.balance-card .btn-light:active { transform: scale(.96); }

/* ═══════════════════════════════════════════════════════════════
   QUICK ACTIONS  (solid tiles)
   ═══════════════════════════════════════════════════════════════ */
.quick-actions-wrap { padding: 0 1rem .25rem; }
.quick-actions {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem;
    padding: 0 1rem;
}
@media (max-width: 360px) { .quick-actions { grid-template-columns: repeat(3, 1fr); } }
.quick-action {
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    padding: .8rem .25rem;
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: var(--wallet-radius-sm);
    font-size: .68rem; font-weight: 500; color: var(--wallet-muted);
    cursor: pointer; text-align: center; word-break: break-word;
    transition: transform .16s, background .16s, border-color .16s;
}
.quick-action:hover { background: var(--wallet-surface-2); border-color: var(--wallet-border-2); transform: translateY(-2px); }
.quick-action:active { transform: scale(.94); }
.qa-icon {
    width: 44px; height: 44px; border-radius: 14px;
    background: rgba(var(--wallet-primary-rgb),.14);
    border: 1px solid rgba(var(--wallet-primary-rgb),.26);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: var(--wallet-primary);
    transition: background .2s; flex-shrink: 0;
}
.quick-action:hover .qa-icon { background: rgba(var(--wallet-primary-rgb),.22); }

/* ═══════════════════════════════════════════════════════════════
   SECTION / FORM CARDS
   ═══════════════════════════════════════════════════════════════ */
.wallet-section {
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: var(--wallet-radius);
    padding: 1.1rem; margin: 0 1rem 1rem;
    box-shadow: var(--wallet-shadow-sm);
}
.wallet-section-title {
    font-size: .7rem; font-weight: 700; color: var(--wallet-muted);
    text-transform: uppercase; letter-spacing: .08em; margin-bottom: .85rem;
}
.wallet-form-card {
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: var(--wallet-radius);
    padding: 1.25rem; margin: .75rem 1rem;
    box-shadow: var(--wallet-shadow-sm);
}
.wallet-info-card {
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: var(--wallet-radius);
    padding: 1.1rem;
    box-shadow: var(--wallet-shadow-sm);
}
.wallet-page-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1rem;
    background: var(--wallet-glass);
    backdrop-filter: var(--wallet-glass-blur);
    -webkit-backdrop-filter: var(--wallet-glass-blur);
    border-bottom: 1px solid var(--wallet-glass-border);
}
.wallet-page-header h5 { font-size: .97rem; font-weight: 700; letter-spacing: -.01em; }
.btn-icon-back {
    width: 36px; height: 36px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--wallet-surface-2); border: 1px solid var(--wallet-border);
    font-size: 1.1rem; color: var(--wallet-text);
    transition: background .15s, transform .15s;
}
.btn-icon-back:hover { background: var(--wallet-hover); }
.btn-icon-back:active { transform: scale(.92); }

/* Form controls inside cards */
.wallet-form-card .form-label,
.wallet-form .form-label {
    font-size: .78rem; font-weight: 600; color: var(--wallet-muted);
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem;
}
.wallet-form-card .form-control,
.wallet-form .form-control {
    border-radius: var(--wallet-radius-sm);
    border: 1.5px solid var(--wallet-border-2);
    padding: .7rem .9rem; font-size: .92rem;
    background: var(--wallet-input-bg); color: var(--wallet-text);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.wallet-form-card .form-control:focus,
.wallet-form .form-control:focus {
    border-color: var(--wallet-primary);
    box-shadow: 0 0 0 3px rgba(var(--wallet-primary-rgb),.18);
    background: var(--wallet-surface); outline: none;
}

/* ═══════════════════════════════════════════════════════════════
   TRANSACTION ITEMS
   ═══════════════════════════════════════════════════════════════ */
.txn-item {
    display: flex; align-items: center; gap: .85rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--wallet-border);
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    background: var(--wallet-hover); color: var(--wallet-muted);
    border: 1px solid var(--wallet-border);
}
.txn-icon.credit  { background: rgba(52,211,153,.14);  color: var(--wallet-success); border-color: rgba(52,211,153,.28); }
.txn-icon.debit   { background: var(--wallet-hover);    color: var(--wallet-text); }
.txn-icon.pending { background: rgba(245,158,11,.14);   color: var(--wallet-warning); border-color: rgba(245,158,11,.28); }
.txn-details { flex: 1; min-width: 0; }
.txn-name { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--wallet-text); }
.txn-date { font-size: .73rem; color: var(--wallet-muted); margin-top: 1px; }
.txn-fee-hint { font-size: .68rem; color: var(--wallet-muted); opacity:.75; margin-left:.25rem; }
.txn-amount { font-size: .92rem; font-weight: 700; white-space: nowrap; color: var(--wallet-text); }
.txn-amount.credit { color: var(--wallet-success); }
.txn-amount.debit  { color: var(--wallet-text); }

/* staggered reveal for the first rows in a list */
.txn-item { animation: rise .5s ease both; }
.txn-item:nth-child(1){animation-delay:.03s}.txn-item:nth-child(2){animation-delay:.08s}
.txn-item:nth-child(3){animation-delay:.13s}.txn-item:nth-child(4){animation-delay:.18s}
.txn-item:nth-child(5){animation-delay:.23s}.txn-item:nth-child(6){animation-delay:.28s}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Transaction list page extras */
.txn-date-separator {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--wallet-muted); padding: 1rem 0 .4rem;
}
/* the very first date group shouldn't push away from the card top */
.txn-date-separator:first-child { padding-top: .35rem; }
/* History rows: keep the same comfortable vertical rhythm as .txn-item while
   adding horizontal padding for the full-width hover/tap background. */
.txn-item-link {
    display: flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit;
    margin: 0 -.6rem; padding: .9rem .6rem; border-radius: var(--wallet-radius-sm);
    transition: background .15s;
}
.txn-item-link:hover { background: var(--wallet-hover); }
.txn-item-link:active { background: var(--wallet-hover); }
.txn-filter-row { gap: .5rem; }
.filter-chip {
    white-space: nowrap; padding: .38em 1rem;
    border: 1.5px solid var(--wallet-border-2); border-radius: 20px;
    font-size: .78rem; font-weight: 600; color: var(--wallet-muted);
    background: var(--wallet-surface); transition: all .15s; flex-shrink: 0;
}
.filter-chip.active, .filter-chip:hover {
    border-color: var(--wallet-primary); color: var(--wallet-primary);
    background: rgba(var(--wallet-primary-rgb),.12);
}
.txn-status-badge { font-size: .62rem; font-weight: 700; padding: .12em .5em; border-radius: 5px; vertical-align: middle; margin-left: .3rem; }
.txn-status-badge.success  { background: rgba(52,211,153,.14);  color: var(--wallet-success); }
.txn-status-badge.pending  { background: rgba(245,158,11,.14); color: var(--wallet-warning); }
.txn-status-badge.failed   { background: rgba(244,124,124,.16);  color: var(--wallet-danger); }
.txn-status-badge.reversed { background: rgba(139,147,167,.16); color: var(--wallet-muted); }
.txn-icon-lg {
    width: 68px; height: 68px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.txn-icon-lg.credit { background: rgba(52,211,153,.14);  color: var(--wallet-success); }
.txn-icon-lg.debit  { background: var(--wallet-hover);   color: var(--wallet-text); }
.detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: .75rem 0; border-bottom: 1px solid var(--wallet-border);
}
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: .78rem; color: var(--wallet-muted); font-weight: 500; }
.detail-value { font-size: .88rem; font-weight: 600; text-align: right; max-width: 58%; word-break: break-all; color: var(--wallet-text); }
.detail-value.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: .8rem; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn-wallet-primary {
    display: block; width: 100%; padding: .88rem;
    background: var(--pc-strong);
    color: var(--pc-on-strong); border: none; border-radius: var(--wallet-radius-sm);
    font-size: .97rem; font-weight: 700; letter-spacing: .01em;
    cursor: pointer; text-align: center;
    transition: transform .15s, background .15s;
}
/* Primary actions are Obsidian for every domain (shared look); the accent shows in focus. */
.btn-wallet-primary:hover { background: var(--pc-strong-hover); color: var(--pc-on-strong); }
.btn-wallet-primary:active { transform: scale(.98); }
.btn-wallet-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Bootstrap primary/outline follow the domain colour */
.btn-primary {
    --bs-btn-bg: var(--pc-strong);
    --bs-btn-color: var(--pc-on-strong);
    --bs-btn-border-color: var(--pc-strong);
    --bs-btn-hover-bg: var(--pc-strong-hover);
    --bs-btn-hover-color: var(--pc-on-strong);
    --bs-btn-hover-border-color: var(--pc-strong-hover);
    --bs-btn-active-bg: var(--pc-strong-hover);
    --bs-btn-active-border-color: var(--pc-strong-hover);
    --bs-btn-disabled-bg: var(--pc-strong);
    --bs-btn-disabled-border-color: var(--pc-strong);
    background-color: var(--pc-strong); border-color: var(--pc-strong); color: var(--pc-on-strong);
}
.btn-outline-primary {
    --bs-btn-color: var(--wallet-primary);
    --bs-btn-border-color: var(--wallet-primary);
    --bs-btn-hover-bg: var(--wallet-primary);
    --bs-btn-hover-border-color: var(--wallet-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--wallet-primary);
    --bs-btn-active-border-color: var(--wallet-primary);
    color: var(--wallet-primary); border-color: var(--wallet-primary);
}
.btn-outline-primary:hover { color: #fff; background-color: var(--wallet-primary); border-color: var(--wallet-primary); }
.text-primary { color: var(--wallet-primary) !important; }

.btn-wallet-secondary {
    display: block; width: 100%; padding: .88rem;
    border-radius: var(--wallet-radius-sm);
    border: 1.5px solid var(--wallet-border-2);
    background: var(--wallet-surface); color: var(--wallet-text);
    font-weight: 700; font-size: .95rem; text-align: center;
    cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.btn-wallet-secondary:hover { background: var(--wallet-surface-2); border-color: var(--wallet-border-2); }
.btn-wallet-secondary:active { transform: scale(.98); }

/* ═══════════════════════════════════════════════════════════════
   PIN PAD
   ═══════════════════════════════════════════════════════════════ */
.pin-display { display: flex; gap: .75rem; justify-content: center; margin: 1.75rem 0; }
.pin-dot { width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid var(--wallet-primary); background: transparent; transition: background .15s, transform .15s; }
.pin-dot.filled { background: var(--wallet-primary); transform: scale(1.1); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; max-width: 270px; margin: 0 auto; }
.pin-key {
    aspect-ratio: 1; border-radius: 50%;
    border: 1px solid var(--wallet-border); background: var(--wallet-surface);
    font-size: 1.35rem; font-weight: 700; color: var(--wallet-text);
    box-shadow: var(--wallet-shadow-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .1s, transform .1s, box-shadow .1s;
    -webkit-tap-highlight-color: transparent;
}
.pin-key:hover { background: var(--wallet-surface-2); }
.pin-key:active { background: rgba(var(--wallet-primary-rgb),.16); transform: scale(.92); box-shadow: none; }
.pin-key.del { font-size: 1.15rem; color: var(--wallet-muted); }

/* ═══════════════════════════════════════════════════════════════
   QR SCANNER
   ═══════════════════════════════════════════════════════════════ */
.qr-scan-container {
    position: relative; width: 100%; max-width: 320px; margin: 1.5rem auto;
    border-radius: var(--wallet-radius); overflow: hidden; aspect-ratio: 1;
    background: #0a0a0a; box-shadow: var(--wallet-shadow-lg);
    border: 1px solid var(--wallet-border);
}
#qrVideo { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-frame { position: absolute; top: 36px; right: 36px; bottom: 36px; left: 36px; border: none; pointer-events: none; }
.qr-corner { position: absolute; width: 30px; height: 30px; border-color: var(--wallet-primary); border-style: solid; filter: drop-shadow(0 0 5px rgba(var(--wallet-primary-rgb),.7)); }
.qr-corner.tl { top:0; left:0;  border-width:3px 0 0 3px; border-radius:7px 0 0 0; }
.qr-corner.tr { top:0; right:0; border-width:3px 3px 0 0; border-radius:0 7px 0 0; }
.qr-corner.bl { bottom:0; left:0;  border-width:0 0 3px 3px; border-radius:0 0 0 7px; }
.qr-corner.br { bottom:0; right:0; border-width:0 3px 3px 0; border-radius:0 0 7px 0; }
.qr-scan-label { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: .78rem; font-weight: 500; text-shadow: 0 1px 4px rgba(0,0,0,.6); }

/* ═══════════════════════════════════════════════════════════════
   LOAD FUNDS — Preset Grid
   ═══════════════════════════════════════════════════════════════ */
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.preset-btn {
    padding: .7rem .5rem; border-radius: var(--wallet-radius-sm);
    border: 1.5px solid var(--wallet-border-2); background: var(--wallet-surface-2);
    color: var(--wallet-text); font-weight: 700; font-size: .9rem;
    cursor: pointer; transition: all .15s;
}
.preset-btn:hover, .preset-btn.active {
    border-color: var(--wallet-primary); background: rgba(var(--wallet-primary-rgb),.12);
    color: var(--wallet-primary); box-shadow: 0 0 0 3px rgba(var(--wallet-primary-rgb),.12);
}
.method-btn {
    padding: .45rem .85rem; border-radius: var(--wallet-radius-sm);
    border: 1.5px solid var(--wallet-border-2); background: var(--wallet-surface-2);
    color: var(--wallet-text); font-size: .82rem; font-weight: 500;
    cursor: pointer; transition: all .15s; white-space: nowrap;
}
.method-btn:hover, .method-btn.active {
    border-color: var(--wallet-secondary); background: rgba(var(--wallet-secondary-rgb),.14); color: var(--wallet-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   TAXIPAY
   ═══════════════════════════════════════════════════════════════ */
.taxipay-role-card {
    display: flex; align-items: center; gap: 1rem;
    background: var(--wallet-surface); border-radius: var(--wallet-radius);
    padding: 1.2rem 1.1rem; box-shadow: var(--wallet-shadow-sm);
    color: var(--wallet-text); border: 1.5px solid var(--wallet-border);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.taxipay-role-card:hover { transform: translateY(-2px); box-shadow: var(--wallet-shadow); border-color: rgba(var(--wallet-primary-rgb),.35); color: var(--wallet-text); }
.taxipay-role-icon {
    width: 50px; height: 50px; border-radius: 16px; flex-shrink: 0;
    background: rgba(var(--wallet-primary-rgb),.14); color: var(--wallet-primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.taxipay-role-icon.passenger { background: rgba(52,211,153,.14); color: var(--wallet-success); }
.status-banner { border-radius: var(--wallet-radius-sm); padding: .7rem 1rem; font-size: .84rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.status-banner.waiting    { background: rgba(245,158,11,.14); color: var(--wallet-warning); }
.status-banner.active     { background: rgba(var(--wallet-primary-rgb),.14); color: var(--wallet-primary); }
.status-banner.processing { background: rgba(var(--wallet-secondary-rgb),.14); color: var(--wallet-secondary); }
.status-banner.success    { background: rgba(52,211,153,.14); color: var(--wallet-success); }
.status-banner.error      { background: rgba(244,124,124,.16); color: var(--wallet-danger); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(.75)} }
/* A displayed QR must always sit on white with a light quiet zone — otherwise
   in dark mode the surrounding area goes dark and camera scanners can't read it. */
.qr-code-box {
    display: block; width: fit-content; max-width: 100%; margin: 0 auto;
    background: #fff; padding: 12px; border-radius: 14px;
    box-shadow: var(--wallet-shadow);
}
.qr-code-box canvas, .qr-code-box img { display: block; }
.room-code-badge {
    display: inline-block; padding: .4em 1em;
    background: var(--wallet-surface-2); border: 1px solid var(--wallet-border);
    border-radius: 10px; font-size: .9rem; font-weight: 700; letter-spacing: .12em;
    color: var(--wallet-text); font-family: 'SF Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════
   PROFILE
   ═══════════════════════════════════════════════════════════════ */
.profile-avatar {
    width: 76px; height: 76px; border-radius: 24px;
    background: linear-gradient(140deg, var(--wallet-primary), rgba(var(--wallet-primary-rgb),.5));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em;
    box-shadow: 0 10px 26px -10px rgba(var(--wallet-primary-rgb),.6);
}
.profile-menu-item {
    display: flex; align-items: center; gap: .85rem;
    padding: .9rem 0; border-bottom: 1px solid var(--wallet-border);
    color: var(--wallet-text); transition: color .15s;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover { color: var(--wallet-primary); }
.profile-menu-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(var(--wallet-primary-rgb),.12); color: var(--wallet-primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   RESULT ICONS / MERCHANT
   ═══════════════════════════════════════════════════════════════ */
.result-icon { width: 80px; height: 80px; border-radius: 24px; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; margin: 0 auto; }
.result-icon.success { background: rgba(52,211,153,.14);  color: var(--wallet-success); }
.result-icon.error   { background: rgba(244,124,124,.16);  color: var(--wallet-danger); }
.merchant-icon-lg {
    width: 54px; height: 54px; border-radius: 16px;
    background: rgba(var(--wallet-primary-rgb),.14); color: var(--wallet-primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
}
.amount-display-lg { text-align: center; padding: 1rem 0; }

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.text-primary-wallet { color: var(--wallet-primary) !important; }
.bg-primary-wallet   { background: var(--wallet-primary) !important; }
.badge-wallet { background: rgba(var(--wallet-primary-rgb),.14); color: var(--wallet-primary); font-size: .72rem; font-weight: 700; padding: .22em .6em; border-radius: 6px; }
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--wallet-muted); font-size: .78rem; font-weight: 500; margin: 1.1rem 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--wallet-border); }
.wallet-main {
    flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding-top: var(--wallet-header-h);
    padding-bottom: calc(var(--wallet-nav-h) + 4.5rem);
    animation: mainIn .45s ease both;
}
@keyframes mainIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Safe area insets */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .wallet-bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--wallet-nav-h) + env(safe-area-inset-bottom)); }
    .wallet-header { height: calc(var(--wallet-header-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
    .wallet-main {
        padding-top: calc(var(--wallet-header-h) + env(safe-area-inset-top));
        padding-bottom: calc(var(--wallet-nav-h) + env(safe-area-inset-bottom) + 4.5rem);
    }
}

/* ── Active Work Cards ── */
.wallet-work-card {
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    border-radius: 14px; padding: .85rem 1rem;
    transition: background .15s, transform .15s;
    color: var(--wallet-text);
}
.wallet-work-card:hover, .wallet-work-card:active { background: var(--wallet-surface-2); }
.wallet-work-card:active { transform: scale(.99); }
.work-card-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; color:#fff; }

/* ═══════════════════════════════════════════════════════════════
   BOOTSTRAP HARMONISATION  (make BS components theme-aware)
   ═══════════════════════════════════════════════════════════════ */
.wallet-app .text-muted { color: var(--wallet-muted) !important; }

.wallet-app .card {
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border);
    color: var(--wallet-text);
}
.wallet-app .form-control,
.wallet-app .form-select {
    /* background-COLOR only — using the `background` shorthand here would wipe the
       <select> dropdown arrow's no-repeat/position/size and make it tile. */
    background-color: var(--wallet-input-bg);
    border: 1.5px solid var(--wallet-border-2);
    color: var(--wallet-text);
}
.wallet-app .form-control::placeholder { color: var(--wallet-muted); opacity: .8; }
.wallet-app .form-control:focus,
.wallet-app .form-select:focus {
    background-color: var(--wallet-surface); color: var(--wallet-text);
    border-color: var(--wallet-primary);
    box-shadow: 0 0 0 3px rgba(var(--wallet-primary-rgb),.18);
}
/* Dark mode needs a light-coloured arrow (Bootstrap's default is near-black).
   Pin repeat/position/size so it's a single glyph, not a tiled fill. */
:root[data-theme="dark"] .wallet-app .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238b93a7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
}
.wallet-app .input-group-text {
    background: var(--wallet-surface-2); border: 1.5px solid var(--wallet-border-2); color: var(--wallet-muted);
}

/* Alerts */
.wallet-app .alert-success { background: rgba(52,211,153,.14); border: 1px solid rgba(52,211,153,.3); color: var(--wallet-success); }
.wallet-app .alert-danger  { background: rgba(244,124,124,.16); border: 1px solid rgba(244,124,124,.3); color: var(--wallet-danger); }
.wallet-app .alert-warning { background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.3); color: var(--wallet-warning); }
.wallet-app .alert-info    { background: rgba(var(--wallet-primary-rgb),.14); border: 1px solid rgba(var(--wallet-primary-rgb),.3); color: var(--wallet-primary); }

/* Materio-style label badges */
.wallet-app .bg-label-primary { background: rgba(var(--wallet-primary-rgb),.16) !important; color: var(--wallet-primary) !important; }
.wallet-app .bg-label-success { background: rgba(52,211,153,.16) !important; color: var(--wallet-success) !important; }
.wallet-app .bg-label-danger  { background: rgba(244,124,124,.18) !important; color: var(--wallet-danger) !important; }
.wallet-app .bg-label-warning { background: rgba(245,158,11,.16) !important; color: var(--wallet-warning) !important; }
.wallet-app .bg-label-info    { background: rgba(var(--wallet-secondary-rgb),.16) !important; color: var(--wallet-secondary) !important; }
.wallet-app .bg-label-secondary { background: var(--wallet-hover) !important; color: var(--wallet-muted) !important; }

/* Modals & offcanvas */
.wallet-app .modal-content,
.wallet-app .offcanvas {
    background: var(--wallet-surface); color: var(--wallet-text); border: 1px solid var(--wallet-border);
}
.wallet-app .modal-header, .wallet-app .modal-footer { border-color: var(--wallet-border); }
/* Sit above the fixed app chrome (header/nav z-index 200) + PWA banner (1050),
   and keep the dialog above its own backdrop so its fields stay interactive. */
.modal-backdrop { z-index: 1590; }
.modal { z-index: 1600; }

/* List groups & tables */
.wallet-app .list-group-item { background: var(--wallet-surface); color: var(--wallet-text); border-color: var(--wallet-border); }
.wallet-app .table { --bs-table-bg: transparent; color: var(--wallet-text); border-color: var(--wallet-border); }
.wallet-app .table > :not(caption) > * > * { border-color: var(--wallet-border); }
.wallet-app .table-light, .wallet-app .table-light > * { background: var(--wallet-surface-2); color: var(--wallet-text); }

/* Close button visible in dark */
.wallet-app .btn-close { filter: var(--wallet-btn-close-filter); }

/* ── Bootstrap utilities that assume a LIGHT page (2026-09-23) ─────────────────
   The wallet themes with <html data-theme>, not Bootstrap's data-bs-theme, so
   Bootstrap's own colour utilities stay light-mode: `.bg-light` painted the fee
   summary card white while its text inherited the dark theme's near-white — the
   "Transfer / Total deducted" rows vanished. `.text-dark` did the reverse on the
   balance line, and `.form-text` ("Max you can send") was dark grey on near-black.
   Remapped to theme tokens so they read correctly in BOTH themes.
   Deliberately NOT remapped: `.bg-white` — it only wraps QR codes, which must stay
   on white to scan; and `.text-dark` on yellow/cyan badges, which need dark text. */
.wallet-app .bg-light,
.wallet-app .bg-body-tertiary,
.wallet-app .bg-body-secondary {
    background-color: var(--wallet-surface-2) !important;
    color: var(--wallet-text);
}
.wallet-app .text-body,
.wallet-app .text-body-emphasis,
.wallet-app .text-dark:not(.bg-warning):not(.bg-info):not(.bg-white) {
    color: var(--wallet-text) !important;
}
.wallet-app .form-text,
.wallet-app .text-secondary,
.wallet-app .text-body-secondary { color: var(--wallet-muted) !important; }
.wallet-app hr { border-color: var(--wallet-border-2); opacity: 1; }

/* Bootstrap's own tokens, for components and inline `var(--bs-…)` styles
   (e.g. the verified-recipient banner uses var(--bs-success-bg-subtle)). */
:root[data-theme="dark"] {
    --bs-body-color: #eaeefb;
    --bs-body-color-rgb: 234, 238, 251;
    --bs-emphasis-color: #ffffff;
    --bs-secondary-color: #8b93a7;
    --bs-tertiary-color: rgba(234, 238, 251, .5);
    --bs-body-bg: #0b0f1a;
    --bs-secondary-bg: #1b2236;
    --bs-tertiary-bg: #151b2b;
    --bs-border-color: rgba(255, 255, 255, .12);
    --bs-heading-color: inherit;
    --bs-primary-bg-subtle:   rgba(var(--wallet-primary-rgb), .16);
    --bs-secondary-bg-subtle: rgba(255, 255, 255, .06);
    --bs-success-bg-subtle:   rgba(52, 211, 153, .14);
    --bs-danger-bg-subtle:    rgba(244, 124, 124, .16);
    --bs-warning-bg-subtle:   rgba(245, 158, 11, .14);
    --bs-info-bg-subtle:      rgba(56, 189, 248, .14);
    --bs-light-bg-subtle:     #1b2236;
}

/* Outline-secondary readable in dark */
.wallet-app .btn-outline-secondary {
    color: var(--wallet-text); border-color: var(--wallet-border-2);
}
.wallet-app .btn-outline-secondary:hover { background: var(--wallet-hover); color: var(--wallet-text); border-color: var(--wallet-border-2); }

/* Theme toggle icon button just uses .btn-icon-ghost (already themed) */

/* ═══════════════════════════════════════════════════════════════
   MOTION — reduced-motion opt-out
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    @view-transition { navigation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   HOME · PAYMENTS · CHECKOUT  (2026-11 PayChain Ivory)
   Shared PayChain layout for every domain: ivory surfaces, Obsidian
   balance card, Inter, tabular figures, 8px rhythm. The domain
   accent (--app-*) appears only on: Add money, the Scan tile, the
   active tab, progress lines, focus rings and links.
   No color-mix / inset / aspect-ratio here: older phone browsers.
   ═══════════════════════════════════════════════════════════════ */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ── Section heading ── */
.pc-h {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    margin: 2rem 1rem .75rem;
}
.pc-h h2 { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--wallet-text); letter-spacing: -.01em; }
.pc-h h2::after { content: ''; display: block; width: 24px; height: 3px; border-radius: 2px; margin-top: 5px; background: var(--app-accent); }
.pc-h a { font-size: .875rem; font-weight: 600; color: var(--app-accent-text); padding: 6px 0; }
.pc-h a:hover { color: var(--app-accent-text); text-decoration: underline; }

/* ── Greeting ── */
.pc-greet { margin: 1rem 1rem 0; }
.pc-greet-hello { font-size: .95rem; color: var(--wallet-muted); }
.pc-greet-name { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--wallet-text); overflow-wrap: anywhere; }

/* ── Obsidian balance card ── */
.pc-balance {
    margin: 1rem 1rem 0; padding: 1.25rem 1.25rem 1.25rem;
    border-radius: 24px; color: var(--pc-ivory);
    background: var(--pc-card);
    background:
        radial-gradient(110% 85% at 100% 0%, rgba(var(--app-accent-rgb), .30), transparent 58%),
        var(--pc-card);
    border: 1px solid var(--pc-card-border);
    box-shadow: inset 0 -3px 0 var(--app-accent), var(--wallet-shadow);
}
.pc-balance-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pc-balance-label { font-size: .9rem; color: rgba(241,244,248,.78); }
.pc-eye {
    width: 44px; height: 44px; margin: -10px -12px -10px 0;
    background: none; border: 0; padding: 0; cursor: pointer;
    color: rgba(241,244,248,.85); font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
}
.pc-balance-amount {
    margin-top: .35rem;
    font-size: 2.15rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
    overflow-wrap: anywhere; transition: filter .2s;
}
.pc-balance-amount.bal-hidden { filter: blur(12px); }
.pc-balance-meta { margin-top: .4rem; font-size: .875rem; color: rgba(241,244,248,.78); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; min-height: 32px; }
.pc-balance-logo { margin-left: auto; height: 36px; width: auto; max-width: 120px; object-fit: contain; object-position: right center; }
.pc-balance-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; margin-top: 1.25rem; }
.pc-balance-actions.single { grid-template-columns: 1fr; }
.pc-btn-accent, .pc-btn-ghost-dark {
    min-height: 48px; border-radius: 14px; padding: 0 .75rem;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    font-size: .9rem; font-weight: 700; text-align: center; white-space: nowrap;
    transition: transform .15s var(--pc-ease), opacity .15s;
}
.pc-btn-accent { background: var(--app-accent-on-dark); color: var(--app-on-accent-dark); }
.pc-btn-accent:hover { color: var(--app-on-accent-dark); opacity: .92; }
.pc-btn-ghost-dark { border: 1px solid rgba(241,244,248,.45); color: var(--pc-ivory); font-weight: 600; }
.pc-btn-ghost-dark:hover { color: var(--pc-ivory); border-color: var(--pc-ivory); }
.pc-btn-accent:active, .pc-btn-ghost-dark:active { transform: scale(.98); }

/* ── Account card (card-only domains: no wallet, same place and look as the balance card) ── */
.pc-account-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .25rem .65rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700; white-space: nowrap;
    background: rgba(241,244,248,.12); color: var(--pc-ivory);
}
.pc-account-name {
    margin-top: .5rem;
    font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2;
    color: var(--pc-ivory);
    overflow-wrap: anywhere;          /* a long name wraps; it is never clipped */
}
@media (max-width: 360px) { .pc-account-name { font-size: 1.4rem; } }

/* ── Quick actions: Send · Request · Scan · More ── */
.pc-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1rem 1rem 0; }
.pc-action {
    min-height: 84px; border-radius: 18px;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .375rem;
    color: var(--wallet-text); font-size: .85rem; font-weight: 500;
    cursor: pointer; padding: .5rem .25rem;
    transition: transform .15s var(--pc-ease), background .15s;
}
.pc-action i { font-size: 1.5rem; line-height: 1; color: var(--app-accent-text); }
.pc-action:hover { color: var(--wallet-text); background: var(--wallet-surface-2); }
.pc-action:active { transform: scale(.97); }
.pc-action.is-accent { background: var(--app-fill); border-color: transparent; color: var(--app-on-fill); font-weight: 700; }
.pc-action.is-accent i { color: var(--app-on-fill); }
.pc-action.is-accent:hover { background: var(--app-fill); color: var(--app-on-fill); opacity: .92; }

/* ── This month ── */
.pc-card {
    margin: 1rem 1rem 0; padding: 1rem 1rem 1.125rem;
    border-radius: 20px; background: var(--wallet-surface); border: 1px solid var(--wallet-border);
}
.pc-card h2 { margin: 0 0 .5rem; font-size: 1.05rem; font-weight: 700; }
.pc-month { display: grid; grid-template-columns: 1fr 1fr; }
.pc-month > div + div { border-left: 1px solid var(--wallet-border); padding-left: 1rem; }
.pc-month-k { font-size: .85rem; color: var(--wallet-muted); }
.pc-month-v { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.pc-progress { margin-top: .875rem; height: 6px; border-radius: 3px; background: var(--wallet-surface-2); overflow: hidden; }
.pc-progress > span { display: block; height: 100%; border-radius: 3px; background: var(--app-fill); }
.pc-progress-note { margin-top: .5rem; font-size: .8rem; color: var(--wallet-muted); }

/* ── Swipe rails (Pay & go, Lifestyle) ── */
.pc-hint { font-size: .8rem; font-weight: 600; color: var(--wallet-muted); visibility: hidden; opacity: 0; transition: opacity .25s; }
.pc-hint.show { visibility: visible; opacity: 1; }
.rail {
    display: flex; gap: .75rem; padding: 0 1rem 4px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; scroll-padding-left: 1rem;
    scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex-shrink: 0; }
.art-card {
    position: relative; overflow: hidden;
    width: 150px; height: 184px; padding: 1rem;
    border-radius: 22px; background: var(--wallet-surface); border: 1px solid var(--wallet-border);
    display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem;
    color: var(--wallet-text); transition: transform .15s var(--pc-ease), border-color .15s;
}
.art-card:hover { color: var(--wallet-text); border-color: var(--wallet-border-2); }
.art-card:active { transform: scale(.97); }
.art-card-blob {
    position: absolute; right: -34px; top: -34px; width: 150px; height: 150px; border-radius: 75px;
    background: rgba(var(--app-accent-rgb), .14);
}
.art-card-art { position: absolute; right: 16px; top: 16px; font-size: 3.9rem; line-height: 1; color: var(--app-accent-text); }
.art-card-title { position: relative; font-size: 1rem; font-weight: 700; }
.art-card-sub   { position: relative; font-size: .8rem; line-height: 1.35; color: var(--wallet-muted); }
.feature-card {
    position: relative; overflow: hidden;
    width: 280px; height: 148px; padding: 1.1rem;
    border-radius: 22px; background: var(--wallet-surface-2); border: 1px solid var(--wallet-border);
    color: var(--wallet-text);
    display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
    transition: transform .15s var(--pc-ease);
}
.feature-card:hover { color: var(--wallet-text); }
.feature-card:active { transform: scale(.98); }
.feature-card-art { position: absolute; right: -22px; bottom: -30px; font-size: 7.25rem; line-height: 1; opacity: .14; }
.feature-card-text { position: relative; display: flex; flex-direction: column; gap: .2rem; max-width: 170px; }
.feature-card-title { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; }
.feature-card-sub   { font-size: .82rem; line-height: 1.35; opacity: .85; }
.feature-card-cta {
    position: relative; min-height: 34px; padding: 0 .9rem; border-radius: 17px;
    display: inline-flex; align-items: center; font-size: .82rem; font-weight: 700;
    background: var(--pc-strong); color: var(--pc-on-strong);
}
.feature-card.brand { background: var(--app-fill); border-color: transparent; color: var(--app-on-fill); }
.feature-card.brand:hover { color: var(--app-on-fill); }
.feature-card.brand .feature-card-art { opacity: .22; }
.feature-card.brand .feature-card-cta { background: var(--app-on-fill); color: var(--app-fill); }

/* ── Activity list ── */
.pc-list { margin: 0 1rem; border-radius: 20px; background: var(--wallet-surface); border: 1px solid var(--wallet-border); padding: 0 1rem; }
.pc-row { display: flex; align-items: center; gap: .875rem; min-height: 64px; padding: .625rem 0; border-bottom: 1px solid var(--wallet-border); color: var(--wallet-text); }
.pc-row:last-child { border-bottom: 0; }
a.pc-row:hover { color: var(--wallet-text); }
.pc-tile {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--pc-strong); color: var(--pc-on-strong); font-weight: 700; font-size: 1rem;
}
.pc-tile.in   { background: var(--pc-ok-bg); color: var(--wallet-success); }
.pc-tile.soft { background: var(--wallet-surface-2); color: var(--wallet-text); }
.pc-row-main { flex: 1; min-width: 0; }
.pc-row-title { font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-row-sub { font-size: .8rem; color: var(--wallet-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-row-amt { font-size: .95rem; font-weight: 700; white-space: nowrap; text-align: right; }
.pc-row-amt.in { color: var(--wallet-success); }
.pc-pill { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; }
.pc-pill.pending  { background: var(--pc-warn-bg); color: var(--wallet-warning); }
.pc-pill.failed   { background: var(--pc-err-bg); color: var(--wallet-danger); }
.pc-pill.reversed { background: var(--wallet-surface-2); color: var(--wallet-muted); }
.pc-empty { padding: 1.5rem 0; text-align: center; font-size: .9rem; color: var(--wallet-muted); }

/* ── Bottom sheets (More services, My QR) ──
   Always rendered as a direct child of <body> (the page script moves them there on first
   open): .wallet-main runs a transform animation, and in Chrome that makes position:fixed
   children attach to the scrolling area instead of the screen — the sheet then "floated"
   part-way up the page. From <body> it sits flush on the bottom edge.
   Motion: the backdrop fades in while the panel slides up from below the screen; closing
   reverses it (visibility is delayed on close so the slide-down is seen). */
.pc-sheet {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9000;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(17,17,17,0);
    visibility: hidden; pointer-events: none;
    transition: background .28s ease, visibility 0s linear .34s;
}
.pc-sheet.open {
    background: rgba(17,17,17,.5);
    visibility: visible; pointer-events: auto;
    transition: background .28s ease, visibility 0s;
}
.pc-sheet-panel {
    width: 100%; max-width: 520px; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--wallet-bg); border-radius: 24px 24px 0 0;
    padding: .625rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px -12px rgba(0,0,0,.35);
    transform: translateY(100%);
    transition: transform .34s cubic-bezier(.22, .9, .25, 1);
}
.pc-sheet.open .pc-sheet-panel { transform: translateY(0); }
.pc-sheet-panel.dragging { transition: none; }
.pc-sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--wallet-border-2); margin: 0 auto .875rem; }
.pc-sheet-drag { touch-action: none; cursor: grab; }
.pc-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.pc-sheet-head h2 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.pc-icon-btn {
    width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--wallet-border);
    background: var(--wallet-surface); color: var(--wallet-text); font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.pc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem .5rem; }
.pc-grid-item {
    display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .25rem 0;
    background: none; border: 0; cursor: pointer;
    color: var(--wallet-text); font-size: .78rem; font-weight: 500; text-align: center;
}
.pc-grid-item:hover { color: var(--wallet-text); }
.pc-grid-icon {
    width: 52px; height: 52px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border);
}
.pc-grid-item:active .pc-grid-icon { transform: scale(.95); }
/* Narrow phones (320–375px): keep figures on one line and buttons to one line. */
@media (max-width: 380px) {
    .pc-month-v { font-size: 1.15rem; }
    .pc-balance-amount { font-size: 1.85rem; }
    .pc-btn-accent i, .pc-btn-ghost-dark i { display: none; }
}
@media (max-width: 340px) {
    .pc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pc-actions { gap: .375rem; } .pc-action { font-size: .78rem; }
    .pc-month-v { font-size: 1.02rem; }
    .pc-month > div + div { padding-left: .625rem; }
}

/* ── Payments hub ── */
.pc-title { margin: 1rem 1rem 0; }
.pc-title h1 { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.pc-title p { margin: .25rem 0 0; color: var(--wallet-muted); font-size: .95rem; }
.pc-search { margin: 1rem 1rem 0; display: flex; gap: .5rem; }
.pc-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pc-search-field {
    flex: 1; display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 .875rem;
    border-radius: 14px; background: var(--wallet-input-bg); border: 1px solid var(--wallet-border-2);
}
.pc-search-field i { color: var(--wallet-muted); font-size: 1.1rem; }
.pc-search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1rem; color: var(--wallet-text); }
.pc-search button {
    min-width: 48px; min-height: 48px; border-radius: 14px; border: 0;
    background: var(--pc-strong); color: var(--pc-on-strong); font-size: 1.15rem; cursor: pointer;
}
.pc-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; margin: 0 1rem; }
.pc-tile-card {
    min-height: 104px; padding: .875rem; border-radius: 18px;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border); color: var(--wallet-text);
    display: flex; flex-direction: column; justify-content: space-between; gap: .5rem;
    transition: background .15s;
}
.pc-tile-card:hover { color: var(--wallet-text); background: var(--wallet-surface-2); }
.pc-tile-card i { font-size: 1.6rem; line-height: 1; }
.pc-tile-card i { color: var(--app-accent-text); }
.pc-tile-card strong { display: block; font-size: .975rem; font-weight: 700; }
.pc-tile-card span { display: block; font-size: .8rem; color: var(--wallet-muted); }
.pc-people { display: flex; gap: 1rem; overflow-x: auto; padding: 0 1rem 4px; scrollbar-width: none; }
.pc-people::-webkit-scrollbar { display: none; }
.pc-person { flex: 0 0 auto; width: 64px; display: flex; flex-direction: column; align-items: center; gap: .375rem; color: var(--wallet-text); font-size: .8rem; text-align: center; }
.pc-person:hover { color: var(--wallet-text); }
.pc-person-av {
    width: 56px; height: 56px; border-radius: 28px;
    display: flex; align-items: center; justify-content: center;
    background: var(--pc-chip); color: var(--pc-on-chip); font-weight: 700; font-size: 1.05rem;
}
.pc-person-av.add { background: var(--wallet-surface); border: 1px dashed var(--wallet-border-2); font-size: 1.4rem; font-weight: 400; }
.pc-person-name { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-chev { color: var(--wallet-muted); font-size: 1.2rem; }
.pc-note { margin: 1.25rem 1rem 0; display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: .8rem; color: var(--wallet-muted); }

/* ── Checkout ── */
.co-head { display: flex; align-items: center; justify-content: space-between; margin: .75rem 1rem 0; min-height: 48px; }
.co-head h1 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.co-head .pc-icon-btn { border: 0; background: transparent; }
.co-payee {
    margin: 1rem 1rem 0; padding: 1rem; border-radius: 20px;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border);
    display: flex; align-items: center; gap: .875rem;
}
.co-payee-icon {
    width: 56px; height: 56px; border-radius: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--pc-chip); color: var(--pc-on-chip); font-size: 1.4rem; font-weight: 700;
}
.co-payee-main { flex: 1; min-width: 0; }
.co-payee-name { font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
.co-payee-sub  { font-size: .85rem; color: var(--wallet-muted); overflow-wrap: anywhere; }
.co-payee-amount { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.co-badge { flex-shrink: 0; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--pc-ok-bg); color: var(--wallet-success); }
.co-badge.warn { background: var(--pc-warn-bg); color: var(--wallet-warning); }
.co-body { margin: 0 1rem; }
.co-label { display: block; margin: 1.5rem 0 .5rem; font-size: 1.05rem; font-weight: 700; color: var(--wallet-text); }
.co-amount {
    display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; min-height: 64px;
    border-radius: 18px; background: var(--wallet-input-bg); border: 1.5px solid var(--wallet-border-2);
}
.co-amount:focus-within { border-color: var(--app-focus-ring); }
.co-amount span { font-size: 1.6rem; font-weight: 800; color: var(--wallet-muted); }
.co-amount input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    font-size: 2rem; font-weight: 800; color: var(--wallet-text);
    font-variant-numeric: tabular-nums;
}
.co-hint { margin-top: .375rem; font-size: .8rem; color: var(--wallet-muted); }
.co-method {
    display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; border-radius: 18px;
    background: var(--app-accent-soft); border: 1.5px solid var(--app-accent);
}
.co-method-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--wallet-surface); font-size: 1.3rem; flex-shrink: 0; }
.co-method-main { flex: 1; min-width: 0; }
.co-method-main strong { display: block; font-size: .975rem; }
.co-method-main span { font-size: .85rem; color: var(--wallet-muted); }
.co-radio { width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--app-accent-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.co-radio::after { content: ''; width: 10px; height: 10px; border-radius: 5px; background: var(--app-accent-text); }
.co-summary { margin-top: 1rem; padding: .875rem 1rem; border-radius: 18px; background: var(--wallet-surface-2); }
.co-summary-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; padding: .2rem 0; }
.co-summary-row span:first-child { color: var(--wallet-muted); }
.co-summary-row.total { margin-top: .375rem; padding-top: .5rem; border-top: 1px solid var(--wallet-border-2); font-weight: 700; }
.co-summary-row.total span:first-child { color: var(--wallet-text); }
.co-warn { margin-top: .5rem; font-size: .85rem; color: var(--wallet-danger); }
.co-pay {
    display: flex; width: 100%; min-height: 56px; margin-top: 1.5rem;
    align-items: center; justify-content: center; gap: .5rem;
    border: 0; border-radius: 16px; background: var(--pc-strong); color: var(--pc-on-strong);
    font-size: 1.05rem; font-weight: 700; cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.co-pay:disabled { opacity: .45; cursor: not-allowed; }
.co-pay:not(:disabled):active { transform: scale(.99); }
.co-secure { margin: .625rem 0 0; text-align: center; font-size: .8rem; color: var(--wallet-muted); }
.co-body .pin-display { margin: 1rem 0; }

@media (prefers-reduced-motion: reduce) {
    .pc-sheet, .pc-sheet.open, .pc-sheet-panel { transition: none; }
    .pc-action, .pc-btn-accent, .pc-btn-ghost-dark, .co-pay, .art-card, .feature-card, .pc-hint { transition: none; }
}

/* ── Desktop: a deliberately arranged column, not a stretched phone ── */
@media (min-width: 900px) {
    .wallet-main > .pc-wrap { max-width: 720px; margin: 0 auto; }
}

/* ═══════════════════════════════════════════════════════════════
   OLDER PHONE BROWSERS
   aspect-ratio arrived in Chromium 88. Without it a square camera
   box has no height (the scanner shows as a sliver or not at all)
   and the PIN keys lose their shape. These rules apply ONLY where
   aspect-ratio is missing; everywhere else they are ignored.

   Rules for anything new in this app, for the same reason:
     • top/right/bottom/left, not `inset` (Chromium 87)
     • a vh line before every dvh line (Chromium 108)
     • no `?.` or `??` in page scripts (Chromium 80) — one of those
       makes an older browser reject the WHOLE script block, and
       every button that block wires up then does nothing.
   ═══════════════════════════════════════════════════════════════ */
@supports not (aspect-ratio: 1) {
    .qr-scan-container::before,
    .scanner-wrap::before,
    .pc-square::before { content: ''; display: block; padding-top: 100%; }

    .qr-scan-container > video,
    .scanner-wrap > video,
    .pc-square > video { position: absolute; top: 0; left: 0; }

    .pin-pad { grid-template-columns: repeat(3, 76px); justify-content: center; }
    .pin-key { height: 76px; }
}

/* ═══════════════════════════════════════════════════════════════
   UPLOAD FIELD  (wallet-upload.js)
   Every upload in the wallet: identity document, selfie, proof of
   address, bank letter, card proof.

   Two states of the same markup:
     • before the script runs — a plain, visible file input. If the
       script never loads, this is what the user gets, and it works.
     • .pc-upload--on — two large targets ("Take a photo" /
       "Choose a file"), a preview of what will be sent, and help
       that opens by itself when a tap opens nothing.

   The real <input type="file"> lies invisibly ON TOP of the
   "Choose a file" target, so the tap lands on the native control.
   Do not change that to a hidden input opened from script: some
   phone browsers ignore a scripted click on a file input.

   top/right/bottom/left rather than `inset`, and no `gap` on flex
   rows that must hold their layout — older phone browsers know
   neither.
   ═══════════════════════════════════════════════════════════════ */
.pc-upload { position: relative; }
.pc-upload [hidden] { display: none !important; }

/* Plain state: only the label, the native input and the hint. */
.pc-upload__action > i,
.pc-upload__action > span,
.pc-upload__more { display: none; }

.pc-upload--on .pc-upload__pick { display: flex; }
.pc-upload--on .pc-upload__pick.d-none { display: none; }

.pc-upload--on .pc-upload__action {
    position: relative; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 96px; padding: .9rem .6rem;
    border-radius: var(--wallet-radius-sm);
    border: 1.5px dashed var(--wallet-border-2);
    background: var(--wallet-input-bg);
    color: var(--wallet-text);
    font-size: .84rem; font-weight: 600; text-align: center;
    cursor: pointer; overflow: hidden;
    transition: border-color .15s, background .15s;
}
.pc-upload--on .pc-upload__action + .pc-upload__action { margin-left: .6rem; }
.pc-upload--on .pc-upload__action > i {
    display: block; font-size: 1.6rem; line-height: 1; margin-bottom: .4rem;
    color: var(--wallet-primary);
}
.pc-upload--on .pc-upload__action > span { display: block; }
/* Three separate rules, not one selector list: a browser that does not know one of these
   pseudo-classes throws away every selector it is listed with. */
.pc-upload--on .pc-upload__action:hover {
    border-color: var(--wallet-primary);
    background: rgba(var(--wallet-primary-rgb), .08);
}
.pc-upload--on .pc-upload__action:focus-within {
    border-color: var(--wallet-primary);
    background: rgba(var(--wallet-primary-rgb), .08);
}
.pc-upload--on button.pc-upload__action:focus {
    border-color: var(--wallet-primary);
    background: rgba(var(--wallet-primary-rgb), .08);
    outline: none;
}
.pc-upload--on .pc-upload__action:active { background: rgba(var(--wallet-primary-rgb), .14); }

/* The native input, stretched over its target and made invisible — still the thing tapped. */
.pc-upload--on .pc-upload__file {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    width: 100%; height: 100%;
    margin: 0; padding: 0; border: 0;
    opacity: 0; cursor: pointer;
    font-size: 0;                 /* no text caret or baseline to shrink the tap area */
}

/* What will be uploaded. */
.pc-upload__chosen {
    display: flex; align-items: center;
    padding: .7rem; border-radius: var(--wallet-radius-sm);
    border: 1.5px solid rgba(52, 211, 153, .45);
    background: rgba(52, 211, 153, .08);
}
.pc-upload__chosen.d-none { display: none; }
.pc-upload__thumb,
.pc-upload__doc {
    width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0;
    background: var(--wallet-surface-2);
}
.pc-upload__thumb { object-fit: cover; }
.pc-upload__doc { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--wallet-primary); }
.pc-upload__doc.d-none { display: none; }
.pc-upload__chosen-text { flex: 1; min-width: 0; margin: 0 .8rem; }
.pc-upload__name {
    display: block; font-size: .86rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-upload__size { display: block; font-size: .76rem; color: var(--wallet-muted); margin-top: .1rem; }
.pc-upload__change {
    flex-shrink: 0; min-height: 44px; padding: 0 .95rem;
    border-radius: 10px; border: 1.5px solid var(--wallet-border-2);
    background: transparent; color: var(--wallet-text);
    font-size: .8rem; font-weight: 600;
}

.pc-upload.is-busy .pc-upload__pick { opacity: .55; pointer-events: none; }

.pc-upload__msg {
    margin-top: .6rem; padding: .6rem .75rem; border-radius: 10px;
    font-size: .82rem; line-height: 1.5;
    background: rgba(244, 124, 124, .1); border: 1px solid rgba(244, 124, 124, .28);
}
.pc-upload.is-busy .pc-upload__msg {
    background: rgba(var(--wallet-primary-rgb), .08); border-color: rgba(var(--wallet-primary-rgb), .22);
}

/* Help: one quiet line until it is needed. */
.pc-upload--on .pc-upload__more { display: block; margin-top: .15rem; }
.pc-upload--on.has-file .pc-upload__more { display: none; }
.pc-upload .form-text { margin-top: .5rem; }
.pc-upload__helplink {
    display: block; min-height: 44px; padding: .5rem 0; border: 0; background: none; text-align: left;
    font-size: .78rem; font-weight: 600; color: var(--wallet-muted);
    text-decoration: underline; text-underline-offset: 3px;
}
.pc-upload__help,
.pc-upload__embedded {
    margin-top: .25rem; padding: .85rem .9rem; border-radius: var(--wallet-radius-sm);
    background: var(--wallet-surface-2); border: 1px solid var(--wallet-border);
    font-size: .82rem; line-height: 1.55;
}
.pc-upload__help strong, .pc-upload__embedded strong { display: block; margin-bottom: .4rem; font-size: .84rem; }
.pc-upload__help ol { margin: 0; padding-left: 1.15rem; }
.pc-upload__help li { margin-bottom: .45rem; }
.pc-upload__help li:last-child { margin-bottom: 0; }
.pc-upload__linkbtn {
    padding: 0; border: 0; background: none;
    font-size: inherit; font-weight: 600; color: var(--wallet-primary);
    text-decoration: underline; text-underline-offset: 3px;
}
.pc-upload__linkbtn:disabled { color: var(--wallet-muted); text-decoration: none; }
/* On a line of their own, and tall enough to hit with a thumb. */
.pc-upload__help .pc-upload__linkbtn,
.pc-upload__embedded .pc-upload__linkbtn { display: block; min-height: 44px; padding: .6rem 0; text-align: left; }
.pc-upload__embedded { margin: .6rem 0 .35rem; }

/* ── The in-page camera ──────────────────────────────────────────── */
.pc-cam {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2000;
    display: none; flex-direction: column; background: #000; color: #fff;
}
.pc-cam.is-open { display: flex; }
html.pc-cam-open, html.pc-cam-open body { overflow: hidden; }
.pc-cam__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.pc-cam__video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pc-cam--mirror .pc-cam__video { transform: scaleX(-1); }
.pc-cam__status {
    position: absolute; left: 1.5rem; right: 1.5rem; text-align: center;
    font-size: .92rem; line-height: 1.5; color: rgba(255, 255, 255, .85);
}
.pc-cam__status.d-none { display: none; }
.pc-cam__bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem 1.25rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    background: #000;
}
.pc-cam__side {
    width: 84px; min-height: 48px; border: 0; background: none; color: #fff;
    font-size: .95rem; font-weight: 600; text-align: left;
}
.pc-cam__side--icon { text-align: right; font-size: 1.6rem; line-height: 1; }
.pc-cam__shutter {
    width: 74px; height: 74px; padding: 5px; border-radius: 50%;
    border: 4px solid #fff; background: transparent; flex-shrink: 0;
    transition: transform .1s, opacity .15s;
}
.pc-cam__shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.pc-cam__shutter:active { transform: scale(.93); }
.pc-cam__shutter:disabled { opacity: .3; }

/* ═══════════════════════════════════════════════════════════════
   INSTALL SHEET  (wallet-install.js)
   A card docked above the bottom navigation: the app's own icon,
   one sentence, two buttons. On a browser with no install prompt
   of its own it unfolds into the two or three taps that browser
   needs. Surface-coloured, not a block of brand colour — it is an
   offer sitting on the page, not an alert.
   ═══════════════════════════════════════════════════════════════ */
.pc-install {
    position: fixed; left: 0; right: 0; z-index: 1040;
    bottom: calc(var(--wallet-nav-h) + 12px);
    padding: 0 12px;
    pointer-events: none;                 /* only the card itself takes taps */
    opacity: 0; transform: translateY(18px);
    transition: opacity .28s ease, transform .32s cubic-bezier(.2, .8, .2, 1);
}
@supports (padding: env(safe-area-inset-bottom)) {
    .pc-install { bottom: calc(var(--wallet-nav-h) + env(safe-area-inset-bottom) + 12px); }
}
.pc-install[hidden] { display: none; }
.pc-install.is-in { opacity: 1; transform: none; }
.pc-install [hidden] { display: none !important; }

.pc-install__card {
    pointer-events: auto;
    max-width: 440px; margin: 0 auto; padding: 18px;
    /* Never taller than the space above the navigation: on a small phone the steps scroll
       inside the card rather than pushing its top off the screen. vh first for browsers
       that do not know dvh. */
    max-height: calc(100vh - var(--wallet-nav-h) - 36px);
    max-height: calc(100dvh - var(--wallet-nav-h) - 36px);
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--wallet-surface);
    border: 1px solid var(--wallet-border-2);
    border-radius: 22px;
    box-shadow: var(--wallet-shadow-lg);
}
.pc-install__head { display: flex; align-items: flex-start; }
.pc-install__icon {
    width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px;
    object-fit: cover; background: var(--wallet-surface-2);
    box-shadow: var(--wallet-shadow-sm);
}
.pc-install__titles { flex: 1; min-width: 0; margin: 0 12px 0 14px; }
.pc-install__title { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.pc-install__text  { font-size: .84rem; line-height: 1.5; color: var(--wallet-muted); margin-top: 3px; }
.pc-install__close {
    width: 44px; height: 44px; flex-shrink: 0; margin: -10px -12px 0 0;
    border: 0; border-radius: 10px; background: none;
    font-size: 1.2rem; line-height: 1; color: var(--wallet-muted);
}
.pc-install__close:hover { background: var(--wallet-hover); color: var(--wallet-text); }

.pc-install__head, .pc-install__actions { flex-shrink: 0; }
/* The steps scroll; the heading and the buttons stay where they are. */
.pc-install__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pc-install__steps {
    list-style: none; margin: 18px 0 0; padding: 18px 0 0;
    border-top: 1px solid var(--wallet-border);
}
.pc-install__steps li { display: flex; align-items: flex-start; font-size: .86rem; line-height: 1.5; }
.pc-install__steps li + li { margin-top: 14px; }
.pc-install__num {
    width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .74rem; font-weight: 700;
    background: rgba(var(--wallet-primary-rgb), .14); color: var(--wallet-primary);
}
.pc-install__step { flex: 1; min-width: 0; margin: 1px 12px 0; }
.pc-install__step b { font-weight: 700; color: var(--wallet-text); }
.pc-install__glyph { flex-shrink: 0; font-size: 1.25rem; line-height: 24px; color: var(--wallet-muted); }
.pc-install__tip {
    margin-top: 16px; padding: .7rem .8rem; border-radius: 12px;
    background: var(--wallet-surface-2);
    font-size: .78rem; line-height: 1.55; color: var(--wallet-muted);
}
.pc-install__tip b { color: var(--wallet-text); font-weight: 600; }
.pc-install__copy {
    display: block; min-height: 44px; margin-top: 6px; padding: .6rem 0; border: 0; background: none;
    font-size: .84rem; font-weight: 600; color: var(--wallet-primary);
    text-decoration: underline; text-underline-offset: 3px;
}

.pc-install__actions { display: flex; margin-top: 18px; }
.pc-install__later,
.pc-install__go { min-height: 46px; border-radius: 13px; font-size: .92rem; }
.pc-install__later {
    flex: 1 1 0; border: 1.5px solid var(--wallet-border-2); background: transparent;
    color: var(--wallet-text); font-weight: 600;
}
.pc-install__go {
    flex: 1.5 1 0; margin-left: 10px; border: 0; color: #fff; font-weight: 700;
    background: linear-gradient(135deg, var(--wallet-primary), rgba(var(--wallet-primary-rgb), .72));
    box-shadow: 0 12px 24px -14px rgba(var(--wallet-primary-rgb), .95);
    transition: transform .12s, filter .15s;
}
.pc-install__go:hover { filter: brightness(1.06); }
.pc-install__go:active, .pc-install__later:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
    .pc-install { transition: none; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   TWO-STEP SIGN-IN (Account/SetupAuthenticator, Verify, RecoveryCodes; Profile/Security)
   Groups: 16px inside, 32px between. The QR stays black on white in BOTH themes —
   authenticator cameras refuse a themed or inverted code.
   ═══════════════════════════════════════════════════════════════ */
.mfa-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.mfa-step  { display: grid; grid-template-columns: 26px 1fr; gap: .7rem; align-items: start; }
.mfa-step__n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700;
               background: rgba(var(--wallet-primary-rgb), .18); color: var(--wallet-primary); }
.mfa-step__t { font-weight: 600; font-size: .9rem; color: var(--wallet-text); }
.mfa-step__d { font-size: .78rem; color: var(--wallet-muted); margin-top: 2px; }
.mfa-qrwrap { display: flex; justify-content: center; margin: 0 0 1rem; }
.mfa-qr { background: #fff; padding: 10px; border-radius: 14px; line-height: 0; box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.mfa-qr svg { width: 176px; height: 176px; display: block; }
.mfa-open-app { display: none; margin-bottom: 1rem; }
@media (pointer: coarse) { .mfa-open-app { display: block; } .mfa-qr-desktop-note { display: none; } }
.mfa-key { font-family: 'SF Mono', 'Fira Code', Consolas, monospace; font-size: 1rem; letter-spacing: .12em; word-break: break-all; user-select: all;
           padding: .7rem .8rem; border: 1px dashed var(--wallet-border-2); border-radius: var(--wallet-radius-sm); background: var(--wallet-surface-2); color: var(--wallet-text); }
.mfa-keymeta { font-size: .72rem; color: var(--wallet-muted); margin-top: .4rem; }
details.mfa-manual { margin: 0 0 1.5rem; }
details.mfa-manual > summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--wallet-primary); list-style: none; }
details.mfa-manual > summary::-webkit-details-marker { display: none; }
details.mfa-manual > summary::before { content: "▸ "; }
details.mfa-manual[open] > summary::before { content: "▾ "; }
details.mfa-manual > div { margin-top: 1rem; }
.auth-card .form-control.mfa-code { font-size: 1.7rem; letter-spacing: .45em; text-align: center; padding: .75rem .5rem .75rem 1.1rem; font-variant-numeric: tabular-nums; }
.auth-card .form-control.mfa-code::placeholder { letter-spacing: .25em; font-size: 1.1rem; }
.mfa-alt { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: center; margin-top: 1.25rem; font-size: .82rem; }
.mfa-alt form { display: inline; }
.mfa-alt button, .mfa-alt a { background: none; border: 0; padding: 0; font: inherit; color: var(--wallet-primary); text-decoration: underline; cursor: pointer; }
.mfa-alt button:disabled { color: var(--wallet-muted); text-decoration: none; cursor: default; }
.mfa-trust { display: flex; align-items: flex-start; gap: .6rem; margin: 1rem 0 1.25rem; font-size: .85rem; color: var(--wallet-text); }
.mfa-trust input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.mfa-trust small { display: block; color: var(--wallet-muted); font-size: .72rem; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .9rem; margin: 0 0 1rem; padding: 0;
             font-family: 'SF Mono', 'Fira Code', Consolas, monospace; font-size: .95rem; letter-spacing: .05em; }
.mfa-codes li { list-style: none; padding: .55rem .5rem; text-align: center; border: 1px solid var(--wallet-border-2); border-radius: var(--wallet-radius-sm);
                background: var(--wallet-surface-2); color: var(--wallet-text); }
.mfa-codes-actions { display: flex; gap: .75rem; margin: 0 0 1.5rem; }
.mfa-codes-actions .btn { flex: 1; }
.mfa-sec { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.mfa-sec__item { padding: .8rem; border: 1px solid var(--wallet-border); border-radius: var(--wallet-radius-sm); background: var(--wallet-surface-2); }
.mfa-sec__k { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--wallet-muted); margin-bottom: .25rem; }
.mfa-sec__v { font-size: .92rem; font-weight: 600; color: var(--wallet-text); }
@media print {
  body * { visibility: hidden; }
  .mfa-print, .mfa-print * { visibility: visible; color: #000 !important; background: #fff !important; }
  .mfa-print { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   PARTNER CO-BRAND — "In partnership with …" (e.g. Imbewu)
   Views/Shared/_PartnerBadge.cshtml. Shown only when the domain has
   it switched on in the MIS. The partner is a credit, not the
   tenant, so it sits in its own quiet space — never in the header.
   The logo is adapted per surface server-side (/Pwa/PartnerLogo).
   ═══════════════════════════════════════════════════════════════ */
.partner-badge {
    display: flex; flex-direction: column; align-items: center;
    gap: .55rem; text-align: center;
}
.partner-badge__rule {
    display: block; width: 32px; height: 2px; border-radius: 2px;
    background: var(--wallet-secondary); opacity: .7;
    margin-bottom: .2rem;
}
.partner-badge__label {
    font-size: .66rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--wallet-muted);
}
.partner-badge__logo { display: flex; align-items: center; justify-content: center; min-height: 72px; }
.partner-badge__logo img {
    display: block; height: auto; width: auto;
    max-height: 80px; max-width: min(340px, 100%); object-fit: contain;   /* 2x — Mike, 11 Nov */
}
/* Home: the closing line of the dashboard, with room above it. */
.partner-badge--home { margin: 2.25rem 1rem .5rem; }
/* Sign-in card: under the form, behind one hairline. */
.partner-badge--auth {
    margin-top: 1.75rem; padding-top: 1.35rem;
    border-top: 1px solid var(--wallet-border);
}
.partner-badge--auth .partner-badge__rule { display: none; }
.partner-badge--auth .partner-badge__logo img { max-height: 72px; }

/* Page behind an open bottom sheet does not scroll. */
html.pc-sheet-lock .wallet-main { overflow: hidden; }
/* Dark mode: lift the sheet off the dimmed page so it reads as a layer. */
:root[data-theme="dark"] .pc-sheet-panel { background: var(--wallet-surface); }
:root[data-theme="dark"] .pc-sheet-panel .pc-grid-icon,
:root[data-theme="dark"] .pc-sheet-panel .pc-icon-btn { background: var(--wallet-surface-2); }

/* ═══════════════════════════════════════════════════════════════
   PAYCHAIN FLOW SCREENS  (2026-11-11 · "Everyday payments" concept)
   PayChain brand strip, big left-aligned page titles, preset amounts,
   the dark "From" wallet card, trust line, two-step review, Request
   payment card, and photo-ready service cards.
   ═══════════════════════════════════════════════════════════════ */

/* ── PayChain brand strip: official lockup | tagline ── */
.pc-strip {
    display: flex; align-items: center; gap: .875rem;
    margin: .75rem 1rem 0; padding-bottom: .75rem;
    border-bottom: 1px solid var(--wallet-border);
}
.pc-strip-logo { width: 140px; height: auto; flex-shrink: 0; }   /* CI minimum width */
.pc-strip-div { width: 1px; height: 26px; background: var(--wallet-border-2); flex-shrink: 0; }
.pc-strip-tag { font-size: .8rem; color: var(--wallet-muted); line-height: 1.3; }
@media (max-width: 350px) { .pc-strip-div, .pc-strip-tag { display: none; } }

/* ── Page title: back arrow + big title + subtitle ── */
.pc-page-head { display: flex; align-items: flex-start; gap: .5rem; margin: 1rem 1rem 0; }
.pc-page-head .pc-icon-btn { border: 0; background: transparent; margin-left: -10px; flex-shrink: 0; }
.pc-page-head h1 { margin: 2px 0 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.pc-page-head p { margin: .25rem 0 0; font-size: .95rem; color: var(--wallet-muted); }

/* ── "Powered by" with hairlines either side ── */
.powered-by-line { display: flex; align-items: center; gap: .75rem; width: 100%; max-width: 320px; }
.powered-by-line::before, .powered-by-line::after { content: ''; flex: 1; height: 1px; background: var(--wallet-border-2); }

/* ── Recipient card (selected contact) ── */
.co-contact {
    display: flex; align-items: center; gap: .875rem; padding: .75rem .875rem; border-radius: 18px;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border);
}
.co-contact-av {
    width: 52px; height: 52px; border-radius: 26px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--pc-chip); color: var(--pc-on-chip); font-weight: 700; font-size: 1.05rem;
}
.co-contact-div { width: 1px; align-self: stretch; background: var(--wallet-border); margin: .25rem 0; }
.co-contact-main { flex: 1; min-width: 0; }
.co-contact-main strong { display: block; font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
.co-contact-main span { font-size: .85rem; color: var(--wallet-muted); }
.co-change {
    min-height: 44px; padding: 0 .25rem; border: 0; background: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 2px;
    font-size: .875rem; font-weight: 600; color: var(--app-accent-text);
}

/* ── Preset amounts ── */
.co-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .625rem; }
.co-preset {
    min-height: 44px; border-radius: 14px; cursor: pointer;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border-2); color: var(--wallet-text);
    font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.co-preset:hover { background: var(--wallet-surface-2); }
.co-preset[aria-pressed="true"] { background: var(--app-accent-soft); border: 2px solid var(--app-accent); }

/* ── Dark "From" wallet card (the selected funding source) ── */
.co-from {
    display: flex; align-items: center; gap: .875rem; padding: .875rem 1rem; border-radius: 18px;
    background: var(--pc-card); color: var(--pc-ivory); border: 1px solid var(--pc-card-border);
    box-shadow: inset 3px 0 0 var(--app-accent);
}
.co-from-icon { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.co-from-div { width: 1px; height: 32px; background: rgba(241,244,248,.25); flex-shrink: 0; }
.co-from-main { flex: 1; min-width: 0; }
.co-from-main strong { display: block; font-size: 1rem; }
.co-from-main span { font-size: .85rem; color: rgba(241,244,248,.78); }

/* ── Totals, trust line, secondary buttons ── */
.co-summary-row.big { font-size: 1.15rem; font-weight: 800; }
.co-trust { margin: 1rem 0 0; display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: .85rem; color: var(--wallet-muted); }
.co-trust i { font-size: 1.1rem; }
.co-outline {
    display: flex; width: 100%; min-height: 52px; margin-top: .75rem;
    align-items: center; justify-content: center; gap: .5rem;
    border: 1.5px solid var(--pc-strong); border-radius: 16px; background: transparent; color: var(--wallet-text);
    font-size: 1rem; font-weight: 700; cursor: pointer;
}
.co-link { display: block; margin: .75rem auto 0; min-height: 44px; border: 0; background: none; color: var(--app-accent-text); font-weight: 600; cursor: pointer; }
.co-review {
    margin-top: 1.25rem; padding: 1rem; border-radius: 18px;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border);
}
.co-review h2 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; }
.co-locked { opacity: .65; pointer-events: none; }

/* ── Request payment ── */
.rq-card {
    margin: 1rem 1rem 0; padding: 1.25rem 1rem 1.5rem; border-radius: 22px; text-align: center;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border);
}
.rq-pill { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--app-accent-soft); color: var(--wallet-text); font-size: .85rem; font-weight: 700; }
.rq-qr { display: inline-block; margin-top: 1rem; padding: 12px; border-radius: 16px; background: #FFFFFF; border: 1px solid var(--wallet-border); }
.rq-name { margin-top: .875rem; font-size: 1.2rem; font-weight: 800; }
.rq-amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.rq-ref { font-size: .95rem; color: var(--wallet-muted); }
.rq-status-row { display: flex; align-items: center; justify-content: space-between; margin: 1.25rem 1rem 0; font-weight: 700; font-size: .95rem; }
.rq-status { padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; border: 1px solid var(--app-accent); color: var(--app-accent-text); background: var(--app-accent-soft); }
.rq-status.done { border-color: var(--wallet-success); color: var(--wallet-success); background: var(--pc-ok-bg); }
.rq-edit {
    display: flex; align-items: center; gap: .875rem; width: calc(100% - 2rem); margin: .625rem 1rem 0;
    min-height: 60px; padding: .625rem 1rem; border-radius: 16px; cursor: pointer; text-align: left;
    background: var(--wallet-surface); border: 1px solid var(--wallet-border); color: var(--wallet-text);
}
.rq-edit i:first-child { font-size: 1.35rem; color: var(--app-accent-text); }
.rq-edit strong { display: block; font-size: .975rem; }
.rq-edit small { color: var(--wallet-muted); font-size: .8rem; }
.rq-edit-panel { margin: .5rem 1rem 0; padding: 1rem; border-radius: 16px; background: var(--wallet-surface-2); }
.rq-edit-panel .form-control { border-radius: 12px; min-height: 48px; background: var(--wallet-input-bg); color: var(--wallet-text); border-color: var(--wallet-border-2); }
.rq-actions { margin: 1.25rem 1rem 0; }

/* ── Lifestyle cards: photo on top, text and action below ("Ready to enjoy" style) ──
   The photo comes from /img/lifestyle/{domain-slug}/{key}.(jpg|webp|png), else
   /img/lifestyle/{key}.(jpg|webp|png) — resolved on the server, so a missing photo costs
   no request. With no photo, the top shows the service icon on a domain-colour panel. */
.life-card {
    flex: 0 0 auto; width: 200px; overflow: hidden;
    display: flex; flex-direction: column;
    border-radius: 20px; background: var(--wallet-surface); border: 1px solid var(--wallet-border);
    color: var(--wallet-text); transition: transform .15s var(--pc-ease), border-color .15s;
}
.life-card:hover { color: var(--wallet-text); border-color: var(--wallet-border-2); }
.life-card:active { transform: scale(.98); }
.life-photo {
    position: relative; height: 118px; flex-shrink: 0;
    background-color: var(--app-accent-soft); background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
}
.life-photo i { font-size: 3rem; color: var(--app-accent-text); }
.life-card.brand .life-photo:not(.has-photo) { background-color: var(--app-fill); }
.life-card.brand .life-photo:not(.has-photo) i { color: var(--app-on-fill); }
.life-photo.has-photo i { display: none; }
.life-tag {
    position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px;
    background: var(--app-accent-soft); color: var(--wallet-text); font-size: .72rem; font-weight: 700;
}
.life-body { display: flex; flex-direction: column; gap: .2rem; padding: .75rem .875rem .875rem; flex: 1; }
.life-title { font-size: 1rem; font-weight: 700; }
.life-sub { font-size: .8rem; color: var(--wallet-muted); line-height: 1.35; margin-bottom: .625rem; }
.life-cta {
    margin-top: auto; min-height: 38px; border-radius: 12px;   /* pinned to the card's foot so buttons line up */
    display: flex; align-items: center; justify-content: center;
    background: var(--pc-strong); color: var(--pc-on-strong); font-size: .85rem; font-weight: 700;
}
