/* ============================================================
   GoGo Food - Main Stylesheet
   Aesthetic: Bold editorial food brand — warm coral + deep charcoal + cream
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,700;0,9..144,900;1,9..144,300;1,9..144,700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --coral: #FF5C35;
  --coral-light: #FF7A5C;
  --coral-dark: #E04420;
  --charcoal: #1A1512;
  --charcoal-2: #2D2520;
  --charcoal-3: #3F3530;
  --warm-gray: #7A6E68;
  --cream: #FDF8F3;
  --cream-2: #F5EEE6;
  --cream-3: #EDE4D8;
  --white: #FFFFFF;
  --green: #10b981;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --orange: #f59e0b;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(26,21,18,0.08);
  --shadow-hover: 0 12px 40px rgba(26,21,18,0.16);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  touch-action: manipulation; /* disables double-tap zoom */
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none; /* prevents pull-to-refresh bounce on iOS */
}
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }
a { text-decoration: none; color: inherit; cursor: pointer; }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- Navigation ---- */
#nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(26, 21, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  height: 64px;
}
.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 900;
  color: var(--white); cursor: pointer;
  letter-spacing: -0.5px; flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo em { color: var(--coral); font-style: normal; }
.nav-logo-text-wrap { display: flex; flex-direction: column; gap: 1px; }
.nav-logo-text { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 900; line-height: 1; }
.nav-logo-tagline {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 10px; font-weight: 500;
  color: rgba(255,255,255,0.45); letter-spacing: 0.3px;
  white-space: nowrap;
}
.nav-burger-icon { width: 36px; height: 36px; flex-shrink: 0; }
#nav-links {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.nav-link {
  color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.btn-nav {
  background: var(--coral); color: var(--white) !important;
  padding: 8px 18px; border-radius: 8px;
}
.btn-nav:hover { background: var(--coral-light); }
.cart-link { position: relative; }
#cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--coral); color: white;
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
/* User button with "Log out" label */
.nav-user-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 12px !important; gap: 1px; line-height: 1.2;
}
.nav-username {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9);
}
.nav-logout-label {
  font-size: 10px; font-weight: 400; color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 0.5px;
}
/* User name chip — always visible in top-right */
#nav-user-chip { display: none; } /* hidden by default; shown on mobile via media query */
.nav-chip {
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1.2; cursor: default;
}
.nav-chip-name {
  font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.95);
  white-space: nowrap; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis;
}
.nav-chip-role {
  font-size: 10px; font-weight: 400; color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 0.4px;
}

/* Refresh button */
.nav-refresh-btn {
  font-size: 20px !important; padding: 4px 10px !important;
  color: rgba(255,255,255,0.45) !important; border-radius: 8px;
  line-height: 1; cursor: pointer;
}
.nav-refresh-btn:hover { color: var(--white) !important; background: rgba(255,255,255,0.08); }

/* ---- Mobile Hero (shown on mobile, hidden on desktop) ---- */
.hero-mobile { display: none; }
.hero-desktop { display: flex; } /* default: show desktop hero */

/* ---- Food Photo Strip ---- */
.food-photo-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 16px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.food-photo-strip::-webkit-scrollbar { display: none; }
.food-photo-card {
  flex-shrink: 0; width: 140px; border-radius: 14px; overflow: hidden;
  background: white; box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  cursor: pointer; transition: transform 0.15s;
}
.food-photo-card:active { transform: scale(0.97); }
.food-photo-card img {
  width: 140px; height: 110px; object-fit: cover; display: block;
}
.food-photo-info {
  padding: 8px 10px 10px;
}
.food-photo-name {
  font-size: 12px; font-weight: 700; color: var(--charcoal);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.food-photo-rest {
  font-size: 11px; color: var(--warm-gray); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  background: var(--charcoal);
  min-height: 480px; display: flex; align-items: center;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
  padding: 80px 24px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,92,53,0.15); border: 1px solid rgba(255,92,53,0.3);
  color: var(--coral-light); font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 900; line-height: 0.95;
  color: var(--white); margin-bottom: 20px;
  letter-spacing: -2px;
}
.hero-title em { color: var(--coral); font-style: italic; }
.hero-sub { color: rgba(255,255,255,0.55); font-size: 18px; max-width: 480px; margin-bottom: 36px; }

/* Hero BG shapes */
.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.15; }
.s1 { width: 400px; height: 400px; background: var(--coral); top: -100px; right: 100px; }
.s2 { width: 300px; height: 300px; background: #FF9A5C; bottom: -50px; right: 300px; }
.s3 { width: 200px; height: 200px; background: var(--coral-dark); top: 50%; right: 50px; }

/* ---- Search Bar ---- */
.search-bar {
  display: flex; align-items: center;
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; max-width: 600px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.search-icon { padding: 0 16px; font-size: 18px; }
.search-bar input {
  flex: 1; border: none; outline: none; padding: 16px 0;
  font-size: 15px; background: transparent; color: var(--charcoal);
}
.search-bar button {
  background: var(--coral); color: white; border: none;
  padding: 16px 28px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background var(--transition); flex-shrink: 0;
}
.search-bar button:hover { background: var(--coral-dark); }

/* ---- Categories ---- */
.categories-section { padding: 48px 0 24px; }
.section-title {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 700; margin-bottom: 20px;
  letter-spacing: -0.5px;
}
.category-pills {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 4px;
}
.category-pills::-webkit-scrollbar { display: none; }
.pill {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  width: 72px; min-width: 72px; min-height: 78px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1.5px solid var(--cream-3); background: var(--white);
  cursor: pointer; flex-shrink: 0;
  transition: all var(--transition); color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.pill-icon { font-size: 26px; line-height: 1; display: block; }
.pill-label {
  font-size: 10px; font-weight: 600; line-height: 1.2;
  text-align: center; color: var(--charcoal);
  white-space: normal; word-break: normal; overflow-wrap: normal;
  hyphens: none;
}
.pill:hover, .pill.active {
  background: var(--coral); border-color: var(--coral);
  color: white; transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255,92,53,0.25);
}
.pill.active .pill-label, .pill:hover .pill-label { color: white; }

/* ---- Restaurants Grid ---- */
.restaurants-section { padding: 24px 0 64px; }
.restaurant-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.restaurant-card {
  background: var(--white); border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition); border: 1px solid var(--cream-3);
  box-shadow: var(--shadow);
}
.restaurant-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-img-wrap { position: relative; height: 200px; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.restaurant-card:hover .card-img-wrap img { transform: scale(1.05); }
.card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  padding: 16px;
}
.cuisine-tag {
  background: rgba(255,255,255,0.2); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3); color: white;
  padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 600;
}
/* Open Now badge on restaurant card image */
.open-now-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(16,185,129,0.92); backdrop-filter: blur(4px);
  color: white; padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
}
.card-body { padding: 20px; }
.card-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.card-header-row h3 { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700; }
.stars { color: var(--coral); font-weight: 700; font-size: 14px; }
.card-desc { color: var(--warm-gray); font-size: 14px; margin-bottom: 12px; line-height: 1.5; }
.card-meta { display: flex; gap: 16px; font-size: 13px; color: var(--warm-gray); font-weight: 500; }

