/* ===== DESIGN TOKENS ===== */
:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --border: #e4e4e7;
  --border-hover: #d4d4d8;
  --text-primary: #09090b;
  --text-secondary: #71717a;
  --text-muted: #a1a1aa;
  --text-faint: #52525b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37,99,235,0.08);
  --success: #16a34a;
  --success-dark: #047857;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning-text: #78350f;
  --warning-bg: #fef3c7;
  --warning-border: #fcd34d;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
  --shadow-phone: 0 30px 80px rgba(0,0,0,0.12);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  width: 1440px;
  margin: 0 auto;
}
button { font-family: var(--font); cursor: pointer; }
input, textarea, select { font-family: var(--font); }
a { text-decoration: none; color: inherit; }
svg { display: block; flex-shrink: 0; }

/* ===== PHONE FRAME ===== */
.app-viewport {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  min-height: 100vh;
}
.phone {
  width: 390px;
  height: 844px;
  background: var(--surface);
  border-radius: 44px;
  box-shadow: var(--shadow-phone), 0 0 0 10px #18181b, 0 0 0 11px #27272a;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #18181b;
  border-radius: 20px;
  z-index: 100;
}
.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px 8px;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--surface);
  z-index: 90;
}
.status-icons { display: flex; gap: 5px; align-items: center; }
#screen-slot {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
#screen-slot::-webkit-scrollbar { width: 0; display: none; }
#bottom-nav-slot { flex-shrink: 0; }
.home-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: #09090b;
  border-radius: 2px;
  z-index: 100;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 0 22px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--accent); }
.nav-item:active { transform: scale(0.92); }

