/* ═══════════════════════════════════════════════════════════════════════════
   QMANJA VOICE AI — editorial saffron · ink · cream
   Fraunces display, Inter body, JetBrains Mono accents
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,800&family=JetBrains+Mono:wght@500&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg:           #faf6f0;
    --paper:        #ffffff;
    --ink:          #1a1410;
    --ink-2:        #3a2f25;
    --muted:        #8b7e6a;
    --border:       #e7dfcb;
    --border-soft:  #f1ead9;

    --saffron:      #d97706;
    --saffron-deep: #b45309;
    --saffron-soft: #fef3c7;
    --saffron-glow: #fbbf24;

    --green:        #15803d;
    --green-soft:   #d1fae5;
    --red:          #dc2626;
    --red-deep:     #991b1b;
    --red-soft:     #fef2f2;
    --blue-soft:    #dbeafe;
    --blue-deep:    #1e40af;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', 'SF Mono', monospace;

    --shadow-sm:    0 1px 3px rgba(28,20,16,0.06), 0 2px 6px rgba(28,20,16,0.04);
    --shadow-md:    0 2px 8px -2px rgba(28,20,16,0.08), 0 8px 24px -8px rgba(28,20,16,0.1);
    --shadow-glow:  0 14px 40px -8px rgba(217,119,6,0.5), 0 4px 12px rgba(28,20,16,0.18);
    --shadow-red:   0 14px 40px -8px rgba(220,38,38,0.5), 0 4px 12px rgba(28,20,16,0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(251,191,36,0.10), transparent 38%),
        radial-gradient(circle at 88% 92%, rgba(217,119,6,0.06), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

button, input, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--saffron-deep); text-decoration: none; }
a:hover { color: var(--ink); }
code { font-family: var(--font-mono); }

/* ═══════════════════ TOP NAV ═══════════════════ */

.topnav {
    position: sticky; top: 0; z-index: 50;
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 32px;
    background: rgba(250, 246, 240, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.brand-link {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--ink);
}

.brand-dot {
    width: 10px; height: 10px;
    background: var(--saffron);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(217,119,6,0.18);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 800;
    letter-spacing: -0.01em;
    font-variation-settings: "opsz" 12;
}

.brand-divider {
    width: 1px; height: 14px;
    background: var(--border);
    margin: 0 4px;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--saffron-deep);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.nav-links {
    display: flex; align-items: center; gap: 6px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px; font-weight: 500;
    color: var(--ink-2);
    transition: all 150ms;
    position: relative;
}

.nav-link:hover {
    background: var(--paper);
    color: var(--ink);
}

.cart-link {
    display: inline-flex; align-items: center; gap: 6px;
}

.cart-badge {
    display: inline-grid; place-items: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--saffron);
    color: white;
    font-size: 10px; font-weight: 700;
    border-radius: 999px;
    font-family: var(--font-mono);
}

/* ═══════════════════ MAIN ═══════════════════ */

.main-content {
    position: relative; z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px;
}

.footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

.section-heading {
    font-family: var(--font-display);
    font-size: 24px; font-weight: 600;
    font-variation-settings: "opsz" 100;
    margin-bottom: 18px;
    letter-spacing: -0.015em;
}

/* ═══════════════════ HERO SECTION ═══════════════════ */

.hero-section {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    margin-bottom: 50px;
    align-items: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-variation-settings: "opsz" 144;
    margin-bottom: 16px;
    color: var(--ink);
}

.hero-title em {
    font-style: italic;
    color: var(--saffron-deep);
    font-weight: 500;
}

