/* QReats — Charlotte-inspired Food Theme (Sunny Yellow & Cream) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Charlotte-style palette: sunny yellow, cream, warm orange */
    --gold: #FFD93D;
    --gold-light: #FFE566;
    --gold-lighter: #FFF3B8;
    --gold-dark: #E5C235;
    --gold-darker: #B8860B;
    --amber: #FF9500;
    --white: #FFFFFF;
    --bg: #F8F7F2;
    --bg-2: #FFF9E8;
    --bg-3: #FFF4CC;
    --surface: #FFFFFF;
    --border: rgba(255, 217, 61, 0.35);
    --border-light: rgba(255, 217, 61, 0.15);
    --text-dark: #1C1917;
    --text-main: #292524;
    --text-sub: #57534E;
    --text-muted: #78716C;
    --success: #059669;
    --success-bg: #ECFDF5;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --info: #2563EB;
    --info-bg: #EFF6FF;
    --grad-gold: linear-gradient(135deg, #FFE566 0%, #FFD93D 50%, #F5C400 100%);
    --grad-amber: linear-gradient(135deg, #FFD93D 0%, #FF9500 100%);
    /* Shadows — soft, warm lift */
    --shadow-xs: 0 1px 3px rgba(28, 25, 23, 0.06);
    --shadow-sm: 0 4px 12px rgba(28, 25, 23, 0.08);
    --shadow-md: 0 10px 28px rgba(28, 25, 23, 0.1);
    --shadow-lg: 0 20px 48px rgba(28, 25, 23, 0.12);
    --shadow-gold: 0 8px 24px rgba(255, 217, 61, 0.35);
    /* Radii — friendly rounded */
    --r-xs: 8px;
    --r-sm: 14px;
    --r-md: 18px;
    --r-lg: 24px;
    --r-xl: 32px;
    --r-full: 100px;
    /* Motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --dur: 0.4s;
    --transition: all var(--dur) var(--ease);
    --nav-h: 68px;
    /* Spacing scale */
    --sp-xs: 0.25rem;
    --sp-sm: 0.5rem;
    --sp-md: 1rem;
    --sp-lg: 1.5rem;
    --sp-xl: 2rem;
    --sp-2xl: 3rem;
    /* Typography scale */
    --fs-xs: 0.72rem;
    --fs-sm: 0.82rem;
    --fs-base: 0.95rem;
    --fs-lg: 1.1rem;
    --fs-xl: 1.5rem;
    --fs-2xl: 2rem;
    --fs-display: clamp(2rem, 8vw, 3.8rem);
    /* Safe area */
    --safe-b: env(safe-area-inset-bottom, 0px);
}

/* Alpine.js: hide until hydrated (avoids flash of wrong tab) */
[x-cloak] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ═══════════════════════════════
   AMBIENT BACKGROUND SYSTEM
   Rich warm atmosphere for
   both Restaurant & Tea/Cafe
   ═══════════════════════════════ */

/* Base warm gradient layer — cream & sunny yellow */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255, 217, 61, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 85% 80%, rgba(255, 149, 0, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 217, 61, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(255, 229, 102, 0.07) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* Grain texture overlay for depth */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* ── Floating Decorative Elements ── */
.bg-decor {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

/* Large warm glow — top right (sunny yellow) */
.bg-glow-1 {
    top: -120px;
    right: -80px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 217, 61, 0.18) 0%, rgba(255, 217, 61, 0.04) 40%, transparent 70%);
    animation: ambient-drift 20s ease-in-out infinite;
}

/* Warm amber glow — bottom left */
.bg-glow-2 {
    bottom: -100px;
    left: -60px;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 149, 0, 0.12) 0%, rgba(255, 149, 0, 0.03) 45%, transparent 70%);
    animation: ambient-drift 25s ease-in-out infinite reverse;
}

/* Soft golden ring — center */
.bg-ring-1 {
    top: 30%;
    right: 10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(255, 217, 61, 0.08);
    animation: ring-pulse 12s ease-in-out infinite;
}

/* Secondary ring — lower area */
.bg-ring-2 {
    bottom: 20%;
    left: 8%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 217, 61, 0.06);
    animation: ring-pulse 16s ease-in-out infinite reverse;
}

