/* ==========================================================================
   FLUTTERHUB WALLET - PREMIUM DESIGN SYSTEM
   A rich, professional digital wallet UI
   ========================================================================== */

/* --- Design Tokens --- */
:root {
    --w-bg: #f0f2f5;
    --w-surface: #ffffff;
    --w-surface-hover: #f8f9fb;
    --w-border: #e4e7ec;
    --w-border-light: #f1f3f6;
    --w-text: #0f172a;
    --w-text-secondary: #64748b;
    --w-text-muted: #94a3b8;
    --w-blue: #2563eb;
    --w-blue-light: #dbeafe;
    --w-green: #059669;
    --w-green-light: #d1fae5;
    --w-red: #dc2626;
    --w-red-light: #fee2e2;
    --w-orange: #ea580c;
    --w-orange-light: #ffedd5;
    --w-purple: #7c3aed;
    --w-purple-light: #ede9fe;
    --w-gold: #d97706;
    --w-radius: 20px;
    --w-radius-sm: 14px;
    --w-radius-xs: 10px;
    --w-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --w-shadow-lg: 0 4px 24px rgba(0,0,0,0.06);
    --w-font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --w-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--w-font);
    background: var(--w-bg);
    color: var(--w-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font-family: var(--w-font);
    border: none;
    cursor: pointer;
    background: none;
}

a { text-decoration: none; color: inherit; }

/* ==========================================================================
   PIN MODAL
   ========================================================================== */
.pin-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pin-container {
    background: var(--w-surface);
    border-radius: 28px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    margin: 16px;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--w-border-light);
    animation: pinSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pinSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pin-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--w-surface-hover);
    color: var(--w-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pin-close-btn:hover {
    background: var(--w-red-light);
    color: var(--w-red);
}

.pin-lock-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--w-blue), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.pin-lock-ring {
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    border: 2px solid rgba(37, 99, 235, 0.15);
    animation: ringPulse 2s ease-in-out infinite;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.05); }
}

.pin-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--w-text);
    margin-bottom: 6px;
}

.pin-subtext {
    font-size: 14px;
    color: var(--w-text-secondary);
    margin-bottom: 20px;
}

/* ── Username input inside PIN modal ── */
.pin-username-wrap {
    width: 100%;
    margin-bottom: 20px;
}

.pin-username-field {
    position: relative;
    display: flex;
    align-items: center;
    background: #f4f7ff;
    border: 1.5px solid #dde3f0;
    border-radius: 12px;
    padding: 0 14px;
    transition: border-color 0.2s;
}

.pin-username-field:focus-within {
    border-color: #1A7CFF;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,124,255,0.10);
}

.pin-username-icon {
    color: #1A7CFF;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

#pin-username-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    font-family: inherit;
    color: #0D1B40;
    padding: 13px 0;
    letter-spacing: 0.01em;
}

#pin-username-input::placeholder {
    color: #9aa5bf;
    font-size: 14px;
}

.pin-entered {
    font-size: 1.5rem;
    color: var(--w-text);
    margin-top: 8px;
    letter-spacing: 0.2rem;
    text-align: center;
    font-weight: 600;
}

/* Dots */
.pin-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.pin-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-user-select: none;
    user-select: none;
}

.pin-dot.filled {
    background: var(--w-blue);
    border-color: var(--w-blue);
    color: #ffffff;
    transform: scale(1.15);
    box-shadow: 0 0 14px rgba(37, 99, 235, 0.45);
}

.pin-dot.error {
    background: var(--w-red);
    border-color: var(--w-red);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(220, 38, 38, 0.4);
}

/* Keypad */
.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 260px;
    margin: 0 auto 20px;
}

.key-btn {
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    outline: none;
    height: 54px;
    border-radius: var(--w-radius-sm);
    background: #f8fafc;
    color: #0f172a;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
    border: 1.5px solid #e2e8f0;
}

.key-btn:hover, .key-btn:active, .key-btn:focus {
    background: var(--w-blue-light);
    color: var(--w-blue);
    border-color: rgba(37, 99, 235, 0.4);
}

.key-action {
    background: var(--w-surface);
    font-size: 16px;
    color: var(--w-text-secondary);
}

.pin-hint {
    font-size: 12.5px;
    color: var(--w-text-muted);
}

.pin-hint strong {
    color: var(--w-blue);
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-8px); }
    30%, 60%, 90% { transform: translateX(8px); }
}

.pin-container.shake {
    animation: shake 0.5s ease;
}


/* ==========================================================================
   WALLET HEADER
   ========================================================================== */