/* ---- Restaurant Page ---- */
.restaurant-hero {
  height: 340px; background-size: cover; background-position: center;
  position: relative;
}
.rh-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0.3));
  display: flex; align-items: flex-end; padding-bottom: 40px;
  color: white;
}
.rh-name {
  font-family: 'Fraunces', serif;
  font-size: 48px; font-weight: 900; line-height: 1.1; margin-bottom: 8px;
}
.rh-meta { color: rgba(255,255,255,0.75); font-size: 15px; margin-bottom: 6px; }
.rh-hours {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500;
  margin-bottom: 10px;
}
.rh-open-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 700;
}
.rh-open  { background: rgba(16,185,129,0.25); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.rh-closed { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.35); }
.back-btn {
  background: rgba(255,255,255,0.15); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2); color: white;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  margin-bottom: 20px; font-size: 14px; transition: all var(--transition);
}
.back-btn:hover { background: rgba(255,255,255,0.25); }

.menu-container { display: grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 40px 24px; }
.menu-sidebar { position: sticky; top: 80px; height: fit-content; }
.menu-sidebar h3 { font-family: 'Fraunces', serif; font-size: 18px; margin-bottom: 12px; }
.menu-cat-link {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; color: var(--warm-gray); font-weight: 500;
  transition: all var(--transition); margin-bottom: 4px; cursor: pointer;
}
.menu-cat-link:hover { background: var(--cream-2); color: var(--charcoal); }
.menu-cat-title {
  font-family: 'Fraunces', serif;
  font-size: 24px; font-weight: 700; margin-bottom: 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--cream-3);
}
.menu-category { margin-bottom: 40px; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.menu-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--cream-3);
  transition: all var(--transition);
}
.menu-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.menu-card img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.menu-card-body { padding: 14px; }
.menu-card-body h4 { font-weight: 600; margin-bottom: 4px; }
.menu-card-body p { color: var(--warm-gray); font-size: 13px; margin-bottom: 12px; line-height: 1.4; }
.menu-card-footer { display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 700; color: var(--coral); font-size: 16px; }
.add-btn {
  background: var(--coral); color: white; border: none;
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px;
  transition: all var(--transition);
}
.add-btn:hover { background: var(--coral-dark); transform: scale(1.05); }
.add-btn-disabled {
  background: #ccc; color: #888; border: none;
  padding: 8px 16px; border-radius: 8px; cursor: not-allowed; font-weight: 600; font-size: 13px;
}
.menu-card-closed { opacity: 0.6; }

/* ---- Cart ---- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; margin-top: 24px; }
.cart-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--white); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 12px;
  border: 1px solid var(--cream-3);
}
.cart-item img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ci-info { flex: 1; }
.ci-info h4 { font-weight: 600; margin-bottom: 4px; }
.ci-info span { color: var(--warm-gray); font-size: 14px; }
.qty-ctrl { display: flex; align-items: center; gap: 8px; }
.qty-ctrl button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--cream-3); background: var(--white);
  cursor: pointer; font-size: 18px; display: flex; align-items: center;
  justify-content: center; transition: all var(--transition); font-weight: 600;
}
.qty-ctrl button:hover { border-color: var(--coral); color: var(--coral); }
.qty-ctrl span { font-weight: 600; min-width: 20px; text-align: center; }
.ci-total { font-weight: 700; min-width: 60px; text-align: right; }
.remove-btn {
  background: none; border: none; cursor: pointer; color: var(--warm-gray);
  font-size: 14px; padding: 4px; transition: color var(--transition);
}
.remove-btn:hover { color: #ef4444; }

.cart-summary {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--cream-3);
  height: fit-content; position: sticky; top: 80px;
}
.cart-summary h3 { font-family: 'Fraunces', serif; font-size: 22px; margin-bottom: 4px; }
.summary-from { color: var(--coral); font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--cream-2); }
.summary-row.total { font-weight: 700; font-size: 18px; border-bottom: none; margin-top: 4px; }

/* ---- Checkout ---- */
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; margin-top: 24px; }
.checkout-form, .order-review {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; border: 1px solid var(--cream-3);
}
.order-review { height: fit-content; position: sticky; top: 80px; }
.order-review h3 { font-family: 'Fraunces', serif; font-size: 22px; margin-bottom: 4px; }
.or-restaurant { color: var(--coral); font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.or-item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.or-item.bold { font-weight: 700; font-size: 17px; }
.or-item hr { border: none; border-top: 1px solid var(--cream-3); margin: 8px 0; }
.form-section { margin-bottom: 32px; }
.form-section h3 { font-family: 'Fraunces', serif; font-size: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--charcoal-3); letter-spacing: 0.3px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--cream-3); outline: none; font-size: 15px;
  transition: border-color var(--transition); background: var(--cream);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--coral); background: white;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.payment-methods { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.payment-opt {
  flex: 1; min-width: 120px; padding: 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--cream-3); cursor: pointer; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px; transition: all var(--transition);
}
.payment-opt input { display: none; }
.payment-opt:hover { border-color: var(--coral-light); }
.payment-opt.active { border-color: var(--coral); background: rgba(255,92,53,0.05); }
.demo-note { color: var(--warm-gray); font-size: 12px; margin-top: 12px; }