/* Floating dot cluster */
.bg-dots {
    top: 15%;
    left: 5%;
    width: 120px;
    height: 120px;
    background:
        radial-gradient(circle 3px at 20% 30%, rgba(255, 217, 61, 0.2) 100%, transparent),
        radial-gradient(circle 2px at 70% 20%, rgba(255, 149, 0, 0.15) 100%, transparent),
        radial-gradient(circle 2px at 40% 80%, rgba(255, 217, 61, 0.12) 100%, transparent),
        radial-gradient(circle 3px at 85% 65%, rgba(229, 194, 53, 0.18) 100%, transparent),
        radial-gradient(circle 1.5px at 10% 60%, rgba(255, 229, 102, 0.2) 100%, transparent);
    animation: float-gentle 8s ease-in-out infinite;
}

/* Second dot cluster */
.bg-dots-2 {
    bottom: 25%;
    right: 5%;
    width: 100px;
    height: 100px;
    background:
        radial-gradient(circle 2px at 30% 25%, rgba(255, 217, 61, 0.15) 100%, transparent),
        radial-gradient(circle 2.5px at 75% 50%, rgba(255, 149, 0, 0.12) 100%, transparent),
        radial-gradient(circle 2px at 15% 75%, rgba(229, 194, 53, 0.16) 100%, transparent),
        radial-gradient(circle 1.5px at 60% 85%, rgba(255, 229, 102, 0.12) 100%, transparent);
    animation: float-gentle 10s ease-in-out infinite reverse;
}

/* Diagonal decorative line */
.bg-line {
    top: 40%;
    left: -20px;
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 217, 61, 0.12), transparent);
    transform: rotate(-35deg);
    animation: ambient-drift 18s ease-in-out infinite;
}

/* Small floating diamond */
.bg-diamond {
    top: 55%;
    right: 15%;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(255, 217, 61, 0.15);
    transform: rotate(45deg);
    animation: float-gentle 7s ease-in-out infinite;
}

.bg-diamond-2 {
    top: 20%;
    left: 18%;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 149, 0, 0.1);
    transform: rotate(45deg);
    animation: float-gentle 9s ease-in-out infinite reverse;
}

@keyframes ambient-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(15px, -10px) scale(1.05); }
    50% { transform: translate(-10px, 20px) scale(0.95); }
    75% { transform: translate(20px, 10px) scale(1.03); }
}

@keyframes ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

@keyframes warm-breathe {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-dark);
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.gradient-text {
    background: var(--grad-amber);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .container {
        padding: 2rem 1.2rem;
    }
}


.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(28, 25, 23, 0.06);
}

.nav-logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.03em;
}

.nav-logo .logo-badge {
    width: 36px;
    height: 36px;
    background: var(--grad-gold);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-gold);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-sub);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.5rem 1rem;
    border-radius: var(--r-full);
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--text-dark);
    background: var(--bg-2);
    border-color: var(--border);
}

.nav-links a.active {
    color: var(--gold-darker);
    background: var(--gold-lighter);
    border-color: rgba(255, 217, 61, 0.4);
    font-weight: 700;
}

.nav-toggle {
    display: none;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
}

@media(max-width:768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        gap: 0.3rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border-radius: var(--r-full);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: var(--fs-base);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--grad-gold);
    color: var(--text-dark);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 36px rgba(255, 217, 61, 0.45);
    filter: brightness(1.04);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-sub);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold-darker);
    background: var(--gold-lighter);
    transform: translateY(-2px);
}

/* Ghost button — no border, text only */
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-sub);
    padding: 0.5rem 1rem;
}

.btn-ghost:hover {
    background: var(--bg-2);
    color: var(--text-dark);
}

/* Danger button */
.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
    filter: brightness(1.08);
}

/* Small button */
.btn-sm {
    padding: 0.45rem 1rem;
    font-size: var(--fs-sm);
    gap: 0.4rem;
}

/* Icon-only button (circle) */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.modern-card {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 2rem;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.modern-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 217, 61, 0.35);
}

.modern-card:hover::before {
    transform: scaleX(1);
}

.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(28, 25, 23, 0.06);
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-sub);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border-radius: var(--r-md);
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255, 217, 61, 0.2);
}

select.form-input {
    cursor: pointer;
}

textarea.form-input {
    resize: vertical;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}


.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: var(--r-full);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge-gold {
    background: var(--gold-lighter);
    color: var(--gold-darker);
    border: 1px solid rgba(255, 217, 61, 0.35);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-warning {
    background: #FFF7ED;
    color: var(--warning);
}

.category-pill {
    padding: 0.55rem 1.3rem;
    border-radius: var(--r-full);
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--text-sub);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
}

.category-pill:hover {
    border-color: var(--gold);
    color: var(--gold-darker);
    background: var(--gold-lighter);
}