.hero-sub {
    font-size: 17px;
    color: var(--ink-2);
    max-width: 560px;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Call buttons */

.call-controls {
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-bottom: 24px;
}

.btn-call-start, .btn-call-end {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 18px 36px;
    border-radius: 999px;
    color: white;
    font-size: 16px; font-weight: 600;
    min-width: 220px;
    justify-content: center;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn-call-start {
    background: linear-gradient(135deg, var(--saffron) 0%, var(--saffron-deep) 100%);
    box-shadow: var(--shadow-glow);
}

.btn-call-start:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 48px -8px rgba(217,119,6,0.6), 0 6px 14px rgba(28,20,16,0.2);
}

.btn-call-end {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
    box-shadow: var(--shadow-red);
}

.btn-call-end:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 48px -8px rgba(220,38,38,0.6), 0 6px 14px rgba(28,20,16,0.2);
}

.phone-icon { width: 20px; height: 20px; }
.phone-icon.hangup { transform: rotate(135deg); }

/* Phone orb (decorative) */

.hero-orb-wrap {
    display: flex; justify-content: center; align-items: center;
}

.phone-orb {
    width: 240px; height: 240px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, var(--saffron-glow) 0%, var(--saffron) 45%, var(--saffron-deep) 85%);
    box-shadow:
        inset 0 -16px 35px rgba(180,83,9,0.45),
        inset 0 16px 35px rgba(254,243,199,0.55),
        0 30px 70px -10px rgba(217,119,6,0.5);
    position: relative;
    transition: all 400ms;
}

.phone-orb::before {
    content: '';
    position: absolute; inset: -16px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--saffron-glow), var(--saffron), var(--saffron-deep), var(--saffron-glow));
    z-index: -1;
    animation: orb-spin 16s linear infinite;
    opacity: 0.35;
}

.phone-orb.active {
    animation: orb-breathe 2.2s ease-in-out infinite;
}

@keyframes orb-spin { to { transform: rotate(360deg); } }

@keyframes orb-breathe {
    0%, 100% { transform: scale(1); box-shadow:
        inset 0 -16px 35px rgba(180,83,9,0.45),
        inset 0 16px 35px rgba(254,243,199,0.55),
        0 30px 70px -10px rgba(217,119,6,0.5); }
    50%      { transform: scale(1.04); box-shadow:
        inset 0 -16px 35px rgba(180,83,9,0.45),
        inset 0 16px 35px rgba(254,243,199,0.55),
        0 40px 90px -10px rgba(217,119,6,0.7); }
}

/* Call status strip */

.call-status {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 20px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    max-width: 540px;
    margin-bottom: 14px;
}

.status-orb {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
    transition: background 200ms;
}

.status-orb.greeting,
.status-orb.speaking         { background: var(--saffron); animation: orb-pulse 0.7s ease-in-out infinite; }
.status-orb.listening        { background: var(--green); animation: orb-pulse 1.6s ease-in-out infinite; }
.status-orb.user_speaking    { background: var(--green); animation: orb-pulse 0.4s ease-in-out infinite; }
.status-orb.processing       { background: var(--saffron-deep); animation: orb-pulse 0.5s ease-in-out infinite; }
.status-orb.idle             { background: var(--muted); }

@keyframes orb-pulse {
    0%,100% { transform: scale(1); opacity: 1; }
    50%     { transform: scale(1.4); opacity: 0.6; }
}

#statusText {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 14px;
    color: var(--ink);
    flex-shrink: 0;
}

.meter {
    flex: 1; height: 6px;
    background: rgba(28,20,16,0.08);
    border-radius: 3px;
    overflow: hidden;
    min-width: 100px;
}

.meter-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--green) 0%, var(--saffron-glow) 60%, var(--red) 100%);
    transition: width 80ms linear;
    border-radius: 3px;
    width: 0%;
}

.elapsed {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--saffron-deep);
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.live-caption {
    display: flex; gap: 10px; align-items: baseline;
    padding: 12px 18px;
    background: var(--saffron-soft);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    margin-bottom: 14px;
    max-width: 700px;
    font-size: 14px;
    color: var(--ink-2);
    font-style: italic;
}

.caption-prefix {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--saffron-deep);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    flex-shrink: 0;
}