/* ---- Confirmation ---- */
.centered-page { display: flex; justify-content: center; align-items: center; min-height: 60vh; padding: 40px 24px; }
.confirmation-box { max-width: 500px; text-align: center; }
.conf-icon { font-size: 72px; margin-bottom: 20px; }
.confirmation-box h1 { font-family: 'Fraunces', serif; font-size: 42px; margin-bottom: 8px; }
.conf-id { color: var(--coral); font-size: 13px; font-weight: 600; font-family: monospace; margin-bottom: 12px; }
.conf-details {
  background: var(--cream-2); border-radius: var(--radius-sm);
  padding: 20px; text-align: left; margin: 24px 0;
  display: flex; flex-direction: column; gap: 8px; font-size: 14px;
}
.conf-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- My Orders ---- */
.order-card {
  background: var(--white); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
  border: 1px solid var(--cream-3); box-shadow: var(--shadow);
}
.oc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.oc-header h3 { font-family: 'Fraunces', serif; font-size: 18px; }
.oc-header small { color: var(--warm-gray); font-size: 13px; }
.oc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.oc-items { color: var(--warm-gray); font-size: 14px; margin-bottom: 8px; }
.oc-address { font-size: 13px; color: var(--warm-gray); }
.oc-rest-phone { font-size: 13px; color: var(--warm-gray); margin-top: 3px; }
.status-badge { padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }

/* ---- Auth Pages ---- */
.auth-page { min-height: 80vh; display: flex; justify-content: center; align-items: center; padding: 40px 24px; }
.auth-box {
  background: var(--white); border-radius: 20px; padding: 40px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-hover);
  border: 1px solid var(--cream-3);
}
.auth-logo { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 900; color: var(--coral); margin-bottom: 24px; cursor: pointer; }
.auth-box h2 { font-family: 'Fraunces', serif; font-size: 30px; margin-bottom: 6px; }
.auth-sub { color: var(--warm-gray); margin-bottom: 28px; font-size: 15px; }
.auth-divider { text-align: center; color: var(--warm-gray); font-size: 13px; margin: 16px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--cream-3);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.demo-accounts { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--cream-3); }
.demo-accounts p { font-size: 12px; color: var(--warm-gray); margin-bottom: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.demo-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-pills button {
  padding: 6px 14px; border-radius: 100px; border: 1.5px solid var(--cream-3);
  background: var(--cream); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.demo-pills button:hover { border-color: var(--coral); color: var(--coral); }

/* ---- Buttons ---- */
.btn-primary {
  background: var(--coral); color: white; border: none;
  padding: 14px 28px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); display: inline-block;
}
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-1px); }
.btn-primary.full { width: 100%; text-align: center; }
.btn-primary.lg { padding: 16px 32px; font-size: 16px; }
.btn-ghost {
  background: transparent; border: 1.5px solid var(--cream-3);
  color: var(--charcoal); padding: 13px 28px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all var(--transition); display: inline-block;
}
.btn-ghost:hover { border-color: var(--charcoal); background: var(--cream-2); }
.btn-ghost.full { width: 100%; text-align: center; margin-top: 10px; }
.btn-ghost.sm { padding: 8px 16px; font-size: 13px; }

/* ---- Empty States ---- */
.empty-state { color: var(--warm-gray); font-size: 16px; text-align: center; padding: 40px; }
.empty-state-box {
  text-align: center; padding: 80px 24px;
  background: var(--white); border-radius: var(--radius); margin-top: 24px;
}
.empty-cart { text-align: center; }
.empty-icon { font-size: 72px; margin-bottom: 16px; }
.empty-cart h2, .empty-state-box h3 { font-family: 'Fraunces', serif; font-size: 30px; margin-bottom: 8px; }
.empty-cart p, .empty-state-box p { color: var(--warm-gray); margin-bottom: 24px; }

/* ---- Page Titles ---- */
.page-title { font-family: 'Fraunces', serif; font-size: 36px; font-weight: 900; margin: 32px 0 24px; }

/* ---- Dashboard ---- */
.dashboard { min-height: 100vh; }
.dash-header {
  background: var(--charcoal); color: white; padding: 48px 0 40px;
  margin-bottom: 32px;
}
.dash-header h1 { font-family: 'Fraunces', serif; font-size: 36px; margin-bottom: 6px; }
.dash-header p { color: rgba(255,255,255,0.55); }
.admin-header { background: linear-gradient(135deg, var(--charcoal) 0%, #2D1A35 100%); }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--cream-3); box-shadow: var(--shadow);
  border-left: 4px solid var(--coral);
}
.stat-card.accent-green { border-left-color: var(--green); }
.stat-card.accent-blue { border-left-color: var(--blue); }
.stat-card.accent-orange { border-left-color: var(--orange); }
.stat-card.accent-purple { border-left-color: var(--purple); }
.stat-num { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 700; color: var(--charcoal); }
.stat-label { color: var(--warm-gray); font-size: 13px; font-weight: 500; margin-top: 4px; }
/* Tappable stat cards */
.stat-card-tap {
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}
.stat-card-tap::after {
  content: '→';
  position: absolute; bottom: 10px; right: 14px;
  font-size: 14px; color: var(--warm-gray); opacity: 0.5;
}
.stat-card-tap:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.10); }
.stat-card-tap:active { transform: translateY(0); }