.category-pill.active {
    background: var(--grad-gold);
    border-color: transparent;
    color: var(--text-dark);
    box-shadow: var(--shadow-gold);
}

.eyebrow {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-dark);
}

/* Search input */
.search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.4rem;
    border-radius: var(--r-full);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-base);
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 217, 61, 0.2);
}

.search-wrap {
    position: relative;
}

.search-wrap::before {
    content: '🔍';
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Scroll fade affordance */
.scroll-fade {
    position: relative;
}

.scroll-fade::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.3s;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--r-md);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
    border-radius: var(--r-xs);
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 65%;
}

.skeleton-text.long {
    width: 90%;
}

.skeleton-card {
    height: 100px;
    border-radius: var(--r-lg);
}

.skeleton-circle {
    border-radius: 50%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Inline validation */
.form-input.invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error {
    color: var(--danger);
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Inline alert / toast */
.inline-alert {
    padding: 0.8rem 1rem;
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeUp 0.3s var(--ease);
}

.inline-alert.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.inline-alert.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.15);
}

/* QReats - Main Style Sheet */

/* Cart badge bounce */
@keyframes cartBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

.cart-bounce {
    animation: cartBounce 0.3s var(--ease-spring);
}

/* Add-to-cart pulse */
@keyframes addPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.92);
    }

    100% {
        transform: scale(1);
    }
}

.add-pulse {
    animation: addPulse 0.25s var(--ease);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
    background: var(--gold-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes pulse-gold {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 217, 61, 0.5)
    }

    50% {
        box-shadow: 0 0 0 14px rgba(255, 217, 61, 0)
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-8px)
    }
}

@keyframes borderPulse {

    0%,
    100% {
        border-color: rgba(255, 217, 61, 0.35)
    }

    50% {
        border-color: var(--gold)
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1)
    }

    50% {
        transform: translate(30px, 20px) scale(1.1)
    }
}

.animate-fade {
    animation: fadeUp 0.6s var(--ease) both;
}

.animate-fade-2 {
    animation: fadeUp 0.6s var(--ease) 0.12s both;
}

.animate-fade-3 {
    animation: fadeUp 0.6s var(--ease) 0.24s both;
}

.animate-scale {
    animation: scaleIn 0.4s var(--ease-spring) both;
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

.pulse-alert {
    animation: borderPulse 1.8s ease-in-out infinite, pulse-gold 1.8s ease-in-out infinite;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(26, 18, 0, 0.2);
    border-top-color: var(--text-dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--r-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    animation: scaleIn 0.35s var(--ease-spring);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--grad-gold);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.status-pending {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.status-preparing {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.status-ready {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-2);
}

/* Status filter tabs */
.status-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    /* In flex toolbars, default min-width:auto prevents shrinking and causes page-wide overflow */
    min-width: 0;
}

.status-tabs::-webkit-scrollbar {
    display: none;
}

.status-tab {
    padding: 0.5rem 1.2rem;
    border-radius: var(--r-full);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Poppins', sans-serif;
}

.status-tab:hover {
    border-color: var(--gold);
}

.status-tab.active {
    background: var(--grad-gold);
    border-color: transparent;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.status-tab .tab-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 800;
}

.text-center {
    text-align: center
}

.text-muted {
    color: var(--text-muted)
}

.text-gold {
    color: var(--gold-dark)
}

.text-success {
    color: var(--success)
}

.text-danger {
    color: var(--danger)
}

.w-full {
    width: 100%
}

.mt-1 {
    margin-top: 1rem
}

.mt-2 {
    margin-top: 2rem
}

.mb-1 {
    margin-bottom: 1rem
}

.mb-2 {
    margin-bottom: 2rem
}

/* --- Premium Dashboard Enhancements --- */

.glass-premium {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(28, 25, 23, 0.08);
}

.card-premium {
    background: var(--white);
    border-radius: var(--r-xl);
    padding: 2.4rem;
    border: 1px solid var(--border-light);
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(28, 25, 23, 0.06);
}

.card-premium:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 44px -10px rgba(28, 25, 23, 0.14);
    border-color: rgba(255, 217, 61, 0.4);
}

.premium-gradient-bg {
    background:
        linear-gradient(160deg, 
            #F8F7F2 0%,
            #FFF9E8 25%,
            #FFF4CC 50%,
            #FFF0B0 75%,
            #FFF9E8 100%);
    background-size: 200% 200%;
    animation: gradient-shift 20s ease-in-out infinite;
    position: relative;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animated-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
    animation: drift 15s infinite alternate ease-in-out;
}

.orb-gold { background: linear-gradient(135deg, var(--gold), var(--gold-light)); width: 400px; height: 400px; top: -100px; right: -100px; }
.orb-amber { background: linear-gradient(135deg, var(--amber), rgba(255,140,0,0.6)); width: 300px; height: 300px; bottom: -50px; left: -100px; animation-delay: -5s; }
.orb-tea { background: radial-gradient(circle, rgba(139,90,43,0.2), rgba(201,146,26,0.15)); width: 350px; height: 350px; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: warm-breathe 10s ease-in-out infinite; }

.text-display {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.stat-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card-premium:hover .stat-icon-wrap {
    transform: scale(1.1) rotate(5deg);
}

.premium-badge {
    background: rgba(255, 217, 61, 0.2);
    color: var(--gold-darker);
    padding: 0.5rem 1.2rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 217, 61, 0.3);
}

.header-accent {
    position: relative;
    display: inline-block;
}

.header-accent::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--gold-lighter);
    z-index: -1;
    opacity: 0.7;
    border-radius: 4px;
}