.error-banner {
    padding: 12px 16px;
    background: var(--red-soft);
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: var(--red-deep);
    font-size: 13px;
    margin-bottom: 14px;
    max-width: 700px;
}

/* ═══════════════════ CONVERSATION PANE ═══════════════════ */

.conv-pane {
    margin: 40px 0;
    padding: 28px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.conv-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 420px;
    overflow-y: auto;
    padding: 4px;
}

.conv-list::-webkit-scrollbar { width: 6px; }
.conv-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.msg {
    display: flex;
    animation: msg-in 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.msg.user      { justify-content: flex-end; }
.msg.assistant { justify-content: flex-start; }

@keyframes msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.msg-bubble {
    max-width: 78%;
    padding: 11px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: var(--shadow-sm);
    word-break: break-word;
}

.msg.user .msg-bubble {
    background: var(--ink);
    color: var(--bg);
    border-bottom-right-radius: 5px;
}

.msg.assistant .msg-bubble {
    background: var(--bg);
    color: var(--ink);
    border: 1px solid var(--border);
    border-bottom-left-radius: 5px;
}

.lang-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.65);
    font-family: var(--font-mono);
    font-size: 9px;
    border-radius: 4px;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

/* ═══════════════════ CART PREVIEW ═══════════════════ */

.cart-preview {
    margin: 30px 0;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    max-width: 480px;
}

.cart-preview-head {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}

.cart-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--saffron-deep);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cart-preview-list {
    display: flex; flex-direction: column;
    margin-bottom: 14px;
}

.cart-row-mini {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-soft);
}

.cart-row-mini:last-child { border-bottom: none; }

.cart-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.cart-qty {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.cart-price {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}

.cart-preview-totals {
    display: flex; flex-direction: column;
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
    font-size: 13px;
}

.cart-preview-totals > div {
    display: flex; justify-content: space-between;
    color: var(--muted);
}

.cart-preview-totals .grand {
    margin-top: 6px; padding-top: 8px;
    border-top: 1px solid var(--border-soft);
    color: var(--ink);
    font-weight: 600;
    font-size: 16px;
}

.cart-preview-totals .grand span:last-child {
    color: var(--saffron-deep);
    font-family: var(--font-mono);
}

/* ═══════════════════ ORDER CONFIRM CARD ═══════════════════ */

.order-confirm {
    margin: 40px auto;
    max-width: 560px;
    padding: 40px 32px;
    background: linear-gradient(135deg, var(--green-soft) 0%, #ecfdf5 100%);
    border: 1px solid #6ee7b7;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    animation: msg-in 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-tick {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 28px; font-weight: 700;
    box-shadow: 0 8px 24px rgba(21,128,61,0.3);
}

.confirm-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--ink);
    font-variation-settings: "opsz" 100;
}

.confirm-id, .confirm-phone {
    display: flex; flex-direction: column; gap: 4px;
    margin-bottom: 12px;
}

.confirm-id .label,
.confirm-phone .label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.confirm-id code {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.04em;
}

.confirm-phone strong {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--ink);
}

.confirm-eta {
    font-size: 14px;
    color: var(--green);
    margin: 16px 0;
}

.confirm-eta strong {
    font-weight: 700;
}

.confirm-actions {
    display: flex; gap: 12px; justify-content: center;
    flex-wrap: wrap;
    margin-top: 18px;
}

/* ═══════════════════ MENU SECTION ═══════════════════ */

.menu-section {
    margin: 60px 0 40px;
}

.menu-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.menu-head .section-heading {
    margin-bottom: 0;
}

.cat-tabs {
    display: flex; gap: 4px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    flex-wrap: wrap;
}

.cat-tab {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    border-radius: 999px;
    transition: all 150ms;
}

.cat-tab:hover { color: var(--ink); }

.cat-tab.active {
    background: var(--ink);
    color: var(--bg);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.menu-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 200ms;
    display: flex; flex-direction: column;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #fcd34d;
}

.menu-img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--saffron-soft);
    overflow: hidden;
}