/* ===== HEADER ===== */
.app-header {
  padding: 14px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.header-location { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.location-icon-box {
  width: 36px; height: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
}
.location-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.location-name {
  font-size: 14px; color: var(--text-primary); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
  transition: background 0.15s;
}
.icon-btn:hover { background: #fafafa; }
.icon-btn:active { transform: scale(0.95); }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent);
  color: #fff; font-size: 10px; font-weight: 600;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}
.search-bar { display: flex; gap: 8px; align-items: center; }
.search-input-wrap {
  flex: 1; background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
}
.search-input-wrap input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 14px; color: var(--text-primary);
}
.search-input-wrap input::placeholder { color: var(--text-muted); }
.filter-btn {
  width: 42px; height: 42px;
  background: var(--accent);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  transition: background 0.15s;
}
.filter-btn:hover { background: var(--accent-hover); }
.filter-btn:active { transform: scale(0.95); }

/* Detail header */
.detail-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.detail-header-left { display: flex; align-items: center; gap: 12px; }
.detail-header-title { font-size: 16px; font-weight: 600; }
.back-btn {
  width: 36px; height: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.back-btn:hover { background: #eee; }
.back-btn:active { transform: scale(0.95); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 12px 20px;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-secondary);
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}
.crumb-active { color: var(--text-primary); font-weight: 500; }

/* ===== CATEGORY CHIPS ===== */
.categories {
  padding: 16px 20px 8px;
  display: flex; gap: 8px;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.categories::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-faint);
  display: flex; align-items: center; gap: 6px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.chip.active { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.chip:hover:not(.active) { background: #fafafa; }
.chip:active { transform: scale(0.97); }

/* ===== FILTER TAGS ===== */
.filters-row {
  padding: 12px 20px;
  display: flex; gap: 8px;
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.filters-row::-webkit-scrollbar { display: none; }
.filter-tag {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500;
  background: var(--bg);
  color: #3f3f46;
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
  cursor: default;
}
.filter-tag.dietary { background: var(--success-bg); color: var(--success-dark); border-color: var(--success-border); }
.filter-tag .ft-remove {
  cursor: pointer; margin-left: 2px;
  opacity: 0.7; transition: opacity 0.15s;
}
.filter-tag .ft-remove:hover { opacity: 1; }

/* ===== SECTION HEADER ===== */
.section-header {
  padding: 20px 20px 12px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.section-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.section-count { font-size: 12px; color: var(--text-secondary); }

/* ===== MENU ITEM CARD ===== */
.menu-list { padding: 0 20px 20px; }
.menu-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 10px;
  display: flex; gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.menu-item:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.menu-item:active { transform: scale(0.98); }
.item-img {
  width: 88px; height: 88px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--bg);
}
.item-img.unavail { filter: grayscale(1); opacity: 0.6; }
.veg-dot {
  position: absolute; top: 6px; left: 6px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.veg-dot div { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.veg-dot.non div { background: var(--danger); }
.item-info {
  flex: 1; display: flex; flex-direction: column;
  justify-content: space-between; min-width: 0;
}
.item-name {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 3px;
  display: flex; align-items: center; gap: 6px;
}
.item-desc {
  font-size: 12px; color: var(--text-secondary); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.item-tags { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.tag {
  font-size: 10px; font-weight: 500;
  padding: 2px 7px; border-radius: var(--radius-xs);
  background: var(--bg); color: var(--text-faint);
  border: 1px solid var(--border);
}
.tag.veg { background: var(--success-bg); color: var(--success-dark); border-color: var(--success-border); }
.tag.spicy { background: var(--danger-bg); color: var(--danger-dark); border-color: var(--danger-border); }
.item-bottom {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 8px;
}
.item-price { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.item-price .old {
  font-size: 12px; color: var(--text-muted);
  text-decoration: line-through; font-weight: 400; margin-left: 4px;
}
.item-price.muted { color: var(--text-muted); }
.add-btn {
  background: var(--accent); color: #fff;
  border: none; width: 32px; height: 32px;
  border-radius: var(--radius-md);
  font-size: 18px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(37,99,235,0.2);
  transition: background 0.15s, transform 0.1s;
}
.add-btn:hover { background: var(--accent-hover); }
.add-btn:active { transform: scale(0.9); }
.add-btn.pulse {
  animation: addPulse 0.4s ease;
}
@keyframes addPulse {
  0% { background: var(--accent); }
  50% { background: var(--success); transform: scale(1.15); }
  100% { background: var(--accent); transform: scale(1); }
}
.unavail-badge {
  background: var(--danger-bg); color: #991b1b;
  border: 1px solid var(--danger-border);
  padding: 4px 8px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 500;
}

/* ===== POPULAR BANNER ===== */
.popular-banner {
  margin: 0 20px 4px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--warning-text); font-weight: 500;
}

/* ===== CART BAR ===== */
.cart-bar {
  position: sticky; bottom: 0;
  background: var(--text-primary); color: #fff;
  margin: 0 16px 16px;
  border-radius: var(--radius-2xl);
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform 0.15s;
  animation: slideUp 0.3s ease;
}
.cart-bar:active { transform: scale(0.98); }
.cart-info { display: flex; align-items: center; gap: 10px; }
.cart-count-badge {
  background: rgba(255,255,255,0.15);
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.cart-text-main { font-size: 13px; font-weight: 600; }
.cart-text-sub { font-size: 11px; color: var(--text-muted); }
.cart-view {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none; z-index: 10000;
}
.toast {
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  font-size: 13px; font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  max-width: 340px;
  display: flex; align-items: center; gap: 8px;
}
.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.info { background: #3b82f6; }
.toast.fade-out { animation: toastOut 0.3s ease forwards; }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 40px; text-align: center;
}
.empty-state-icon {
  width: 64px; height: 64px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-state-title {
  font-size: 16px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
}
.empty-state-subtitle {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 20px;
}
.empty-state-action {
  background: var(--accent); color: #fff;
  border: none; padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.empty-state-action:hover { background: var(--accent-hover); }

/* ===== LOGIN SCREEN ===== */
.login-screen { padding: 40px 24px 24px; }
.login-logo {
  text-align: center; margin-bottom: 32px;
}
.login-logo h1 { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.login-logo p { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.login-tabs {
  display: flex; margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.login-tab {
  flex: 1; padding: 10px;
  text-align: center; font-size: 13px; font-weight: 500;
  cursor: pointer; background: var(--surface);
  color: var(--text-secondary);
  border: none;
  transition: all 0.15s;
}
.login-tab.active {
  background: var(--text-primary); color: #fff;
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px; color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input.error { border-color: var(--danger); }
.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; }
.btn-primary {
  width: 100%; padding: 12px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.user-cards { margin-bottom: 24px; }
.user-cards-label {
  font-size: 11px; font-weight: 500;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px;
}
.user-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s;
}
.user-card:hover { border-color: var(--accent); background: var(--accent-light); }
.user-card:active { transform: scale(0.98); }
.user-card .avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.user-card .user-info { flex: 1; }
.user-card .user-name { font-size: 14px; font-weight: 600; }
.user-card .user-email { font-size: 12px; color: var(--text-secondary); }
.vip-badge {
  font-size: 9px; font-weight: 600;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: var(--warning-text);
  padding: 2px 6px; border-radius: var(--radius-xs);
  border: 1px solid var(--warning-border);
}

/* ===== FILTER DROPDOWN ===== */
.filter-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 50;
  padding: 16px 20px;
  animation: slideDown 0.2s ease;
}
.filter-section { margin-bottom: 16px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-section-title {
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.3px; margin-bottom: 8px;
}
.filter-option {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; cursor: pointer; font-size: 13px;
}
.filter-checkbox {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.filter-checkbox.checked {
  background: var(--accent); border-color: var(--accent);
}
.filter-radio {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.filter-radio.checked { border-color: var(--accent); }
.filter-radio.checked::after {
  content: ''; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
}

/* ===== ITEM DETAIL ===== */
.item-detail-img {
  width: 100%; height: 200px;
  background-size: cover; background-position: center;
  background-color: var(--bg); position: relative;
}
.item-detail-body { padding: 20px; }
.item-detail-name { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.item-detail-desc {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 12px;
}
.allergen-callout {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12px; color: var(--warning-text);
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 16px;
}
.unavail-message {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px; color: var(--danger-dark);
  margin-bottom: 16px;
}
.modifier-section { margin-bottom: 20px; }
.modifier-title {
  font-size: 14px; font-weight: 600; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.modifier-required {
  font-size: 10px; font-weight: 500;
  color: var(--danger); background: var(--danger-bg);
  padding: 2px 6px; border-radius: var(--radius-xs);
}
.modifier-optional {
  font-size: 10px; font-weight: 500;
  color: var(--text-secondary); background: var(--bg);
  padding: 2px 6px; border-radius: var(--radius-xs);
}
.modifier-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid #f4f4f5;
  cursor: pointer;
}
.modifier-option:last-child { border-bottom: none; }
.modifier-left { display: flex; align-items: center; gap: 10px; }
.modifier-radio {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.modifier-radio.selected { border-color: var(--accent); }
.modifier-radio.selected::after {
  content: ''; width: 10px; height: 10px;
  background: var(--accent); border-radius: 50%;
}
.modifier-check {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.modifier-check.selected {
  background: var(--accent); border-color: var(--accent);
}
.modifier-price { font-size: 13px; color: var(--text-secondary); }
.modifier-label { font-size: 14px; }
.special-instructions {
  width: 100%; min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px; color: var(--text-primary);
  resize: vertical; outline: none;
}
.special-instructions:focus { border-color: var(--accent); }

/* Quantity Selector */
.qty-selector {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qty-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: none;
  cursor: pointer; transition: background 0.15s;
}
.qty-btn:hover { background: var(--bg); }
.qty-btn:active { transform: scale(0.9); }
.qty-value {
  width: 44px; text-align: center;
  font-size: 16px; font-weight: 600;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 40px;
}
.add-to-cart-btn {
  width: 100%; padding: 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-xl);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 20px;
}
.add-to-cart-btn:hover { background: var(--accent-hover); }
.add-to-cart-btn:active { transform: scale(0.98); }
.add-to-cart-btn:disabled {
  background: #d4d4d8; cursor: not-allowed;
  color: var(--text-muted);
}

/* ===== CART SCREEN ===== */
.cart-items-list { padding: 0 20px; }
.cart-item-card {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-qty-badge {
  width: 28px; height: 28px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  color: var(--accent); flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.cart-item-mods {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px;
}
.cart-item-mod-pill {
  font-size: 10px; padding: 2px 6px;
  background: var(--bg); border-radius: var(--radius-xs);
  color: var(--text-secondary);
}
.cart-item-instructions {
  font-size: 11px; color: var(--text-muted);
  font-style: italic; margin-bottom: 4px;
}
.cart-item-controls {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}
.cart-item-qty-control {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden;
}
.cart-qty-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: none;
  cursor: pointer; font-size: 14px;
}
.cart-qty-btn:hover { background: var(--bg); }
.cart-qty-val {
  width: 30px; text-align: center;
  font-size: 13px; font-weight: 600;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 28px;
}
.cart-item-right {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
}
.cart-item-price { font-size: 14px; font-weight: 600; }
.cart-remove-btn {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.cart-remove-btn:hover { color: var(--danger); }
.cart-totals {
  padding: 20px; margin-top: 8px;
}
.cart-total-row {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 8px;
  color: var(--text-secondary);
}
.cart-total-row.final {
  font-size: 16px; font-weight: 600;
  color: var(--text-primary); margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.cart-actions { padding: 0 20px 20px; }
.cart-add-more {
  display: block; text-align: center;
  color: var(--accent); font-size: 13px; font-weight: 500;
  margin-top: 12px; cursor: pointer;
}

/* ===== CHECKOUT ===== */
.checkout-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.checkout-section-title {
  font-size: 14px; font-weight: 600; margin-bottom: 12px;
}
.fulfillment-toggle {
  display: flex; border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  margin-bottom: 12px;
}
.fulfillment-opt {
  flex: 1; padding: 10px; text-align: center;
  font-size: 13px; font-weight: 500;
  cursor: pointer; background: var(--surface);
  color: var(--text-secondary);
  border: none;
  transition: all 0.15s;
}
.fulfillment-opt.active {
  background: var(--text-primary); color: #fff;
}
.checkout-address {
  font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px; background: var(--bg);
  border-radius: var(--radius-md);
}
.time-slot-select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 14px; background: var(--surface);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.checkout-item-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 6px 0;
  color: var(--text-secondary);
}
.checkout-item-name { flex: 1; }
.checkout-edit-link {
  color: var(--accent); font-size: 12px; font-weight: 500;
  cursor: pointer;
}
.promo-row {
  display: flex; gap: 8px;
}
.promo-input {
  flex: 1; padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
}
.promo-apply {
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.promo-apply:hover { background: var(--bg); }
.payment-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; background: var(--bg);
  border-radius: var(--radius-lg);
}
.payment-card-info { display: flex; align-items: center; gap: 10px; }
.payment-card-number { font-size: 14px; font-weight: 500; }
.payment-change {
  color: var(--accent); font-size: 12px; font-weight: 500;
  cursor: pointer;
}
.place-order-btn {
  width: 100%; padding: 14px; margin: 20px 0;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-xl);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.place-order-btn:hover { background: var(--accent-hover); }
.place-order-btn:active { transform: scale(0.98); }

/* Loading overlay */
.loading-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.9);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 60;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text { margin-top: 12px; font-size: 14px; color: var(--text-secondary); }

/* ===== ORDER CONFIRMATION ===== */
.confirmation-screen { padding: 30px 20px 20px; text-align: center; }
.confirm-check {
  width: 64px; height: 64px;
  background: var(--success-bg);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  animation: scaleIn 0.5s ease;
}
.confirm-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.confirm-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.order-number {
  font-size: 22px; font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--text-primary); margin-bottom: 24px;
}
.receipt-section {
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 16px; margin-bottom: 16px;
}
.receipt-title {
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.3px;
  margin-bottom: 10px;
}
.receipt-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0;
}
.receipt-row.total {
  font-weight: 600; padding-top: 8px;
  margin-top: 8px; border-top: 1px solid var(--border);
}
.pickup-info {
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 16px; margin-bottom: 16px;
}
.pickup-info-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0;
}
.pickup-info-label { color: var(--text-secondary); }
.paid-badge {
  font-size: 10px; font-weight: 600;
  background: var(--success-bg); color: var(--success);
  padding: 2px 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--success-border);
}
.confirm-actions { margin-top: 24px; }
.track-btn {
  width: 100%; padding: 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-xl);
  font-size: 15px; font-weight: 600;
  cursor: pointer; margin-bottom: 12px;
}
.track-btn:hover { background: var(--accent-hover); }
.back-to-menu-link {
  display: block; text-align: center;
  color: var(--accent); font-size: 13px; font-weight: 500;
  cursor: pointer;
}

/* ===== ORDER TRACKING ===== */
.tracking-body { padding: 20px; }
.tracking-status-card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 16px; margin-bottom: 20px;
  text-align: center;
}
.tracking-status-label {
  font-size: 12px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px;
}
.tracking-status-value {
  font-size: 18px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 6px;
}
.tracking-eta {
  font-size: 13px; color: var(--accent);
  font-weight: 500;
}

/* Vertical Timeline */
.vtimeline { padding: 0 0 0 8px; }
.vtimeline-step {
  display: flex; gap: 14px;
  position: relative; padding-bottom: 24px;
}
.vtimeline-step:last-child { padding-bottom: 0; }
.vtimeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 11px; top: 24px;
  width: 2px; bottom: 0;
  background: var(--border);
}
.vtimeline-step.completed:not(:last-child)::after { background: var(--success); }
.vtimeline-step.current:not(:last-child)::after {
  background: linear-gradient(to bottom, var(--accent), var(--border));
}
.vtimeline-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--surface);
  z-index: 1;
}
.vtimeline-step.completed .vtimeline-dot {
  background: var(--success); border-color: var(--success);
}
.vtimeline-step.current .vtimeline-dot {
  border-color: var(--accent); background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.2);
}
.vtimeline-content { flex: 1; padding-top: 2px; }
.vtimeline-label { font-size: 14px; font-weight: 500; }
.vtimeline-step.completed .vtimeline-label { color: var(--text-primary); }
.vtimeline-step.current .vtimeline-label { color: var(--accent); font-weight: 600; }
.vtimeline-step.pending .vtimeline-label { color: var(--text-muted); }
.vtimeline-time { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.tracking-summary {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 16px; margin-top: 20px;
}
.tracking-summary-title {
  font-size: 14px; font-weight: 600; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.tracking-summary-items { font-size: 13px; color: var(--text-secondary); }
.tracking-summary-row { padding: 4px 0; }
.tracking-restaurant {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 16px; margin-top: 12px;
}
.tracking-restaurant-name { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.tracking-restaurant-info {
  font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px; cursor: pointer;
}
.tracking-restaurant-info:hover { color: var(--accent); }
.tracking-help {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: var(--accent);
  font-weight: 500; cursor: pointer;
}
.refresh-status {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: 13px; font-weight: 500;
  cursor: pointer; margin-top: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}
.refresh-status:hover { background: var(--accent-light); }

/* ===== ACCOUNT SCREEN ===== */
.account-body { padding: 0; }
.account-avatar-section {
  display: flex; flex-direction: column;
  align-items: center; padding: 24px 20px 16px;
}
.account-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff; font-size: 24px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.account-name { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* Tab Switcher */
.tab-switcher {
  display: flex; border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.tab-item {
  flex: 1; padding: 12px 0;
  text-align: center;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.tab-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Profile section */
.profile-section { padding: 20px; }
.profile-field {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.profile-field-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.profile-field-value { font-size: 14px; font-weight: 500; }
.profile-edit-btn {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  padding: 4px;
}
.profile-edit-btn:hover { color: var(--accent); }
.profile-edit-inline {
  display: flex; gap: 8px; margin-top: 6px;
}
.profile-edit-input {
  flex: 1; padding: 8px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px; outline: none;
}
.profile-save-btn {
  padding: 8px 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500; cursor: pointer;
}
.settings-links { margin-top: 20px; }
.settings-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.15s;
}
.settings-link:hover { color: var(--accent); }
.settings-link-left { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.logout-btn {
  width: 100%; padding: 12px; margin-top: 20px;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.logout-btn:hover { background: #fee2e2; }

/* Order History */
.order-history { padding: 16px 20px; }
.order-filter-row {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 16px;
}
.order-filter-label { font-size: 14px; font-weight: 600; }
.order-filter-select {
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px; background: var(--surface);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}
.order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.order-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.order-card-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 8px;
}
.order-card-id { font-size: 14px; font-weight: 600; }
.order-card-date { font-size: 12px; color: var(--text-secondary); }
.status-badge {
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-xs);
  text-transform: uppercase; letter-spacing: 0.3px;
}
.status-badge.confirmed { background: #dbeafe; color: #1d4ed8; }
.status-badge.accepted { background: #e0e7ff; color: #4338ca; }
.status-badge.beingprepared { background: var(--warning-bg); color: var(--warning-text); }
.status-badge.readyforpickup { background: var(--success-bg); color: var(--success-dark); }
.status-badge.completed { background: var(--success-bg); color: var(--success); }
.status-badge.cancelled { background: var(--danger-bg); color: var(--danger); }
.order-card-items {
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: 8px; line-height: 1.4;
}
.order-card-footer {
  display: flex; justify-content: space-between; align-items: center;
}
.order-card-total { font-size: 14px; font-weight: 600; }
.order-card-type { font-size: 11px; color: var(--text-muted); }
.reorder-btn {
  padding: 6px 14px;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.reorder-btn:hover { background: var(--accent-hover); }
.reorder-btn:active { transform: scale(0.95); }

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes toastIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-10px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.25s ease; }
.stagger-item {
  opacity: 0;
  animation: staggerIn 0.35s ease forwards;
}

/* Badge bounce */
.badge-bounce { animation: badgeBounce 0.4s ease; }
@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}
