@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --lpc-p-accent:    #4f46e5;
    --lpc-p-accent2:   #7c3aed;
    --lpc-p-bg:        #f5f5f7;
    --lpc-p-surface:   #ffffff;
    --lpc-p-border:    #e5e7eb;
    --lpc-p-text:      #111827;
    --lpc-p-muted:     #6b7280;
    --lpc-p-success:   #10b981;
    --lpc-p-danger:    #ef4444;
    --lpc-p-radius:    14px;
}

.lpc-portal * { box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }

.lpc-portal {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 60px;
    color: var(--lpc-p-text);
}

/* ── Auth screen ────────────────────────────────────────────────── */
.lpc-auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 100%);
}

.lpc-auth-box {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(79,70,229,.15);
}

.lpc-auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.lpc-auth-logo img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.lpc-auth-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.lpc-auth-logo h1 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--lpc-p-text);
}

.lpc-auth-logo p {
    font-size: .85rem;
    color: var(--lpc-p-muted);
    margin: 0;
}

.lpc-tabs {
    display: flex;
    gap: 0;
    background: var(--lpc-p-bg);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.lpc-tab {
    flex: 1;
    padding: 9px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .875rem;
    font-weight: 600;
    color: var(--lpc-p-muted);
    cursor: pointer;
    transition: all .2s;
}

.lpc-tab.lpc-tab-active {
    background: #fff;
    color: var(--lpc-p-text);
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.lpc-auth-form .lpc-form-group { margin-bottom: 16px; }
.lpc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.lpc-auth-form label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--lpc-p-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.lpc-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--lpc-p-muted);
    font-size: .75rem;
}

.lpc-auth-form input {
    width: 100%;
    padding: 11px 14px;
    font-size: .9rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    border: 2px solid var(--lpc-p-border);
    border-radius: 10px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    color: var(--lpc-p-text);
    background: #fff;
}

.lpc-auth-form input:focus {
    border-color: var(--lpc-p-accent);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.lpc-btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--lpc-p-accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: all .2s;
    letter-spacing: .2px;
}

.lpc-btn-primary:hover {
    background: #3730a3;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,70,229,.3);
}

.lpc-btn-primary:active { transform: none; }

.lpc-auth-msg {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    display: none;
}