.menu-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 400ms;
}

.menu-card:hover .menu-img img {
    transform: scale(1.06);
}

.img-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    font-size: 50px;
    background: var(--saffron-soft);
    color: var(--saffron-deep);
}

.veg-badge {
    position: absolute; top: 10px; right: 10px;
    width: 22px; height: 22px;
    background: white;
    border-radius: 4px;
    display: grid; place-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.veg-badge::before {
    content: '';
    width: 10px; height: 10px;
    border-radius: 50%;
}

.veg-badge.veg    { border: 1.5px solid var(--green); }
.veg-badge.veg::before    { background: var(--green); }
.veg-badge.nonveg { border: 1.5px solid var(--red); }
.veg-badge.nonveg::before { background: var(--red); }

.menu-meta {
    padding: 14px 16px;
    display: flex; flex-direction: column;
    gap: 6px;
    flex: 1;
}

.menu-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.25;
    font-variation-settings: "opsz" 50;
}

.menu-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    flex: 1;
}

.menu-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px dashed var(--border-soft);
}

.menu-price {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--saffron-deep);
}

.menu-cat {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.menu-empty {
    text-align: center;
    padding: 50px 20px;
    background: var(--paper);
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
}

/* ═══════════════════ TRACK PAGE ═══════════════════ */

.track-page, .cart-page, .slip-page {
    max-width: 820px;
    margin: 0 auto;
}

.page-head {
    margin-bottom: 32px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 144;
    margin-bottom: 8px;
    line-height: 1.1;
}

.page-title em {
    font-style: italic;
    color: var(--saffron-deep);
}

.page-sub {
    color: var(--ink-2);
    font-size: 15px;
}

.track-form {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.form-label {
    display: flex; flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--ink-2);
    font-weight: 500;
}

.form-input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--bg);
    color: var(--ink);
    transition: border-color 150ms;
    font-family: var(--font-body);
}

.form-input:focus {
    outline: none;
    border-color: var(--saffron);
    background: white;
}

/* Buttons */

.btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: all 150ms;
    text-decoration: none;
}

.btn-primary {
    background: var(--ink);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--saffron-deep);
    color: white;
}

.btn-secondary {
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--saffron);
    color: var(--saffron-deep);
}

.btn-lg { padding: 14px 32px; font-size: 14px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; margin-top: 16px; }

/* Alerts */

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
}

.alert.alert-warn {
    background: var(--red-soft);
    border: 1px solid #fecaca;
    color: var(--red-deep);
}

.alert.alert-success {
    background: var(--green-soft);
    border: 1px solid #86efac;
    color: #065f46;
}

.alert.alert-info {
    background: var(--saffron-soft);
    border: 1px solid #fcd34d;
    color: var(--saffron-deep);
}

/* Order cards */

.orders-list {
    display: flex; flex-direction: column;
    gap: 20px;
}

.order-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.order-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
}

.order-id {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.03em;
}

.order-date {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

/* Status pills */

.status-pill {
    padding: 5px 12px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.status-pill.placed         { background: var(--saffron-soft); color: var(--saffron-deep); }
.status-pill.confirmed      { background: var(--blue-soft);    color: var(--blue-deep); }
.status-pill.preparing      { background: #ffe4e6;             color: #9f1239; }
.status-pill.outfordelivery { background: #e0e7ff;             color: #3730a3; }
.status-pill.delivered      { background: var(--green-soft);   color: #065f46; }
.status-pill.cancelled      { background: #f3f4f6;             color: #6b7280; }

/* Stepper */

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 0 26px;
    position: relative;
    padding: 0 12px;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 24px; right: 24px;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    z-index: 1;
    text-align: center;
}

.step-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    display: grid; place-items: center;
    font-size: 13px; font-weight: 700;
    color: white;
    margin-bottom: 8px;
    transition: all 250ms;
}

.step.reached .step-dot {
    background: var(--green);
    border-color: var(--green);
}

.step.current .step-dot {
    box-shadow: 0 0 0 4px rgba(21,128,61,0.2);
    animation: step-pulse 1.6s ease-in-out infinite;
}

@keyframes step-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(21,128,61,0.2); }
    50%     { box-shadow: 0 0 0 8px rgba(21,128,61,0); }
}

.step-label {
    font-size: 10px;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.2;
    max-width: 76px;
}

.step.reached .step-label {
    color: var(--ink);
}

.order-items-mini {
    display: flex; flex-direction: column;
    gap: 8px;
    padding: 16px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--ink-2);
}

.order-item-row .mono {
    font-family: var(--font-mono);
    color: var(--ink);
    font-weight: 500;
}

.order-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
}

