/* ============================================
   Windhu Member — biru muda elegan + aksen orange
   ============================================ */

:root, [data-theme="ocean"] {
    --wg-blue-light: #e8f4fc;
    --wg-blue: #5eb8ff;
    --wg-blue-deep: #1a6bb5;
    --wg-orange: #ff6b1a;
    --wg-orange-dark: #e85d04;
    --wg-accent: #ff6b1a;
    --wg-accent-dark: #e85d04;
    --wg-text: #0f2942;
    --wg-muted: #5a7a9a;
    --wg-card: #ffffff;
    --wg-radius: 18px;
    --wg-header-grad: linear-gradient(135deg, #5eb8ff 0%, #1a6bb5 100%);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px; line-height: 1.5; color: var(--wg-text); background: var(--wg-blue-light);
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

.app-container {
    max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--wg-blue-light); position: relative;
}

/* Auth & landing */
.auth-page { min-height: 100vh; background: linear-gradient(160deg, #d4ecff 0%, #f0f9ff 40%, #fff8f3 100%); }
.auth-page.member-landing { display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-shell { width: 100%; max-width: 400px; margin: 0 auto; padding: 24px; }
.auth-back { color: var(--wg-blue-deep); text-decoration: none; font-size: 1.1rem; display: inline-block; margin-bottom: 16px; }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand h1 { font-size: 1.5rem; font-weight: 800; color: var(--wg-blue-deep); }
.auth-brand p { color: var(--wg-muted); font-size: 0.9rem; margin-top: 6px; }
.auth-logo { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 18px; background: linear-gradient(135deg, var(--wg-blue), var(--wg-blue-deep)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.input-app { width: 100%; padding: 12px 14px; border: 2px solid #dce8f4; border-radius: 12px; font-size: 1rem; margin-bottom: 12px; font-family: inherit; }
.input-app:focus { outline: none; border-color: var(--wg-blue); box-shadow: 0 0 0 3px rgba(94,184,255,0.25); }
.btn-primary-app { display: inline-flex; align-items: center; justify-content: center; padding: 14px 24px; border-radius: 14px; background: linear-gradient(135deg, var(--wg-accent), var(--wg-accent-dark)); color: #fff; font-weight: 700; border: none; text-decoration: none; box-shadow: 0 8px 24px rgba(255,107,26,0.35); }
.btn-outline-app { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: 14px; border: 2px solid var(--wg-blue); color: var(--wg-blue-deep); font-weight: 600; text-decoration: none; background: #fff; }
.w-100 { width: 100%; }
.mt-3 { margin-top: 12px; }
.alert-app { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-app.danger { background: #ffebee; color: #c62828; }
.alert-app.success { background: #e8f5e9; color: #2e7d32; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--wg-muted); }
.auth-switch a { color: var(--wg-orange-dark); font-weight: 600; }
.landing-hero { max-width: 520px; text-align: center; }
.landing-badge { display: inline-block; padding: 8px 16px; background: rgba(255,255,255,0.8); border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: var(--wg-blue-deep); margin-bottom: 20px; }
.landing-hero h1 { font-size: 1.75rem; font-weight: 800; color: var(--wg-blue-deep); line-height: 1.25; margin-bottom: 12px; }
.landing-hero > p { color: var(--wg-muted); margin-bottom: 24px; }
.landing-features { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.landing-features div { background: #fff; padding: 10px 14px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; color: var(--wg-text); box-shadow: 0 4px 12px rgba(26,107,181,0.08); }
.landing-cta { display: flex; flex-direction: column; gap: 12px; }
.landing-foot { margin-top: 24px; font-size: 0.8rem; color: var(--wg-muted); }
.landing-foot a { color: var(--wg-blue-deep); }

/* Header */
.app-header {
    background: var(--wg-header-grad);
    padding: 0; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 12px rgba(13,71,161,0.3);
}
.header-top {
    display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px;
}
.header-greeting { flex: 1; }
.header-greeting .greeting-text { color: rgba(255,255,255,0.8); font-size: 13px; }
.header-greeting .user-name { color: #fff; font-size: 18px; font-weight: 700; margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-avatar {
    width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4);
    object-fit: cover; cursor: pointer; transition: border-color 0.3s;
}
.header-avatar:hover { border-color: #fff; }
.header-btn {
    width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.15);
    border: none; color: #fff; font-size: 18px; display: flex; align-items: center;
    justify-content: center; cursor: pointer; transition: all 0.3s; text-decoration: none;
}
.header-btn:hover { background: rgba(255,255,255,0.25); }

/* Balance / Poin Hero */
.balance-hero {
    background: linear-gradient(135deg, #5eb8ff 0%, #1a6bb5 100%);
    padding: 0 20px 28px;
}
.balance-card {
    background: rgba(255,255,255,0.12); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 24px;
    position: relative; overflow: hidden;
}
.balance-card::before {
    content: ''; position: absolute; top: -40%; right: -20%; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); border-radius: 50%;
}
.balance-label {
    color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 8px; display: flex; align-items: center;
    justify-content: space-between; gap: 8px;
}
.balance-amount {
    color: #fff; font-size: 36px; font-weight: 800; letter-spacing: -1px; line-height: 1.2;
}
.balance-amount .currency { font-size: 20px; font-weight: 600; opacity: 0.8; margin-right: 6px; }
.balance-id {
    color: rgba(255,255,255,0.6); font-size: 12px; margin-top: 12px;
    display: flex; align-items: center; gap: 6px;
}
.balance-id i { font-size: 14px; }

/* Level Badge */
.level-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
}
.level-silver { background: rgba(255,255,255,0.2); color: #e0e0e0; }
.level-gold { background: rgba(255,193,7,0.3); color: #ffe082; }
.level-emerald { background: rgba(16,185,129,0.35); color: #a7f3d0; }

/* Poin hero — aksen orange */
.poin-hero {
    margin: 0 20px 16px; padding: 20px; border-radius: var(--wg-radius);
    background: linear-gradient(135deg, var(--wg-orange) 0%, var(--wg-orange-dark) 100%);
    color: #fff; box-shadow: 0 12px 32px rgba(255,107,26,0.35);
}
.poin-hero .poin-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.9; }
.poin-hero .poin-value { font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin: 8px 0; }
.poin-hero .poin-sub { font-size: 0.85rem; opacity: 0.9; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px 16px; }
.feature-tile {
    background: var(--wg-card); border-radius: var(--wg-radius); padding: 16px; text-decoration: none; color: inherit;
    box-shadow: 0 4px 16px rgba(15,41,66,0.06); border: 1px solid rgba(94,184,255,0.15); transition: transform 0.2s;
}
.feature-tile:hover { transform: translateY(-2px); }
.feature-tile .ft-icon { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 10px; }
.feature-tile .ft-title { font-weight: 700; font-size: 0.95rem; }
.feature-tile .ft-desc { font-size: 0.75rem; color: var(--wg-muted); margin-top: 4px; }
.feature-tile.wide { grid-column: span 2; }
.ft-promo { background: #fff3e8; color: var(--wg-orange-dark); }
.ft-order { background: #e8f4fc; color: var(--wg-blue-deep); }
.ft-redeem { background: #fce4ec; color: #c2185b; }
.ft-card { background: #e8f5e9; color: #2e7d32; }

.member-id-strip { margin: 0 20px 12px; padding: 12px 16px; background: #fff; border-radius: 14px; font-size: 0.85rem; display: flex; justify-content: space-between; align-items: center; }
.member-id-strip strong { color: var(--wg-orange-dark); }

/* Kartu QR */
.card-page { padding: 20px; padding-bottom: 100px; }
.member-card-visual {
    background: linear-gradient(145deg, #1a6bb5, #5eb8ff); border-radius: 20px; padding: 24px; color: #fff;
    box-shadow: 0 16px 40px rgba(26,107,181,0.35); margin-bottom: 20px;
}
.qr-wrap { background: #fff; border-radius: 16px; padding: 16px; text-align: center; margin-top: 16px; }
.qr-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.qr-toggle button { flex: 1; padding: 10px; border: 2px solid #dce8f4; background: #fff; border-radius: 10px; font-weight: 600; cursor: pointer; }
.qr-toggle button.active { border-color: var(--wg-orange); color: var(--wg-orange-dark); background: #fff8f3; }
.barcode-placeholder { font-family: monospace; letter-spacing: 2px; padding: 20px; background: #f5f5f5; border-radius: 8px; word-break: break-all; }

/* Section Titles */
.section-title {
    font-size: 16px; font-weight: 700; color: #1a1a2e; padding: 20px 20px 12px;
    display: flex; align-items: center; justify-content: space-between;
}
.section-title .see-all { font-size: 13px; color: #1a73e8; text-decoration: none; font-weight: 600; }

/* Wealth / Stats Grid */
.wealth-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 20px; }
.wealth-item {
    background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s;
}
.wealth-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.wealth-item .icon-circle {
    width: 42px; height: 42px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px;
}
.wealth-item .wealth-label { font-size: 12px; color: #8e8e93; font-weight: 500; margin-bottom: 4px; }
.wealth-item .wealth-value { font-size: 13px; font-weight: 700; color: #1a1a2e; }

/* Icon Colors */
.icon-blue { background: #e3f2fd; color: #1565c0; }
.icon-green { background: #e8f5e9; color: #2e7d32; }
.icon-orange { background: #fff3e0; color: #e65100; }
.icon-purple { background: #f3e5f5; color: #7b1fa2; }
.icon-teal { background: #e0f2f1; color: #00695c; }
.icon-red { background: #fce4ec; color: #c62828; }
.icon-amber { background: #fff8e1; color: #f57f17; }
.icon-indigo { background: #e8eaf6; color: #283593; }

/* Quick Actions */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 20px; }
.action-item {
    display: flex; flex-direction: column; align-items: center; text-decoration: none;
    padding: 16px 8px; border-radius: 16px; background: #fff; transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.action-item:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.action-icon {
    width: 48px; height: 48px; border-radius: 14px; display: flex;
    align-items: center; justify-content: center; font-size: 22px; margin-bottom: 8px;
}
.action-label { font-size: 11px; font-weight: 600; color: #555; text-align: center; line-height: 1.3; }

/* Transaction List */
.transaction-list { padding: 0 20px; }
.transaction-card {
    background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.transaction-item {
    display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.transaction-item:last-child { border-bottom: none; }
.transaction-item:hover { background: #fafafa; }

.trans-icon-wrap {
    width: 42px; height: 42px; border-radius: 12px; display: flex;
    align-items: center; justify-content: center; font-size: 18px; margin-right: 14px; flex-shrink: 0;
}
.trans-info { flex: 1; min-width: 0; }
.trans-info .trans-title { font-size: 14px; font-weight: 600; color: #1a1a2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trans-info .trans-date { font-size: 12px; color: #8e8e93; margin-top: 2px; }
.trans-amount-wrap { text-align: right; }
.trans-amount-wrap .trans-amount { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.trans-amount-wrap .trans-poin { font-size: 11px; font-weight: 600; color: #2e7d32; margin-top: 2px; }

/* Empty State */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state i { font-size: 48px; color: #dee2e6; margin-bottom: 12px; }
.empty-state p { color: #8e8e93; font-size: 14px; }

/* Bottom Nav */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; background: #fff; border-top: 1px solid #f0f0f0;
    display: flex; justify-content: space-around; padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 100; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; text-decoration: none;
    padding: 6px 8px; border-radius: 12px; transition: all 0.3s; min-width: 52px; flex: 1;
}
.nav-item i { font-size: 18px; color: #adb5bd; margin-bottom: 2px; }
.nav-item span { font-size: 9px; font-weight: 600; color: #adb5bd; }
.nav-item.active i, .nav-item.active span { color: var(--wg-orange-dark); }
.nav-item:hover i, .nav-item:hover span { color: var(--wg-blue-deep); }

.bottom-spacer { height: 80px; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.animate-fade-in { animation: fadeInUp 0.5s ease forwards; }
.animate-slide-in { animation: slideInRight 0.4s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Responsive */
@media (min-width: 481px) {
    body { background: #e8eaed; }
    .app-container { box-shadow: 0 0 40px rgba(0,0,0,0.1); }
}
@media (min-width: 768px) {
    .wealth-grid { grid-template-columns: repeat(4, 1fr); }
}