.lpc-auth-msg.success { background: #d1fae5; color: #065f46; }
.lpc-auth-msg.error   { background: #fee2e2; color: #991b1b; }

.lpc-ref-note {
    font-size: .8rem;
    color: var(--lpc-p-success);
    font-weight: 600;
    margin: 4px 0 0;
}

/* ── Stamp banner ───────────────────────────────────────────────── */
.lpc-stamp-banner {
    padding: 14px 20px;
    font-size: .9rem;
    font-weight: 600;
    border-radius: 0;
    text-align: center;
}

.lpc-stamp-success   { background: #d1fae5; color: #064e3b; }
.lpc-stamp-completed { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.lpc-stamp-error     { background: #fee2e2; color: #991b1b; }

/* ── Portal header ──────────────────────────────────────────────── */
.lpc-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 0;
    gap: 12px;
}

.lpc-portal-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lpc-portal-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lpc-p-accent), var(--lpc-p-accent2));
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lpc-portal-name { font-size: 1rem; font-weight: 700; line-height: 1.2; }
.lpc-portal-biz  { font-size: .78rem; color: var(--lpc-p-muted); }

.lpc-btn-ghost {
    background: none;
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .8rem;
    font-weight: 600;
    color: var(--lpc-p-muted);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background .15s;
}
.lpc-btn-ghost:hover { background: var(--lpc-p-bg); color: var(--lpc-p-text); }

/* ── Portal nav ─────────────────────────────────────────────────── */
.lpc-portal-nav {
    display: flex;
    gap: 4px;
    padding: 16px 20px 0;
    border-bottom: 2px solid var(--lpc-p-border);
    overflow-x: auto;
    scrollbar-width: none;
}
.lpc-portal-nav::-webkit-scrollbar { display: none; }

.lpc-pnav-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 10px 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .875rem;
    font-weight: 600;
    color: var(--lpc-p-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lpc-pnav-btn:hover { color: var(--lpc-p-text); }
.lpc-pnav-active { color: var(--lpc-p-accent) !important; border-bottom-color: var(--lpc-p-accent) !important; }
.lpc-pnav-count {
    background: var(--lpc-p-accent);
    color: #fff;
    border-radius: 999px;
    font-size: .7rem;
    padding: 1px 7px;
    font-weight: 700;
}

/* ── Tab panels ─────────────────────────────────────────────────── */
.lpc-ptab { padding: 20px; }

/* ── Punch cards ─────────────────────────────────────────────────── */
.lpc-cards-list { display: flex; flex-direction: column; gap: 16px; }

.lpc-punch-card {
    border-radius: 18px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.lpc-pc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.lpc-pc-title {
    font-size: 1.1rem;
    font-weight: 800;
}

.lpc-pc-count {
    font-size: .85rem;
    font-weight: 700;
    opacity: .8;
    background: rgba(255,255,255,.2);
    padding: 4px 10px;
    border-radius: 999px;
}

.lpc-pc-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.lpc-pc-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    font-weight: 700;
    transition: transform .2s;
    flex-shrink: 0;
    overflow: hidden;
}

.lpc-pc-dot img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.lpc-dot-filled { transform: scale(1.05); }

.lpc-pc-progress { margin-bottom: 14px; }
.lpc-pc-progress-bar {
    height: 6px;
    background: rgba(255,255,255,.2);
    border-radius: 999px;
    overflow: hidden;
}
.lpc-pc-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width .5s ease;
}

.lpc-pc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lpc-pc-reward {
    font-size: .85rem;
    font-weight: 600;
    opacity: .9;
}

.lpc-pc-completed {
    font-size: .78rem;
    opacity: .7;
    font-weight: 600;
}

/* ── Badges ──────────────────────────────────────────────────────── */
.lpc-badges-grid { display: flex; flex-direction: column; gap: 12px; }

.lpc-badge-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid var(--lpc-p-border);
    background: #fff;
    transition: all .2s;
}

.lpc-badge-earned {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.lpc-badge-locked { opacity: .7; }

.lpc-badge-emoji { font-size: 2.2rem; flex-shrink: 0; }

.lpc-badge-card-name { font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.lpc-badge-desc      { font-size: .8rem;  color: var(--lpc-p-muted); margin-bottom: 6px; }

.lpc-badge-progress-wrap { display: flex; align-items: center; gap: 10px; }
.lpc-badge-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--lpc-p-border);
    border-radius: 999px;
    overflow: hidden;
}
.lpc-badge-progress-fill {
    height: 100%;
    background: var(--lpc-p-accent);
    border-radius: 999px;
    transition: width .4s ease;
}
.lpc-badge-progress-label { font-size: .75rem; color: var(--lpc-p-muted); white-space: nowrap; }
.lpc-badge-earned-label { font-size: .8rem; color: #065f46; font-weight: 700; }

/* ── History ─────────────────────────────────────────────────────── */
.lpc-history-list { display: flex; flex-direction: column; gap: 2px; }

.lpc-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--lpc-p-border);
}
.lpc-history-item:last-child { border-bottom: none; }

.lpc-history-icon { font-size: 1.3rem; flex-shrink: 0; }
.lpc-history-info { flex: 1; min-width: 0; }
.lpc-history-campaign { font-size: .9rem; font-weight: 700; }
.lpc-history-detail   { font-size: .8rem; color: var(--lpc-p-muted); }
.lpc-history-time     { font-size: .78rem; color: var(--lpc-p-muted); white-space: nowrap; }

/* ── Referral ─────────────────────────────────────────────────────── */
.lpc-refer-box {
    text-align: center;
    padding: 12px 0;
}

.lpc-refer-icon { font-size: 3.5rem; margin-bottom: 12px; }
.lpc-refer-box h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 8px; }
.lpc-refer-box p  { color: var(--lpc-p-muted); font-size: .9rem; margin-bottom: 20px; }

.lpc-refer-link-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.lpc-refer-link-wrap input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--lpc-p-border);
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .82rem;
    color: var(--lpc-p-muted);
    background: var(--lpc-p-bg);
    min-width: 0;
}

.lpc-refer-link-wrap .lpc-btn-primary {
    width: auto;
    white-space: nowrap;
    padding: 10px 18px;
    font-size: .875rem;
    margin-top: 0;
}

.lpc-copy-msg {
    font-size: .85rem;
    color: var(--lpc-p-success);
    font-weight: 700;
    padding: 8px;
}

.lpc-refer-stats {
    font-size: .9rem;
    margin-top: 16px;
    color: var(--lpc-p-text);
}