.order-foot .label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}

.order-total {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--saffron-deep);
}

.order-eta-strip {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--saffron-soft);
    border-radius: 8px;
    font-size: 12px;
    color: var(--saffron-deep);
    text-align: center;
    font-family: var(--font-mono);
}

/* ═══════════════════ SLIP / RECEIPT ═══════════════════ */

.slip {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.slip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 2px dashed var(--border);
}

.slip-brand {
    display: flex; align-items: center; gap: 10px;
}

.slip-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--saffron-deep);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.slip-id-block {
    text-align: center;
    padding: 20px;
    background: var(--saffron-soft);
    border-radius: 12px;
    margin-bottom: 24px;
}

.slip-id {
    display: block;
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.04em;
    margin-top: 6px;
}

.slip-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 4px;
}

.slip-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.slip-meta strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.slip-divider {
    height: 1px;
    background: var(--border);
    margin: 24px 0;
    position: relative;
}

.slip-divider::before, .slip-divider::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 16px; height: 16px;
    background: var(--bg);
    border-radius: 50%;
}

.slip-divider::before { left: -28px; }
.slip-divider::after  { right: -28px; }

.slip-section {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--ink);
    font-variation-settings: "opsz" 50;
}

.slip-items {
    display: flex; flex-direction: column;
    gap: 14px;
}

.slip-item {
    display: flex; align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.slip-item-img {
    width: 56px; height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--saffron-soft);
    flex-shrink: 0;
}

.slip-item-img.placeholder {
    display: grid; place-items: center;
    font-size: 24px;
}

.slip-item-info {
    flex: 1;
    min-width: 0;
}

