:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 82, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --accent: #0052FF;
    --accent-glow: rgba(0, 82, 255, 0.15);
    --text-primary: #050505;
    --text-secondary: #6B7280;
    --bg-main: #FFFFFF;
}

/* Animations */
@keyframes meshGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =========================================================
   POKER 3D CARD FLIP CYCLE (Flip Back -> Flip Front)
   Smooth 360-degree rotation showing luxury card back then front
   ========================================================= */
@keyframes pokerFlipCycle {
    0% {
        transform: perspective(1000px) rotateY(0deg) scale(1);
    }
    48% {
        transform: perspective(1000px) rotateY(180deg) scale(0.95);
    }
    52% {
        transform: perspective(1000px) rotateY(180deg) scale(0.95);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg) scale(1);
    }
}

/* Staggered poker flip entrance for quick actions, grids & list cards */
.mbr-quick-item,
.s-item,
.voucher-card,
.stamp-card,
.scratch-option-card,
.food-item-card,
.chest-card,
.branch-card,
.reward-item {
    position: relative;
    animation: pokerFlipCycle 0.85s cubic-bezier(0.4, 0.0, 0.2, 1) both;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    will-change: transform;
}

/* Front content hidden when facing away */
.mbr-quick-item > *,
.s-item > *,
.voucher-card > *,
.stamp-card > *,
.scratch-option-card > *,
.food-item-card > *,
.chest-card > *,
.branch-card > *,
.reward-item > * {
    position: relative;
    z-index: 2;
    transform: translateZ(2px);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Luxury Poker Card Back (reveals when item flips to the back) */
.mbr-quick-item::after,
.s-item::after,
.voucher-card::after,
.stamp-card::after,
.scratch-option-card::after,
.food-item-card::after,
.chest-card::after,
.branch-card::after,
.reward-item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, #1b1a1f 0%, #0d0d12 100%);
    border: 1px solid rgba(224, 194, 122, 0.45);
    background-image: 
        radial-gradient(rgba(224, 194, 122, 0.28) 1.5px, transparent 1.5px),
        radial-gradient(rgba(224, 194, 122, 0.12) 1.5px, transparent 1.5px);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.8), 0 4px 14px rgba(0, 0, 0, 0.4);
    transform: rotateY(180deg) translateZ(1px);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Cascading stagger delays (1st to 10th elements) */
.mbr-quick-item:nth-child(1), .s-item:nth-child(1), .scratch-option-card:nth-child(1), .chest-card:nth-child(1), .branch-card:nth-child(1), .reward-item:nth-child(1), .voucher-card:nth-child(1) { animation-delay: 0.08s; }
.mbr-quick-item:nth-child(2), .s-item:nth-child(2), .scratch-option-card:nth-child(2), .chest-card:nth-child(2), .branch-card:nth-child(2), .reward-item:nth-child(2), .voucher-card:nth-child(2) { animation-delay: 0.16s; }
.mbr-quick-item:nth-child(3), .s-item:nth-child(3), .scratch-option-card:nth-child(3), .chest-card:nth-child(3), .branch-card:nth-child(3), .reward-item:nth-child(3), .voucher-card:nth-child(3) { animation-delay: 0.24s; }
.mbr-quick-item:nth-child(4), .s-item:nth-child(4), .scratch-option-card:nth-child(4), .chest-card:nth-child(4), .branch-card:nth-child(4), .reward-item:nth-child(4), .voucher-card:nth-child(4) { animation-delay: 0.32s; }
.mbr-quick-item:nth-child(5), .s-item:nth-child(5), .chest-card:nth-child(5), .reward-item:nth-child(5) { animation-delay: 0.40s; }
.mbr-quick-item:nth-child(6), .s-item:nth-child(6), .chest-card:nth-child(6), .reward-item:nth-child(6) { animation-delay: 0.48s; }
.mbr-quick-item:nth-child(7), .s-item:nth-child(7), .chest-card:nth-child(7) { animation-delay: 0.56s; }
.mbr-quick-item:nth-child(8), .s-item:nth-child(8), .chest-card:nth-child(8) { animation-delay: 0.64s; }
.mbr-quick-item:nth-child(9), .s-item:nth-child(9), .history-item:nth-child(9) { animation-delay: 0.53s; }
.mbr-quick-item:nth-child(10), .s-item:nth-child(10), .history-item:nth-child(10) { animation-delay: 0.59s; }