/* ── Empty state ─────────────────────────────────────────────────── */
.lpc-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--lpc-p-muted);
}
.lpc-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.lpc-empty-state p { font-size: .9rem; }

/* ═══════════════════════════════════════════════════════════════
   STAMP TOAST
   ═══════════════════════════════════════════════════════════════ */

.lpc-stamp-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 14px 20px;
    font-size: .9rem;
    font-weight: 600;
    border-radius: 0;
    position: relative;
    /* Start hidden — JS adds lpc-toast-visible to slide in */
    transform: translateY(-100%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .3s ease;
}

.lpc-stamp-toast.lpc-toast-visible {
    transform: translateY(0);
    opacity: 1;
}

.lpc-stamp-toast.lpc-toast-leaving {
    transform: translateY(-110%);
    opacity: 0;
}

.lpc-toast-success  { background: #d1fae5; color: #064e3b; border-bottom: 2px solid #6ee7b7; }
.lpc-toast-complete { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; border-bottom: 2px solid #d97706; }
.lpc-toast-error    { background: #fee2e2; color: #991b1b; border-bottom: 2px solid #fca5a5; }

.lpc-toast-icon { font-size: 1.4rem; flex-shrink: 0; }

.lpc-toast-body { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.lpc-toast-body strong { font-size: .95rem; }
.lpc-toast-body span   { font-size: .82rem; opacity: .85; font-weight: 500; }

.lpc-toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: .9rem;
    cursor: pointer;
    opacity: .6;
    padding: 4px 6px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: opacity .15s, background .15s;
    color: inherit;
}
.lpc-toast-close:hover { opacity: 1; background: rgba(0,0,0,.08); }

/* ═══════════════════════════════════════════════════════════════
   STAMP DOT — NEW PULSE & BURST ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes lpcDotPulse {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
    50%  { transform: scale(1.25); box-shadow: 0 0 0 8px rgba(255,255,255,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

@keyframes lpcDotBurst {
    0%   { transform: scale(1);    opacity: 1; }
    50%  { transform: scale(1.4);  opacity: 1; }
    100% { transform: scale(1);    opacity: 1; }
}

.lpc-dot-pulse {
    animation: lpcDotPulse .7s ease forwards;
}

.lpc-dot-burst {
    animation: lpcDotBurst .4s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════
   CARD COMPLETION — FLASH + CONFETTI
   ═══════════════════════════════════════════════════════════════ */

@keyframes lpcCardFlash {
    0%   { filter: brightness(1); }
    25%  { filter: brightness(1.35); }
    50%  { filter: brightness(1); }
    75%  { filter: brightness(1.2); }
    100% { filter: brightness(1); }
}

.lpc-card-completed-flash {
    animation: lpcCardFlash .8s ease;
    position: relative;
    overflow: hidden;
}

/* Confetti pieces dropped by JS */
@keyframes lpcConfettiFall {
    0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
    100% { transform: translateY(120px) rotate(360deg);  opacity: 0; }
}

.lpc-confetti-piece {
    position: absolute;
    top: 0;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    pointer-events: none;
    animation: lpcConfettiFall 1s ease-in forwards;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — INLINE FIELD ERRORS
   ═══════════════════════════════════════════════════════════════ */

.lpc-auth-form input.lpc-field-error {
    border-color: var(--lpc-p-danger) !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important;
}

.lpc-field-error-msg {
    font-size: .78rem;
    color: var(--lpc-p-danger);
    font-weight: 600;
    margin: 4px 0 0;
    padding: 0;
}

/* ── Auth token notice (stamp waiting) ───────────────────────── */
.lpc-auth-token-notice {
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .875rem;
    color: #3730a3;
    margin-bottom: 20px;
    text-align: center;
}

/* ── Referral code highlight ─────────────────────────────────── */
.lpc-form-group-highlight input {
    border-color: var(--lpc-p-success) !important;
    background: #f0fdf4;
}

.lpc-ref-applied {
    font-size: .8rem;
    color: var(--lpc-p-success);
    font-weight: 600;
    margin: 4px 0 0;
}

.lpc-req-star { color: var(--lpc-p-danger); }

/* ── Password input wrap ─────────────────────────────────────── */
.lpc-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lpc-input-wrap input {
    flex: 1;
    padding-right: 44px !important;
}

.lpc-toggle-pw {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--lpc-p-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color .15s;
}
.lpc-toggle-pw:hover { color: var(--lpc-p-text); }

/* ═══════════════════════════════════════════════════════════════
   PORTAL TAB PANELS — FOCUS RING SUPPRESSION FOR MOUSE
   ═══════════════════════════════════════════════════════════════ */

.lpc-ptab:focus { outline: none; }

/* ═══════════════════════════════════════════════════════════════
   REFERRAL — ENHANCED COPY BUTTON STATE
   ═══════════════════════════════════════════════════════════════ */

.lpc-refer-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--lpc-p-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.lpc-refer-copy-btn:hover    { background: #3730a3; transform: translateY(-1px); }
.lpc-refer-copy-btn.lpc-copied { background: var(--lpc-p-success); transform: none; }

.lpc-copy-confirm {
    font-size: .83rem;
    color: var(--lpc-p-success);
    font-weight: 700;
    text-align: center;
    padding: 6px 0;
}

.lpc-refer-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 2px solid var(--lpc-p-border);
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: .875rem;
    font-weight: 600;
    color: var(--lpc-p-text);
    cursor: pointer;
    margin-top: 10px;
    transition: all .2s;
}
.lpc-refer-share-btn:hover { border-color: var(--lpc-p-accent); color: var(--lpc-p-accent); background: var(--lpc-p-bg); }

.lpc-refer-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    font-size: .83rem;
    color: var(--lpc-p-muted);
}

.lpc-refer-code-chip {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: .9rem;
    font-weight: 700;
    background: var(--lpc-p-bg);
    border: 2px dashed var(--lpc-p-border);
    border-radius: 8px;
    padding: 5px 14px;
    letter-spacing: 2px;
    color: var(--lpc-p-text);
}

.lpc-refer-stats-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 20px;
}

.lpc-refer-stat { display: flex; align-items: baseline; gap: 8px; }
.lpc-refer-stat-val   { font-size: 2rem; font-weight: 800; color: #78350f; }
.lpc-refer-stat-label { font-size: .85rem; color: #92400e; font-weight: 600; }
.lpc-refer-stat-badge { font-size: .9rem; font-weight: 700; color: #78350f; }

.lpc-refer-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 24px;
}

.lpc-refer-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--lpc-p-border);
    font-size: .88rem;
    color: var(--lpc-p-text);
}
.lpc-refer-step:last-child { border-bottom: none; }

.lpc-refer-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--lpc-p-accent);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lpc-refer-step-reward .lpc-refer-step-num {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-size: 1rem;
    width: 32px;
    height: 32px;
}

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL NUDGE
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   PWA INSTALL BANNER (Android / Chrome)
   ═══════════════════════════════════════════════════════════════ */

.lpc-pwa-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99998;
    width: calc(100% - 32px);
    max-width: 420px;
    background: linear-gradient(135deg, var(--lpc-pwa-bg1, #1e1b4b) 0%, var(--lpc-pwa-bg2, #312e81) 100%);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    padding: 20px 20px 16px;
    box-shadow: 0 20px 60px color-mix(in srgb, var(--lpc-pwa-shadow, #000000) 45%, transparent),
                0 0 0 1px rgba(255,255,255,.06);
    color: var(--lpc-pwa-text, #ffffff);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    overflow: hidden;
}

/* Animated glow blob — fully controlled by CSS vars */
.lpc-pwa-banner-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, var(--lpc-pwa-glow, #7c3aed) 0%, transparent 70%);
    opacity: calc(var(--lpc-pwa-glow-on, 1) * 0.45);
    border-radius: 50%;
    pointer-events: none;
    animation: lpc-pwa-pulse 3s ease-in-out infinite;
}

@keyframes lpc-pwa-pulse {
    0%, 100% { transform: scale(1);   opacity: calc(var(--lpc-pwa-glow-on, 1) * 0.5); }
    50%       { transform: scale(1.2); opacity: calc(var(--lpc-pwa-glow-on, 1) * 0.85); }
}

.lpc-pwa-banner-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    z-index: 1;
}
.lpc-pwa-banner-dismiss:hover {
    background: rgba(255,255,255,.2);
    color: #fff;
}

.lpc-pwa-banner-body {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-right: 24px;
}

.lpc-pwa-banner-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.lpc-pwa-banner-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lpc-pwa-banner-icon span {
    font-size: 1.8rem;
    line-height: 1;
}

.lpc-pwa-banner-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lpc-pwa-banner-text strong {
    font-size: 1rem;
    font-weight: 800;
    color: var(--lpc-pwa-text, #ffffff);
    letter-spacing: -.01em;
}

.lpc-pwa-banner-text span {
    font-size: .8rem;
    color: var(--lpc-pwa-subtext, rgba(255,255,255,0.65));
    line-height: 1.45;
}

.lpc-pwa-banner-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--lpc-pwa-btn1, #7c3aed), var(--lpc-pwa-btn2, #4f46e5));
    color: var(--lpc-pwa-btn-text, #ffffff);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: -.01em;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--lpc-pwa-btn-glow, var(--lpc-pwa-btn1, #7c3aed)) calc(var(--lpc-pwa-btn-glow-on, 1) * 50%), transparent);
    transition: transform .15s, box-shadow .15s;
    margin-bottom: 10px;
}

.lpc-pwa-banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--lpc-pwa-btn-glow, var(--lpc-pwa-btn1, #7c3aed)) calc(var(--lpc-pwa-btn-glow-on, 1) * 65%), transparent);
}

.lpc-pwa-banner-btn:active {
    transform: translateY(0);
}

.lpc-pwa-banner-sub {
    text-align: center;
    font-size: .74rem;
    color: var(--lpc-pwa-subtext, rgba(255,255,255,0.4));
    margin: 0;
    letter-spacing: .01em;
}

/* ═══════════════════════════════════════════════════════════════
   PORTAL HEADER — TOTAL STAMPS PILL
   ═══════════════════════════════════════════════════════════════ */

.lpc-portal-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lpc-portal-totals {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--lpc-p-bg);
    border-radius: 10px;
    padding: 6px 12px;
    cursor: default;
}

.lpc-totals-val   { font-size: 1.1rem; font-weight: 800; color: var(--lpc-p-accent); line-height: 1; }
.lpc-totals-label { font-size: .65rem; color: var(--lpc-p-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* ═══════════════════════════════════════════════════════════════
   PUNCH CARD — OVERLAY FOR BG IMAGES + INNER WRAP
   ═══════════════════════════════════════════════════════════════ */

.lpc-punch-card { position: relative; }

.lpc-pc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.38);
    border-radius: inherit;
}

.lpc-pc-inner {
    position: relative;
    z-index: 1;
}

/* Card entrance */
@keyframes lpcCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lpc-punch-card {
    animation: lpcCardIn .4s ease both;
}

.lpc-cards-list .lpc-punch-card:nth-child(2) { animation-delay: .08s; }
.lpc-cards-list .lpc-punch-card:nth-child(3) { animation-delay: .16s; }
.lpc-cards-list .lpc-punch-card:nth-child(4) { animation-delay: .24s; }

/* Stamp dot number label */
.lpc-dot-num {
    font-size: .6rem;
    font-weight: 700;
    opacity: .5;
}

/* SVG check inside filled dot */
.lpc-dot-check {
    width: 10px;
    height: 10px;
    color: #fff;
}

/* Percentage label */
.lpc-pc-pct {
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    margin-left: 8px;
}

.lpc-pc-progress-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

/* Completed badge on card footer */
.lpc-pc-completed-badge {
    font-size: .75rem;
    font-weight: 700;
    background: rgba(255,255,255,.18);
    border-radius: 999px;
    padding: 3px 10px;
}

/* ═══════════════════════════════════════════════════════════════
   HISTORY — SECTION LABELS + BADGES
   ═══════════════════════════════════════════════════════════════ */

.lpc-history-section { margin-bottom: 24px; }

.lpc-history-section-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--lpc-p-muted);
    padding: 0 0 8px;
    border-bottom: 1px solid var(--lpc-p-border);
    margin-bottom: 4px;
}

.lpc-history-dot {
    font-size: 1.2rem;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.lpc-history-dot-reward { font-size: 1.4rem; }

.lpc-history-main { font-size: .9rem; font-weight: 600; }
.lpc-history-sub  { font-size: .78rem; color: var(--lpc-p-muted); margin-top: 1px; }

.lpc-history-badge {
    display: inline-block;
    background: var(--lpc-p-bg);
    border: 1px solid var(--lpc-p-border);
    border-radius: 5px;
    font-size: .72rem;
    font-weight: 700;
    padding: 1px 7px;
    margin-left: 8px;
    vertical-align: middle;
    color: var(--lpc-p-muted);
}

.lpc-history-dot-scratch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.lpc-history-badge-pending {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

/* ═══════════════════════════════════════════════════════════════
   BADGES — SECTION LABELS + EARNED DATE + TICK
   ═══════════════════════════════════════════════════════════════ */

.lpc-badges-section { margin-bottom: 28px; }

.lpc-badges-section-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--lpc-p-muted);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--lpc-p-border);
    margin-bottom: 12px;
}

.lpc-badge-earned-date {
    font-size: .75rem;
    color: var(--lpc-p-muted);
    margin-top: 4px;
}

.lpc-badge-tick {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--lpc-p-success);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    align-self: flex-start;
}