/* Add-ons modal */
.addons-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 2000; display: flex; align-items: flex-end;
  justify-content: center;
}
@media (min-width: 600px) {
  .addons-modal-backdrop { align-items: center; }
}
.addons-modal {
  background: var(--white); border-radius: 20px 20px 0 0;
  padding: 28px 24px 36px; width: 100%; max-width: 520px;
  max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.25s ease;
}
@media (min-width: 600px) {
  .addons-modal { border-radius: 20px; }
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.addons-modal-header {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px;
}
.addons-modal-img {
  width: 80px; height: 80px; object-fit: cover; border-radius: 12px; flex-shrink: 0;
}
.addons-modal-title { font-size: 18px; font-weight: 700; color: var(--charcoal); }
.addons-modal-desc { font-size: 13px; color: var(--warm-gray); margin-top: 4px; }
.addons-modal-price { font-size: 16px; font-weight: 700; color: var(--coral); margin-top: 6px; }
.addons-section-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--warm-gray); margin: 18px 0 10px;
}
.addon-opt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--cream-3);
  margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
  gap: 12px;
}
.addon-opt:hover { border-color: var(--coral); background: #fff8f6; }
.addon-opt.selected { border-color: var(--coral); background: #fff3ee; }
.addon-opt input[type=checkbox] { display: none; }
.addon-opt-left { display: flex; align-items: center; gap: 10px; }
.addon-check {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--cream-3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s; font-size: 12px;
}
.addon-opt.selected .addon-check { background: var(--coral); border-color: var(--coral); color: white; }
.addon-opt-name { font-size: 14px; font-weight: 500; color: var(--charcoal); }
.addon-opt-price { font-size: 13px; color: var(--warm-gray); font-weight: 500; }
.addons-qty-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--cream-3);
}
.addons-qty-ctrl { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--cream-3); border-radius: 10px; overflow: hidden; }
.addons-qty-ctrl button {
  background: none; border: none; padding: 10px 16px;
  font-size: 18px; cursor: pointer; color: var(--charcoal); font-weight: 700;
}
.addons-qty-ctrl span { font-size: 15px; font-weight: 700; padding: 0 4px; min-width: 24px; text-align: center; }
.addons-add-btn {
  background: var(--coral); color: white; border: none; border-radius: 10px;
  padding: 12px 22px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.addons-add-btn:hover { background: var(--coral-light); }

/* Addon badges in cart/order items */
.addon-badge {
  display: inline-block; font-size: 11px; background: #fff3ee;
  color: var(--coral); border: 1px solid #fdddd3; border-radius: 5px;
  padding: 1px 7px; margin: 2px 2px 0 0;
}

/* Burger decorations in UI */
.section-burger {
  display: inline-block; margin-right: 8px; font-size: 1em; vertical-align: middle;
}


.dash-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--cream-3); }
.tab-btn {
  padding: 12px 20px; background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--warm-gray);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--transition);
}
.tab-btn:hover { color: var(--charcoal); }
.tab-btn.active { color: var(--coral); border-bottom-color: var(--coral); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel h2 { font-family: 'Fraunces', serif; font-size: 24px; margin-bottom: 20px; }

/* Menu Management */
.menu-manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.manage-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--cream-3);
  display: flex; flex-direction: column;
}
.manage-card img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.mc-body { padding: 14px; flex: 1; }
.mc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.mc-top h4 { font-weight: 600; font-size: 15px; }
.mc-cat {
  background: var(--cream-2); color: var(--warm-gray);
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600;
  white-space: nowrap; margin-left: 8px;
}
.mc-body p { color: var(--warm-gray); font-size: 13px; margin-bottom: 12px; line-height: 1.4; }
.mc-footer { display: flex; justify-content: space-between; align-items: center; }
.mc-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 16px; padding: 4px; transition: transform var(--transition); }
.icon-btn:hover { transform: scale(1.2); }
.del-btn:hover { filter: hue-rotate(330deg); }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--cream-3); border-radius: 100px; transition: 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input:checked + .toggle-slider { background: var(--green); }
input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Status select */
.status-select {
  border: 1.5px solid var(--cream-3); border-radius: 6px;
  padding: 6px 10px; font-size: 13px; cursor: pointer; font-weight: 500;
}

/* Item form */
.item-form {
  max-width: 700px; background: var(--cream); border-radius: var(--radius);
  padding: 28px; border: 1px solid var(--cream-3);
}
.item-form textarea { resize: vertical; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.img-preview-wrap { margin-bottom: 16px; }

/* Admin grid */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.admin-panel {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--cream-3);
}
.admin-panel h2 { font-family: 'Fraunces', serif; font-size: 20px; margin-bottom: 20px; }
.admin-panel.full-width { grid-column: 1 / -1; }

/* Restaurant perf */
.rest-perf-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--cream-2); }
.rest-perf-row:last-child { border-bottom: none; }
.rp-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.rp-info { flex: 1; }
.rp-info strong { display: block; font-size: 14px; }
.rp-info span { color: var(--warm-gray); font-size: 12px; }
.rp-stats { text-align: right; font-size: 13px; color: var(--warm-gray); }
.rp-stats .rev { font-weight: 700; color: var(--green); font-size: 15px; }

/* Customers */
.customer-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cream-2); }
.customer-row:last-child { border-bottom: none; }
.cust-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--coral);
  color: white; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.cust-info { flex: 1; }
.cust-info strong { display: block; font-size: 14px; }
.cust-info span { color: var(--warm-gray); font-size: 12px; }
.cust-orders { color: var(--warm-gray); font-size: 13px; font-weight: 600; }

/* Orders table */
.orders-filter { display: flex; gap: 12px; margin-bottom: 20px; }
.orders-filter select {
  border: 1.5px solid var(--cream-3); border-radius: 8px;
  padding: 8px 14px; font-size: 14px; cursor: pointer;
}
.orders-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders-table th {
  text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 700;
  color: var(--warm-gray); text-transform: uppercase; letter-spacing: 0.8px;
  border-bottom: 2px solid var(--cream-3); white-space: nowrap;
}
.orders-table td { padding: 14px 12px; border-bottom: 1px solid var(--cream-2); vertical-align: middle; }
.orders-table tr:hover td { background: var(--cream); }
.mono { font-family: monospace; font-size: 12px; color: var(--warm-gray); }
.cell-name { font-weight: 600; }
.cell-sub { color: var(--warm-gray); font-size: 12px; }
.items-cell { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--warm-gray); }

/* ---- Toast ---- */
#toast {
  position: fixed; bottom: 24px; left: 16px; right: 16px;
  width: auto; max-width: 420px;
  margin: 0 auto;
  background: var(--charcoal); color: white; padding: 14px 20px;
  border-radius: 16px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3); z-index: 9999;
  opacity: 0; transition: all 0.3s;
  white-space: normal; word-break: break-word;
  text-align: center;
  transform: translateY(20px);
}
#toast.error { background: #ef4444; }
#toast.success { background: var(--charcoal); border-left: 4px solid var(--green); }

/* Day-of-week checkbox row */
.day-checkbox-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px;
}
.day-checkbox-opt {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 10px; border-radius: 10px;
  border: 1.5px solid var(--cream-3); background: var(--white);
  cursor: pointer; transition: all 0.15s; min-width: 44px;
  font-size: 12px; font-weight: 600; color: var(--warm-gray);
  user-select: none;
}
.day-checkbox-opt input[type=checkbox] { display: none; }
.day-checkbox-opt:hover { border-color: var(--coral); color: var(--coral); }
.day-checkbox-opt.day-checked {
  background: var(--coral); border-color: var(--coral); color: white;
}

