/**
 * S20 Save-to-Own — Customer Frontend CSS
 *
 * All rules scoped to .s20-wrap so they coexist with any theme/Elementor.
 * The theme provides: fonts, body styles, page layout, header, footer.
 * We provide: component styles only.
 */

/* ── Standalone page base reset ─────────────────────────────────────────────
   Prevents the active WordPress theme from bleeding white / light text
   colours into the standalone access page (body.s20-body).
   Only applies to the dedicated full-page template; does not affect the
   shortcode embed path.
── */
body.s20-body {
    color: #111827 !important;
    background: #f3f4f6;
}
/* Re-allow elements that intentionally use white text (buttons, hero sections,
   avatar, etc.) to set their own colour via more-specific rules. */
body.s20-body .s20-btn--primary,
body.s20-body .s20-btn--accent,
body.s20-body .s20-btn--pay,
body.s20-body .s20-setup-hero,
body.s20-body .s20-setup-hero *,
body.s20-body .s20-avatar,
body.s20-body .s20-topbar,
body.s20-body .s20-topbar * { color: unset; }

/* ── CSS Variables (scoped to wrapper, set per-instance via inline style) ── */
.s20-wrap {
    --s20-primary:  #2563eb;
    --s20-accent:   #16a34a;
    --s20-red:      #dc2626;
    --s20-orange:   #ea580c;
    --s20-purple:   #7c3aed;
    --s20-yellow:   #d97706;
    --s20-gray-50:  #f9fafb;
    --s20-gray-100: #f3f4f6;
    --s20-gray-200: #e5e7eb;
    --s20-gray-400: #9ca3af;
    --s20-gray-500: #6b7280;
    --s20-gray-700: #374151;
    --s20-gray-900: #111827;
    --s20-white:    #ffffff;
    --s20-radius:   12px;
    --s20-radius-sm:8px;
    --s20-shadow:   0 1px 4px rgba(0,0,0,.07),0 2px 8px rgba(0,0,0,.05);
    --s20-shadow-lg:0 8px 32px rgba(0,0,0,.12);
    --s20-transition:160ms ease;
}
.s20-wrap * { box-sizing: border-box; }