.lpc-badge-emoji-blur {
    filter: grayscale(1) opacity(.5);
}

/* Badge entrance animation when tab opens */
@keyframes lpcBadgeIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

#lpc-ptab-badges .lpc-badge-card {
    animation: lpcBadgeIn .3s ease both;
}

#lpc-ptab-badges .lpc-badges-grid .lpc-badge-card:nth-child(2) { animation-delay: .05s; }
#lpc-ptab-badges .lpc-badges-grid .lpc-badge-card:nth-child(3) { animation-delay: .10s; }
#lpc-ptab-badges .lpc-badges-grid .lpc-badge-card:nth-child(4) { animation-delay: .15s; }
#lpc-ptab-badges .lpc-badges-grid .lpc-badge-card:nth-child(5) { animation-delay: .20s; }
#lpc-ptab-badges .lpc-badges-grid .lpc-badge-card:nth-child(6) { animation-delay: .25s; }

/* ═══════════════════════════════════════════════════════════════
   iOS PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════════════ */

.lpc-ios-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px 20px 32px;
    box-shadow: 0 -8px 40px rgba(0,0,0,.18);
    font-family: -apple-system, 'SF Pro Display', 'Plus Jakarta Sans', sans-serif;
    max-width: 480px;
    margin: 0 auto;
}