/* Featured category strip editor */
.featured-cat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--cream); border-radius: 10px;
  margin-bottom: 8px;
}
.fcat-thumb {
  width: 56px; height: 44px; object-fit: cover; border-radius: 8px; flex-shrink: 0;
}
.fcat-info { flex: 1; min-width: 0; }
.fcat-info strong { display: block; font-size: 14px; color: var(--charcoal); }
.fcat-url { font-size: 11px; color: var(--warm-gray); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcat-actions { display: flex; gap: 4px; flex-shrink: 0; }
.fcat-add-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }

/* Food photo strip empty state */
.food-photo-strip-empty { height: 4px; }

/* ---- Floating Cart Bar ---- */
#floating-cart-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--coral);
  color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  z-index: 190;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(255,92,53,0.35);
}
#floating-cart-bar.fcb-visible { transform: translateY(0); }
.fcb-count {
  font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 100px;
}
.fcb-cta { font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.fcb-total { font-size: 15px; font-weight: 700; }

@media (max-width: 768px) {
  /* Sit above the bottom nav */
  #floating-cart-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- Bottom Navigation (mobile only) ---- */
#bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  #bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(26,21,18,0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bn-tab {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; padding: 10px 4px 8px;
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.45);
    transition: color 0.15s;
    position: relative;
    min-width: 0;
  }
  .bn-tab:active { opacity: 0.7; }
  .bn-tab.bn-active { color: var(--coral); }
  .bn-icon {
    font-size: 22px; line-height: 1;
  }
  .bn-label {
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.3px;
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 64px;
  }
  .bn-badge {
    position: absolute; top: 6px;
    left: 50%; margin-left: 4px;
    background: var(--coral); color: white;
    border-radius: 50%; width: 17px; height: 17px;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(26,21,18,0.97);
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  /* Layout */
  .container { padding: 0 16px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .menu-container { grid-template-columns: 1fr; padding: 24px 16px; }
  .menu-sidebar { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .restaurant-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth-box { padding: 28px 20px; }

  /* Nav — restore original mobile style */
  #nav { padding: 0 12px; }
  .nav-inner { height: 56px; gap: 8px; }
  .nav-logo { font-size: 18px; gap: 8px; }
  .nav-logo-text { font-size: 18px; }
  .nav-burger-icon { width: 32px; height: 32px; }
  /* Hide top nav links on mobile — bottom nav takes over */
  #nav-links { display: none !important; }
  /* Show user chip on mobile */
  #nav-user-chip { display: flex; align-items: center; margin-left: auto; }
  /* Add padding so content doesn't hide behind bottom nav */
  #main-content { padding-bottom: 72px; }

  /* Mobile hero */
  .hero-desktop { display: none !important; }
  .hero-mobile {
    display: block;
    background: var(--charcoal);
    padding-bottom: 4px;
  }
  .hero-mobile-top {
    padding: 20px 16px 16px;
  }
  .hero-mobile-headline {
    font-family: 'Fraunces', serif;
    font-size: 36px; font-weight: 900; color: white;
    line-height: 1.0; letter-spacing: -1px; margin-bottom: 6px;
  }
  .hero-mobile-headline em { color: var(--coral); font-style: italic; }
  .hero-mobile-title {
    font-size: 16px; font-weight: 500;
    color: rgba(255,255,255,0.6);
    margin-bottom: 14px; line-height: 1.3;
  }
  .hero-mobile-title em { color: var(--coral); font-style: italic; font-weight: 700; }
  .search-bar-mobile {
    max-width: 100%; margin-bottom: 16px;
  }
  /* Nav logo tagline */
  .nav-logo-text { font-size: 18px; }

  /* Hero (original desktop) */
  .hero { min-height: 400px; }
  .hero-inner { padding: 48px 16px 40px; }
  .hero-title { font-size: 36px; letter-spacing: -1px; line-height: 1.0; }
  .hero-sub { font-size: 14px; margin-bottom: 28px; }
  .hero-tag { font-size: 12px; padding: 5px 12px; }

  /* Search bar */
  .search-bar { max-width: 100%; }
  .search-bar input { font-size: 14px; padding: 14px 0; }
  .search-bar button { padding: 14px 16px; font-size: 13px; }
  .search-icon { padding: 0 10px; font-size: 16px; }

  /* Categories */
  .categories-section { padding: 32px 0 16px; }
  .section-title { font-size: 22px; }
  /* Let pills scroll edge-to-edge */
  .categories-section .container { overflow: hidden; }
  .category-pills { margin: 0 -16px; padding: 0 16px 8px; }

  /* Restaurant cards */
  .card-img-wrap { height: 180px; }

  /* Restaurant page hero */
  .restaurant-hero { height: 260px; }
  .rh-name { font-size: 26px; }
  .rh-meta { font-size: 13px; }

  /* Menu grid */
  .menu-grid { grid-template-columns: 1fr; }

  /* Cart */
  .cart-item { gap: 10px; padding: 12px; }
  .cart-item img { width: 56px; height: 56px; }
  .ci-total { min-width: 48px; font-size: 14px; }
  .qty-ctrl button { width: 26px; height: 26px; font-size: 15px; }
  .cart-summary { position: static; }

  /* Checkout */
  .order-review { display: none; }
  .checkout-form { padding: 20px 16px; }
  .payment-opt { min-width: 100px; padding: 10px; font-size: 13px; }

  /* Orders */
  .orders-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .orders-filter { flex-direction: column; gap: 8px; }
  .orders-filter select { width: 100%; }
  .oc-header { flex-direction: column; gap: 8px; }
  .oc-right { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }

  /* Dashboard */
  .page-title { font-size: 26px; }
  .stat-card { padding: 16px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-num { font-size: 28px; }
  .dash-tabs { gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; flex-wrap: nowrap; }
  .tab-btn { white-space: nowrap; padding: 10px 14px; font-size: 13px; flex-shrink: 0; }
  .dash-header .container { padding: 20px 16px; }
  .dash-header h1 { font-size: 24px; }

  /* Confirmation */
  .confirmation-box h1 { font-size: 32px; }
  .conf-icon { font-size: 56px; }
  .conf-actions { flex-direction: column; }
  .conf-actions button { width: 100%; }

  /* Auth */
  .auth-page { padding: 24px 16px; }

  /* Earnings */
  .earnings-cards { grid-template-columns: 1fr; gap: 12px; }
  .earnings-amount { font-size: 26px; }

  /* Manage menu grid */
  .menu-manage-grid { grid-template-columns: 1fr; }

  /* Toast */
  #toast { font-size: 13px; bottom: calc(72px + env(safe-area-inset-bottom, 0px) + 12px); left: 16px; right: 16px; max-width: calc(100% - 32px); }
}

@media (max-width: 480px) {
  .hero-title { font-size: 30px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .payment-methods { flex-direction: column; }
  .payment-opt { min-width: unset; }
  .rest-accounts-grid { grid-template-columns: 1fr; }
  .section-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .available-order-card { flex-direction: column; }
  .aoc-right { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}

/* ---- Restaurant Account Management ---- */
.section-header-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
}
.section-header-row h2 { font-family: 'Fraunces', serif; font-size: 24px; margin: 0; }
.sm-btn { padding: 10px 20px !important; font-size: 14px !important; }
.form-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--warm-gray); margin: 20px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--cream-3);
}
.form-hint { color: var(--warm-gray); font-size: 14px; margin-bottom: 20px; }
.form-hint em { color: var(--charcoal); font-style: normal; font-weight: 600; }

/* Restaurant accounts grid */
.rest-accounts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px;
}
.rest-account-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--cream-3);
  box-shadow: var(--shadow); transition: box-shadow var(--transition);
}
.rest-account-card:hover { box-shadow: var(--shadow-hover); }
.rac-img-wrap { position: relative; height: 160px; overflow: hidden; }
.rac-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.rac-cuisine {
  position: absolute; bottom: 10px; left: 12px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  color: white; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 100px;
}
.rac-body { padding: 16px; }
.rac-top h3 { font-family: 'Fraunces', serif; font-size: 18px; margin-bottom: 4px; }
.rac-desc { color: var(--warm-gray); font-size: 13px; line-height: 1.4; margin-bottom: 14px; }
.rac-stats {
  display: flex; gap: 16px; padding: 12px 0;
  border-top: 1px solid var(--cream-2); border-bottom: 1px solid var(--cream-2);
  margin-bottom: 14px;
}
.rac-stat { flex: 1; text-align: center; }
.rac-stat span { display: block; font-weight: 700; font-size: 15px; color: var(--charcoal); }
.rac-stat small { font-size: 11px; color: var(--warm-gray); text-transform: uppercase; letter-spacing: 0.5px; }
.rac-owner { display: flex; justify-content: space-between; align-items: center; }
.rac-owner-info { display: flex; flex-direction: column; gap: 2px; }
.owner-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--warm-gray); }
.owner-email { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.owner-email.no-owner { color: var(--warm-gray); font-weight: 400; font-style: italic; }
.rac-actions { display: flex; gap: 6px; }

/* Full customer list */
.full-customer-list { display: flex; flex-direction: column; gap: 0; }
.customer-row-full {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-bottom: 1px solid var(--cream-2);
  transition: background var(--transition);
}
.customer-row-full:hover { background: var(--cream); }
.customer-row-full:last-child { border-bottom: none; }
.cust-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--warm-gray); margin-left: auto; }
.cust-meta .rev { font-weight: 700; color: var(--green); }

