/* ============================================================
   Khadyo design system - original brand look (orange #fc8019),
   heavy Inter-style type, rounded cards, dark cart pill.
   ============================================================ */

:root {
  --brand: #fc8019;
  --brand-dark: #e06b12;
  --brand-deep: #d86610;
  --brand-soft: #fff4e8;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line-2: #f3f4f6;
  --surface: #f4f4f5;
  --card: #ffffff;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.07), 0 1px 2px rgba(17, 24, 39, 0.05);
  --shadow-lg: 0 10px 24px -6px rgba(17, 24, 39, 0.14);
  --font: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--brand); color: #fff; }

.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.boot-mark {
  width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: #fff;
  font-size: 27px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  animation: pulse 1.2s ease-in-out infinite;
}
.boot-label { font-weight: 800; letter-spacing: -0.02em; font-size: 18px; color: var(--muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------------- storefront header ---------------- */
.shop-header {
  position: fixed; top: 0; inset-inline: 0; z-index: 40; padding: 14px 18px;
  transition: all 0.3s ease;
}
.shop-header.scrolled {
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); padding-top: 9px; padding-bottom: 9px;
}
.shop-header-row { max-width: 72rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand-tile {
  width: 42px; height: 42px; border-radius: 14px; background: #fff; display: flex;
  align-items: center; justify-content: center; box-shadow: var(--shadow); border: 1px solid var(--line-2);
  transition: transform 0.25s ease;
}
.brand-tile:hover { transform: scale(1.06); }
.brand-tile svg { color: var(--brand); }
.brand-word { display: flex; flex-direction: column; margin-left: 10px; cursor: pointer; }
.brand-word b { font-size: 21px; font-weight: 900; letter-spacing: -0.03em; color: #fff; line-height: 1; transition: color 0.3s; text-shadow: 0 1px 6px rgba(0,0,0,0.25); }
.brand-word span { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: #ffedd5; margin-top: 3px; display: flex; align-items: center; gap: 5px; text-shadow: 0 1px 4px rgba(0,0,0,0.25); transition: color 0.3s; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; animation: pulse 1.6s infinite; }
.scrolled .brand-word b { color: var(--brand); text-shadow: none; }
.scrolled .brand-word span { color: var(--muted); text-shadow: none; }
.shop-nav { display: flex; align-items: center; gap: 20px; }
.shop-link { background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 14px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.3); transition: color 0.3s; display: inline-flex; gap: 7px; align-items: center; }
.shop-link:hover { color: #fed7aa; }
.scrolled .shop-link { color: var(--ink-2); text-shadow: none; }
.scrolled .shop-link:hover, .scrolled .shop-link.active { color: var(--brand); }
.shop-signin {
  background: #fff; color: var(--brand); border: 0; border-radius: 14px; padding: 10px 20px;
  font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: var(--shadow-lg); transition: all 0.2s;
}
.shop-signin:hover { background: var(--line-2); }
.shop-user { display: inline-flex; align-items: center; gap: 9px; background: #fff; border-radius: 999px; padding: 5px 14px 5px 6px; box-shadow: var(--shadow); cursor: pointer; border: 0; }

/* ---------------- hero ---------------- */
.hero {
  position: relative; overflow: hidden; border-radius: 0 0 2.5rem 2.5rem;
  padding: 7.5rem 1.2rem 5.5rem; background:
    linear-gradient(to right, rgba(252, 128, 25, 0.94), rgba(224, 107, 18, 0.85)),
    url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?q=80&w=2070&auto=format&fit=crop');
  background-size: cover; background-position: center;
}
.hero-inner { max-width: 46rem; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(8px); color: #fff;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  border: 1px solid rgba(255, 255, 255, 0.25); margin-bottom: 22px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(30px, 6vw, 58px); font-weight: 900; line-height: 1.08; letter-spacing: -0.03em; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.22); }
.hero h1 em { font-style: normal; color: #ffedd5; }
.hero-sub { color: #fff5ea; font-weight: 600; margin: 0 0 30px; font-size: 15.5px; text-shadow: 0 1px 8px rgba(0,0,0,0.25); }
.glass-search {
  display: flex; max-width: 38rem; margin: 0 auto; background: rgba(255, 255, 255, 0.96);
  border-radius: 22px; padding: 7px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.35);
  transition: box-shadow 0.25s;
}
.glass-search:focus-within { box-shadow: 0 18px 44px -10px rgba(0, 0, 0, 0.4), 0 0 0 4px rgba(252, 128, 25, 0.25); }
.glass-search .where { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-right: 1px solid var(--line-2); }
.glass-search .where .ic { color: var(--brand); flex-shrink: 0; }
.glass-search .where-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand); }
.glass-search .where-value { font-size: 13px; font-weight: 800; color: var(--ink); }
.glass-search .find { display: flex; align-items: center; flex: 1; padding: 10px 14px; gap: 10px; }
.glass-search input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.glass-search input::placeholder { color: var(--faint); font-weight: 600; }
.glass-search .go {
  width: 42px; height: 42px; border-radius: 999px; border: 0; background: #ffedd5; color: var(--brand);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.glass-search .go:hover { background: var(--brand); color: #fff; }

/* ---------------- category cards ---------------- */
.cat-grid { max-width: 72rem; margin: -3.4rem auto 0; padding: 0 1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; position: relative; z-index: 5; }
.cat-card {
  position: relative; height: 118px; border-radius: 22px; overflow: hidden; cursor: pointer;
  background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line-2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 26px -6px rgba(252, 128, 25, 0.35); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.cat-card:hover img { transform: scale(1.09); }
.cat-card .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(17,24,39,0.88), rgba(17,24,39,0.08) 60%, transparent); }
.cat-card b { position: absolute; left: 14px; bottom: 11px; color: #fff; font-size: 18px; font-weight: 900; letter-spacing: -0.02em; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }

/* ---------------- menu sections + food cards ---------------- */
.menu-page { max-width: 72rem; margin: 0 auto; padding: 1.6rem 1rem 8rem; }
.menu-page-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 20px; }
.menu-page-head h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.clear-filter { border: 0; background: var(--red-soft); color: var(--red); font-weight: 800; font-size: 12.5px; padding: 8px 14px; border-radius: 12px; cursor: pointer; }
.merchant-head { display: flex; align-items: center; gap: 13px; margin: 34px 0 16px; }
.merchant-tile {
  width: 50px; height: 50px; border-radius: 16px; color: #fff; font-weight: 900; font-size: 21px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1f2937, #374151); box-shadow: var(--shadow); border: 1px solid #111827;
}
.merchant-head h3 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -0.025em; }
.merchant-head p { margin: 2px 0 0; font-size: 12px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 5px; text-transform: uppercase; letter-spacing: 0.06em; }
.merchant-head p .ic { color: var(--brand); }
.food-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.food-card {
  background: #fff; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--line-2);
  overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s ease;
}
.food-card:hover { box-shadow: var(--shadow-lg); }
.food-img { height: 148px; position: relative; background: var(--line-2); overflow: hidden; }
.food-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; display: block; }
.food-card:hover .food-img img { transform: scale(1.05); }
.food-img .noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #cbd5e1; background: linear-gradient(135deg, #f8fafc, #eef2f7); }
.food-img .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 55%); pointer-events: none; }
.sale-badge {
  position: absolute; top: 11px; left: 11px; background: #16a34a; color: #fff; font-size: 9.5px;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; padding: 4px 9px; border-radius: 9px;
}
.stock-badge {
  position: absolute; top: 11px; right: 11px; background: rgba(220, 38, 38, 0.95); color: #fff;
  font-size: 9.5px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 4px 9px; border-radius: 9px; backdrop-filter: blur(6px);
}
.food-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.food-name { font-size: 16.5px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.25; }
.food-desc { font-size: 12.5px; color: var(--muted); font-weight: 600; line-height: 1.45; flex: 1; }
.food-price-row { display: flex; align-items: baseline; gap: 8px; }
.food-price { font-size: 19px; font-weight: 900; }
.food-price-was { font-size: 13px; font-weight: 700; color: var(--faint); text-decoration: line-through; }

/* ADD / stepper */
.add-btn {
  width: 100%; padding: 10px 0; border-radius: 14px; border: 2px solid var(--line-2);
  background: #fff; color: var(--brand); font-weight: 900; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; transition: all 0.18s ease;
}
.add-btn:hover { border-color: rgba(252, 128, 25, 0.35); background: var(--brand-soft); }
.add-btn:active { transform: scale(0.97); }
.stepper {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: var(--brand-soft); border-radius: 14px; overflow: hidden; border: 1px solid #ffe0bd;
}
.stepper button {
  width: 38px; height: 38px; border: 0; background: none; color: var(--brand); cursor: pointer;
  font-weight: 900; font-size: 19px; display: flex; align-items: center; justify-content: center; transition: background 0.15s;
}
.stepper button:hover { background: #ffdcb2; }
.stepper .val { min-width: 26px; text-align: center; font-weight: 900; color: var(--brand-deep); font-size: 14px; }

/* merchant menu manager rows */
.menu-cat-title { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 26px 0 12px; }
.menu-row { display: flex; gap: 14px; align-items: center; padding: 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.menu-thumb { width: 56px; height: 56px; border-radius: 15px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 21px; font-weight: 900; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.menu-row-info { flex: 1; min-width: 0; }
.menu-row-name { font-weight: 900; font-size: 14.5px; display: flex; align-items: center; }
.menu-row-desc { color: var(--muted); font-size: 12.5px; margin-top: 2px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-row-price { font-weight: 900; font-size: 14.5px; white-space: nowrap; }

/* ---------------- floating cart pill ---------------- */
.cart-pill {
  position: fixed; bottom: 18px; inset-inline: 14px; z-index: 30; margin: 0 auto; max-width: 26rem;
  background: #111827; border: 1px solid #1f2937; border-radius: 999px; padding: 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 20px 44px -10px rgba(0, 0, 0, 0.5);
}
.cart-pill-msg { flex: 1; padding: 0 14px; min-width: 0; }
.cart-pill-hint { font-size: 9.5px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; color: #d1d5db; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-pill-hint .ok { color: #4ade80; }
.cart-pill-track { height: 6px; border-radius: 999px; background: #1f2937; overflow: hidden; }
.cart-pill-fill { height: 100%; border-radius: 999px; background: var(--brand); box-shadow: 0 0 10px #fc8019; transition: width 0.5s ease, background 0.3s; }
.cart-pill-fill.ok { background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.cart-pill-btn {
  display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; flex-shrink: 0;
  background: var(--brand); color: #fff; font-weight: 900; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 12.5px; border-radius: 999px; padding: 8px 16px 8px 8px;
  box-shadow: 0 6px 16px -4px rgba(252, 128, 25, 0.6); transition: background 0.15s, transform 0.1s;
}
.cart-pill-btn:hover { background: var(--brand-dark); }
.cart-pill-btn:active { transform: scale(0.97); }
.cart-pill-count { background: rgba(255,255,255,0.22); width: 27px; height: 27px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* ---------------- drawers ---------------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.6); backdrop-filter: blur(3px); z-index: 60; animation: fadeIn 0.2s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw); z-index: 61;
  background: var(--surface); box-shadow: -20px 0 60px rgba(0,0,0,0.25);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 26px 0 0 26px; animation: slideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-head { background: #fff; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow); }
.drawer-head h3 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.drawer-close { width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--line-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.drawer-close:hover { background: var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 15px; }
.drawer-foot { padding: 14px 16px; background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line-2); box-shadow: 0 -10px 30px rgba(0,0,0,0.05); }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; } }

.cart-line { background: #fff; border-radius: 18px; border: 1px solid var(--line-2); overflow: hidden; }
.cart-line-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px; }
.cart-line-row + .cart-line-row { border-top: 1px solid var(--line-2); }
.cart-line-name { font-weight: 900; font-size: 14px; }
.cart-line-meta { font-size: 11px; font-weight: 700; color: var(--faint); margin-top: 2px; }
.cart-line-meta b { color: var(--brand); }
.cart-line .stepper { width: 108px; }

.panel { background: #fff; border-radius: 18px; border: 1px solid var(--line-2); padding: 17px; box-shadow: var(--shadow); }
.panel-title { font-weight: 900; font-size: 15.5px; letter-spacing: -0.01em; margin: 0 0 4px; }
.panel-sub { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0; }

/* voice recorder */
.rec-btn {
  width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(252, 128, 25, 0.15); transition: background 0.2s;
}
.rec-btn:hover { background: var(--brand-dark); }
.rec-btn.recording { background: var(--red); animation: pulse 1s infinite; }
.rec-track { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 14px; }
.rec-fill { height: 100%; background: var(--brand); transition: width 0.1s linear; }
.rec-done { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: var(--line-2); padding: 9px; border-radius: 14px; border: 1px solid var(--line); }
.rec-done audio { flex: 1; height: 34px; }
.rec-remove { border: 0; background: #fff; color: var(--red); font-weight: 900; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 11px; border-radius: 10px; cursor: pointer; border: 1px solid #fecaca; }

/* payment options */
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 2px solid var(--line-2); cursor: pointer; margin-bottom: 10px; background: #fff; transition: all 0.15s; }
.pay-opt:hover { border-color: #fdba74; }
.pay-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.pay-opt input { accent-color: var(--brand); width: 17px; height: 17px; }
.pay-opt b { font-weight: 800; font-size: 14px; }

/* bill */
.bill-row { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.bill-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bill-total { display: flex; justify-content: space-between; font-weight: 900; font-size: 18px; letter-spacing: -0.01em; border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 12px; }

/* address picker */
.addr-opt { border: 2px solid var(--line-2); border-radius: 16px; padding: 14px; cursor: pointer; background: #fff; transition: border-color 0.15s; }
.addr-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.addr-opt .lbl { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 14px; }
.addr-opt .lbl span { background: var(--line-2); color: var(--ink-2); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.addr-opt p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* tracking */
.track-wrap { max-width: 36rem; margin: 0 auto; padding: 2.6rem 1rem 4rem; }
.track-title { font-size: 30px; font-weight: 900; letter-spacing: -0.025em; margin: 0 0 6px; }
.track-sub { color: var(--muted); font-weight: 700; font-size: 14px; margin: 0 0 26px; }
.track-steps { background: #fff; border-radius: 26px; border: 1px solid var(--line-2); box-shadow: var(--shadow); padding: 26px; display: flex; flex-direction: column; gap: 22px; }
.track-step { display: flex; gap: 14px; }
.track-dot {
  width: 30px; height: 30px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 900; background: var(--line-2); color: var(--faint);
}
.track-step.done .track-dot { background: var(--green); color: #fff; }
.track-step.now .track-dot { background: var(--brand); color: #fff; animation: pulse 1.5s infinite; }
.track-step b { font-weight: 800; font-size: 15px; }
.track-step.now b { color: var(--brand-deep); }
.track-step.dim b { color: var(--faint); }
.track-step p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------------- buttons / forms (shared portals) ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 13px; font-weight: 800; font-size: 14px;
  border: 1.5px solid transparent; cursor: pointer; transition: all 0.15s ease; white-space: nowrap; background: none;
}
.btn:focus-visible { outline: 3px solid rgba(252, 128, 25, 0.3); outline-offset: 1px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(252, 128, 25, 0.55); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-dark { background: #111827; color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover:not(:disabled) { border-color: #d1d5db; background: var(--line-2); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--line-2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-danger-outline { border-color: #fecaca; background: #fff; color: var(--red); }
.btn-danger-outline:hover:not(:disabled) { background: var(--red-soft); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover:not(:disabled) { background: #15803d; }
.btn-sm { height: 33px; padding: 0 13px; font-size: 12.5px; border-radius: 10px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15px; border-radius: 15px; }
.btn-block { width: 100%; }

.field { margin-bottom: 14px; }
.label { display: block; font-weight: 800; font-size: 12.5px; margin-bottom: 6px; }
.label .req { color: var(--red); }
.input, .select, .textarea {
  width: 100%; height: 44px; border: 2px solid var(--line); border-radius: 13px;
  padding: 0 13px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; min-height: 80px; padding: 11px 13px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(252, 128, 25, 0.13); }
.input::placeholder, .textarea::placeholder { color: var(--faint); font-weight: 600; }
.field-error { color: var(--red); font-size: 12.5px; margin-top: 5px; font-weight: 700; }
.form-error { background: var(--red-soft); border: 1px solid #fecaca; color: var(--red); border-radius: 13px; padding: 12px 15px; font-size: 13.5px; font-weight: 700; margin-bottom: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; font-weight: 600; }

/* cards / stats / tables / tabs / badges (dashboards) */
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); }
.card-pad { padding: 19px; }
.card-title { font-size: 16px; font-weight: 900; letter-spacing: -0.015em; margin: 0 0 3px; }
.card-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 15px; font-weight: 600; }
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 16px 17px; box-shadow: var(--shadow); }
.stat-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value { font-size: 24px; font-weight: 900; letter-spacing: -0.02em; margin-top: 5px; }
.stat-foot { font-size: 12px; color: var(--faint); margin-top: 3px; font-weight: 600; }
.stat-ic { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 11px; }
.stat-ic.tint-orange { background: var(--brand-soft); color: var(--brand); }
.stat-ic.tint-green { background: var(--green-soft); color: var(--green); }
.stat-ic.tint-blue { background: var(--blue-soft); color: var(--blue); }
.stat-ic.tint-violet { background: var(--violet-soft); color: var(--violet); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-slate { background: var(--line-2); color: var(--ink-2); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-orange { background: var(--brand-soft); color: var(--brand-deep); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 11px 15px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); font-weight: 800; border-bottom: 1px solid var(--line); background: #fafafa; white-space: nowrap; }
.table td { padding: 12px 15px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafafa; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; }
.table-code { font-weight: 900; font-variant-numeric: tabular-nums; }
.cell-sub { display: block; color: var(--faint); font-size: 11.5px; margin-top: 1px; font-weight: 600; }

.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line-2); margin-bottom: 19px; overflow-x: auto; }
.tab { padding: 10px 15px; font-weight: 800; font-size: 13.5px; color: var(--muted); border: 0; background: none; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count { background: var(--line-2); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 800; color: var(--ink-2); }
.tab-count.hot { background: var(--brand); color: #fff; }

/* dashboard shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #111827; color: #9ca3af; padding: 18px 13px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; color: #fff; font-weight: 900; font-size: 18px; letter-spacing: -0.03em; }
.sidebar-brand .brand-mark { background: var(--brand); }
.side-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: #4b5563; font-weight: 800; padding: 14px 12px 6px; }
.side-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: #9ca3af; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; position: relative; }
.side-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-item.active { background: rgba(255, 255, 255, 0.09); color: #fff; }
.side-item.active::before { content: ""; position: absolute; left: -13px; top: 9px; bottom: 9px; width: 3.5px; border-radius: 0 4px 4px 0; background: var(--brand); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.side-user-name { color: #fff; font-weight: 800; font-size: 13px; }
.side-user-role { color: #6b7280; font-size: 11.5px; text-transform: capitalize; }
.main { padding: 24px 28px 60px; min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.main-head-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background: #d1d5db; border-radius: 999px; transition: 0.16s; }
.switch-slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.16s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.switch input:checked + .switch-slider { background: var(--green); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch-label { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 13.5px; }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.58); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 7vh 18px 18px; overflow-y: auto; animation: fadeIn 0.14s ease; }
.modal { background: #fff; border-radius: 24px; width: 100%; max-width: 520px; box-shadow: 0 24px 60px rgba(0,0,0,0.3); animation: slideUp 0.18s ease; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 19px 22px 0; }
.modal-title { font-size: 18px; font-weight: 900; letter-spacing: -0.02em; margin: 0; }
.modal-body { padding: 16px 22px 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px 20px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }

/* toasts */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: 360px; }
.toast { background: #111827; color: #fff; border-radius: 14px; padding: 13px 16px; font-size: 13.5px; font-weight: 700; display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 16px 40px rgba(0,0,0,0.3); animation: slideUp 0.18s ease; }
.toast .ic { flex-shrink: 0; margin-top: 1px; }
.toast.success { background: #052e16; }
.toast.success .ic { color: #4ade80; }
.toast.error { background: #450a0a; }
.toast.error .ic { color: #f87171; }

/* misc */
.avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; flex-shrink: 0; }
.empty { text-align: center; padding: 52px 20px; color: var(--muted); background: #fff; border: 2px dashed var(--line); border-radius: 22px; font-weight: 600; }
.empty .ic { color: #d1d5db; margin-bottom: 12px; }
.empty-title { font-weight: 900; color: var(--ink); font-size: 16px; margin-bottom: 4px; letter-spacing: -0.01em; }
.spinner { width: 27px; height: 27px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 44px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.divider { height: 1px; background: var(--line-2); margin: 15px 0; border: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.total-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; color: var(--ink-2); font-weight: 700; }
.total-row.grand { font-weight: 900; font-size: 16.5px; color: var(--ink); padding-top: 10px; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }
.auth-side { background: linear-gradient(155deg, #fc8019, #d86610 60%, #b45309); color: #fff; padding: 50px 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,0.14); filter: blur(80px); bottom: -160px; left: -120px; }
.auth-side .brand-word b, .auth-side .brand-word span { color: #fff; text-shadow: none; }
.auth-side h2 { font-size: 30px; letter-spacing: -0.025em; line-height: 1.18; margin: auto 0 14px; font-weight: 900; position: relative; z-index: 1; }
.auth-side p { color: #fff3e4; max-width: 380px; margin: 0; font-weight: 600; position: relative; z-index: 1; }
.auth-side-points { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.auth-point { display: flex; gap: 11px; align-items: center; color: #fff; font-size: 13.5px; font-weight: 700; }
.auth-point .ic { color: #ffe4c4; }
.auth-form-col { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 410px; }
.auth-form h1 { font-size: 27px; letter-spacing: -0.025em; margin: 0 0 5px; font-weight: 900; }
.auth-form .page-sub { margin-bottom: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 19px; }
.auth-tab { padding: 11px; border-radius: 13px; border: 2px solid var(--line); background: #fff; font-weight: 800; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.auth-tab.active { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.phone-widget-box { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0 2px; }
/* Force the phone.email button into the Khadyo theme (it sets inline styles) */
.pe_signin_button button {
  background: var(--brand) !important;
  border-radius: 14px !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  padding: 14px 26px !important;
  box-shadow: 0 6px 16px -6px rgba(252, 128, 25, 0.55) !important;
  transition: background 0.15s ease !important;
}
.pe_signin_button button:hover { background: var(--brand-dark) !important; }
.pe_signin_button img, .pe_signin_button svg { filter: brightness(0) invert(1); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 11.5px; font-weight: 800; margin: 20px 0 16px; text-transform: uppercase; letter-spacing: 0.09em; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 18px; }
.seg-item { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 13px 8px; text-align: center; cursor: pointer; font-weight: 800; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 7px; }
.seg-item .ic { color: var(--muted); }
.seg-item.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
.seg-item.active .ic { color: var(--brand); }
.demo-box { border: 1px solid var(--line); border-radius: 16px; margin-top: 20px; overflow: hidden; }
.demo-box-head { background: var(--line-2); padding: 9px 14px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.demo-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.demo-row:last-child { border-bottom: 0; }
.demo-role { font-weight: 800; }
.demo-cred { color: var(--muted); font-variant-numeric: tabular-nums; }

/* stars, bars, timeline, banners */
.stars { display: inline-flex; gap: 3px; }
.star-btn { border: 0; background: none; cursor: pointer; padding: 2px; color: #d1d5db; display: flex; }
.star-btn.filled { color: #f59e0b; }
.bars { display: flex; gap: 10px; align-items: flex-end; height: 130px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 42px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #fdba74, var(--brand)); min-height: 3px; transition: height 0.4s ease; }
.bar-label { font-size: 10.5px; color: var(--faint); font-weight: 700; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 13px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 26px; height: 26px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tl-line { width: 2px; flex: 1; background: var(--line); min-height: 18px; margin: 3px 0; }
.tl-body { padding-bottom: 15px; }
.tl-title { font-weight: 800; font-size: 13.5px; }
.tl-time { color: var(--faint); font-size: 12px; margin-top: 1px; font-weight: 600; }
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 15px; padding: 13px 16px; font-size: 13.5px; font-weight: 700; margin-bottom: 17px; }
.banner.warn { background: var(--amber-soft); color: var(--amber); border: 1px solid #fde68a; }
.banner.info { background: var(--blue-soft); color: var(--blue); border: 1px solid #bfdbfe; }
.online-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 13px; color: var(--green); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }

.footer { border-top: 1px solid var(--line); background: #fff; margin-top: 44px; }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 24px 18px; display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 13px; font-weight: 600; flex-wrap: wrap; }

/* layout helpers shared with portal views */
.container { max-width: 74rem; margin: 0 auto; padding: 24px 20px 70px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.page-title { font-size: 25px; font-weight: 900; letter-spacing: -0.025em; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 22px; font-weight: 600; }
.right { text-align: right; }

/* responsive */
@media (max-width: 1020px) {
  .food-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; gap: 6px; }
  .sidebar-brand { padding: 0 8px 0 2px; font-size: 16px; }
  .side-section, .sidebar-foot .side-user, .side-item span.lbl { display: none; }
  .side-item { width: auto; padding: 9px; }
  .side-item.active::before { display: none; }
  .main { padding: 16px 14px 50px; }
  .food-grid { grid-template-columns: 1fr; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .glass-search { flex-direction: column; border-radius: 20px; }
  .glass-search .where { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .shop-link.hide-sm { display: none; }
}
