/* Mana Nellore Partner — restaurant portal.
   Design language: warm paper bg, serif display type, burnt-orange accent,
   near-black sidebar. Butter-smooth: 150-250ms ease transitions on every
   interactive element, transform/opacity-only motion, no layout shift. */
:root {
  --ink: #181a17;
  --ink-2: #3c4038;
  --muted: #8a8f85;
  --bg: #f6f7f2;
  --card: #ffffff;
  --line: #e8eae6;
  --accent: #e04a27;
  --accent-deep: #c23d1f;
  --accent-bg: #fdeee7;
  --green: #1a8a3c;
  --green-bg: #e6f4ea;
  --blue: #1d6fd1;
  --blue-bg: #e8f1fd;
  --red: #d33f2e;
  --red-bg: #fdecea;
  --amber: #f0a92e;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(24,26,23,.05), 0 8px 24px rgba(24,26,23,.05);
  --shadow-lift: 0 2px 4px rgba(24,26,23,.06), 0 14px 32px rgba(24,26,23,.10);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.32,.72,.28,1);
  --t-fast: .16s;
  --t-med: .22s;
  --tabbar-h: 64px;
  --sidebar-w: 212px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* Mono eyebrow label — signature element */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ---------- Top bar / sidebar ---------- */
#topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--ink); color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.16);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: .2px; color: #fff; }
.brand-text span {
  font-family: var(--mono); font-size: 10px; color: #a9aea3;
  text-transform: uppercase; letter-spacing: .18em;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08);
  color: #fff; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color var(--t-fast) ease, transform var(--t-fast) var(--ease), border-color var(--t-fast) ease;
}
@media (hover:hover){.icon-btn:hover { background: rgba(255,255,255,.16); }}
.icon-btn:active { transform: scale(.94); }
.open-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06);
  color: #fff; border-radius: 999px; padding: 9px 15px;
  font-weight: 600; font-size: 13px;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}
@media (hover:hover){.open-toggle:hover { background: rgba(255,255,255,.12); }}
.open-toggle:active { transform: scale(.97); }
.open-toggle .dot { width: 9px; height: 9px; border-radius: 50%; background: #39d98a; box-shadow: 0 0 8px #39d98a; transition: background-color var(--t-med) ease; }
.open-toggle.closed .dot { background: #ff7a6b; box-shadow: 0 0 8px #ff7a6b; }

/* ---------- Layout ---------- */
#view {
  max-width: 720px; margin: 0 auto;
  padding: 16px 14px calc(var(--tabbar-h) + 28px);
}
#view.fullscreen {
  max-width: 460px; padding: 24px 18px 44px;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}
.screen-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin: 6px 2px 18px;
}
.screen-head .sh-text { min-width: 0; }
.screen-head h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: 26px; line-height: 1.15; letter-spacing: -.01em;
  margin: 0; color: var(--ink);
}
.screen-head .sh-sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.screen-head .btn.small, .screen-head .btn-sm { flex: none; margin-top: 4px; }
.screen-head > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 6px; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #39d98a; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
  border: 1px solid var(--line);
  transition: border-color var(--t-med) ease, transform var(--t-med) var(--ease);
}
.card.tight { padding: 13px; }