/* Rest accounts responsive handled in main responsive block above */

/* ---- Settings Panel ---- */
.settings-panel { max-width: 700px; }
.settings-group {
  background: var(--white); border-radius: var(--radius);
  padding: 28px; border: 1px solid var(--cream-3); margin-bottom: 24px;
}
.settings-group h3 { font-family: 'Fraunces', serif; font-size: 20px; margin-bottom: 8px; }
.settings-desc { color: var(--warm-gray); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.settings-row { display: flex; gap: 32px; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; }
.settings-field { flex: 1; min-width: 180px; }
.settings-field small { color: var(--warm-gray); font-size: 12px; margin-top: 6px; display: block; }
.pct-input-wrap { position: relative; display: flex; align-items: center; }
.pct-input-wrap input {
  padding-right: 36px; font-size: 22px; font-weight: 700;
  color: var(--coral); width: 120px; text-align: center;
}
.pct-symbol {
  position: absolute; right: 12px; font-size: 20px; font-weight: 700;
  color: var(--coral); pointer-events: none;
}
.settings-preview {
  flex: 1; min-width: 180px;
  background: var(--cream-2); border-radius: var(--radius-sm);
  padding: 16px; border: 1px solid var(--cream-3);
}
.preview-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--warm-gray); margin-bottom: 10px; }
.preview-value { font-size: 14px; font-weight: 600; color: var(--charcoal); margin-bottom: 4px; }

/* ============================================================
   Driver Experience
   ============================================================ */