@keyframes pulseGlowBlue {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* ====================
   Auth Layout (Luxury Obsidian & Champagne Gold Theme)
==================== */
.modern-auth-body {
    background-color: transparent !important;
    background-image: none !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.modern-auth-body::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(70% 45% at 15% -10%, rgba(224, 194, 122, 0.12), transparent 60%),
        radial-gradient(60% 40% at 85% 15%, rgba(224, 194, 122, 0.06), transparent 70%),
        radial-gradient(50% 30% at 50% 100%, rgba(212, 175, 55, 0.05), transparent 80%);
}

.modern-auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(165deg, rgba(38, 34, 28, 0.94) 0%, rgba(14, 14, 18, 0.97) 100%) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(224, 194, 122, 0.38) !important;
    border-radius: 26px;
    padding: 38px 28px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.75),
        0 0 35px rgba(224, 194, 122, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-logo-container {
    text-align: center;
    margin-bottom: 28px;
}

.modern-title {
    font-size: 28px;
    font-weight: 850;
    color: #f7f4ec !important;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #e0c27a 65%, #c8a355 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modern-subtitle {
    font-size: 13.5px;
    color: #d4cec2 !important;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.55;
    font-weight: 500;
}

.modern-form-group {
    margin-bottom: 20px;
}

.modern-label {
    display: block;
    font-size: 11px;
    font-weight: 750;
    color: var(--gold) !important;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
    margin-left: 4px;
}

.modern-input {
    width: 100%;
    background: rgba(14, 14, 18, 0.85) !important;
    border: 1px solid rgba(224, 194, 122, 0.22) !important;
    border-radius: 14px;
    padding: 16px 18px;
    color: #f7f4ec !important;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.25s ease;
    box-sizing: border-box;
    color-scheme: dark;
}

.modern-input::placeholder {
    color: #b7b1a4 !important;
}

.modern-input:focus {
    outline: none;
    background: rgba(20, 20, 26, 0.95) !important;
    border-color: #e0c27a !important;
    box-shadow: 0 0 20px rgba(224, 194, 122, 0.22);
    transform: translateY(-1px);
}

.modern-btn {
    width: 100%;
    background: linear-gradient(135deg, #e0c27a 0%, #c49d47 100%) !important;
    color: #0b0b0e !important;
    border: 1px solid rgba(255, 235, 175, 0.45) !important;
    border-radius: 14px;
    padding: 16px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 12px;
    box-shadow: 0 10px 25px rgba(196, 157, 71, 0.3);
    letter-spacing: 0.3px;
}

.modern-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(224, 194, 122, 0.4);
    filter: brightness(1.08);
}

.modern-btn:active {
    transform: scale(0.98) translateY(0);
}

.modern-link-container {
    text-align: center;
    margin-top: 24px;
}

.modern-link-text {
    color: #8c877a !important;
    font-size: 13.5px;
    font-weight: 500;
}

.modern-link {
    color: var(--gold) !important;
    text-decoration: none;
    font-weight: 750;
    margin-left: 6px;
    transition: color 0.2s;
}

.modern-link:hover {
    color: #f7e1a3 !important;
    text-decoration: underline;
}

.modern-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 22px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* ====================
   Global Layout & Theme overrides
==================== */
body.modern-theme {
    background-color: #07070a !important;
    background-image: url('../images/theme-bg.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #ece7dc !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

.modern-theme .app-header {
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.92) 0%, rgba(8, 8, 10, 0.96) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(224, 194, 122, 0.16) !important;
    color: #ece7dc !important;
}

.modern-theme .app-main {
    background: transparent !important;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.modern-theme .icon-btn {
    color: #ece7dc !important;
}

.modern-theme .profile-avatar {
    border-color: color-mix(in srgb, var(--gold) 45%, transparent) !important;
    background-color: #1c1c22 !important;
    color: var(--gold) !important;
}

.home-container {
    padding: 20px;
    max-width: 100%;
}

/* Dark membership home paints its own canvas under app-main */
.modern-theme .app-main:has(.mbr-dark-home) {
    background: transparent !important;
    padding-bottom: 0 !important;
}
.modern-theme .app-main:has(.mbr-dark-home) .home-container {
    padding: 0 !important;
}
body.modern-theme:has(.mbr-dark-home) {
    background-color: #07070a !important;
    background-image: url('../images/theme-bg.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
}

/* ====================
   3D Card Structure
==================== */
.card-container {
    perspective: 1500px;
    -webkit-perspective: 1500px;
    width: 100%;
    aspect-ratio: 1.518 / 1;
    border-radius: 18px;
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.65));
}

.card-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.card-container.flipped .card-flipper {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

.card-face {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.card-front {
    transform: rotateY(0deg) translateZ(1px);
    -webkit-transform: rotateY(0deg) translateZ(1px);
    z-index: 2;
}

.card-back {
    transform: rotateY(180deg) translateZ(1px);
    -webkit-transform: rotateY(180deg) translateZ(1px);
    z-index: 1;
}

/* Guard against mobile browser backface-visibility leaks */
.card-container .card-front {
    transition: opacity 0.01s ease 0.38s;
}
.card-container .card-back {
    transition: opacity 0.01s ease 0.38s;
}
.card-container.flipped .card-front {
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
}
.card-container:not(.flipped) .card-back {
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 1 !important;
}
.card-container.flipped .card-back {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 3 !important;
}
.card-container:not(.flipped) .card-front {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 3 !important;
}

.modern-3d-card-face {
    background: #fff;
    border: 1px solid rgba(0, 82, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 82, 255, 0.05);
}

.modern-3d-card-face.mbr-card {
    border-radius: 18px;
}

.card-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.flip-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
}

/* ====================
   Home Components 
==================== */
.modern-welcome {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 2px;
}

.modern-welcome-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.modern-stat-tray {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modern-stat-box {
    flex: 1;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 22px;
    padding: 16px;
    transition: all 0.3s;
}

.modern-stat-label {
    font-size: 10px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modern-stat-val {
    font-size: 20px;
    font-weight: 800;
}

.modern-stat-sub {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
}

/* Unified Dashboard Card */
.modern-dashboard-card {
    background: #FFFFFF;
    border: 1px solid rgba(0, 82, 255, 0.08);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 12px 40px rgba(0, 82, 255, 0.04);
}

.dashboard-assets {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.asset-item {
    flex: 1;
    text-align: center;
}

.asset-divider {
    width: 1px;
    height: 40px;
    background: #E5E7EB;
    margin: 0 10px;
}

.dashboard-wallet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFF;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(0, 82, 255, 0.04);
}

.wallet-info .modern-stat-label {
    margin-bottom: 2px;
}

.wallet-info .modern-stat-val {
    color: var(--accent);
}

.refill-link {
    background: var(--accent);
    color: #fff;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

.refill-link:active {
    transform: scale(0.95);
}

/* ====================
   Carousel Layout
==================== */
.section-header {
    margin-top: 40px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.product-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: #FFFFFF;
    border: 1px solid #F3F4F6;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 82, 255, 0.03);
}

.product-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 12px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ====================
   Footer Navigation
==================== */
.modern-footer {
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    height: 72px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 82, 255, 0.08);
    border-radius: 24px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 15px 40px rgba(0, 82, 255, 0.08);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #9CA3AF;
    transition: all 0.3s;
}

.tab-item.active {
    color: var(--accent);
    transform: translateY(-4px);
}

.modern-footer-label {
    font-size: 10px;
    font-weight: 700;
    margin-top: 4px;
}

/* ====================
   Desktop Preview Frame 
==================== */
@media (min-width: 1025px) {
    .hide-on-desktop {
        display: none !important;
    }

    .desktop-preview-wrapper {
        position: fixed;
        inset: 0;
        background: radial-gradient(circle at 0% 0%, #f0f4ff 0%, #ffffff 50%, #f8faff 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 99999;
        overflow: hidden;
        padding: 40px;
    }

    .preview-columns {
        display: flex;
        align-items: center;
        gap: 80px;
        max-width: 1200px;
        width: 100%;
        justify-content: center;
    }

    /* Premium iPhone 15 Pro Style Frame */
    .mobile-frame-container {
        position: relative;
        width: 400px;
        height: 820px;
        background: #111;
        border-radius: 60px;
        padding: 14px;
        box-shadow: 
            0 50px 100px -20px rgba(0, 0, 0, 0.25),
            0 30px 60px -30px rgba(0, 0, 0, 0.3),
            inset 0 0 2px 2px rgba(255, 255, 255, 0.1);
        border: 4px solid #333;
    }

    .frame-inner {
        position: relative;
        width: 100%;
        height: 100%;
        background: #fff;
        border-radius: 48px;
        overflow: hidden;
        border: 1px solid #000;
    }

    /* Dynamic Island */
    .dynamic-island {
        position: absolute;
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 35px;
        background: #000;
        border-radius: 20px;
        z-index: 100;
    }

    .frame-content {
        width: 100%;
        height: 100%;
        border: none;
        background: #fff;
    }

    /* Side Promotion / QR Section */
    .qr-side-section {
        max-width: 450px;
        animation: fadeInScale 0.8s ease-out;
    }

    .qr-badge {
        display: inline-block;
        background: #0052FF;
        color: #fff;
        padding: 8px 16px;
        border-radius: 100px;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 24px;
    }

    .qr-title {
        font-size: 48px;
        font-weight: 900;
        color: #050505;
        line-height: 1.1;
        margin-bottom: 20px;
        letter-spacing: -2px;
    }

    .qr-desc {
        font-size: 18px;
        color: #666;
        line-height: 1.6;
        margin-bottom: 40px;
    }

    .qr-card {
        background: #fff;
        padding: 30px;
        border-radius: 32px;
        display: inline-block;
        box-shadow: 0 20px 50px rgba(0, 82, 255, 0.1);
        border: 1px solid rgba(0, 82, 255, 0.05);
        text-align: center;
    }

    .qr-container {
        width: 200px;
        height: 200px;
        margin: 0 auto 20px;
        background: #f8f9fa;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    .qr-container img {
        max-width: 100%;
        height: auto;
    }

    .qr-footer-text {
        font-size: 14px;
        font-weight: 700;
        color: #050505;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
}

/* ====================
   Member App Unification (2026 PWA - Dark Luxury Theme)
   Shared chrome for all logged-in pages
==================== */
:root {
    --accent: #d4b56a;
    --accent-2: #b89648;
    --accent-soft: rgba(224, 194, 122, 0.12);
    --accent-glow: rgba(224, 194, 122, 0.22);
    --ink: #f7f4ec;
    --muted: #a39e8f;
    --line: rgba(255, 255, 255, 0.08);
    --surface: #14141a;
    --bg-app: #0b0b0e;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.5);
}

body.modern-theme {
    background-color: #07070a !important;
    background-image: url('../images/theme-bg.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #ece7dc !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
}

.modern-theme .app-header {
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.94) 0%, rgba(8, 8, 10, 0.98) 100%) !important;
    border-bottom: 1px solid rgba(224, 194, 122, 0.16) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modern-theme .app-main {
    background: transparent !important;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    min-height: calc(100vh - var(--header-height, 58px));
}

/* Page chrome used across wallet / voucher / echop / profile / etc. */
.modern-theme .app-main .page-container,
.modern-theme .app-main .home-container,
.modern-theme .app-main .rewards-hub-page,
.modern-theme .app-main .booking-page {
    padding: 18px 18px 120px !important;
    background: transparent !important;
    color: #ece7dc !important;
    animation: fadeInScale 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.modern-theme .app-main .page-title,
.modern-theme .app-main .rewards-title,
.modern-theme .app-main .spin-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -0.6px !important;
    color: #ffffff !important;
    margin-bottom: 6px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modern-theme .app-main .page-subtitle,
.modern-theme .app-main .rewards-sub,
.modern-theme .app-main .spin-desc,
.modern-theme .app-main .page-sub {
    font-size: 13px !important;
    color: #a39e8f !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    margin-bottom: 22px !important;
}

/* Dark Segmented tabs */
.modern-theme .app-main .tab-nav,
.modern-theme .app-main .tab-container {
    background: #14141a !important;
    border-radius: 14px !important;
    padding: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(224, 194, 122, 0.2) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.modern-theme .app-main .tab-btn {
    border-radius: 11px !important;
    font-weight: 700 !important;
    color: #a39e8f !important;
    background: transparent;
    transition: all 0.25s ease;
}

.modern-theme .app-main .tab-btn.active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, transparent) 0%, rgba(30, 30, 38, 0.9) 100%) !important;
    color: var(--gold) !important;
    border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

/* Dark Luxury Glass Cards & Lists */
.modern-theme .app-main .settings-group,
.modern-theme .app-main .voucher-card,
.modern-theme .app-main .notif-card,
.modern-theme .app-main .notif-item,
.modern-theme .app-main .history-list,
.modern-theme .app-main .history-item,
.modern-theme .app-main .news-card,
.modern-theme .app-main .report-card,
.modern-theme .app-main .scratch-option-card,
.modern-theme .app-main .food-item-card,
.modern-theme .app-main .topup-card,
.modern-theme .app-main .ref-card,
.modern-theme .app-main .appt-card.passed {
    background: linear-gradient(175deg, #171720 0%, #0f0f14 100%) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(224, 194, 122, 0.22) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
    color: #ece7dc !important;
}

.modern-theme .app-main .profile-hero {
    background: linear-gradient(175deg, #171720 0%, #0f0f14 100%) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(224, 194, 122, 0.25) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
    color: #ece7dc !important;
}

.modern-theme .app-main .profile-hero .p-avatar {
    border: 3px solid var(--gold) !important;
    background-color: #1a1a22 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6) !important;
    color: var(--gold) !important;
}

.modern-theme .app-main .profile-hero .p-name {
    color: #ffffff !important;
}

.modern-theme .app-main .profile-hero .p-phone {
    color: #a39e8f !important;
}

.modern-theme .app-main .p-badge {
    background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 72%, #fff) 0%, var(--gold) 100%) !important;
    color: #111116 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(212, 181, 106, 0.3) !important;
}

.modern-theme .app-main .s-item {
    color: #ece7dc !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.modern-theme .app-main .s-item:active {
    background: rgba(224, 194, 122, 0.08) !important;
}

.modern-theme .app-main .s-icon {
    background: color-mix(in srgb, var(--gold) 14%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent) !important;
    color: var(--gold) !important;
}

.modern-theme .app-main .s-text {
    color: #ece7dc !important;
}

/* Forms & inputs */
.modern-theme .app-main .form-input,
.modern-theme .app-main .input-control,
.modern-theme .app-main input[type="text"],
.modern-theme .app-main input[type="password"],
.modern-theme .app-main input[type="email"],
.modern-theme .app-main input[type="tel"],
.modern-theme .app-main input[type="number"],
.modern-theme .app-main input[type="date"],
.modern-theme .app-main select,
.modern-theme .app-main textarea {
    border-radius: 14px !important;
    border: 1px solid rgba(224, 194, 122, 0.32) !important;
    background: #1c1c24 !important;
    color: #f7f4ec !important;
    color-scheme: dark;
}

.modern-theme .app-main input::placeholder,
.modern-theme .app-main textarea::placeholder {
    color: #c8c2b4 !important;
}

.modern-theme input[type="password"]::-ms-reveal,
.modern-theme input[type="password"]::-ms-clear {
    filter: invert(0.86) sepia(0.45) saturate(2.4) hue-rotate(8deg);
    width: 18px;
    height: 18px;
}

.modern-theme .app-main .form-input:focus,
.modern-theme .app-main .input-control:focus,
.modern-theme .app-main input:focus,
.modern-theme .app-main select:focus,
.modern-theme .app-main textarea:focus {
    border-color: rgba(224, 194, 122, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(224, 194, 122, 0.15) !important;
    outline: none !important;
}

/* Primary CTAs — Luxury Champagne Gold Buttons */
.modern-theme .app-main .submit-btn,
.modern-theme .app-main .btn-primary,
.modern-theme .app-main .redeem-btn,
.modern-theme .app-main .btn-redeem,
.modern-theme .app-main .btn-claim,
.modern-theme .app-main .btn-play-scratch,
.modern-theme .app-main .btn-redeem-food,
.modern-theme .app-main .spin-button,
.modern-theme .app-main .sc-btn-primary,
.modern-theme .app-main .copy-btn {
    background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 70%, #fff) 0%, var(--gold) 52%, color-mix(in srgb, var(--gold) 62%, #000) 100%) !important;
    color: #0b0b0e !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--gold) 32%, transparent) !important;
    font-weight: 800 !important;
    text-shadow: none !important;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.modern-theme .app-main .submit-btn:active,
.modern-theme .app-main .btn-primary:active,
.modern-theme .app-main .btn-redeem:active,
.modern-theme .app-main .btn-claim:active,
.modern-theme .app-main .btn-play-scratch:active,
.modern-theme .app-main .spin-button:active {
    transform: scale(0.97);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.modern-theme .app-main .btn-use {
    background: color-mix(in srgb, var(--gold) 14%, transparent) !important;
    color: var(--gold) !important;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent) !important;
}

.modern-theme .app-main .btn-logout {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    box-shadow: none !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

/* Empty states */
.modern-theme .app-main [style*="border: 2px dashed"] {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(20, 20, 26, 0.6) !important;
    border-radius: 18px !important;
}

/* Quick action grid (Home) */
.mbr-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0 0 28px;
}

.mbr-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ink);
    padding: 14px 8px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    transition: transform .15s ease;
}

.mbr-quick-item:active { transform: scale(0.96); }

.mbr-quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 18px;
    font-weight: 800;
}

.mbr-quick-label {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: -0.1px;
    text-align: center;
    line-height: 1.2;
}

/* Floating footer polish */
.modern-footer {
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
    left: 14px !important;
    right: 14px !important;
    height: 68px !important;
    border-radius: 22px !important;
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.92) 0%, rgba(8, 8, 10, 0.96) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(224, 194, 122, 0.16) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4) !important;
}

.modern-footer .tab-item.active {
    color: var(--gold) !important;
}

.modern-footer .tab-item.active svg {
    filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--gold) 40%, transparent));
}

/* Wallet asset cards */
.modern-theme .app-main .asset-card {
    border-radius: 24px !important;
    box-shadow: 0 16px 40px rgba(0, 82, 255, 0.12) !important;
}

/* Soften harsh echop black panels toward brand */
.modern-theme .app-main .chop-card,
.modern-theme .app-main .prize-card {
    border-radius: 20px !important;
}

/* Spin / scratch page titles when present */
.modern-theme .app-main h1,
.modern-theme .app-main .page-heading {
    letter-spacing: -0.4px;
}

/* Profile settings icon tiles */
.modern-theme .app-main .s-icon {
    border-radius: 12px !important;
}

/* Notification unread accent */
.modern-theme .app-main .notif-item.unread {
    border-left: 3px solid var(--accent);
}

/* Safer tap targets */
.modern-theme .app-main .s-item,
.modern-theme .app-main .tab-btn {
    min-height: 48px;
}

/* Complete-profile sections */
.setup-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(0, 0, 0, 0.18) 100%);
    border: 1px solid rgba(224, 194, 122, 0.28);
    border-radius: 18px;
    padding: 18px 16px 8px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.setup-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.setup-panel-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0c27a;
    background: rgba(224, 194, 122, 0.12);
    border: 1px solid rgba(224, 194, 122, 0.28);
}

.setup-panel-head h3 {
    font-size: 15px;
    font-weight: 750;
    color: #f7f4ec;
    line-height: 1.2;
}

.setup-panel-head p {
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.45;
    color: #d4cec2;
}

.setup-avatar {
    width: 86px;
    height: 86px;
    border-radius: 26px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #e0c27a;
    background-color: #171720;
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(224, 194, 122, 0.45);
}

.setup-avatar-label {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #d4cec2;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.setup-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #d4cec2;
}

/* Mandatory password dialog */
.pwd-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    background: rgba(5, 5, 8, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.pwd-modal-card {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(165deg, rgba(42, 38, 30, 0.98) 0%, rgba(12, 12, 16, 0.98) 100%);
    border: 1px solid rgba(224, 194, 122, 0.4);
    border-radius: 26px;
    padding: 30px 24px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pwd-modal-head {
    text-align: center;
    margin-bottom: 22px;
}

.pwd-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0c27a;
    background: radial-gradient(circle at 40% 30%, rgba(224, 194, 122, 0.32), rgba(224, 194, 122, 0.08));
    border: 1px solid rgba(224, 194, 122, 0.45);
}

.pwd-modal-head h2 {
    font-size: 20px;
    font-weight: 800;
    color: #f7f4ec;
}

.pwd-modal-head p {
    margin-top: 8px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #d4cec2;
}

.pwd-field {
    margin-bottom: 14px;
}

.pwd-field label {
    display: block;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #e0c27a;
    margin-bottom: 8px;
}

.modern-theme .app-main .pwd-field input {
    width: 100%;
    box-sizing: border-box;
    background: #1c1c24 !important;
    color: #f7f4ec !important;
    border: 1px solid rgba(224, 194, 122, 0.34) !important;
    border-radius: 14px !important;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color-scheme: dark;
}

.modern-theme .app-main .pwd-field input::placeholder {
    color: #c8c2b4 !important;
}

.modern-theme .app-main .pwd-field input:focus {
    border-color: #e0c27a !important;
    box-shadow: 0 0 0 3px rgba(224, 194, 122, 0.16) !important;
}

.pwd-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.pwd-submit {
    width: 100%;
    margin-top: 6px;
    padding: 15px;
    border: 1px solid rgba(255, 235, 175, 0.45);
    border-radius: 14px;
    background: linear-gradient(135deg, #e0c27a 0%, #c49d47 100%);
    color: #0b0b0e;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(196, 157, 71, 0.32);
}

.pwd-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}