.wallet-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--w-border-light);
}

.wallet-nav {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wallet-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-brand img {
    height: 36px;
    width: auto;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--w-blue);
    letter-spacing: -0.3px;
}

.brand-name span {
    color: var(--w-text);
}

.nav-qr-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--w-blue);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.nav-qr-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}


/* ==========================================================================
   WALLET CONTENT
   ========================================================================== */
.wallet-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* Greeting */
.wallet-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.greeting-label {
    font-size: 13px;
    color: var(--w-text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.greeting-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--w-text);
    letter-spacing: -0.3px;
}

.greeting-date {
    font-size: 12.5px;
    color: var(--w-text-muted);
    font-weight: 500;
    text-align: right;
    background: var(--w-surface);
    padding: 8px 14px;
    border-radius: var(--w-radius-xs);
    border: 1px solid var(--w-border-light);
}


/* ==========================================================================
   ATM CARD
   ========================================================================== */
.atm-card-wrapper {
    margin-bottom: 28px;
    perspective: 800px;
}

.atm-card {
    position: relative;
    width: 100%;
    min-height: 220px;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 100%);
    padding: 28px 26px 24px;
    color: #ffffff;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 20px 48px rgba(15, 23, 42, 0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.atm-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 12px 32px rgba(0, 0, 0, 0.12),
        0 28px 60px rgba(15, 23, 42, 0.2);
}

/* Shine effect */
.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

/* Geometric pattern */
.card-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(40%, -30%);
    pointer-events: none;
}

/* Card Top Row */
.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.card-brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.85);
}

.card-brand-logo i {
    color: var(--w-gold);
    font-size: 18px;
}

.card-brand-logo strong {
    color: #ffffff;
}

/* Eye Button on card */
.card-eye-btn {
    width: 40px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.card-eye-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Balance Display */
.card-balance {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.balance-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    margin-bottom: 6px;
}

.balance-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.balance-value .currency {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--w-mono);
}

.balance-value .amount {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--w-mono);
    letter-spacing: -0.5px;
}

/* Card Number */
.card-number {
    display: flex;
    gap: 16px;
    font-family: var(--w-mono);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 18px;
    position: relative;
    z-index: 2;
}

/* Card Bottom Row */
.card-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.card-holder-info label,
.card-tier label {
    display: block;
    font-size: 8.5px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
    margin-bottom: 3px;
}

.card-holder-info span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.card-tier span {
    font-size: 11px;
    font-weight: 700;
    color: var(--w-gold);
    letter-spacing: 0.5px;
}

.card-tier span i {
    font-size: 10px;
    margin-right: 3px;
}

.card-contactless {
    color: rgba(255, 255, 255, 0.25);
    font-size: 22px;
    transform: rotate(90deg);
}


/* ==========================================================================
   QUICK ACTIONS
   ========================================================================== */
.quick-actions-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--w-text);
    margin-bottom: 14px;
    letter-spacing: -0.2px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 8px 14px;
    background: var(--w-surface);
    border: 1px solid var(--w-border-light);
    border-radius: var(--w-radius);
    transition: all 0.25s ease;
    box-shadow: var(--w-shadow);
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--w-shadow-lg);
    border-color: var(--w-border);
}

.action-card span {
    font-size: 12px;
    font-weight: 700;
    color: var(--w-text);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.action-icon--blue  { background: var(--w-blue-light);  color: var(--w-blue);   }
.action-icon--green { background: var(--w-green-light); color: var(--w-green);  }
.action-icon--orange{ background: var(--w-orange-light);color: var(--w-orange); }
.action-icon--purple{ background: var(--w-purple-light);color: var(--w-purple); }


/* ==========================================================================
   FINANCIAL SUMMARY
   ========================================================================== */
.finance-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--w-surface);
    border: 1px solid var(--w-border-light);
    border-radius: var(--w-radius);
    box-shadow: var(--w-shadow);
}

.summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.summary-income .summary-icon {
    background: var(--w-green-light);
    color: var(--w-green);
}

.summary-expense .summary-icon {
    background: var(--w-red-light);
    color: var(--w-red);
}

.summary-label {
    display: block;
    font-size: 11px;
    color: var(--w-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.summary-value {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--w-text);
    font-family: var(--w-mono);
}

.summary-income .summary-value { color: var(--w-green); }
.summary-expense .summary-value { color: var(--w-red); }


/* ==========================================================================
   TRANSACTIONS
   ========================================================================== */
.transactions-section {
    background: var(--w-surface);
    border: 1px solid var(--w-border-light);
    border-radius: var(--w-radius);
    padding: 20px;
    box-shadow: var(--w-shadow);
}

.tx-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tx-section-header .section-title {
    margin-bottom: 0;
}

.tx-sync-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--w-green);
    background: var(--w-green-light);
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tx-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--w-radius-sm);
    background: var(--w-surface-hover);
    border: 1px solid var(--w-border-light);
    transition: all 0.2s ease;
}