/* Custom Scrollbar for Premium Feel */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: var(--gold-lighter);
    border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float-premium {
    animation: float-gentle 6s infinite ease-in-out;
}

/* ═══════════════════════════════
   HERO HEADING — responsive
   ═══════════════════════════════ */
.hero-heading {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

/* ═══════════════════════════════
   BOTTOM NAVIGATION BAR
   Native app-style, mobile-only
   ═══════════════════════════════ */
.bottom-nav {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {

    /* ══════════════════════════════════
       GLOBAL MOBILE RESET — Prevent Overflow
       ══════════════════════════════════ */
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
        position: relative;
        width: 100%;
    }

    /*
     * Use 100% of the containing block — not 100vw — so layout width matches the
     * visible area when a vertical scrollbar is present (100vw includes the gutter
     * and can itself create horizontal overflow).
     */
    * {
        max-width: 100%;
    }

    /* ══════════════════════════════════
       MOBILE STACK — Universal Override
       ══════════════════════════════════ */
    .mobile-stack {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* ══════════════════════════════════
       BOTTOM NAVIGATION BAR — STABLE FIXED
       ══════════════════════════════════ */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 99999; /* Highest priority */
        background: var(--white);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-light);
        padding: 0.5rem 0;
        padding-bottom: calc(0.5rem + var(--safe-b));
        justify-content: space-around;
        align-items: center;
        transform: translateZ(0); /* Force hardware accel for stability */
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        text-decoration: none;
        padding: 0.35rem 0.5rem;
        border-radius: var(--r-md);
        transition: var(--transition);
        position: relative;
        min-width: 60px;
    }

    .bottom-nav-icon {
        font-size: 1.4rem;
        line-height: 1;
    }

    .bottom-nav-label {
        font-family: 'Plus Jakarta Sans', sans-serif;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    /* Active state indicator — more visible */
    .bottom-nav-item.active {
        color: var(--gold-darker);
    }

    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: -0.5rem;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 4px;
        background: var(--grad-gold);
        border-radius: 0 0 4px 4px;
    }

    /* ══════════════════════════════════
       HIDE HAMBURGER COMPLETELY
       ══════════════════════════════════ */
    .desktop-only, .nav-toggle, .nav-links.show {
        display: none !important;
    }

    /* ══════════════════════════════════
       COMPACT STICKY HEADER
       ══════════════════════════════════ */
    .nav-container {
        height: 56px;
        padding: 0 1rem;
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100% !important;
    }

    .nav-logo {
        font-size: 0.95rem;
        gap: 0.4rem;
        max-width: 80%;
    }

    .nav-logo span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ══════════════════════════════════
       CONTAINER & BODY PADDING
       ══════════════════════════════════ */
    body {
        padding-bottom: 90px !important;
    }

    .container {
        padding: 1rem !important;
        margin-top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* QR + Settings only — contain stray overflow without clipping fixed UI elsewhere */
    .page-qr-main,
    .page-settings-main {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* ══════════════════════════════════
       TYPOGRAPHY — Prevent overflow
       ══════════════════════════════════ */
    h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        overflow-wrap: break-word;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    p {
        font-size: 0.9rem !important;
    }

    /* ══════════════════════════════════
       DASHBOARD — Responsive
       ══════════════════════════════════ */
    .hero-heading {
        font-size: 1.8rem !important;
        letter-spacing: -0.03em;
    }

    .card-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .card-premium {
        padding: 1.5rem !important;
        border-radius: 20px !important;
    }

    /* ══════════════════════════════════
       FORCE ALL INLINE GRIDS TO STACK
       ══════════════════════════════════ */
    [style*="display:grid"], [style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* Exceptions for grids that SHOULD stay grids on mobile (like 2-column actions) */
    [style*="grid-template-columns:repeat(2"], [style*="grid-template-columns: repeat(2"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* ══════════════════════════════════
       ORDERS PAGE — Specific Mobile Fixes
       ══════════════════════════════════ */
    [style*="display:flex;justify-content:space-between;align-items:center;margin-bottom:4rem"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .status-tabs {
        width: 100%;
        max-width: 100%;
        min-width: 0; /* allow shrink so overflow-x applies inside, not on the page */
        flex: 1 1 100%;
        display: flex !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 5px !important;
    }

    .token-num {
        font-size: 1.3rem !important;
    }

    /* ══════════════════════════════════
       QR CODE PAGE — Specific Mobile Fixes
       ══════════════════════════════════ */
    .page-qr-code .card-premium {
        max-width: 100%;
        min-width: 0;
    }

    .page-qr-main .qr-grid > div[style*="sticky"] {
        position: static !important;
        width: 100%;
        max-width: 100%;
    }

    .qr-preview {
        padding: 2.5rem 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #qrcode {
        max-width: 100%;
        box-sizing: border-box;
    }

    #qrcode canvas,
    #qrcode img {
        max-width: min(240px, 100%) !important;
        height: auto !important;
    }

    .scan-badge {
        font-size: 0.8rem !important;
        padding: 0.6rem 1rem !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ══════════════════════════════════
       SETTINGS PAGE — Specific Mobile Fixes
       ══════════════════════════════════ */
    .page-settings .card-premium {
        max-width: 100%;
        min-width: 0;
    }

    .page-settings .save-bar {
        position: fixed !important;
        bottom: 85px !important;
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
        padding: 0.75rem 1rem !important;
        z-index: 10000;
        box-sizing: border-box !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .page-settings .save-bar > div[style*="flex:1"] {
        flex: 1 1 0 !important;
        min-width: 0 !important;
    }

    /* Schedule: one column so time inputs never force horizontal page scroll */
    .page-settings .day-row {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
        font-size: 0.8rem !important;
    }

    .page-settings .day-row input[type="time"] {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .page-settings .day-row > span.text-display:first-child {
        font-weight: 800;
        margin-bottom: 0.15rem;
    }

    .page-settings .day-row label {
        justify-self: start;
    }

    /* Colors grid */
    [style*="display:flex;flex-wrap:wrap;gap:1.5rem"] {
        gap: 0.75rem !important;
    }

    .color-preview {
        width: 35px !important;
        height: 35px !important;
    }

    /* ══════════════════════════════════
       FOOTER — above bottom nav
       ══════════════════════════════════ */
    footer {
        margin-bottom: 0 !important;
        margin-top: 2rem !important;
        padding-bottom: 1rem;
    }

    /* ══════════════════════════════════
       GENERAL MOBILE POLISH
       ══════════════════════════════════ */

    /* Premium badge — smaller */
    .premium-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.9rem;
    }

    /* Buttons — full width on mobile */
    .btn-primary,
    .btn-outline {
        font-size: 0.85rem;
    }

    /* Inline flex sections that might overflow */
    [style*="display:flex;justify-content:space-between"] {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    /* Sub text */
    [style*="font-size:1.2rem"],
    [style*="font-size:1.1rem"] {
        font-size: 0.95rem !important;
    }

    /* Animated background orbs — reduce on mobile for perf */
    .animated-orb {
        opacity: 0.15;
    }

    .bg-decor {
        opacity: 0.5;
    }

    /* Service banner scroll */
    .service-banner,
    [style*="display:flex;gap:1.5rem;overflow-x:auto"] {
        gap: 0.8rem !important;
    }

    .service-chip {
        min-width: 180px;
        padding: 0.8rem 1rem;
    }

    /* Heatmap grid on mobile — tighter */
    .heatmap-grid {
        grid-template-columns: repeat(auto-fit, minmax(55px, 1fr)) !important;
        gap: 0.5rem !important;
    }

    .table-node {
        font-size: 0.75rem !important;
    }

    /* Chart container */
    .chart-container {
        height: 120px !important;
        padding: 12px !important;
    }

    /* Mode cards */
    .mode-card {
        padding: 0.8rem 1rem !important;
    }

    .mode-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }
}