/* Driver dashboard header */
.driver-header { background: linear-gradient(135deg, #1a2744 0%, #0f3d2e 100%); }
.driver-header-inner { padding: 40px 0; }
.driver-profile-hero { display: flex; align-items: center; gap: 24px; color: white; }
.driver-avatar-lg {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.driver-avatar-lg.placeholder {
  background: var(--coral); display: flex; align-items: center;
  justify-content: center; font-size: 36px; font-weight: 700; color: white;
}
.driver-profile-hero h1 { font-family: 'Fraunces', serif; font-size: 32px; margin-bottom: 4px; }
.driver-vehicle-info { color: rgba(255,255,255,0.65); font-size: 14px; margin-bottom: 10px; }
.driver-status-row { display: flex; align-items: center; gap: 8px; }
.driver-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-toggle-btn {
  padding: 6px 14px; border-radius: 100px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; margin-left: 8px; transition: all var(--transition);
}
.go-online  { background: var(--green); color: white; }
.go-online:hover  { background: #0ea572; }
.go-offline { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.3); }
.go-offline:hover { background: rgba(255,255,255,0.25); }

/* Active delivery banner */
.active-delivery-banner {
  background: linear-gradient(135deg, #1e3a5f, #1a4731);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,0.1); color: white;
}
.adb-label { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.adb-content { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.adb-info h3 { font-family: 'Fraunces', serif; font-size: 20px; margin-bottom: 4px; }
.adb-items { color: rgba(255,255,255,0.65); font-size: 13px; margin-bottom: 6px; }
.adb-address { font-size: 14px; margin-bottom: 8px; }
.adb-meta { display: flex; gap: 16px; font-size: 13px; color: rgba(255,255,255,0.65); }
.btn-delivered {
  background: var(--green); color: white; border: none;
  padding: 14px 24px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all var(--transition); white-space: nowrap; flex-shrink: 0;
}
.btn-delivered:hover { background: #0ea572; transform: scale(1.03); }

/* Available orders */
.available-orders-list { display: flex; flex-direction: column; gap: 14px; }
.available-order-card {
  background: var(--white); border-radius: var(--radius);
  padding: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  border: 1px solid var(--cream-3); box-shadow: var(--shadow); transition: all var(--transition);
}
.available-order-card:hover { box-shadow: var(--shadow-hover); }
.aoc-left { flex: 1; }
.aoc-restaurant { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.aoc-items { color: var(--warm-gray); font-size: 13px; margin-bottom: 6px; }
.aoc-address { font-size: 14px; margin-bottom: 8px; }
.aoc-meta { display: flex; gap: 14px; font-size: 12px; color: var(--warm-gray); }
.aoc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.aoc-fee { font-size: 22px; font-weight: 900; color: var(--green); }
.aoc-fee-label { font-size: 11px; color: var(--warm-gray); text-transform: uppercase; letter-spacing: 0.5px; }
.btn-accept {
  background: var(--coral); color: white; border: none;
  padding: 10px 22px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.btn-accept:hover { background: var(--coral-dark); transform: scale(1.04); }

/* Offline / on-delivery notice */
.offline-notice {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--cream-2); border-radius: var(--radius); padding: 24px;
  border: 1px solid var(--cream-3); font-size: 14px;
}
.offline-notice span { font-size: 32px; flex-shrink: 0; }
.offline-notice strong { display: block; margin-bottom: 4px; }
.offline-notice p { color: var(--warm-gray); margin: 0; }
.on-delivery-notice { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.2); }

/* Admin driver cards */
.driver-accounts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.driver-account-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--cream-3); box-shadow: var(--shadow);
  transition: box-shadow var(--transition); padding: 20px;
}
.driver-account-card:hover { box-shadow: var(--shadow-hover); }
.dac-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.dac-avatar {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--cream-3);
}
.dac-avatar.placeholder {
  background: var(--coral); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: white;
}
.dac-info { flex: 1; }
.dac-info h3 { font-family: 'Fraunces', serif; font-size: 18px; margin-bottom: 2px; }
.dac-phone { color: var(--warm-gray); font-size: 13px; margin-bottom: 6px; }
.dac-status { display: flex; align-items: center; gap: 6px; }
.dac-actions { display: flex; gap: 4px; }
.dac-vehicle {
  font-size: 13px; color: var(--warm-gray); padding: 10px 0;
  border-top: 1px solid var(--cream-2); border-bottom: 1px solid var(--cream-2); margin-bottom: 12px;
}
.dac-active-order {
  font-size: 13px; background: rgba(59,130,246,0.08); border-radius: 6px;
  padding: 8px 12px; color: #1d4ed8; margin-bottom: 12px; border: 1px solid rgba(59,130,246,0.2);
}
.dac-stats { display: flex; gap: 0; margin-bottom: 14px; }
.dac-stat {
  flex: 1; text-align: center; padding: 10px 4px;
  border-right: 1px solid var(--cream-2);
}
.dac-stat:last-child { border-right: none; }
.dac-stat span { display: block; font-weight: 700; font-size: 16px; color: var(--charcoal); }
.dac-stat small { font-size: 10px; color: var(--warm-gray); text-transform: uppercase; letter-spacing: 0.5px; }
.dac-login {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 10px; border-top: 1px solid var(--cream-2);
}

/* Driver and restaurant account responsive handled in main responsive block above */

/* Dollar amount input (mirrors pct-input-wrap) */
.dollar-input-wrap { position: relative; display: flex; align-items: center; }
.dollar-symbol {
  position: absolute; left: 12px; font-size: 20px; font-weight: 700;
  color: var(--coral); pointer-events: none;
}
.dollar-input-wrap input {
  padding-left: 28px; padding-right: 12px;
  font-size: 22px; font-weight: 700; color: var(--coral);
  width: 130px; text-align: left;
}

/* Earnings Section */
.earnings-section {
  margin-bottom: 40px;
}
.earnings-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--charcoal);
  font-weight: 700;
}
.earnings-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.earnings-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.earnings-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.earnings-card.accent-app {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
}
.earnings-period {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #78350f;
  margin-bottom: 8px;
  font-weight: 600;
}
.earnings-card.accent-app .earnings-period {
  color: #1e40af;
}
.earnings-amount {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 6px;
}
.earnings-card.accent-app .earnings-amount {
  color: #1e40af;
}
.earnings-count {
  font-size: 13px;
  color: #b45309;
}
.earnings-card.accent-app .earnings-count {
  color: #1e3a8a;
}

/* ---- Star Rating ---- */
.rating-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--cream-2);
  flex-wrap: wrap;
}
.rating-label {
  font-size: 13px; font-weight: 600; color: var(--warm-gray);
}
.star-picker { display: flex; gap: 4px; }
.star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 24px; color: var(--cream-3); padding: 0 2px;
  transition: color var(--transition), transform 0.15s;
  line-height: 1;
}
.star-btn:hover,
.star-picker:hover .star-btn { color: var(--orange); }
.star-picker .star-btn:hover ~ .star-btn { color: var(--cream-3); }
.star-picker:hover .star-btn:hover { transform: scale(1.2); }
.rating-done {
  font-size: 14px; font-weight: 600;
  color: var(--orange); letter-spacing: 0.5px;
}

/* Empty category state */
.empty-cat-state {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  color: var(--warm-gray);
  font-size: 15px;
}

/* ---- Multi-category checkbox grid ---- */
.cat-hint {
  font-weight: 400; color: var(--coral); font-size: 13px; margin-left: 6px;
}
.cat-subhint {
  font-size: 12px; color: var(--warm-gray); margin: 4px 0 12px; line-height: 1.4;
}
.cat-checkbox-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cat-checkbox-opt {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 100px;
  border: 1.5px solid var(--cream-3); background: var(--white);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--transition); user-select: none;
}
.cat-checkbox-opt input { display: none; }
.cat-checkbox-opt:hover { border-color: var(--coral-light); }
.cat-checkbox-opt:has(input:checked) {
  background: var(--coral); border-color: var(--coral); color: white;
}
.mc-cats { display: flex; flex-wrap: wrap; gap: 4px; }
.mc-cat {
  background: var(--cream-2); color: var(--warm-gray);
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 100px; text-transform: uppercase; letter-spacing: 0.3px;
}