.tx-row:hover {
    background: #f1f5f9;
    border-color: var(--w-border);
}

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--w-radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.tx-icon--debit  { background: var(--w-red-light);   color: var(--w-red);   }
.tx-icon--credit { background: var(--w-green-light); color: var(--w-green); }

.tx-info {
    flex: 1;
    min-width: 0;
}

.tx-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--w-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-info span {
    font-size: 12px;
    color: var(--w-text-muted);
}

.tx-amount {
    font-family: var(--w-mono);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.tx-debit  { color: var(--w-red);   }
.tx-credit { color: var(--w-green); }


/* ==========================================================================
   QR SCANNER INSIDE MODAL
   ========================================================================== */
.scanner-box {
    position: relative;
    width: 100%;
    height: 240px;
    border-radius: var(--w-radius);
    overflow: hidden;
    background: #0f172a;
    margin: 20px 0 16px;
}

.scanner-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    transform: translate(-50%, -50%);
}

.corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--w-blue);
    border-style: solid;
    border-width: 0;
}

.corner-tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-radius: 6px 0 0 0; }
.corner-tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-radius: 0 6px 0 0; }
.corner-bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 6px; }
.corner-br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 6px 0; }

.scanner-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--w-blue), transparent);
    box-shadow: 0 0 10px var(--w-blue);
    animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
    0%, 100% { top: 5%; }
    50%      { top: 95%; }
}