/* ── Universal color reset ───────────────────────────────────────────────────
   Defeats WordPress theme color:white bleed. Every element inside .s20-wrap
   that sits on a white/light background MUST show dark text.
── */
.s20-wrap { color: #111827 !important; }
/* Blanket inherit — every child gets dark text unless overridden below */
.s20-wrap * { color: inherit !important; }
/* Restore white text on intentionally dark/coloured elements */
.s20-wrap .s20-btn--primary *,
.s20-wrap .s20-btn--accent *,
.s20-wrap .s20-btn--pay *,
.s20-wrap .s20-setup-hero *,
.s20-wrap .s20-avatar,
.s20-wrap .s20-pbar-label { color: #fff !important; }

/* Re-explicitly set dark text on every white/light-bg surface */
.s20-wrap .s20-card,
.s20-wrap .s20-card *,
.s20-wrap .s20-dashboard,
.s20-wrap .s20-dash-name,
.s20-wrap .s20-dash-meta,
.s20-wrap .s20-summary-card,
.s20-wrap .s20-summary-value,
.s20-wrap .s20-summary-label,
.s20-wrap .s20-cd-unit,
.s20-wrap .s20-cd-num,
.s20-wrap .s20-cd-lbl,
.s20-wrap .s20-invoice-preview,
.s20-wrap .s20-invoice-preview-label,
.s20-wrap .s20-invoice-preview-value,
.s20-wrap .s20-invoice-preview-row,
.s20-wrap .s20-invoice-preview-row *,
.s20-wrap .s20-snapshot-row,
.s20-wrap .s20-snapshot-row strong,
.s20-wrap .s20-terms-content,
.s20-wrap .s20-pin-title,
.s20-wrap .s20-ring-pct,
.s20-wrap .s20-amount-row,
.s20-wrap .s20-tx-card,
.s20-wrap .s20-tx-type-label,
.s20-wrap .s20-input,
.s20-wrap .s20-phone-input,
.s20-wrap .s20-phone-code,
.s20-wrap .s20-modal,
.s20-wrap .s20-modal *,
.s20-modal,
.s20-modal * { color: #111827 !important; }

/* Sub-text: explicitly grey */
.s20-wrap .s20-goal-desc,
.s20-wrap .s20-summary-label,
.s20-wrap .s20-summary-sub,
.s20-wrap .s20-login-sub,
.s20-wrap .s20-state-msg,
.s20-wrap .s20-pin-sub,
.s20-wrap .s20-days-txt,
.s20-wrap .s20-empty p,
.s20-wrap .s20-field-note,
.s20-wrap .s20-snapshot-row span,
.s20-wrap .s20-invoice-preview-label,
.s20-wrap .s20-amount-row > span:first-child { color: #6b7280 !important; }

/* White-on-colour elements stay white */
.s20-wrap .s20-setup-hero,
.s20-wrap .s20-setup-hero *,
.s20-wrap .s20-btn--primary,
.s20-wrap .s20-btn--accent,
.s20-wrap .s20-btn--pay,
.s20-wrap .s20-avatar,
.s20-wrap .s20-pbar-label { color: #fff !important; }

/* Modal explicit override (lives outside .s20-wrap) */
.s20-modal-title { color: #111827 !important; }
.s20-modal-sub   { color: #6b7280 !important; }
.s20-modal .s20-label { color: #374151 !important; }
.s20-modal .s20-input { color: #111827 !important; }
.s20-pay-waiting h3,
.s20-pay-result h3 { color: #111827 !important; }
.s20-pay-waiting p,
.s20-pay-result p  { color: #6b7280 !important; }

/* ── Layout wrapper ─────────────────────────────────────── */
.s20-wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 8px 0 40px;
}

/* ── Cards ──────────────────────────────────────────────── */
.s20-wrap .s20-card {
    background: var(--s20-white);
    border: 1px solid var(--s20-gray-200);
    border-radius: var(--s20-radius);
    box-shadow: var(--s20-shadow);
    padding: 24px;
    margin-bottom: 16px;
}
.s20-wrap .s20-card--sm { max-width: 480px; margin-left: auto; margin-right: auto; }
.s20-wrap .s20-card-heading {
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .6px;
    color: var(--s20-gray-500); margin: 0 0 16px;
}

/* Center wrap for login/setup/error cards */
.s20-wrap .s20-center-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

/* ── Buttons ─────────────────────────────────────────────── */
.s20-wrap .s20-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 11px 20px; border-radius: var(--s20-radius-sm);
    font-size: 0.9rem; font-weight: 600;
    border: 2px solid transparent; cursor: pointer;
    text-decoration: none; transition: all var(--s20-transition);
    line-height: 1; font-family: inherit;
}
.s20-wrap .s20-btn--primary { background: var(--s20-primary); color: #fff !important; border-color: var(--s20-primary); }
.s20-wrap .s20-btn--primary:hover:not(:disabled) { background: #1d4ed8; border-color: #1d4ed8; }
.s20-wrap .s20-btn--accent  { background: var(--s20-accent);  color: #fff !important; border-color: var(--s20-accent); }
.s20-wrap .s20-btn--accent:hover:not(:disabled)  { background: #15803d; }
.s20-wrap .s20-btn--pay {
    background: linear-gradient(135deg, var(--s20-accent), #22c55e);
    color: #fff !important; border-color: transparent;
    box-shadow: 0 2px 8px rgba(22,163,74,.35);
    padding: 9px 18px; font-size: 0.88rem;
}
.s20-wrap .s20-btn--pay:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(22,163,74,.45); }
.s20-wrap .s20-btn--ghost {
    background: transparent; color: var(--s20-gray-500) !important;
    border-color: var(--s20-gray-200); font-size: 0.85rem; padding: 8px 14px;
}
.s20-wrap .s20-btn--ghost:hover { color: var(--s20-red) !important; border-color: var(--s20-red); background: #fee2e2; }
.s20-wrap .s20-btn--outline { background: transparent; color: var(--s20-primary) !important; border-color: var(--s20-primary); }
.s20-wrap .s20-btn--outline:hover { background: #eff6ff; }
.s20-wrap .s20-btn--full { width: 100%; }
.s20-wrap .s20-btn:disabled { opacity: .55; cursor: not-allowed; }
.s20-wrap .s20-btn-label { display: flex; align-items: center; gap: 6px; }
.s20-wrap .s20-btn-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
    border-radius: 50%; animation: s20spin .7s linear infinite;
}
@keyframes s20spin { to { transform: rotate(360deg); } }

/* ── Alerts ──────────────────────────────────────────────── */
.s20-wrap .s20-alert {
    border-radius: var(--s20-radius-sm); padding: 12px 16px;
    font-size: 0.88rem; margin-bottom: 16px; line-height: 1.5;
}
.s20-wrap .s20-alert[hidden] { display: none; }
.s20-wrap .s20-alert--error { background: #fee2e2; color: var(--s20-red); border: 1px solid #fca5a5; }
.s20-wrap .s20-alert--success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* ── Form fields ─────────────────────────────────────────── */
.s20-wrap .s20-field { margin-bottom: 18px; }
.s20-wrap .s20-label {
    display: block; font-weight: 600; font-size: 0.87rem;
    margin-bottom: 7px; color: var(--s20-gray-700);
}
.s20-wrap .s20-req { color: var(--s20-red); margin-left: 2px; }
.s20-wrap .s20-input {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--s20-gray-200);
    border-radius: var(--s20-radius-sm);
    font-size: 1rem; font-family: inherit;
    color: var(--s20-gray-900); background: #fff;
    transition: border-color var(--s20-transition), box-shadow var(--s20-transition);
    outline: none;
}
.s20-wrap .s20-input:focus { border-color: var(--s20-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.s20-wrap .s20-field-note { font-size: 0.78rem; color: var(--s20-gray-400); margin: 5px 0 0; }

/* ── Phone input ─────────────────────────────────────────── */
.s20-wrap .s20-phone-input-wrap {
    display: flex; align-items: stretch;
    border: 1.5px solid var(--s20-gray-200);
    border-radius: var(--s20-radius-sm); overflow: hidden;
    background: #fff;
    transition: border-color var(--s20-transition), box-shadow var(--s20-transition);
}
.s20-wrap .s20-phone-input-wrap:focus-within {
    border-color: var(--s20-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.s20-wrap .s20-phone-prefix {
    display: flex; align-items: center; gap: 6px; padding: 0 14px;
    background: var(--s20-gray-50); border-right: 1.5px solid var(--s20-gray-200);
    white-space: nowrap; flex-shrink: 0; user-select: none;
}
.s20-wrap .s20-phone-flag { font-size: 1.25rem; line-height: 1; }
.s20-wrap .s20-phone-code { font-weight: 700; font-size: 0.9rem; color: var(--s20-gray-700); }
.s20-wrap .s20-phone-input {
    border: none !important; border-radius: 0 !important; box-shadow: none !important;
    flex: 1; min-width: 0; padding: 12px 14px;
    font-size: 1rem; font-weight: 500; letter-spacing: 1px;
    background: transparent; color: var(--s20-gray-900); outline: none;
}
.s20-wrap .s20-phone-input::placeholder { font-weight: 400; letter-spacing: 0; color: var(--s20-gray-400); }

/* ── PIN boxes ───────────────────────────────────────────── */
.s20-wrap .s20-pin-boxes { display: flex; gap: 12px; justify-content: center; margin: 8px 0; }
.s20-wrap .s20-pin-box {
    width: 60px; height: 68px; text-align: center; font-size: 1.6rem; font-weight: 700;
    border: 2px solid var(--s20-gray-200); border-radius: var(--s20-radius-sm);
    background: var(--s20-gray-50); font-family: monospace;
    transition: border-color var(--s20-transition), background var(--s20-transition);
    -webkit-appearance: none; outline: none;
}
.s20-wrap .s20-pin-box:focus { border-color: var(--s20-primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.s20-wrap .s20-pin-box.filled { border-color: var(--s20-accent); background: #dcfce7; }
.s20-wrap .s20-pin-box.error  { border-color: var(--s20-red); background: #fee2e2; animation: s20shake .4s ease; }
@keyframes s20shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* PIN indicator */
.s20-wrap .s20-pin-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0; font-size: 0.82rem; color: var(--s20-gray-500); }
.s20-wrap .s20-pin-indicator-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--s20-gray-200); transition: background .2s; }
.s20-wrap .s20-pin-indicator-dot.filled { background: var(--s20-primary); }
.s20-wrap .s20-pin-indicator-dot.match  { background: var(--s20-accent); }

/* ── Status badges ───────────────────────────────────────── */
.s20-wrap .s20-status-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px;
}
.s20-wrap .s20-status--active    { background: #dcfce7; color: #15803d; }
.s20-wrap .s20-status--complete  { background: #dbeafe; color: #1d4ed8; }
.s20-wrap .s20-status--forfeited { background: #fee2e2; color: var(--s20-red); }
.s20-wrap .s20-status--expired   { background: #fef9c3; color: #854d0e; }
.s20-wrap .s20-status--cancelled { background: var(--s20-gray-100); color: var(--s20-gray-500); }
.s20-wrap .s20-status--completed { background: #dcfce7; color: #15803d; }
.s20-wrap .s20-status--pending   { background: #fef9c3; color: #854d0e; }
.s20-wrap .s20-status--failed    { background: #fee2e2; color: var(--s20-red); }

/* ── State screens ───────────────────────────────────────── */
.s20-wrap .s20-state-icon  { font-size: 3rem; margin-bottom: 12px; text-align: center; }
.s20-wrap .s20-state-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 10px; text-align: center; }
.s20-wrap .s20-state-msg   { color: var(--s20-gray-500); margin: 0 0 20px; text-align: center; line-height: 1.6; }

/* ══════════════════════════════════════════════════════════
   SETUP PAGE
══════════════════════════════════════════════════════════ */
.s20-wrap .s20-setup-card {
    background: var(--s20-white); border-radius: var(--s20-radius);
    border: 1px solid var(--s20-gray-200); box-shadow: var(--s20-shadow-lg);
    overflow: hidden; max-width: 640px; margin: 0 auto;
}
.s20-wrap .s20-setup-hero {
    background: linear-gradient(135deg, var(--s20-primary), #1d4ed8);
    color: #fff; padding: 28px 32px;
    display: flex; gap: 16px; align-items: flex-start;
}
.s20-wrap .s20-setup-hero-icon { font-size: 2.5rem; flex-shrink: 0; }
.s20-wrap .s20-setup-welcome { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
.s20-wrap .s20-setup-welcome-sub { margin: 0; opacity: .9; font-size: 0.88rem; line-height: 1.5; }

.s20-wrap .s20-invoice-preview {
    margin: 20px 32px;
    border: 1px solid var(--s20-gray-200); border-radius: var(--s20-radius-sm); overflow: hidden;
}
.s20-wrap .s20-invoice-preview-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; border-bottom: 1px solid var(--s20-gray-100); font-size: 0.88rem;
}
.s20-wrap .s20-invoice-preview-row:last-child { border-bottom: none; }
.s20-wrap .s20-invoice-preview-label { color: #6b7280 !important; }
.s20-wrap .s20-invoice-preview-value { font-weight: 600; text-align: right; color: #111827 !important; }
.s20-wrap .s20-amount-large { font-size: 1.15rem; font-weight: 800; color: var(--s20-accent); }
.s20-wrap .s20-mono { font-family: monospace; }

.s20-wrap .s20-terms-box { margin: 0 32px 24px; }
.s20-wrap .s20-terms-title { font-size: 0.85rem; font-weight: 700; color: var(--s20-gray-700); margin: 0 0 10px; }
.s20-wrap .s20-terms-content {
    background: var(--s20-gray-50); border: 1px solid var(--s20-gray-200);
    border-radius: var(--s20-radius-sm); padding: 14px; font-size: 0.82rem;
    color: var(--s20-gray-700); line-height: 1.7; max-height: 180px; overflow-y: auto; margin-bottom: 14px;
}
.s20-wrap .s20-checkbox-label {
    display: flex; align-items: flex-start; gap: 10px;
    cursor: pointer; font-size: 0.88rem; line-height: 1.5;
}
.s20-wrap .s20-checkbox { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--s20-primary); margin-top: 1px; }
.s20-wrap .s20-pin-section { margin: 0 32px 32px; }
.s20-wrap .s20-pin-title { font-size: 0.95rem; font-weight: 700; margin: 0 0 4px; }
.s20-wrap .s20-pin-sub   { font-size: 0.82rem; color: var(--s20-gray-500); margin: 0 0 20px; }

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════════ */
.s20-wrap .s20-login-card { max-width: 460px; width: 100%; }
.s20-wrap .s20-login-header { text-align: center; margin-bottom: 20px; }
.s20-wrap .s20-login-icon  { font-size: 3rem; margin-bottom: 10px; }
.s20-wrap .s20-login-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
.s20-wrap .s20-login-sub   { font-size: 0.88rem; color: var(--s20-gray-500); margin: 0; line-height: 1.5; }
.s20-wrap .s20-login-help  { text-align: center; margin-top: 16px; color: var(--s20-gray-400); font-size: 0.82rem; }

.s20-wrap .s20-invoice-snapshot {
    border: 1px solid var(--s20-gray-200); border-radius: var(--s20-radius-sm); overflow: hidden; margin-bottom: 20px;
}
.s20-wrap .s20-snapshot-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 14px; border-bottom: 1px solid var(--s20-gray-100); font-size: 0.85rem;
    color: #111827 !important;
}
.s20-wrap .s20-snapshot-row span { color: var(--s20-gray-500) !important; }
.s20-wrap .s20-snapshot-row strong { color: #111827 !important; }
.s20-wrap .s20-snapshot-progress { padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.s20-wrap .s20-mini-bar { flex: 1; height: 6px; background: var(--s20-gray-200); border-radius: 999px; overflow: hidden; }
.s20-wrap .s20-mini-bar-fill { height: 100%; background: var(--s20-primary); border-radius: 999px; }
.s20-wrap .s20-mini-bar-pct { font-size: 0.78rem; font-weight: 700; color: var(--s20-primary); white-space: nowrap; }

/* ══════════════════════════════════════════════════════════
   ERROR
══════════════════════════════════════════════════════════ */
.s20-wrap .s20-error-card { text-align: center; }

/* ══════════════════════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════════════════════ */

/* Header bar */
.s20-wrap .s20-dash-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
    background: var(--s20-white); border: 1px solid var(--s20-gray-200);
    border-radius: var(--s20-radius); box-shadow: var(--s20-shadow); padding: 16px 20px;
}
.s20-wrap .s20-dash-header-left { display: flex; align-items: center; gap: 14px; }
.s20-wrap .s20-dash-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s20-wrap .s20-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--s20-primary), #1d4ed8);
    color: #fff; font-size: 1.3rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.s20-wrap .s20-dash-name { font-size: 1.1rem; font-weight: 700; margin: 0 0 3px; color: #111827 !important; }
.s20-wrap .s20-dash-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.s20-wrap .s20-mono-sm { font-family: monospace; font-size: 0.78rem; background: var(--s20-gray-100); padding: 1px 6px; border-radius: 3px; }

/* Banners */
.s20-wrap .s20-banner {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 18px; border-radius: var(--s20-radius-sm);
    font-size: 0.9rem; margin-bottom: 16px;
}
.s20-wrap .s20-banner span:first-child { font-size: 1.4rem; flex-shrink: 0; }
.s20-wrap .s20-banner p { margin: 3px 0 0; font-size: 0.84rem; opacity: .85; }
.s20-wrap .s20-banner--success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.s20-wrap .s20-banner--danger  { background: #fee2e2; color: var(--s20-red); border: 1px solid #fca5a5; }

/* Grid */
.s20-wrap .s20-dash-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.s20-wrap .s20-dash-left, .s20-wrap .s20-dash-right { min-width: 0; }

/* Goal card */
.s20-wrap .s20-goal-desc { font-size: 0.85rem; color: var(--s20-gray-500); margin: -8px 0 16px; line-height: 1.6; }

/* Ring */
.s20-wrap .s20-ring-wrap { position: relative; width: 180px; height: 180px; margin: 0 auto 20px; }
.s20-wrap .s20-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.s20-wrap .s20-ring-track { fill: none; stroke: var(--s20-gray-100); stroke-width: 14; }
.s20-wrap .s20-ring-fill { fill: none; stroke: var(--s20-primary); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.4,0,.2,1); }
.s20-wrap .s20-ring-fill--done    { stroke: var(--s20-accent); }
.s20-wrap .s20-ring-fill--forfeit { stroke: var(--s20-red); }
.s20-wrap .s20-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.s20-wrap .s20-ring-pct  { font-size: 2rem; font-weight: 800; line-height: 1; color: #111827 !important; }
.s20-wrap .s20-ring-pct small { font-size: 1.1rem; }
.s20-wrap .s20-ring-sub  { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .6px; color: var(--s20-gray-400); margin-top: 3px; }

/* Amounts */
.s20-wrap .s20-amounts { border: 1px solid var(--s20-gray-100); border-radius: var(--s20-radius-sm); overflow: hidden; margin-bottom: 16px; }
.s20-wrap .s20-amount-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--s20-gray-100); font-size: 0.87rem; }
.s20-wrap .s20-amount-row:last-child { border-bottom: none; }
.s20-wrap .s20-amount-row > span:first-child { display: flex; align-items: center; gap: 8px; color: #6b7280 !important; }
.s20-wrap .s20-val-green  { color: var(--s20-accent) !important; font-weight: 700; }
.s20-wrap .s20-val-orange { color: var(--s20-orange) !important; }
.s20-wrap .s20-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.s20-wrap .s20-dot--blue   { background: var(--s20-primary); }
.s20-wrap .s20-dot--green  { background: var(--s20-accent); }
.s20-wrap .s20-dot--orange { background: var(--s20-orange); }

/* Progress bar */
.s20-wrap .s20-pbar { height: 16px; background: var(--s20-gray-100); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.s20-wrap .s20-pbar-fill {
    height: 100%; border-radius: 999px; min-width: 3px;
    background: linear-gradient(90deg, var(--s20-primary), #60a5fa);
    display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
    transition: width .9s cubic-bezier(.4,0,.2,1);
}
.s20-wrap .s20-pbar-fill.complete   { background: linear-gradient(90deg, var(--s20-accent), #4ade80); }
.s20-wrap .s20-pbar-fill.forfeited  { background: linear-gradient(90deg, var(--s20-red), #f87171); }
.s20-wrap .s20-pbar-label { font-size: 0.68rem; font-weight: 700; color: #fff; white-space: nowrap; }
.s20-wrap .s20-pbar-ends  { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--s20-gray-400); }

/* Countdown */
.s20-wrap .s20-countdown-card--expired { border-color: #fca5a5; }
.s20-wrap .s20-expiry-date { font-size: 0.82rem; color: var(--s20-gray-500); margin: -6px 0 16px; }
.s20-wrap .s20-countdown-grid { display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 16px; }
.s20-wrap .s20-cd-unit { display: flex; flex-direction: column; align-items: center; background: var(--s20-gray-50); border: 1px solid var(--s20-gray-200); border-radius: var(--s20-radius-sm); padding: 10px 12px; min-width: 58px; }
.s20-wrap .s20-cd-num  { font-size: 1.7rem; font-weight: 800; font-family: monospace; line-height: 1; color: #111827 !important; }
.s20-wrap .s20-cd-lbl  { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .5px; color: var(--s20-gray-400); margin-top: 3px; }
.s20-wrap .s20-cd-sep  { font-size: 1.5rem; font-weight: 800; color: var(--s20-gray-200); padding: 0 2px; align-self: flex-start; padding-top: 10px; }
.s20-wrap .s20-expired-notice { text-align: center; padding: 16px; font-weight: 600; color: var(--s20-red); }
.s20-wrap .s20-days-bar { height: 6px; background: var(--s20-gray-200); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.s20-wrap .s20-days-bar-fill { height: 100%; border-radius: 999px; }
.s20-wrap .s20-days-bar--ok      { background: var(--s20-accent); }
.s20-wrap .s20-days-bar--warning { background: var(--s20-yellow); }
.s20-wrap .s20-days-bar--urgent  { background: var(--s20-red); }
.s20-wrap .s20-days-txt { font-size: 0.78rem; text-align: center; color: var(--s20-gray-500); margin: 0; }

/* Summary cards */
.s20-wrap .s20-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.s20-wrap .s20-summary-card {
    background: var(--s20-white); border: 1px solid var(--s20-gray-200);
    border-radius: var(--s20-radius); box-shadow: var(--s20-shadow);
    padding: 16px; display: flex; align-items: center; gap: 14px;
    transition: transform var(--s20-transition), box-shadow var(--s20-transition);
}
.s20-wrap .s20-summary-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.s20-wrap .s20-summary-icon { font-size: 1.8rem; flex-shrink: 0; }
.s20-wrap .s20-summary-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--s20-gray-500); margin-bottom: 4px; }
.s20-wrap .s20-summary-value { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; color: #111827 !important; }
.s20-wrap .s20-summary-sub   { font-size: 0.72rem; color: var(--s20-gray-400); }

/* Transactions */
.s20-wrap .s20-tx-header,
.s20-body .s20-tx-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.s20-wrap .s20-tx-filters,
.s20-body .s20-tx-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.s20-wrap .s20-tx-filter,
.s20-body .s20-tx-filter {
    background: var(--s20-gray-100); border: 1.5px solid var(--s20-gray-200);
    border-radius: 999px; padding: 5px 14px;
    font-size: 0.8rem; font-weight: 600; font-family: inherit;
    cursor: pointer; color: var(--s20-gray-500); transition: all var(--s20-transition);
}
.s20-wrap .s20-tx-filter.active,
.s20-wrap .s20-tx-filter:hover,
.s20-body .s20-tx-filter.active,
.s20-body .s20-tx-filter:hover { background: var(--s20-primary); color: #fff; border-color: var(--s20-primary); }

/* Transaction card list */
.s20-wrap .s20-tx-list,
.s20-body .s20-tx-list { display: flex; flex-direction: column; gap: 8px; }
.s20-wrap .s20-tx-card,
.s20-body .s20-tx-card {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 16px;
    background: var(--s20-gray-50); border: 1px solid var(--s20-gray-200);
    border-radius: var(--s20-radius-sm); transition: background var(--s20-transition);
}
.s20-wrap .s20-tx-card:hover,
.s20-body .s20-tx-card:hover { background: #f0f6ff; }
.s20-wrap .s20-tx-card.s20-tx-hidden,
.s20-wrap .s20-tx-row.s20-tx-hidden,
.s20-body .s20-tx-card.s20-tx-hidden,
.s20-body .s20-tx-row.s20-tx-hidden  { display: none !important; }
.s20-wrap .s20-tx-card-left,
.s20-body .s20-tx-card-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.s20-wrap .s20-tx-icon,
.s20-body .s20-tx-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.s20-wrap .s20-tx-icon--deposit,
.s20-body .s20-tx-icon--deposit    { background: #dcfce7; }
.s20-wrap .s20-tx-icon--withdrawal,
.s20-body .s20-tx-icon--withdrawal { background: #fee2e2; }
.s20-wrap .s20-tx-icon--interest,
.s20-body .s20-tx-icon--interest   { background: #ede9fe; }
.s20-wrap .s20-tx-icon--adjustment,
.s20-body .s20-tx-icon--adjustment { background: #fff7ed; }
.s20-wrap .s20-tx-card-info,
.s20-body .s20-tx-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s20-wrap .s20-tx-type-label,
.s20-body .s20-tx-type-label { font-weight: 600; font-size: 0.9rem; color: #111827 !important; }
.s20-wrap .s20-tx-card-date,
.s20-body .s20-tx-card-date   { font-size: 0.75rem; color: var(--s20-gray-400); }
.s20-wrap .s20-tx-card-method,
.s20-body .s20-tx-card-method { font-size: 0.75rem; color: var(--s20-gray-500); text-transform: capitalize; }
.s20-wrap .s20-tx-card-right,
.s20-body .s20-tx-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.s20-wrap .s20-tx-amount,
.s20-body .s20-tx-amount { font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s20-wrap .s20-tx-amount--credit,
.s20-body .s20-tx-amount--credit { color: var(--s20-accent); }
.s20-wrap .s20-tx-amount--debit,
.s20-body .s20-tx-amount--debit  { color: var(--s20-red); }

/* Empty state */
.s20-wrap .s20-empty,
.s20-body .s20-empty { text-align: center; padding: 32px 16px; color: var(--s20-gray-400); }
.s20-wrap .s20-empty-icon,
.s20-body .s20-empty-icon { font-size: 2.5rem; margin-bottom: 10px; }
.s20-wrap .s20-empty p,
.s20-body .s20-empty p { font-size: 0.9rem; font-weight: 500; color: var(--s20-gray-500); margin: 0 0 4px; }

/* ══════════════════════════════════════════════════════════
   PAYMENT MODAL (outside .s20-wrap, uses fixed positioning)
══════════════════════════════════════════════════════════ */
.s20-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    animation: s20fade .2s ease;
}
.s20-overlay[hidden] { display: none; }
@keyframes s20fade { from { opacity: 0; } to { opacity: 1; } }
.s20-modal {
    background: #fff; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
    animation: s20slideup .25s cubic-bezier(.4,0,.2,1);
    font-family: inherit;
}
@keyframes s20slideup { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.s20-modal * { box-sizing: border-box; }
.s20-modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px 0; margin-bottom: 20px; }
.s20-modal-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 3px; color: #111827; }
.s20-modal-sub  { font-size: 0.82rem; color: #6b7280; margin: 0; }
.s20-modal-close { background: none; border: 1px solid #e5e7eb; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; color: #6b7280; flex-shrink: 0; transition: all .18s; }
.s20-modal-close:hover { background: #fee2e2; color: #dc2626; border-color: #dc2626; }
.s20-modal-step { padding: 0 24px 24px; }
.s20-modal-step[hidden] { display: none; }

/* Modal form fields */
.s20-modal .s20-field { margin-bottom: 16px; }
.s20-modal .s20-label { display: block; font-weight: 600; font-size: 0.87rem; margin-bottom: 7px; color: #374151; }
.s20-modal .s20-req { color: #dc2626; }
.s20-modal .s20-input { width: 100%; padding: 11px 14px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-size: 1rem; font-family: inherit; color: #111827; background: #fff; outline: none; transition: border-color .18s, box-shadow .18s; }
.s20-modal .s20-input:focus { border-color: var(--s20-primary, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.s20-modal .s20-field-note { font-size: 0.78rem; color: #9ca3af; margin: 5px 0 0; }

/* Modal phone input */
.s20-modal .s20-phone-input-wrap { display: flex; align-items: stretch; border: 1.5px solid #e5e7eb; border-radius: 8px; overflow: hidden; background: #fff; transition: border-color .18s, box-shadow .18s; }
.s20-modal .s20-phone-input-wrap:focus-within { border-color: var(--s20-primary, #2563eb); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.s20-modal .s20-phone-prefix { display: flex; align-items: center; gap: 6px; padding: 0 14px; background: #f9fafb; border-right: 1.5px solid #e5e7eb; white-space: nowrap; flex-shrink: 0; }
.s20-modal .s20-phone-flag { font-size: 1.25rem; }
.s20-modal .s20-phone-code { font-weight: 700; font-size: 0.9rem; color: #374151; }
.s20-modal .s20-phone-input { border: none !important; box-shadow: none !important; flex: 1; padding: 12px 14px; font-size: 1rem; font-weight: 500; letter-spacing: 1px; background: transparent; outline: none; color: #111827; }
.s20-modal .s20-phone-input::placeholder { font-weight: 400; letter-spacing: 0; color: #9ca3af; }

/* Alert inside modal */
.s20-modal .s20-alert { border-radius: 8px; padding: 10px 14px; font-size: 0.88rem; margin-bottom: 14px; }
.s20-modal .s20-alert[hidden] { display: none; }
.s20-modal .s20-alert--error { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }

/* Amount input */
.s20-modal .s20-amount-input-wrap { display: flex; }
.s20-modal .s20-amount-prefix { display: flex; align-items: center; padding: 0 14px; background: #f9fafb; border: 1.5px solid #e5e7eb; border-right: none; border-radius: 8px 0 0 8px; font-weight: 700; font-size: 0.88rem; color: #374151; white-space: nowrap; }
.s20-modal .s20-amount-input { border-radius: 0 8px 8px 0 !important; font-size: 1.2rem !important; font-weight: 700; }

/* Quick pills */
.s20-modal .s20-quick-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.s20-modal .s20-pill { background: #f3f4f6; border: 1.5px solid #e5e7eb; border-radius: 999px; padding: 5px 12px; font-size: 0.8rem; font-weight: 600; font-family: inherit; cursor: pointer; color: #374151; transition: all .18s; }
.s20-modal .s20-pill:hover, .s20-modal .s20-pill.active { background: #dbeafe; border-color: #2563eb; color: #1d4ed8; }
.s20-modal .s20-pill--full { border-color: #16a34a; color: #16a34a; }
.s20-modal .s20-pill--full:hover { background: #dcfce7; }

/* Submit button inside modal */
.s20-modal .s20-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border-radius: 8px; font-size: 0.92rem; font-weight: 600; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: all .18s; line-height: 1; font-family: inherit; width: 100%; margin-top: 4px; }
.s20-modal .s20-btn--primary { background: #2563eb; color: #fff !important; border-color: #2563eb; }
.s20-modal .s20-btn--primary:hover { background: #1d4ed8; }
.s20-modal .s20-btn--accent  { background: #16a34a; color: #fff !important; border-color: #16a34a; }
.s20-modal .s20-btn--accent:hover { background: #15803d; }
.s20-modal .s20-btn--ghost   { background: transparent; color: #6b7280 !important; border-color: #e5e7eb; }
.s20-modal .s20-btn--ghost:hover { color: #dc2626 !important; border-color: #dc2626; background: #fee2e2; }
.s20-modal .s20-btn:disabled { opacity: .55; cursor: not-allowed; }
.s20-modal .s20-btn-label { display: flex; align-items: center; gap: 6px; }
.s20-modal .s20-btn-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: s20spin .7s linear infinite; }

/* Waiting step */
.s20-pay-waiting { text-align: center; padding: 8px 0; }
.s20-pay-pulse { position: relative; width: 80px; height: 80px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; }
.s20-pulse-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid #16a34a; animation: s20pulse 1.5s ease-out infinite; }
@keyframes s20pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.s20-pulse-icon { font-size: 2.2rem; position: relative; z-index: 1; }
.s20-pay-waiting h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; color: #111827; }
.s20-pay-waiting p  { font-size: 0.85rem; color: #6b7280; margin: 0 0 18px; }
.s20-poll-status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: #6b7280; background: #f3f4f6; border-radius: 999px; padding: 6px 14px; margin-bottom: 20px; }
.s20-poll-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: s20blink 1.2s step-start infinite; }
@keyframes s20blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }

/* Result steps */
.s20-pay-result { text-align: center; padding: 8px 0; }
.s20-result-icon { font-size: 3rem; margin-bottom: 12px; }
.s20-pay-result h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px; color: #111827; }
.s20-pay-result p  { font-size: 0.85rem; color: #6b7280; margin: 0 0 20px; }
.s20-new-balance { background: #dcfce7; border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.s20-new-balance-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .5px; color: #15803d; margin-bottom: 4px; }
.s20-new-balance-value { font-size: 1.7rem; font-weight: 800; color: #15803d; font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .s20-wrap .s20-dash-grid { grid-template-columns: 1fr; }
    .s20-wrap .s20-ring-wrap { width: 160px; height: 160px; }
}

@media (max-width: 600px) {
    .s20-wrap { padding: 8px 0 32px; }

    /* Header nav stacks vertically */
    .s20-wrap .s20-dash-header {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
        gap: 10px;
    }
    .s20-wrap .s20-dash-header-left  { gap: 10px; }
    .s20-wrap .s20-dash-header-right {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .s20-wrap .s20-dash-header-right .s20-btn {
        flex: 1;
        justify-content: center;
        font-size: 0.82rem;
        padding: 8px 10px;
    }
    .s20-wrap .s20-dash-name { font-size: 0.95rem; }

    /* Forms, cards, sections */
    .s20-wrap .s20-setup-hero { padding: 20px; flex-direction: column; gap: 10px; }
    .s20-wrap .s20-invoice-preview,
    .s20-wrap .s20-terms-box,
    .s20-wrap .s20-pin-section { margin-left: 16px; margin-right: 16px; }
    .s20-wrap .s20-pin-boxes { gap: 8px; }
    .s20-wrap .s20-pin-box { width: 52px; height: 60px; font-size: 1.4rem; }
    .s20-wrap .s20-summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .s20-wrap .s20-summary-card { padding: 12px; gap: 10px; }
    .s20-wrap .s20-summary-icon { font-size: 1.4rem; }
    .s20-wrap .s20-countdown-grid { gap: 3px; }
    .s20-wrap .s20-cd-unit { min-width: 50px; padding: 8px; }
    .s20-wrap .s20-cd-num { font-size: 1.4rem; }
    .s20-wrap .s20-ring-wrap { width: 150px; height: 150px; }
    .s20-wrap .s20-ring-pct { font-size: 1.8rem; }

    /* Transaction filter tabs scroll horizontally */
    .s20-wrap .s20-tx-filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .s20-wrap .s20-tx-filter   { white-space: nowrap; }

    /* Bottom sheet modal */
    .s20-modal { border-radius: 16px 16px 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-height: 92vh; }
    .s20-overlay { align-items: flex-end; padding: 0; }
}

@media (max-width: 380px) {
    .s20-wrap .s20-summary-grid { grid-template-columns: 1fr; }
    .s20-wrap .s20-pin-box { width: 46px; height: 54px; }
}
