/* ====== Zen-modern, mobile-first theme ====== */
:root {
  --bg: #faf6ef;
  --bg-card: #ffffff;
  --ink: #292524;
  --ink-soft: #78716c;
  --line: #e7e0d2;
  --accent: #f97316;
  --accent-deep: #ea580c;
  --accent-soft: #ffedd5;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --amber-soft: #fef3c7;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(41, 37, 36, .08);
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
}
.page { max-width: 560px; margin: 0 auto; padding: 20px 16px 130px; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
.hidden { display: none !important; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: none; border-radius: 999px; padding: 13px 26px;
  background: var(--bg-card); color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; font-size: 1.1rem; padding: 16px 34px;
  box-shadow: 0 10px 28px rgba(234, 88, 12, .35);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; box-shadow: none; border: 2px solid var(--line); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-gpay {
  background: #1a73e8; color: #fff; font-size: 1.05rem; padding: 15px 30px;
  box-shadow: 0 10px 24px rgba(26, 115, 232, .35);
}
.btn-approve { background: var(--green); color: #fff; }
.btn-reject { background: var(--red); color: #fff; }

@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes bounceIn { 0% { transform: translateY(-18px); opacity: 0; } 60% { transform: translateY(4px); opacity: 1; } 100% { transform: translateY(0); } }
.bounce-in { animation: bounceIn .6s ease both; }
@media (prefers-reduced-motion: reduce) {
  .pulse, .bounce-in { animation: none; }
  .btn { transition: none; }
}

/* ---- Welcome ---- */
.welcome-body .page { display: grid; place-items: center; min-height: 92dvh; padding-bottom: 24px; }
.welcome { text-align: center; position: relative; display: grid; justify-items: center; gap: 10px; }
.welcome-blob {
  position: absolute; inset: -40px -60px auto; height: 320px; z-index: -1;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  filter: blur(6px);
}
.welcome-logo img { width: 130px; height: 130px; object-fit: contain; border-radius: 28px; box-shadow: var(--shadow); }
.logo-emoji { font-size: 88px; line-height: 1; display: block; filter: drop-shadow(0 8px 12px rgba(0,0,0,.12)); }
.welcome-name { font-size: 2.3rem; letter-spacing: -.02em; margin: 6px 0 0; }
.welcome-tagline { font-size: 1.2rem; font-weight: 700; color: var(--accent-deep); margin: 0; }
.welcome-blurb { color: var(--ink-soft); max-width: 34ch; margin: 0 0 14px; }
.welcome-steps { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
.welcome-steps .step { display: flex; align-items: center; gap: 7px; font-size: .88rem; color: var(--ink-soft); font-weight: 600; }
.welcome-steps .step span {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-deep); font-weight: 800; font-size: .8rem;
}
.closed-card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; display: grid; gap: 8px; justify-items: center; max-width: 320px;
}
.closed-emoji { font-size: 44px; }

/* ---- Page head ---- */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.page-head h1 { font-size: 1.7rem; margin: 0; }
.page-sub { color: var(--ink-soft); margin: 2px 0 0; font-size: .95rem; }
.back-link {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 50%; background: var(--bg-card); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; font-size: 1.2rem; font-weight: 700;
}

/* ---- Alerts ---- */
.alert { border-radius: 14px; padding: 12px 16px; margin: 0 0 16px; font-weight: 600; }
.alert-error { background: var(--red-soft); color: #991b1b; }
.alert-info { background: var(--blue-soft); color: #1e40af; }

/* ---- Menu ---- */
.menu-cat { font-size: 1.05rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 10px; }
.menu-card {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px;
}
.menu-thumb {
  width: 64px; height: 64px; border-radius: 14px; background: var(--accent-soft);
  display: grid; place-items: center; font-size: 34px; overflow: hidden;
}
.menu-thumb img { width: 100%; height: 100%; object-fit: cover; }
.menu-info h3 { font-size: 1.02rem; margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.menu-info p { margin: 2px 0 0; font-size: .85rem; color: var(--ink-soft); }
.menu-price { font-weight: 800; margin-top: 4px; }
.veg-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 2px solid; flex: none; }
.veg-dot.veg { border-color: var(--green); background: radial-gradient(circle at center, var(--green) 45%, transparent 50%); }
.veg-dot.nonveg { border-color: #b91c1c; background: radial-gradient(circle at center, #b91c1c 45%, transparent 50%); }
.badge-hot { background: var(--amber-soft); border-radius: 999px; font-size: .7rem; padding: 3px 8px; font-weight: 700; }

.qty-ctl { justify-self: end; }
.qty-btn {
  font: inherit; font-weight: 800; cursor: pointer; border: none; touch-action: manipulation;
  background: var(--accent); color: #fff; border-radius: 12px; padding: 9px 16px; font-size: 1rem;
}
.qty-stepper { display: flex; align-items: center; gap: 2px; background: var(--accent-soft); border-radius: 12px; }
.qty-stepper .qty-btn { background: transparent; color: var(--accent-deep); padding: 9px 12px; font-size: 1.15rem; }
.qty-num { min-width: 22px; text-align: center; font-weight: 800; color: var(--accent-deep); }

/* ---- Cart bar ---- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-width: 560px; margin: 0 auto; padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  background: rgba(250, 246, 239, .92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.cart-toggle {
  display: flex; align-items: center; gap: 10px; font: inherit; cursor: pointer;
  background: var(--bg-card); border: none; border-radius: 999px; padding: 11px 16px; box-shadow: var(--shadow);
}
.cart-count {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px;
  background: var(--accent); color: #fff; border-radius: 999px; font-weight: 800;
}
.cart-label { font-weight: 700; }
.cart-total { font-weight: 800; margin-left: auto; }
.cart-drawer {
  position: absolute; bottom: calc(100% + 8px); left: 14px; right: 14px;
  background: var(--bg-card); border-radius: var(--radius); box-shadow: 0 -6px 30px rgba(41,37,36,.18);
  padding: 16px; max-height: 45dvh; overflow: auto;
}
.cart-drawer .cd-line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: .95rem; }
.cart-drawer .cd-total { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 10px; font-weight: 800; display: flex; justify-content: space-between; }

/* ---- Checkout wizard ---- */
.wiz-title { font-size: 1.35rem; margin: 20px 0 14px; }
.wiz-subtitle { font-size: 1.05rem; margin: 18px 0 10px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card {
  font: inherit; cursor: pointer; border: 3px solid transparent; text-align: center;
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 12px; display: grid; gap: 6px; justify-items: center; touch-action: manipulation;
  transition: border-color .12s ease, transform .12s ease;
}
.choice-card:active { transform: scale(.97); }
.choice-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice-emoji { font-size: 42px; }
.choice-label { font-weight: 800; font-size: 1.05rem; }
.choice-hint { color: var(--ink-soft); font-size: .82rem; }
.choice-sm { padding: 14px 10px; }
.choice-sm .choice-emoji { font-size: 30px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 700; font-size: .92rem; }
.field > span em { color: var(--ink-soft); font-weight: 500; font-style: normal; }
.field input, .field textarea, .field select {
  font: inherit; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--bg-card); color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field-hint { color: var(--ink-soft); font-size: .82rem; }
.wiz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }

/* ---- Review / summary card ---- */
.review-card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin: 8px 0 4px;
}
.rv-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .95rem; }
.rv-row > span:first-child { color: var(--ink-soft); }
.rv-total { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 10px; font-size: 1.08rem; font-weight: 800; }
.rv-total > span:first-child { color: var(--ink); }
.review-card hr { border: none; border-top: 2px dashed var(--line); margin: 8px 0; }

/* ---- Pay ---- */
.pay-amount-card {
  background: linear-gradient(135deg, var(--ink), #44403c); color: #fff;
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.pay-amount-label { opacity: .75; font-size: .88rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.pay-amount { display: block; font-size: 2.4rem; font-weight: 800; margin: 2px 0 8px; }
.pay-lines { list-style: none; margin: 0; padding: 0; font-size: .9rem; opacity: .9; }
.pay-lines li { display: flex; justify-content: space-between; padding: 2px 0; }
.pay-methods {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; display: grid; gap: 12px; justify-items: center; text-align: center;
}
.pay-qr img { border-radius: 14px; border: 6px solid var(--accent-soft); }
.pay-qr-hint { margin: 6px 0 0; color: var(--ink-soft); font-size: .88rem; }
.pay-upi-id { margin: 2px 0 0; font-size: .92rem; }
.pay-or { color: var(--ink-soft); font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .1em; }
.pay-static-qr summary { cursor: pointer; color: var(--ink-soft); font-size: .88rem; }
.pay-static-qr img { max-width: 240px; margin-top: 10px; border-radius: 12px; }
.pay-note { color: var(--ink-soft); font-size: .9rem; margin: 14px 4px; }

.proof-card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; display: grid; gap: 10px;
}
.proof-card h2 { font-size: 1.2rem; margin: 0; }
.proof-hint { color: var(--ink-soft); font-size: .85rem; margin: 0; }
.proof-drop {
  border: 3px dashed var(--line); border-radius: var(--radius); min-height: 130px;
  display: grid; place-items: center; cursor: pointer; overflow: hidden; padding: 8px;
}
.proof-drop:hover, .proof-drop:focus-within { border-color: var(--accent); }
.proof-empty { display: grid; gap: 6px; justify-items: center; color: var(--ink-soft); font-weight: 600; }
.proof-icon { font-size: 38px; }
.proof-preview img { max-height: 300px; border-radius: 12px; }
.proof-actions { display: flex; gap: 10px; justify-content: center; }
.proof-submit { width: 100%; }

/* ---- Track ---- */
.track { display: grid; gap: 14px; justify-items: center; text-align: center; }
.track-hero { display: grid; gap: 6px; justify-items: center; }
.track-hero h1 { font-size: 1.7rem; margin: 0; }
.track-hero p { color: var(--ink-soft); margin: 0; max-width: 40ch; }
.track-emoji { font-size: 60px; }
.status-pill {
  display: inline-block; border-radius: 999px; padding: 6px 16px; font-weight: 800; font-size: .85rem;
  background: var(--amber-soft); color: #92400e;
}
.status-pendingverification { background: var(--amber-soft); color: #92400e; }
.status-approved { background: var(--green-soft); color: #166534; }
.status-ready { background: var(--blue-soft); color: #1e40af; }
.status-completed { background: #e7e5e4; color: #44403c; }
.status-rejected, .status-expired { background: var(--red-soft); color: #991b1b; }
.status-awaitingpayment { background: var(--amber-soft); color: #92400e; }

.reject-card {
  background: var(--red-soft); border-radius: var(--radius); padding: 16px 18px;
  text-align: left; width: 100%; color: #7f1d1d;
}
.reject-card p { margin: 6px 0 0; }

.track-progress { display: flex; gap: 4px; width: 100%; }
.tp-step {
  flex: 1; display: grid; gap: 2px; justify-items: center; font-size: .72rem; font-weight: 700;
  color: var(--ink-soft); padding: 10px 2px; border-radius: 12px; background: var(--bg-card);
  box-shadow: var(--shadow); opacity: .45;
}
.tp-step span { font-size: 20px; }
.tp-step.done { opacity: 1; background: var(--green-soft); color: #166534; }
.tp-step.now { opacity: 1; background: var(--accent-soft); color: var(--accent-deep); }
.track .review-card { width: 100%; text-align: left; }
.track-tip { color: var(--ink-soft); font-size: .85rem; margin: 0; }

/* ---- Auth (shares customer look) ---- */
.auth-card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px; max-width: 420px; margin: 6dvh auto 0;
}
.auth-card-wide { max-width: 520px; }
.auth-card h1 { font-size: 1.5rem; }
.auth-sub { color: var(--ink-soft); font-size: .95rem; }
.auth-alt { display: block; text-align: center; margin-top: 14px; color: var(--ink-soft); }
.totp-input { text-align: center; font-size: 1.6rem; letter-spacing: .4em; font-weight: 800; }
.enroll-steps { padding-left: 20px; color: var(--ink-soft); }
.enroll-qr { text-align: center; margin: 10px 0; }
.enroll-qr img { border-radius: 14px; border: 6px solid var(--accent-soft); }
.enroll-manual { margin: 8px 0 16px; color: var(--ink-soft); font-size: .9rem; }
.enroll-manual summary { cursor: pointer; }
.enroll-secret code { font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; }
