/* ============================================================
   S-Wallet Public — Professional Design v2.0
   ============================================================ */
:root {
    --sw-indigo:       #6366f1;
    --sw-indigo-dark:  #4f46e5;
    --sw-indigo-light: #e0e7ff;
    --sw-green:        #10b981;
    --sw-green-light:  #d1fae5;
    --sw-green-dark:   #065f46;
    --sw-red:          #ef4444;
    --sw-red-light:    #fee2e2;
    --sw-red-dark:     #991b1b;
    --sw-gray-50:  #f9fafb; --sw-gray-100: #f3f4f6; --sw-gray-200: #e5e7eb;
    --sw-gray-400: #9ca3af; --sw-gray-500: #6b7280; --sw-gray-700: #374151;
    --sw-gray-800: #1f2937; --sw-gray-900: #111827;
}

/* ═══════════════════════════════════════════════════════════
   MY ACCOUNT — Wallet Tab
   ═══════════════════════════════════════════════════════════ */

/* Hero Card */
.swallet-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.swallet-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
}
.swallet-hero::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 30%;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
}
.swallet-hero-inner { position: relative; z-index: 1; }
.swallet-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}
.swallet-hero-label {
    font-size: 12px;
    font-weight: 700;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.swallet-hero-balance {
    font-size: 44px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -1px;
}
.swallet-hero-cents {
    font-size: 24px;
    font-weight: 600;
    opacity: .7;
}
.swallet-hero-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.swallet-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.9);
    border: 1px solid rgba(255,255,255,.15);
}
.swallet-hero-badge.active { background: rgba(16,185,129,.2); border-color: rgba(16,185,129,.3); color: #6ee7b7; }
.swallet-hero-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 18px;
    margin-top: 0;
}
.swallet-hero-stat {
    flex: 1;
    padding-right: 20px;
    margin-right: 20px;
    border-right: 1px solid rgba(255,255,255,.1);
}
.swallet-hero-stat:last-child { border-right: none; padding-right: 0; margin-right: 0; }
.swallet-hero-stat-val { font-size: 20px; font-weight: 700; color: #fff; }
.swallet-hero-stat-lbl { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }

/* Section Card */
.swallet-section {
    background: #fff;
    border: 1px solid var(--sw-gray-200);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}
.swallet-section-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sw-gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
}
.swallet-section-header-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--sw-indigo-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.swallet-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--sw-gray-900);
    margin: 0;
}
.swallet-section-body { padding: 20px; }

/* Voucher Redeem */
.swallet-voucher-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.swallet-voucher-input {
    flex: 1;
    min-width: 180px;
    padding: 11px 16px;
    border: 2px solid var(--sw-gray-200);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--sw-gray-900);
    transition: border-color .18s;
    background: var(--sw-gray-50);
}
.swallet-voucher-input:focus { border-color: var(--sw-indigo); outline: none; background: #fff; }
.swallet-voucher-input::placeholder { font-weight: 400; letter-spacing: 0; color: var(--sw-gray-400); font-family: inherit; }
.swallet-voucher-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    background: var(--sw-indigo);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .1s;
    text-decoration: none;
    white-space: nowrap;
}
.swallet-voucher-btn:hover { background: var(--sw-indigo-dark); }
.swallet-voucher-btn:active { transform: scale(.98); }
.swallet-voucher-btn svg { flex-shrink: 0; }
.swallet-voucher-btn .sw-spin {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: swSpin .6s linear infinite;
    display: none;
}
.swallet-voucher-btn.loading .sw-spin { display: inline-block; }
.swallet-voucher-btn.loading svg { display: none; }
@keyframes swSpin { to { transform: rotate(360deg); } }

.swallet-voucher-feedback {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
}
.swallet-voucher-feedback.valid  { color: var(--sw-green-dark); }
.swallet-voucher-feedback.invalid{ color: var(--sw-red-dark); }

/* Transaction List */
.swallet-txn-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.swallet-txn-filter-btn {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: var(--sw-gray-100);
    color: var(--sw-gray-600);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
}
.swallet-txn-filter-btn.active,
.swallet-txn-filter-btn:hover {
    background: var(--sw-indigo-light);
    color: var(--sw-indigo);
    border-color: var(--sw-indigo-light);
}
.swallet-txn-list { list-style: none; margin: 0; padding: 0; }
.swallet-txn-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--sw-gray-100);
}
.swallet-txn-item:last-child { border-bottom: none; }
.swallet-txn-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.swallet-txn-icon.credit { background: var(--sw-green-light); }
.swallet-txn-icon.debit  { background: var(--sw-red-light); }
.swallet-txn-body { flex: 1; min-width: 0; }
.swallet-txn-label { font-weight: 600; font-size: 14px; color: var(--sw-gray-900); }
.swallet-txn-meta  { font-size: 11px; color: var(--sw-gray-400); margin-top: 2px; }
.swallet-txn-right { text-align: right; flex-shrink: 0; }
.swallet-txn-amount { font-weight: 700; font-size: 15px; display: block; }
.swallet-txn-amount.credit { color: var(--sw-green); }
.swallet-txn-amount.credit::before { content: '+'; }
.swallet-txn-amount.debit  { color: var(--sw-red); }
.swallet-txn-amount.debit::before  { content: '−'; }
.swallet-txn-bal { font-size: 11px; color: var(--sw-gray-400); margin-top: 2px; }

/* Empty state */
.swallet-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--sw-gray-400);
}
.swallet-empty svg { opacity: .3; margin-bottom: 12px; }
.swallet-empty p { font-size: 14px; margin: 0; }

/* ═══════════════════════════════════════════════════════════
   CHECKOUT — Wallet Payment Box
   ═══════════════════════════════════════════════════════════ */
.swallet-checkout {
    background: #fff;
    border: 2px solid var(--sw-gray-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color .2s;
}
.swallet-checkout.applied { border-color: var(--sw-green); background: #f0fdf4; }
.swallet-checkout-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.swallet-checkout-icon {
    width: 40px; height: 40px;
    background: var(--sw-indigo-light);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.swallet-checkout-title { font-size: 16px; font-weight: 700; color: var(--sw-gray-900); margin: 0; }
.swallet-checkout-subtitle { font-size: 12px; color: var(--sw-gray-400); margin-top: 1px; }
.swallet-checkout-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sw-gray-50);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.swallet-checkout-bal-lbl { font-size: 12px; color: var(--sw-gray-500); font-weight: 500; }
.swallet-checkout-bal-val { font-size: 20px; font-weight: 800; color: var(--sw-green); }
.swallet-checkout-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.swallet-checkout-input {
    width: 130px;
    padding: 9px 12px;
    border: 1.5px solid var(--sw-gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sw-gray-800);
}
.swallet-checkout-input:focus { border-color: var(--sw-indigo); outline: none; }
.swallet-checkout-apply {
    flex: 1;
    padding: 9px 18px;
    background: var(--sw-indigo);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.swallet-checkout-apply:hover { background: var(--sw-indigo-dark); }
.swallet-checkout-remove {
    padding: 9px 14px;
    background: var(--sw-red-light);
    color: var(--sw-red-dark);
    border: 1px solid var(--sw-red-light);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
}
.swallet-checkout-remove:hover { background: var(--sw-red); color: #fff; }
.swallet-checkout-applied-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sw-green-light);
    border-radius: 8px;
    padding: 11px 14px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sw-green-dark);
}
.swallet-checkout-applied-row svg { flex-shrink: 0; }
.swallet-checkout-msg { font-size: 12px; color: var(--sw-red-dark); margin-top: 8px; }