/* ---------- Auth / onboarding ---------- */
.auth-wrap { width: 100%; animation: riseIn .35s var(--ease); }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand::before {
  content: "Partner portal";
  display: block;
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.auth-brand svg { width: 62px; height: 62px; }
.auth-brand h1 { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 12px 0 6px; color: var(--ink); }
.auth-brand p { color: var(--muted); margin: 0; font-size: 14px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink);
  transition: border-color var(--t-fast) ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224,74,39,.12);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 12px 22px;
  font-weight: 700; font-size: 15px; min-height: 50px;
  background: var(--accent); color: #fff; width: 100%;
  box-shadow: 0 4px 14px rgba(224,74,39,.28);
  transition: background-color var(--t-fast) ease, transform var(--t-fast) var(--ease), opacity var(--t-fast) ease;
}
@media (hover:hover){.btn:hover { background: var(--accent-deep); box-shadow: 0 6px 18px rgba(224,74,39,.34); transform: translateY(-1px); }}
.btn:active { transform: translateY(0) scale(.99); box-shadow: 0 2px 8px rgba(224,74,39,.25); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (hover:hover){.btn.secondary:hover { border-color: #d4d7d0; box-shadow: var(--shadow-lift); background: #fff; }}
.btn.danger { background: var(--red); box-shadow: 0 4px 14px rgba(211,63,46,.28); }
.btn.danger:hover { background: #b23425; }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); box-shadow: none; }
@media (hover:hover){.btn.ghost:hover { background: var(--accent-bg); }}
.btn.small, .btn-sm {
  min-height: 40px; padding: 9px 18px; font-size: 13.5px;
  width: auto; border-radius: 999px;
}
.btn-row { display: flex; gap: 8px; margin-top: 12px; }
.btn-row .btn { width: auto; flex: 1; }
.link-btn {
  background: none; border: none; color: var(--accent);
  font-weight: 600; font-size: 14px; padding: 8px; border-radius: 8px;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
@media (hover:hover){.link-btn:hover { color: var(--accent-deep); background: var(--accent-bg); }}

/* ---------- Entry choice (Log in / Register) ---------- */
.choice-card {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 12px; text-align: left; cursor: pointer;
  box-shadow: var(--shadow); font-family: var(--sans);
  transition: border-color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}
@media (hover:hover){.choice-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-lift); }}
.choice-card:active { transform: scale(.98); }
.choice-ic {
  width: 46px; height: 46px; flex: none; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent);
}
.choice-ic svg { width: 24px; height: 24px; }
.choice-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.choice-tx strong { font-size: 16px; color: var(--ink); }
.choice-tx span { font-size: 13px; color: var(--muted); }
.choice-go { color: var(--accent); font-weight: 800; font-size: 20px; }

/* ---------- Duplicate-account warning on the apply form ---------- */
.dup-warn {
  display: none; margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  background: var(--red-bg); border: 1px solid #f5c6bf;
  color: #a93226; font-size: 13px; font-weight: 600; line-height: 1.45;
}
.dup-warn.show { display: block; }
.dup-warn .link-btn { padding: 2px 4px; font-size: 13px; }

/* ---------- Orders ---------- */
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 9px 15px; font-size: 13px; font-weight: 600;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}
@media (hover:hover){.chip:hover { border-color: #cfd3cb; color: var(--ink-2); transform: translateY(-1px); }}
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.active:hover { transform: none; }
.chip .count { opacity: .7; font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }

.order { border-left: 5px solid var(--line); position: relative; cursor: pointer; }
@media (hover:hover){.order:hover { box-shadow: var(--shadow-lift); }}
.order.st-placed { border-left-color: var(--accent); }
.order.st-accepted, .order.st-preparing { border-left-color: var(--blue); }
.order.st-ready { border-left-color: var(--green); }
.order.st-delivered { border-left-color: #b9c2b4; }
.order.st-rejected, .order.st-cancelled { border-left-color: var(--red); opacity: .94; }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.order-id { font-weight: 800; font-size: 15px; }
.order-time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pill {
  flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 12px; border-radius: 999px; font-family: var(--mono);
}
.pill.placed { background: var(--accent-bg); color: var(--accent-deep); }
.pill.accepted, .pill.preparing { background: var(--blue-bg); color: var(--blue); }
.pill.ready { background: var(--green-bg); color: var(--green); }
.pill.delivered, .pill.picked_up, .pill.on_way, .pill.served { background: #eef1ec; color: var(--muted); }
.pill.rejected, .pill.cancelled { background: var(--red-bg); color: var(--red); }
.order-items { margin: 10px 0; font-size: 14px; }
.order-items .oi { display: flex; justify-content: space-between; padding: 3px 0; }
.order-items .oi span:first-child { color: var(--ink); }
.order-items .oi span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.order-items .oi-note { display: inline-block; margin-top: 2px; padding: 2px 8px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; color: #9a3412; font-size: 12.5px; font-weight: 600; }
.order-total { display: flex; justify-content: space-between; font-weight: 800; border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 6px; }
.order-meta { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
.order-meta strong { color: var(--ink); }
.promise { font-weight: 700; }
.promise.late { color: var(--red); }
.promise.soon { color: var(--accent-deep); }

/* ---------- Menu ---------- */
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 2px 10px; }
.cat-head h2 { font-family: var(--serif); font-size: 19px; font-weight: 700; margin: 0; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-actions, .item-actions { display: flex; gap: 6px; flex: none; }
.mini-btn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 700;
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}
@media (hover:hover){.mini-btn:hover { background: var(--bg); color: var(--ink); border-color: #cfd3cb; }}
.mini-btn:active { transform: scale(.96); }
.mini-btn.danger { color: var(--red); border-color: #f3c9c4; }
@media (hover:hover){.mini-btn.danger:hover { background: var(--red-bg); border-color: var(--red); }}
.menu-item { display: flex; gap: 12px; align-items: flex-start; }
.menu-item img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: var(--bg); flex: none; }
.menu-item .mi-body { flex: 1; min-width: 0; }
.menu-item .mi-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.mi-name-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .mi-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item .mi-price { font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.veg-mark { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.veg-mark.veg { border-color: #1a8a3c; } .veg-mark.veg i { width: 6px; height: 6px; border-radius: 50%; background: #1a8a3c; }
.veg-mark.nonveg { border-color: #a33b2e; } .veg-mark.nonveg i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #a33b2e; }
.unavailable { opacity: .55; }
.unavail-tag { font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--red); text-transform: uppercase; letter-spacing: .1em; }
.dish-rating { font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--surface-2); border-radius: 20px; padding: 2px 8px; white-space: nowrap; }

/* toggle switch */
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: #ccd4cc; border-radius: 999px; transition: background-color var(--t-med) ease; }
.switch .track::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform var(--t-med) var(--ease); box-shadow: 0 1px 4px rgba(0,0,0,.28); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(224,74,39,.25); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .t-label { font-size: 14px; font-weight: 600; }
.toggle-row .t-sub { font-size: 12px; color: var(--muted); }

/* ---------- Settlements / ratings ---------- */
.settle-top { display: flex; justify-content: space-between; align-items: center; }
.settle-period { font-weight: 800; font-family: var(--serif); font-size: 17px; }
.money-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.money-row.net { font-weight: 800; color: var(--ink); font-size: 16px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.rating-summary { display: flex; align-items: center; gap: 14px; }
.big-rating { font-family: var(--serif); font-size: 44px; font-weight: 700; color: var(--ink); }
.stars { color: var(--amber); letter-spacing: 2px; font-size: 18px; }
.review { border-top: 1px solid var(--line); padding: 12px 0; }
.review:first-of-type { border-top: none; }
.review .r-head { display: flex; justify-content: space-between; font-size: 13px; }
.review .r-name { font-weight: 700; }
.review .r-date { color: var(--muted); font-size: 12px; }
.review .r-comment { font-size: 14px; margin-top: 4px; line-height: 1.55; }

/* ---------- States ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 52px; height: 52px; opacity: .35; margin-bottom: 10px; }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 18px; }
.empty p { margin: 0; font-size: 14px; }
/* Signature dark promo panel for empty states */
.empty.dark-panel {
  background: var(--ink); border-radius: 16px; border: 1px solid rgba(255,255,255,.06);
  padding: 38px 28px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.empty.dark-panel .eyebrow { color: var(--accent); }
.empty.dark-panel h3 { font-family: var(--serif); font-weight: 700; font-size: 20px; color: #fff; margin: 0 0 8px; }
.empty.dark-panel p { color: #a9aea3; font-size: 14px; line-height: 1.6; }
.loading { text-align: center; padding: 44px 16px; color: var(--muted); }
/* Skeleton shimmer: a highlight band sliding across (transform-only).
   The old version animated background-position, which repaints the box
   every frame for as long as the skeleton is on screen. */
.skel {
  border-radius: var(--radius);
  background: var(--line);
  position: relative; overflow: hidden;
}
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 15%, rgba(255,255,255,.85) 50%, transparent 85%);
  transform: translateX(-100%);
  animation: skelSlide 1.4s ease-in-out infinite;
}
@keyframes skelSlide { to { transform: translateX(100%); } }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: var(--red-bg); border: 1px solid #f3c9c4; color: #8f2b20; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; font-size: 14px; }
.notice-box { background: #e8f1fd; border: 1px solid #bcd6f7; color: #174a86; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; font-size: 14px; }

/* ---------- Rider pickup OTP (shown on ready delivery orders) ---------- */
.pickup-otp { background: #f0fdf4; border: 2px solid #16a34a; border-radius: var(--radius); padding: 16px; margin: 12px 0 0; text-align: center; }
.pickup-otp .po-label { font-size: 13px; font-weight: 700; color: #15803d; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.pickup-otp .po-code { font-size: 44px; font-weight: 800; letter-spacing: .18em; color: #0f1f24; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pickup-otp .po-hint { font-size: 13px; color: #5c7079; margin-top: 6px; }
/* ---------- Late-cancellation banners (scheduled-order strikes) ---------- */
.latecancel-banner { border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; font-size: 14px; font-weight: 600; line-height: 1.5; }
.latecancel-warn { background: #fff1e8; border: 1px solid #f5b98a; color: #a33d00; }
.latecancel-note { background: #fdf8ec; border: 1px solid #f2d38a; color: #7a4a00; }
.latecancel-suspended { background: var(--red-bg); border: 1px solid #f3c9c4; color: #8f2b20; }
.pending-hero { text-align: center; padding: 32px 10px; }
.pending-hero .spinner { width: 46px; height: 46px; }

/* ---------- Dashboard home ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 14px;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) ease;
}
.stat-card .sc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.stat-card .lbl { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.stat-card .sc-ico {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  background: #f1f2ec; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.stat-card .sc-ico svg { width: 17px; height: 17px; }
.stat-card .num { font-size: 27px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-card.alert .num { color: var(--accent-deep); }
.stat-card.alert .sc-ico { background: var(--accent-bg); color: var(--accent-deep); }
.stat-card.tap { cursor: pointer; }
@media (hover:hover) {
  .stat-card.tap:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}
.stat-card.tap:active { transform: translateY(0) scale(.99); }
.sec-title { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.top-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.top-item:first-of-type { border-top: none; }
.rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #f1f2ec; color: var(--ink-2); font-size: 12px; font-weight: 800; margin-right: 8px; }

/* ---------- Order search ---------- */
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap input { width: 100%; padding: 12px 42px 12px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); transition: border-color var(--t-fast) ease; }
.search-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224,74,39,.12); }
.search-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: none; background: #eef1ec; color: var(--muted); border-radius: 50%; font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: background-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) var(--ease); }
@media (hover:hover){.search-clear:hover { background: #e2e6df; color: var(--ink); }}
.search-clear:active { transform: translateY(-50%) scale(.9); }

/* ---------- Sound toggle ---------- */
.icon-btn .snd-off { display: none; }
.icon-btn.off { opacity: .45; }
.icon-btn.off .snd-on { display: none; }
.icon-btn.off .snd-off { display: block; }
/* text labels for sidebar rows (desktop only) */
.tb-lbl { display: none; }

/* ---------- Bottom tab bar (mobile) / nav rows (desktop) ---------- */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: var(--tabbar-h);
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 14px rgba(24,26,23,.06);
}
#tabbar button {
  flex: 1; background: none; border: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; position: relative; padding: 6px 0;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
#tabbar button svg { width: 22px; height: 22px; transition: transform var(--t-fast) var(--ease); }
@media (hover:hover){#tabbar button:hover { color: var(--ink-2); }}
#tabbar button.active { color: var(--accent-deep); }
#tabbar button:active svg { transform: scale(.9); }
#tabbar .badge {
  position: absolute; top: 6px; right: calc(50% - 22px);
  background: var(--accent); color: #fff; font-style: normal;
  font-size: 10px; font-weight: 800; min-width: 17px; height: 17px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------- Modal ---------- */
#modalRoot:empty { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(18,20,17,.55);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn var(--t-med) ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 560px;
  max-height: 92vh; overflow-y: auto; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  animation: modalIn .3s var(--ease);
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(28px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h2 { font-family: var(--serif); font-weight: 700; margin: 0 0 16px; font-size: 21px; color: var(--ink); }
.modal .btn-row { margin-top: 18px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14.5px; font-weight: 600; border-radius: 10px; transition: background-color var(--t-fast) ease; }
@media (hover:hover){.check-row:hover { background: var(--bg); }}
.check-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- Toast ---------- */
#toastRoot { position: fixed; top: 14px; left: 14px; right: 14px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; border-radius: 999px; padding: 13px 22px;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 28px rgba(0,0,0,.28);
  animation: toastIn .28s var(--ease); max-width: 520px; width: 100%; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }
.toast.error { background: #8f2b20; }

.loc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Tactile press states: every tap gives feedback (transform-only) ---------- */
.link-btn:active { transform: scale(.95); }
.chip:active { transform: scale(.93); }
.mini-btn:active { transform: scale(.94); }
.order:active { transform: scale(.992); }
#tabbar button:active { transform: scale(.94); }
#tabbar button:active svg { transform: scale(.88); }
.check-row:active { transform: scale(.99); }
.tag:active { transform: scale(.94); }
.stat-card.tap:active { transform: scale(.97); }
.switch { cursor: pointer; }
.switch:active .track::after { transform: scale(1.12); }
.switch input:checked + .track:active::after { transform: translateX(20px) scale(1.12); }

/* ---------- Money buttons: big, decisive, satisfying ---------- */
.btn.btn-order {
  min-height: 56px; font-size: 15.5px; font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 6px 18px rgba(224,74,39,.34);
}
@media (hover:hover){.btn.btn-order:hover { background: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(224,74,39,.4); }}
.btn.btn-order:active { transform: scale(.95); box-shadow: 0 2px 8px rgba(224,74,39,.25); }
.btn.btn-order.danger { box-shadow: 0 6px 18px rgba(211,63,46,.34); }
.btn.btn-order.danger:active { transform: scale(.95); }
/* working state: spinner dot, no layout shift */
.btn.busy { position: relative; opacity: .88; pointer-events: none; }
.btn.busy::after {
  content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* ---------- Open/closed toggle: unmistakable state ---------- */
.open-toggle { border-color: rgba(57,217,138,.5); }
.open-toggle.closed { border-color: rgba(255,122,107,.55); }
.open-toggle .lbl { min-width: 44px; text-align: left; }

/* ---------- Toast: success vs error ---------- */
.toast.success { background: #0e6e35; }
.toast.success::before { content: "✓  "; font-weight: 800; }

/* ---------- Search with magnifier icon ---------- */
.search-wrap::before {
  content: ""; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; opacity: .42; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233c4038' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
}
.search-wrap input { padding-left: 42px; }

/* ---------- Order status stepper ---------- */
.o-steps { position: relative; display: flex; margin: 14px 2px 4px; }
.o-steps::before {
  content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 5px;
  height: 2px; background: var(--line); border-radius: 2px;
}
.o-fill {
  position: absolute; left: 12.5%; top: 5px; width: 75%; height: 2px;
  background: var(--green); border-radius: 2px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .45s var(--ease);
}
.o-step { flex: 1; text-align: center; position: relative; }
.o-step i {
  display: block; width: 12px; height: 12px; border-radius: 50%;
  background: #d4d9d2; margin: 0 auto 5px; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  transition: background-color var(--t-med) ease, transform var(--t-med) var(--ease);
}
.o-step span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.o-step.done i { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.o-step.done span { color: var(--ink-2); }
.o-step.now i { background: var(--accent); transform: scale(1.3); box-shadow: 0 0 0 5px var(--accent-bg), 0 0 0 1px var(--accent); }
.o-step.now span { color: var(--accent-deep); }

/* ---------- Menu polish ---------- */
.menu-item img { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line); }
.menu-item .mi-price { color: var(--accent-deep); font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.empty .e-ico { width: 46px; height: 46px; color: var(--accent); margin-bottom: 12px; }
.empty .btn { margin-top: 4px; }

/* ---------- Desktop: fixed left sidebar ---------- */
@media (min-width: 1024px) {
  #topbar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 26px 16px 20px;
    box-shadow: none; border-right: 1px solid rgba(255,255,255,.07);
  }
  .brand { margin-bottom: 6px; padding: 0 4px; }
  .brand-mark { width: 36px; height: 36px; }
  .topbar-right {
    margin-top: auto; flex-direction: column; align-items: stretch; gap: 8px;
  }
  .topbar-right::before {
    content: "Account";
    font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: #6f746c; margin: 0 4px 2px;
  }
  .topbar-right::after {
    content: "Need help? Ping us anytime.";
    font-size: 11.5px; color: #6f746c; margin: 8px 4px 0; line-height: 1.5;
  }
  .open-toggle { justify-content: flex-start; width: 100%; }
  #soundBtn, #logoutBtn {
    width: 100%; border-radius: 12px; height: 40px;
    justify-content: flex-start; padding: 0 12px; gap: 10px;
    font-size: 13px; font-weight: 600;
  }
  #soundBtn .tb-lbl, #logoutBtn .tb-lbl { display: inline; }
  #soundBtn svg, #logoutBtn svg { width: 18px; height: 18px; flex: none; }
  /* transparent overlay: nav rows live in the same sidebar column */
  #tabbar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w); height: auto;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    background: transparent; border: none; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    padding: 108px 16px 250px; gap: 2px;
    pointer-events: none; overflow-y: auto;
  }
  #tabbar::before {
    content: "Workspace";
    font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: #6f746c; margin: 0 4px 8px; pointer-events: none;
  }
  #tabbar button {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 11px;
    padding: 10px 12px; border-radius: 12px;
    font-size: 13.5px; font-weight: 500; color: #b9beb6;
    pointer-events: auto; text-align: left;
  }
  #tabbar button svg { width: 19px; height: 19px; flex: none; }
  @media (hover:hover){#tabbar button:hover { color: #fff; background: rgba(255,255,255,.05); }}
  #tabbar button.active { color: #fff; background: rgba(255,255,255,.09); font-weight: 600; }
  #tabbar .badge { top: 50%; right: 10px; transform: translateY(-50%); }
  #view {
    margin-left: var(--sidebar-w);
    max-width: none; padding: 44px 40px 60px;
  }
  #view > * { max-width: 860px; margin-left: auto; margin-right: auto; }
  #view.fullscreen { margin-left: auto; margin-right: auto; max-width: 460px; }
  .screen-head h1 { font-size: 32px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: 20px; }
  .btn-row .btn { flex: none; min-width: 150px; }
  #toastRoot { left: calc(var(--sidebar-w) + 24px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- New: waiting banner, ETAs, tags, tables, apply ---------- */
.wait-banner {
  background: #fff1e8; border: 1px solid #f5b98a; color: #a33d00;
  border-radius: 12px; padding: 10px 14px; margin: 10px 0 0;
  font-weight: 700; font-size: 13.5px;
  animation: waitpulse 1.6s ease-in-out infinite;
}
@keyframes waitpulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .62; }
}
.eta-line {
  margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--green-900);
  background: #eef7f0; border: 1px solid #cde8d3; border-radius: 10px; padding: 8px 12px;
}
.dinein-tag {
  display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: #5b3b00;
  background: #fdf0d7; border: 1px solid #f2d38a; border-radius: 999px; padding: 4px 12px;
}
.order-note {
  margin-top: 6px; font-size: 13px; color: var(--ink-2);
  background: var(--bg); border-radius: 10px; padding: 8px 12px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.tag {
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  background: #eef1ee; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.tag.combo { background: #fff4e2; border-color: #f2d38a; color: #7a4a00; }
.tag.warn { background: #fdecec; border-color: #f3b8b8; color: #a83232; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.small { font-size: 12px; }
.qr-link {
  margin: 10px 0 4px; padding: 10px 12px; background: var(--bg);
  border: 1px dashed var(--line); border-radius: 10px; word-break: break-all; font-size: 13px;
}
.qr-link a { color: var(--accent-deep); }
.big-tick {
  width: 64px; height: 64px; border-radius: 50%; background: #e6f6ea; color: var(--green-900);
  font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.card-head-sub { font-size: 15px; }
.pending-hero { text-align: center; padding: 18px 6px 6px; }
#applyPhoto { padding: 8px 0; }
#applyPreview img { display: block; }

/* ---------- Butter: arrival motion (transform/opacity only) ----------
   Every tab glides in once on arrival; lists cascade with a stagger;
   polls and filters never replay the entrance. */
/* NOTE: no page-level animation on tab switches — animating the whole #view
   forces the phone to redraw the entire screen every tap, which flickers.
   Tab switches are instant; beauty lives in the content cascades below. */
/* staggered card cascades — arrival only (class removed after it plays) */
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.99); } to { opacity: 1; transform: none; } }
#ordersList.arrive .order,
.stat-grid.arrive .stat-card,
#menuBody.arrive > .card {
  animation: cardIn .45s var(--ease) backwards;
}
#ordersList.arrive .order:nth-child(2),
.stat-grid.arrive .stat-card:nth-child(2),
#menuBody.arrive > .card:nth-child(2) { animation-delay: .05s; }
#ordersList.arrive .order:nth-child(3),
.stat-grid.arrive .stat-card:nth-child(3),
#menuBody.arrive > .card:nth-child(3) { animation-delay: .1s; }
#ordersList.arrive .order:nth-child(4),
.stat-grid.arrive .stat-card:nth-child(4),
#menuBody.arrive > .card:nth-child(4) { animation-delay: .15s; }
#ordersList.arrive .order:nth-child(5),
#menuBody.arrive > .card:nth-child(5) { animation-delay: .2s; }
#ordersList.arrive .order:nth-child(6),
#menuBody.arrive > .card:nth-child(6) { animation-delay: .25s; }
#ordersList.arrive .order:nth-child(7),
#menuBody.arrive > .card:nth-child(7) { animation-delay: .3s; }
#ordersList.arrive .order:nth-child(n+8),
#menuBody.arrive > .card:nth-child(n+8) { animation-delay: .35s; }
/* fresh order: a new order landing on the 2.5s poll glows warmly once,
   so the kitchen's eye catches it without a jarring pop.
   The ring is a composited overlay (transform/opacity only) — the old
   animated box-shadow forced a full repaint of the card every frame. */
.order.fresh::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  border: 3px solid rgba(224,74,39,.55); pointer-events: none;
  animation: freshRing 1.6s ease-out;
}
@keyframes freshRing {
  0% { opacity: 1; transform: scale(.97); }
  100% { opacity: 0; transform: scale(1.05); }
}
/* tab switch: the newly active icon pops */
@keyframes tabPop { 0% { transform: scale(.6); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
#tabbar button.active svg { animation: tabPop .32s var(--ease); }
/* orders badge: pops when the new-order count grows (scale property composes
   with the desktop translateY so neither layout breaks) */
@keyframes badgePop { 0% { scale: .4; } 55% { scale: 1.35; } 100% { scale: 1; } }
#tabbar .badge.pop { animation: badgePop .35s var(--ease); }
/* waiting hero: the empty orders screen feels alive — the kitchen keeps it
   open because orders feel worth waiting for. Radar rings are transform +
   opacity only, so the pulse is cheap even running continuously. */
.waiting-hero { text-align: center; padding: 44px 24px; }
.waiting-hero .eyebrow { margin-bottom: 8px; }
.waiting-hero h3 { font-size: 23px; margin: 0 0 10px; color: var(--ink); }
.waiting-hero p { color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 320px; margin: 0 auto; }
.waiting-hero .btn { margin-top: 16px; }
.waiting-hint { margin-top: 10px !important; font-size: 12.5px !important; color: var(--accent-deep) !important; font-weight: 600; }
.radar { position: relative; width: 108px; height: 108px; margin: 0 auto 20px; color: var(--accent); }
.radar svg { position: absolute; inset: 0; margin: auto; width: 42px; height: 42px; }
.radar span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: radarPing 2.6s ease-out infinite; }
.radar span:nth-child(2) { animation-delay: 1.3s; }
@keyframes radarPing { 0% { transform: scale(.5); opacity: .75; } 100% { transform: scale(1.25); opacity: 0; } }
.waiting-proof { display: inline-block; margin-top: 18px; padding: 9px 18px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-deep); font-weight: 700; font-size: 13.5px; }
.pac-container{z-index:99999 !important;border-radius:14px;border:1px solid #e5e5e5;box-shadow:0 12px 32px rgba(15, 20, 35, .16);font-size:16px;font-family:inherit;margin-top:6px;overflow:hidden;animation:pacIn .18s ease-out;background:#fff}
@keyframes pacIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.pac-item{padding:13px 14px;font-size:16px;line-height:1.4;cursor:pointer;min-height:54px;border-top:1px solid #f1f2f4;display:flex;align-items:center;gap:10px}
.pac-item:first-child{border-top:0}
.pac-item-selected{background:#f6f7f9}
.pac-item-query{font-size:16px;color:#1a1a1a}
.pac-matched{font-weight:700}
.pac-icon-marker{width:20px;height:20px;flex:0 0 20px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center/contain no-repeat}
.pac-item{min-height:54px;display:flex;align-items:center;font-size:16px;padding:8px 12px;cursor:pointer}
@media (hover:hover){.pac-item:hover{background:#f5f5f5}}
.pac-item-query{font-size:16px}

.pill.scheduled{background:#e8f0fe;color:#1a56db}
.sched-line{margin:10px 0 2px;font-size:14px;color:var(--ink)}



.sh-rest-name{font-size:28px;font-weight:800;color:var(--ink);line-height:1.2;margin-top:2px}






/* Founder: header stacked - eyebrow / title / subtitle each on own line */
.screen-head .sh-text{display:block!important}
.screen-head .sh-text .eyebrow{display:block!important}
.screen-head .sh-text h1{display:block!important;margin:4px 0!important}
.screen-head .sh-text .sh-sub{display:block!important;margin-top:4px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.screen-head .sh-text .sh-sub.menu-sub{font-size:13px!important}


.rider-status { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #f8f9fa; }
.rider-assigned { font-size: 14px; color: #1a7f37; }
.rider-waiting { font-size: 14px; color: #8a7a5c; font-style: italic; }