.scanner-toolbar {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.scanner-tool-btn {
    padding: 10px 20px;
    border-radius: 12px;
    background: var(--w-surface-hover);
    border: 1px solid var(--w-border);
    color: var(--w-text);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.scanner-tool-btn:hover {
    background: var(--w-blue-light);
    color: var(--w-blue);
    border-color: rgba(37, 99, 235, 0.2);
}

.scanner-tool-btn--primary {
    background: var(--w-blue);
    color: #fff;
    border-color: var(--w-blue);
}

.scanner-tool-btn--primary:hover {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .wallet-nav {
        padding: 10px 16px;
    }

    .brand-name {
        font-size: 18px;
    }

    .wallet-content {
        padding: 20px 16px 50px;
    }

    .greeting-name {
        font-size: 20px;
    }

    .atm-card {
        min-height: 200px;
        padding: 24px 22px 20px;
        border-radius: 18px;
    }

    .balance-value .amount {
        font-size: 28px;
    }

    .card-number {
        font-size: 14px;
        gap: 12px;
    }

    .actions-grid {
        gap: 10px;
    }

    .action-card {
        padding: 14px 6px 12px;
        border-radius: 16px;
    }

    .action-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 15px;
    }

    .action-card span {
        font-size: 11px;
    }

    .summary-card {
        padding: 14px;
    }

    .summary-value {
        font-size: 14px;
    }

    .pin-container {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .pin-keypad {
        max-width: 240px;
    }

    .key-btn {
        height: 52px;
        font-size: 18px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .wallet-brand img {
        height: 30px;
    }

    .brand-name {
        font-size: 16px;
    }

    .nav-qr-btn {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 16px;
    }

    .wallet-content {
        padding: 16px 14px 40px;
    }

    .greeting-name {
        font-size: 18px;
    }

    .greeting-date {
        font-size: 11px;
        padding: 6px 10px;
    }

    .atm-card {
        min-height: 180px;
        padding: 20px 18px;
        border-radius: 16px;
    }

    .card-brand-logo {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .balance-value .currency {
        font-size: 14px;
    }

    .balance-value .amount {
        font-size: 24px;
    }

    .card-number {
        font-size: 12.5px;
        gap: 10px;
        margin-bottom: 14px;
    }

    .card-holder-info span {
        font-size: 10.5px;
    }

    .card-tier span {
        font-size: 10px;
    }

    .card-contactless {
        font-size: 18px;
    }

    .atm-card-wrapper {
        margin-bottom: 22px;
    }

    .actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .action-card {
        padding: 12px 4px 10px;
        border-radius: 14px;
        gap: 8px;
    }

    .action-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 14px;
    }

    .action-card span {
        font-size: 10.5px;
    }

    .finance-summary {
        gap: 8px;
    }

    .summary-card {
        padding: 12px;
        gap: 10px;
        border-radius: 16px;
    }

    .summary-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 13px;
    }

    .summary-value {
        font-size: 13px;
    }

    .transactions-section {
        padding: 16px;
        border-radius: 16px;
    }

    .tx-row {
        padding: 10px 12px;
        border-radius: 12px;
        gap: 10px;
    }

    .tx-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 13px;
    }

    .tx-info h4 {
        font-size: 13px;
    }

    .tx-amount {
        font-size: 13px;
    }

    .pin-container {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .pin-lock-icon {
        width: 56px;
        height: 56px;
        font-size: 20px;
        border-radius: 18px;
    }

    .pin-heading {
        font-size: 20px;
    }

    .pin-keypad {
        max-width: 220px;
        gap: 8px;
    }

    .key-btn {
        height: 48px;
        font-size: 17px;
        border-radius: 12px;
    }

    .pin-dot {
        width: 16px;
        height: 16px;
    }

    .scanner-box {
        height: 200px;
        border-radius: 16px;
    }

    .scanner-reticle {
        width: 130px;
        height: 130px;
    }
}

/* ==========================================================================
   CAMERA PERMISSION POPUP
   ========================================================================== */

#cam-permission-overlay {
    z-index: 9999;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cam-perm-card {
    position: relative;
    background: #fff;
    border-radius: 28px;
    padding: 40px 32px 32px;
    max-width: 360px;
    width: 92%;
    margin: auto;
    text-align: center;
    box-shadow: 0 32px 80px rgba(0,0,0,0.28);
    animation: cam-perm-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cam-perm-in {
    from { opacity: 0; transform: scale(0.8) translateY(30px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Icon */
.cam-perm-icon {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a7cff 0%, #00b4d8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 12px 32px rgba(26, 124, 255, 0.38);
}

.cam-perm-icon i {
    font-size: 34px;
    color: #fff;
    z-index: 1;
}

/* Animated ring */
.cam-perm-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid rgba(26, 124, 255, 0.35);
    animation: cam-ring-pulse 2s ease-in-out infinite;
}

@keyframes cam-ring-pulse {
    0%, 100% { transform: scale(1);   opacity: 0.6; }
    50%       { transform: scale(1.1); opacity: 0.15; }
}

/* Title */
.cam-perm-title {
    font-family: var(--w-font);
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

/* Description */
.cam-perm-desc {
    font-family: var(--w-font);
    font-size: 14.5px;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 28px;
}

.cam-perm-desc strong { color: #0f172a; }
.cam-perm-desc em     { color: #2563eb; font-style: normal; font-weight: 600; }

/* Buttons */
.cam-perm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cam-btn {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--w-font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.cam-btn:active { transform: scale(0.97); }

.cam-btn--allow {
    background: linear-gradient(135deg, #1a7cff 0%, #00b4d8 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(26, 124, 255, 0.38);
}

.cam-btn--allow:hover {
    box-shadow: 0 12px 32px rgba(26, 124, 255, 0.5);
    transform: translateY(-1px);
}

.cam-btn--deny {
    background: #f1f5f9;
    color: #64748b;
}


.cam-btn--deny:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Denied icon variant */
.cam-perm-icon--denied {
    background: linear-gradient(135deg, #dc2626 0%, #f87171 100%) !important;
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.38) !important;
}

/* Loading icon variant */
.cam-perm-icon--loading {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%) !important;
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.38) !important;
}

/* Steps list for denied state */
.cam-perm-steps {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cam-perm-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: #7f1d1d;
    line-height: 1.5;
}

.cam-perm-steps li i {
    margin-top: 2px;
    color: #dc2626;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}


.cam-perm-steps li strong {
    color: #991b1b;
}

/* ── Info (neutral) icon variant ── */
.cam-perm-icon--info {
    background: linear-gradient(135deg, #1A7CFF 0%, #00B4D8 100%) !important;
    box-shadow: 0 12px 32px rgba(26,124,255,0.35) !important;
}

/* Neutral step list (not red) */
.cam-perm-steps--neutral li {
    background: #f0f7ff;
    border-color: #bfdbfe;
    color: #1e3a5f;
}
.cam-perm-steps--neutral li i { color: #1A7CFF; }
.cam-perm-steps--neutral li strong { color: #1e40af; }

/* ── Browser dialog preview hint ── */
.cam-browser-hint {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin: 14px 0 6px;
    font-size: 12.5px;
}

.cam-hint-bar {
    background: #e8edf2;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #dde3ec;
}

.cam-hint-lock { color: #64748b; font-size: 11px; }

.cam-hint-url {
    color: #475569;
    font-size: 12px;
    font-weight: 500;
}

.cam-hint-prompt {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cam-hint-cam-icon {
    color: #1A7CFF;
    font-size: 18px;
    flex-shrink: 0;
}

.cam-hint-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cam-hint-text strong { color: #0f172a; font-size: 13px; }
.cam-hint-text span   { color: #64748b; font-size: 11.5px; }

.cam-hint-btns {
    display: flex;
    gap: 6px;
}

.cam-hint-allow, .cam-hint-block {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: default;
}

.cam-hint-allow {
    background: #1A7CFF;
    color: #fff;
}

.cam-hint-block {
    background: #e2e8f0;
    color: #475569;
}

 
 / *    % %  F l o a t i n g   A c t i o n   B u t t o n s    % %  * / 
 . f a b - c o n t a i n e r   { 
         p o s i t i o n :   f i x e d ; 
         b o t t o m :   2 4 p x ; 
         r i g h t :   2 4 p x ; 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         g a p :   1 6 p x ; 
         z - i n d e x :   9 0 0 ; 
 } 
 
 . f a b - b t n   { 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         j u s t i f y - c o n t e n t :   c e n t e r ; 
         g a p :   8 p x ; 
         b o r d e r :   n o n e ; 
         b o r d e r - r a d i u s :   3 0 p x ; 
         p a d d i n g :   1 2 p x   2 4 p x ; 
         f o n t - s i z e :   1 5 p x ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c u r s o r :   p o i n t e r ; 
         b o x - s h a d o w :   0   4 p x   1 4 p x   r g b a ( 0 , 0 , 0 , 0 . 1 5 ) ; 
         t r a n s i t i o n :   t r a n s f o r m   0 . 2 s ,   b o x - s h a d o w   0 . 2 s ; 
 } 
 
 . f a b - b t n : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 2 p x ) ; 
         b o x - s h a d o w :   0   6 p x   2 0 p x   r g b a ( 0 , 0 , 0 , 0 . 2 ) ; 
 } 
 
 . f a b - p r i m a r y   { 
         b a c k g r o u n d :   l i n e a r - g r a d i e n t ( 1 3 5 d e g ,   # 1 A 7 C F F   0 % ,   # 0 0 5 6 D 2   1 0 0 % ) ; 
         c o l o r :   w h i t e ; 
 } 
 
 . f a b - s e c o n d a r y   { 
         b a c k g r o u n d :   w h i t e ; 
         c o l o r :   # 1 A 7 C F F ; 
         b o r d e r :   1 p x   s o l i d   r g b a ( 2 6 , 1 2 4 , 2 5 5 , 0 . 2 ) ; 
 } 
 
 . f a b - s e c o n d a r y   i   { 
         c o l o r :   # 1 A 7 C F F ; 
 } 
 
 . f a b - l a b e l   { 
         f o n t - f a m i l y :   v a r ( - - w - f o n t - m a i n ) ; 
 } 
  
 
/* ========== FLOATING ACTION BUTTONS ========== */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
}

.fab-primary {
    background: linear-gradient(135deg, #1A7CFF, #00b4d8);
    font-size: 24px;
    z-index: 2;
}

.fab-primary.active {
    transform: rotate(45deg);
}

.fab-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fab-container.active .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-secondary {
    background: #ffffff;
    color: #1A7CFF;
    width: 48px;
    height: 48px;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.fab-secondary:hover {
    background: #f4f7ff;
}

.tooltip-left {
    position: relative;
}

.tooltip-left::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.fab-container.active .tooltip-left::before {
    opacity: 1;
    visibility: visible;
}

/* ========== BOTTOM NAVIGATION BAR ========== */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 20px 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-top: 1px solid #f0f0f0;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    color: #6b7a99;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100px;
}

.nav-btn i {
    font-size: 22px;
    margin-bottom: 6px;
    color: #1A7CFF;
}

.nav-btn span {
    font-size: 13px;
    font-weight: 600;
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Make space at the bottom of the wallet app so it doesn't get covered by the nav bar */
.wallet-app {
    padding-bottom: 80px;
}

/* ========== FIXED ACTION BUTTONS ========== */
.fixed-action-bar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.fixed-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.fixed-btn:active {
    transform: scale(0.96);
}

.btn-scan {
    background: linear-gradient(135deg, #1A7CFF, #00b4d8);
}

.btn-order {
    background: linear-gradient(135deg, #FF7C1A, #FFB400);
}

.wallet-app {
    padding-bottom: 100px !important;
}