/* Arrow pointing down toward Safari share button */
.lpc-ios-arrow {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 14px solid #fff;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.12));
}

.lpc-ios-banner-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f0f0f5;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    color: #666;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lpc-ios-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-right: 32px;
}

.lpc-ios-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
    background: #4f46e5 no-repeat center/cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.lpc-ios-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lpc-ios-text strong {
    font-size: 1rem;
    font-weight: 700;
    color: #1c1c1e;
}

.lpc-ios-text span {
    font-size: .82rem;
    color: #6b6b6b;
    line-height: 1.4;
}

.lpc-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #f0f0f5;
    padding-top: 14px;
}

.lpc-ios-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
    font-size: .88rem;
    color: #1c1c1e;
    flex-wrap: wrap;
}

.lpc-ios-step:last-child {
    border-bottom: none;
}

.lpc-ios-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4f46e5;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lpc-ios-share-icon,
.lpc-ios-plus-icon {
    display: inline-flex;
    align-items: center;
    background: #f0f0f5;
    border-radius: 6px;
    padding: 4px 6px;
    color: #007aff;
    flex-shrink: 0;
}

.lpc-ios-step-sub {
    flex-basis: 100%;
    padding-left: 34px;
    font-size: .78rem;
    color: #8e8e93;
    margin-top: -4px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .lpc-ios-banner           { background: #1c1c1e; }
    .lpc-ios-arrow            { border-top-color: #1c1c1e; }
    .lpc-ios-banner-close     { background: #2c2c2e; color: #aaa; }
    .lpc-ios-text strong      { color: #f2f2f7; }
    .lpc-ios-text span        { color: #aeaeb2; }
    .lpc-ios-step             { color: #f2f2f7; border-bottom-color: #2c2c2e; }
    .lpc-ios-steps            { border-top-color: #2c2c2e; }
    .lpc-ios-step-sub         { color: #636366; }
    .lpc-ios-share-icon,
    .lpc-ios-plus-icon        { background: #2c2c2e; }
}

/* ── Forgot / Reset Password ───────────────────────────────────── */

.lpc-forgot-link {
    text-align: center;
    margin-top: 12px;
    font-size: .83rem;
}

.lpc-forgot-link a {
    color: var(--lpc-p-accent);
    text-decoration: none;
    font-weight: 600;
}

.lpc-forgot-link a:hover {
    text-decoration: underline;
}

.lpc-forgot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.lpc-forgot-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--lpc-p-text);
    margin: 0;
}

.lpc-back-btn {
    background: none;
    border: none;
    color: var(--lpc-p-accent);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.lpc-back-btn:hover {
    text-decoration: underline;
}

.lpc-forgot-desc {
    font-size: .85rem;
    color: var(--lpc-p-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}

/* ── Tap-to-scan dot ───────────────────────────────────────────── */
.lpc-pc-dot:not(.lpc-dot-filled) {
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.lpc-pc-dot:not(.lpc-dot-filled):hover,
.lpc-pc-dot:not(.lpc-dot-filled):focus-visible {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(255,255,255,.35);
    outline: none;
}
.lpc-pc-dot:not(.lpc-dot-filled):active {
    transform: scale(.95);
}

/* Scanner modal flex */
#lpc-scanner-modal.lpc-scanner-open {
    display: flex !important;
}

/* Scanner success flash */
@keyframes lpc-scan-success {
    0%   { background: rgba(16,185,129,.0); }
    30%  { background: rgba(16,185,129,.4); }
    100% { background: rgba(16,185,129,.0); }
}
.lpc-scan-flash { animation: lpc-scan-success .6s ease-out forwards; }

/* ── Reward-ready "FREE" dot pulse ─────────────────────────────── */
.lpc-dot-reward-ready {
    animation: lpc-free-pulse 1.6s ease-in-out infinite;
}
@keyframes lpc-free-pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(245,158,11,.35); }
    50%      { box-shadow: 0 0 0 7px rgba(245,158,11,.0); }
}

/* ── Reward-ready banner on card ───────────────────────────────── */
.lpc-reward-ready-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg,#f59e0b,#f97316);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    color: #fff;
    animation: lpc-banner-in .4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes lpc-banner-in {
    from { opacity:0; transform:scale(.95) translateY(-4px); }
    to   { opacity:1; transform:none; }
}
.lpc-reward-ready-icon { font-size: 1.6rem; flex-shrink:0; }
.lpc-reward-ready-banner strong { display:block; font-size:.9rem; font-weight:800; }
.lpc-reward-ready-banner span   { font-size:.78rem; opacity:.9; line-height:1.3; }

/* ── Account / Profile tab ─────────────────────────────────────── */
/* ── Account tab ───────────────────────────────────────────────── */
.lpc-account-section { max-width: 480px; }

.lpc-section-title {
    font-size: .875rem;
    font-weight: 700;
    color: var(--lpc-p-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 16px;
}

.lpc-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,.12);
    margin: 24px 0;
}

/* Sign Out — same size as other buttons but muted/danger colour */
.lpc-signout-btn {
    background: rgba(239,68,68,.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239,68,68,.3) !important;
    box-shadow: none !important;
}
.lpc-signout-btn:hover {
    background: rgba(239,68,68,.28) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Static "Save App" install button ─────────────────────────── */
#lpc-pwa-static-btn-wrap {
    padding: 0 16px 16px;
}
.lpc-pwa-static-install-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 20px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    transition: opacity .15s, transform .1s;
}
.lpc-pwa-static-install-btn:hover  { opacity: .9; }
.lpc-pwa-static-install-btn:active { transform: scale(.98); }

/* ── WhatsApp floating chat button ─────────────────────────────── */
.lpc-wa-btn {
    position: fixed;
    bottom: 24px;
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 20px 13px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: .9rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
    transition: transform .2s, box-shadow .2s, padding .3s;
    animation: lpc-wa-enter .5s cubic-bezier(.34,1.56,.64,1) both;
    animation-delay: 1.2s;
    white-space: nowrap;
    max-width: calc(100vw - 48px);
}
.lpc-wa-right { right: 20px; }
.lpc-wa-left  { left: 20px; }
.lpc-wa-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
.lpc-wa-btn:active { transform: translateY(0); }

.lpc-wa-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.lpc-wa-label {
    overflow: hidden;
    max-width: 200px;
    transition: max-width .35s, opacity .35s;
}

/* On very small screens collapse to icon only */
@media (max-width: 360px) {
    .lpc-wa-label { max-width: 0; opacity: 0; }
    .lpc-wa-btn   { padding: 13px; }
}

@keyframes lpc-wa-enter {
    from { opacity: 0; transform: translateY(20px) scale(.85); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}


/* ── reCAPTCHA ────────────────────────────────────────────────── */
.lpc-recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 8px;
}
.lpc-rc-v3-notice {
    font-size: .72rem;
    color: #9ca3af;
    text-align: center;
    margin: 0;
}
