:root {
    --bg-main: #0B0F17;
    --bg-secondary: #0F172A;
    --surface-dark: #131C2E;
    --surface-card: rgba(22, 31, 48, 0.75);
    --surface-glass: rgba(255, 255, 255, 0.03);
    
    /* Luxury Gold Gradients & Accents */
    --gold-primary: #D4AF37;
    --gold-light: #FDE68A;
    --gold-gradient: linear-gradient(135deg, #FDE68A 0%, #D4AF37 50%, #B45309 100%);
    --gold-gradient-soft: linear-gradient(135deg, rgba(253, 230, 138, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    --gold-glow: rgba(212, 175, 55, 0.25);
    --gold-border: rgba(212, 175, 55, 0.22);
    --gold-border-subtle: rgba(212, 175, 55, 0.12);
    
    /* Status Colors */
    --emerald-accent: #10B981;
    --emerald-glow: rgba(16, 185, 129, 0.2);
    --rose-accent: #F43F5E;
    
    /* Typography Colors */
    --text-pure: #FFFFFF;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-gold: #FCD34D;
    
    /* Dimensions */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --header-height: calc(60px + var(--safe-area-top));
    --footer-height: calc(65px + var(--safe-area-bottom));
}

/* Animations */
@keyframes goldShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes goldPulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.2), inset 0 0 15px rgba(212, 175, 55, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.2);
        transform: scale(1.02);
    }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes floatOrb {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

/* ==========================================================================
   Global Layout & Theme Overrides (Starbucks Reserve / Black Gold)
   ========================================================================== */
body.modern-theme {
    background-color: var(--bg-main) !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 30%, rgba(15, 23, 42, 0.8) 0px, transparent 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-primary) !important;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.modern-theme .app-header {
    background: rgba(11, 15, 23, 0.88) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid var(--gold-border-subtle) !important;
    color: var(--text-primary) !important;
}

.modern-theme .app-main {
    background: transparent !important;
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}

.home-container, .page-container {
    padding: 20px 0 70px 0;
    width: 100%;
}

.page-title {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 4px;
    color: var(--text-pure);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 500;
}

/* ==========================================================================
   Typography & Accents
   ========================================================================== */
.text-gold-gradient {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gold-badge {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid var(--gold-border);
    color: var(--gold-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   VIP Membership Card (Starbucks Reserve Titanium Black Gold)
   ========================================================================== */
.card-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto 20px auto;
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.card-face-front-reserve,
.card-face-back-reserve {
    width: 100%;
    min-height: 215px;
    border-radius: 26px;
    border: 1px solid var(--gold-border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Obsidian Card Front Face */
.card-face-front-reserve {
    background: radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.18) 0%, transparent 50%),
                linear-gradient(135deg, #182235 0%, #0D131F 100%);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.35s ease-out;
}

.card-face-front-reserve::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: goldShimmer 6s infinite;
    pointer-events: none;
}

/* Obsidian Card Back Face */
.card-face-back-reserve {
    background: linear-gradient(135deg, #141B29 0%, #0B0E17 100%);
    padding: 16px 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.35s ease-out;
}

.card-container.is-flipped .card-face-front-reserve {
    display: none !important;
}

.card-container.is-flipped .card-face-back-reserve {
    display: flex !important;
}

@keyframes cardFadeIn {
    0% { transform: scale(0.96); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* EMV Chip */
.emv-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #FFE082 0%, #CB9B51 50%, #9E7428 100%);
    border-radius: 6px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 2px 5px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.emv-chip::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.tech-stripe-gold {
    width: calc(100% + 40px);
    height: 30px;
    background: linear-gradient(90deg, #1E293B 0%, #0F172A 100%);
    margin: -16px -20px 8px -20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
}

.qr-reserve-container {
    background: #FFFFFF;
    padding: 6px;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
    border: 2px solid var(--gold-primary);
    margin: 4px 0;
}

.card-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.card-progress-fill {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* ==========================================================================
   Asset Bento Summary (Glassmorphism Bento)
   ========================================================================== */
.reserve-asset-card {
    background: var(--surface-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--gold-border-subtle);
    border-radius: 26px;
    padding: 22px;
    margin-bottom: 28px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.reserve-asset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.reserve-asset-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.reserve-asset-item:active {
    transform: scale(0.97);
}

.reserve-wallet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 16px 18px;
}

.btn-gold-pill {
    background: var(--gold-gradient);
    color: #0B0F17;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: transform 0.2s, filter 0.2s;
    cursor: pointer;
}

.btn-gold-pill:active {
    transform: scale(0.95);
    filter: brightness(0.9);
}

/* ==========================================================================
   Apple Bento Services Grid (Bento Box)
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 30px;
}

.bento-card {
    background: var(--surface-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 22px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.08);
}

.bento-card:active {
    transform: scale(0.97);
}

.bento-card.hero-bento {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(22, 31, 48, 0.9) 100%);
    border: 1px solid var(--gold-border);
    padding: 22px 24px;
}

.bento-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.bento-icon-gold {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.bento-icon-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.bento-icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.bento-icon-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #C084FC;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

/* ==========================================================================
   Featured Gourmet Carousel (Reserve Items)
   ========================================================================== */
.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.product-card-reserve {
    flex: 0 0 260px;
    scroll-snap-align: start;
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, border-color 0.2s;
}

.product-card-reserve:hover {
    border-color: var(--gold-border);
}

.product-img-reserve {
    width: 100%;
    height: 155px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-img-reserve::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(19, 28, 46, 0.9) 0%, transparent 60%);
}

/* ==========================================================================
   Floating Obsidian Footer Nav
   ========================================================================== */
.modern-footer {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    max-width: 520px;
    margin: 0 auto;
    height: 68px;
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1px solid var(--gold-border-subtle) !important;
    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.08) !important;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s;
    flex: 1;
    height: 100%;
    justify-content: center;
}

.tab-item.active {
    color: var(--gold-light) !important;
    transform: translateY(-2px);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.tab-item.active svg {
    stroke: url(#goldGrad) !important;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
}

.modern-footer-label {
    font-size: 10px;
    font-weight: 800;
    margin-top: 3px;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   Auth / Login (Black Gold)
   ========================================================================== */
.modern-auth-body {
    background: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(15, 23, 42, 0.9) 0px, transparent 50%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modern-auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(19, 28, 46, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--gold-border);
    border-radius: 28px;
    padding: 40px 32px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.1);
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--gold-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    margin-left: 4px;
}

.modern-input {
    width: 100%;
    background: rgba(11, 15, 23, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px;
    padding: 16px 18px;
    color: var(--text-pure) !important;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.modern-input:focus {
    outline: none;
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25) !important;
}

.modern-btn {
    width: 100%;
    background: var(--gold-gradient) !important;
    color: #0B0F17 !important;
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3) !important;
    letter-spacing: 0.5px;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4) !important;
}

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

/* ==========================================================================
   Dark Modals & Overlays
   ========================================================================== */
.reserve-modal {
    background: #141B29 !important;
    border: 1px solid var(--gold-border) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.15) !important;
    color: var(--text-primary) !important;
}