/* ---- Stripe Card Element ---- */
.stripe-card-element {
  padding: 13px 14px;
  border: 1.5px solid var(--cream-3);
  border-radius: var(--radius-sm);
  background: var(--cream);
  transition: border-color var(--transition);
}
.stripe-card-element.StripeElement--focus {
  border-color: var(--coral);
  background: white;
}
.stripe-card-element.StripeElement--invalid {
  border-color: #ef4444;
}
.stripe-errors {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
}

/* ---- Bank Deposit Info Block ---- */
.bank-deposit-info {
  display: flex; gap: 16px; align-items: flex-start;
  background: #f0f9ff; border: 1.5px solid #bae6fd;
  border-radius: var(--radius-sm); padding: 20px;
}
.bank-icon { font-size: 32px; flex-shrink: 0; }
.bank-title { font-weight: 700; font-size: 16px; color: #0369a1; margin-bottom: 6px; }
.bank-amount { font-size: 22px; font-weight: 900; color: var(--charcoal); margin-bottom: 8px; }
.bank-note { font-size: 13px; color: #0369a1; line-height: 1.5; }

/* ---- Payment Badge in Orders Table ---- */
.payment-badge {
  font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 100px; white-space: nowrap;
}
.payment-badge.payment-credit-card { background: #ede9fe; color: #6d28d9; }
.payment-badge.payment-bank-deposit { background: #dbeafe; color: #1d4ed8; }
.payment-badge.payment-cash-on-delivery { background: #dcfce7; color: #15803d; }

/* ---- Admin Bank Deposit Popup ---- */
.bank-deposit-popup {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  max-width: 380px; width: calc(100% - 48px);
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2); border: 2px solid #bae6fd;
  opacity: 0; transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.bank-deposit-popup.bdp-visible {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: all;
}
.bdp-inner {
  display: flex; align-items: flex-start; gap: 14px; padding: 20px;
}
.bdp-icon { font-size: 28px; flex-shrink: 0; }
.bdp-body { flex: 1; }
.bdp-title { font-weight: 800; font-size: 15px; color: #1d4ed8; margin-bottom: 4px; }
.bdp-msg { font-size: 14px; color: var(--charcoal); margin-bottom: 4px; line-height: 1.4; }
.bdp-sub { font-size: 12px; color: var(--warm-gray); }
.bdp-dismiss {
  background: #1d4ed8; color: white; border: none;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; flex-shrink: 0; align-self: center;
  transition: background var(--transition);
}
.bdp-dismiss:hover { background: #1e40af; }

@media (max-width: 480px) {
  .bank-deposit-popup { bottom: 16px; right: 16px; width: calc(100% - 32px); }
  .bdp-inner { flex-direction: column; }
  .bdp-dismiss { width: 100%; text-align: center; }
}

/* Customer order status notification popup */
.order-status-popup {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  max-width: 380px; width: calc(100% - 48px);
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.2); border: 2px solid var(--coral);
  opacity: 0; transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  margin-bottom: 0;
}
/* Stack multiple popups */
.order-status-popup + .order-status-popup { margin-bottom: 8px; }
.order-status-popup.osp-visible {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: all;
}
.osp-inner {
  display: flex; align-items: flex-start; gap: 14px; padding: 20px;
}
.osp-icon { font-size: 28px; flex-shrink: 0; }
.osp-body { flex: 1; min-width: 0; }
.osp-title { font-weight: 800; font-size: 15px; color: var(--coral); margin-bottom: 4px; }
.osp-restaurant { font-size: 13px; font-weight: 600; color: var(--charcoal); margin-bottom: 2px; }
.osp-msg { font-size: 14px; color: var(--charcoal); line-height: 1.4; }
.osp-sub { font-size: 12px; color: var(--warm-gray); margin-top: 4px; }
.osp-dismiss {
  background: var(--coral); color: white; border: none;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  white-space: nowrap; flex-shrink: 0; align-self: center;
  transition: background var(--transition);
}
.osp-dismiss:hover { background: var(--coral-light); }
.osp-track-link {
  display: inline-block; margin-top: 8px; font-size: 12px;
  color: var(--coral); font-weight: 600; cursor: pointer; text-decoration: underline;
}
@media (max-width: 480px) {
  .order-status-popup { bottom: 16px; right: 16px; width: calc(100% - 32px); }
  .osp-inner { flex-direction: column; }
  .osp-dismiss { width: 100%; text-align: center; }
}

/* ---- PWA / Safe Area Support ---- */
/* Handles iPhone notch, home bar, and standalone mode */
#nav {
  padding-top: env(safe-area-inset-top);
}
body {
  padding-bottom: env(safe-area-inset-bottom);
}
/* When running as installed PWA (standalone), add extra top padding */
@media (display-mode: standalone) {
  #nav {
    padding-top: max(env(safe-area-inset-top), 12px);
  }
  /* Slightly larger touch targets in standalone mode */
  .nav-link { padding: 8px 12px; }
  .btn-primary, .btn-ghost { min-height: 48px; }
}
/* Prevent text size adjustment on rotation */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ---- Pending Approval ---- */
.pending-badge {
  background: #8b5cf6; color: white;
  border-radius: 100px; padding: 1px 7px;
  font-size: 11px; font-weight: 700;
  margin-left: 4px;
}
.pending-approval-card {
  background: white; border: 2px solid #8b5cf640;
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; box-shadow: var(--shadow);
}
.pac-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 14px;
}
.pac-order-id { font-weight: 700; font-size: 15px; }
.pac-time { font-size: 12px; color: var(--warm-gray); margin-top: 2px; }
.pac-amount { font-size: 22px; font-weight: 800; color: var(--coral); }
.pac-details {
  background: var(--cream-2); border-radius: 10px;
  padding: 14px; margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px;
}
.pac-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-success {
  background: #10b981; color: white; border: none;
  padding: 10px 20px; border-radius: 10px;
  font-weight: 700; cursor: pointer; font-size: 14px;
  transition: background 0.2s;
}
.btn-success:hover { background: #059669; }
.btn-danger {
  background: white; color: #ef4444;
  border: 2px solid #ef4444;
  padding: 10px 20px; border-radius: 10px;
  font-weight: 700; cursor: pointer; font-size: 14px;
  transition: all 0.2s;
}
.btn-danger:hover { background: #fee2e2; }