.slip-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.slip-item-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.slip-item-total {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.slip-totals {
    display: flex; flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.slip-totals > div {
    display: flex; justify-content: space-between;
    color: var(--muted);
}

.slip-grand {
    margin-top: 10px; padding-top: 12px;
    border-top: 2px solid var(--ink);
    color: var(--ink) !important;
    font-weight: 700;
    font-size: 18px;
}

.slip-grand span:last-child {
    color: var(--saffron-deep);
    font-family: var(--font-mono);
}

.slip-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed var(--border);
    text-align: center;
}

.slip-thanks {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 20px;
    font-variation-settings: "opsz" 100;
}

.slip-actions {
    display: flex; gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════════ CART PAGE ═══════════════════ */

.cart-page-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.cart-items-block {
    display: flex; flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex; align-items: center;
    gap: 16px;
    padding: 14px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.cart-item img,
.cart-item .img-placeholder {
    width: 70px; height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--saffron-soft);
}

.cart-item .img-placeholder {
    display: grid; place-items: center;
    font-size: 28px;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
}

.cart-item-price {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.cart-item-line {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.cart-totals-block {
    position: sticky; top: 84px;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.cart-totals-block h3 {
    font-family: var(--font-display);
    font-size: 20px;
    margin-bottom: 16px;
    font-variation-settings: "opsz" 100;
}

.cart-totals-block .row {
    display: flex; justify-content: space-between;
    padding: 8px 0;
    color: var(--muted);
    font-size: 14px;
}

.cart-totals-block .row.grand {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--ink);
    font-weight: 600;
    font-size: 17px;
}

.cart-totals-block .row.grand span:last-child {
    font-family: var(--font-mono);
    color: var(--saffron-deep);
}

/* ═══════════════════ ERROR PAGE ═══════════════════ */

.error-page {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.error-page h1 {
    font-family: var(--font-display);
    font-size: 36px;
    margin-bottom: 12px;
    font-variation-settings: "opsz" 144;
}

.error-page p {
    color: var(--muted);
    margin-bottom: 24px;
}

/* ═══════════════════ PRINT (for slip) ═══════════════════ */

@media print {
    .topnav, .footer, .slip-actions { display: none !important; }
    body::before { display: none; }
    body, html { background: white; }
    .slip {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}

/* ═══════════════════ MOBILE ═══════════════════ */

@media (max-width: 880px) {
    .topnav { padding: 12px 16px; }
    .main-content { padding: 20px 16px; }
    .brand-divider, .brand-sub { display: none; }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-orb-wrap { order: -1; }
    .phone-orb { width: 160px; height: 160px; }
    .hero-title { font-size: 36px; }

    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

    .form-row { grid-template-columns: 1fr; }

    .cart-page-grid {
        grid-template-columns: 1fr;
    }

    .cart-totals-block { position: static; }

    .slip { padding: 24px; }
    .slip-meta { grid-template-columns: 1fr; gap: 12px; }
    .slip-id { font-size: 22px; }

    .stepper { padding: 0 4px; }
    .step-label { font-size: 9px; max-width: 56px; }
}

@media (max-width: 540px) {
    .btn-call-start, .btn-call-end { min-width: 180px; padding: 14px 24px; }
    .hero-title { font-size: 30px; }
    .page-title { font-size: 28px; }
    .call-status { flex-wrap: wrap; }
    .meter { min-width: 80px; }
    .menu-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Clickable menu items (have sizes/add-ons) ───────────────────────────── */
.menu-card.has-options { cursor: pointer; }
.menu-card.has-options:hover { border-color: var(--saffron); }
.opt-hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--saffron-deep);
    background: var(--saffron-soft);
    padding: 2px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ── Item detail modal (sizes + add-ons) ─────────────────────────────────── */
.item-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.item-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(26,20,16,0.55);
    backdrop-filter: blur(3px);
}
.item-modal-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    width: 100%; max-width: 460px;
    max-height: 85vh; overflow-y: auto;
    padding: 24px;
    animation: imPop 0.18s ease-out;
}
@keyframes imPop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.item-modal-close {
    position: absolute; top: 12px; right: 14px;
    width: 34px; height: 34px;
    border: none; border-radius: 50%;
    background: var(--border-soft); color: var(--ink-2);
    font-size: 22px; line-height: 1; cursor: pointer;
}
.item-modal-close:hover { background: var(--border); }
.im-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; padding-right: 30px; }
.im-img {
    width: 64px; height: 64px; flex: none;
    border-radius: 14px;
    background-size: cover; background-position: center;
    border: 1px solid var(--border);
}
.im-img.placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; background: var(--saffron-soft);
}
.im-head-meta { display: flex; flex-direction: column; gap: 6px; }
.im-name { font-family: var(--font-display); font-size: 22px; color: var(--ink); margin: 0; }
.im-section { margin-bottom: 16px; }
.im-section h4 {
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--muted); margin: 0 0 8px;
}
.im-section h4 em { color: var(--red); font-style: normal; font-size: 11px; }
.im-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.im-chip {
    font-size: 14px; color: var(--ink-2);
    background: var(--bg); border: 1px solid var(--border);
    padding: 7px 12px; border-radius: 10px;
}
.im-chip.size { border-color: var(--saffron); background: #fff; }
.im-chip b { color: var(--saffron-deep); }
.im-loading { color: var(--muted); padding: 12px 0; }
.im-foot { font-size: 13px; color: var(--muted); margin: 14px 0 0; border-top: 1px solid var(--border-soft); padding-top: 12px; }
