/* =============================================
   Antrian RM — Minimalist Elegant Design System
   Food-forward, clean, premium
   ============================================= */

/* ============ DESIGN TOKENS ============ */
:root {
  --primary: #1A1A2E;
  --primary-light: #2D2D44;
  --primary-bg: #F0F0F5;

  --accent: #E53E3E;
  --accent-dark: #C53030;
  --accent-light: #FEE2E2;
  --accent-bg: #FFF5F5;

  --success: #38A169;
  --success-light: #C6F6D5;
  --success-bg: #F0FFF4;

  --gold: #D69E2E;
  --gold-light: #FEFCBF;
  --gold-bg: #FFFBEB;

  --bg: #FFFFFF;
  --surface: #F7FAFC;
  --surface-2: #EDF2F7;

  --text: #1A202C;
  --text-2: #718096;
  --text-3: #A0AEC0;

  --border: #E2E8F0;
  --border-2: #EDF2F7;

  --info: #3182CE;
  --info-light: #BEE3F8;
  --danger: #E53E3E;
  --danger-light: #FEE2E2;

  --cat-main: #E53E3E;
  --cat-main-bg: #FEE2E2;
  --cat-side: #D69E2E;
  --cat-side-bg: #FEFCBF;
  --cat-drink: #38A169;
  --cat-drink-bg: #C6F6D5;
  --cat-dessert: #805AD5;
  --cat-dessert-bg: #E9D8FD;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px; --r-full: 999px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.03);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 28px rgba(0,0,0,.06);

  --ease: cubic-bezier(.4,0,.2,1);
  --duration: 150ms;
}

/* ============ RESET + BASE ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html.lenis, html.lenis body {
  height: auto;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: inline-block;
  vertical-align: middle;
}

ul, ol {
  list-style: none;
}

/* ============ TYPOGRAPHY ============ */
h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

.text-xs { font-size: 11px; line-height: 1.4; }
.text-sm { font-size: 13px; line-height: 1.5; }
.text-base { font-size: 14px; line-height: 1.55; }
.text-md { font-size: 15px; line-height: 1.5; }
.text-lg { font-size: 16px; line-height: 1.45; }
.text-xl { font-size: 18px; line-height: 1.35; }

.text-muted { color: var(--text-2); }
.text-faint { color: var(--text-3); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-gold { color: var(--gold); }
.text-white { color: #FFFFFF; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-2-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ LAYOUT ============ */
.page-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 120px;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.section {
  padding: 20px 0;
}

.section-sm {
  padding: 12px 0;
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.gap-2 { gap: var(--s2); }
.gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); }
.gap-6 { gap: var(--s6); }

.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.stack > * + * {
  margin-top: 12px;
}

.stack-sm > * + * {
  margin-top: 8px;
}

.stack-lg > * + * {
  margin-top: 20px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.card-body {
  padding: 16px;
}

.card-flush {
  padding: 0;
}

.w-full {
  width: 100%;
}

.shrink-0 {
  flex-shrink: 0;
}

.hidden {
  display: none;
}

.desktop-only {
  display: none !important;
}

.mobile-only {
  display: block;
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============ HERO ============ */
.hero {
  padding: 24px 0 16px;
}

.hero h1 {
  margin-bottom: 6px;
}

.hero p {
  color: var(--text-2);
  font-size: 14px;
  max-width: 440px;
}

.hero-banner {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 120px;
  margin-top: 12px;
  background: var(--surface);
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,.65) 0%, rgba(26,26,46,.05) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  color: #fff;
}

.hero-content h1 {
  font-size: 18px;
  margin-bottom: 2px;
  text-shadow: 0 1px 4px rgba(0,0,0,.25);
  color: #fff;
}

.hero-content p {
  font-size: 12px;
  opacity: .85;
  margin: 0;
}

/* ============ RESTO BAR ============ */
.resto-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 16px;
}

.resto-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resto-meta {
  flex: 1;
  min-width: 0;
}

.resto-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.resto-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 1px;
}

.resto-detail svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.status-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-weight: 700;
  font-size: 11px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% { opacity: .4; }
}

/* ============ DATE PILLS ============ */
.date-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.date-scroll::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex-shrink: 0;
  width: 62px;
  padding: 10px 0;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  min-height: 44px;
}

.date-pill:hover {
  border-color: var(--primary);
}

.date-pill.active {
  background: var(--primary);
  border-color: var(--primary);
}

.dp-dow {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.dp-day {
  font-size: 18px;
  font-weight: 800;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.dp-mon {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
}

.date-pill.active .dp-dow,
.date-pill.active .dp-day,
.date-pill.active .dp-mon {
  color: #fff;
}

.date-custom {
  position: relative;
}

.date-custom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ============ SLOT GRID ============ */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.slot-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  min-height: 44px;
}

.slot-card:hover {
  border-color: var(--primary);
}

.slot-card.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}

.slot-card.disabled {
  opacity: .4;
  pointer-events: none;
}

.slot-time {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.slot-seats {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 2px;
}

.slot-seats.ok {
  color: var(--success);
  font-weight: 600;
}

/* ============ CATEGORY CHIPS ============ */
.cat-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-nav::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  min-height: 36px;
  display: flex;
  align-items: center;
}

.cat-chip:hover {
  border-color: var(--primary);
  color: var(--text);
}

.cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chip-main { background: var(--cat-main-bg); color: var(--cat-main); border-color: var(--cat-main-bg); }
.chip-side { background: var(--cat-side-bg); color: var(--cat-side); border-color: var(--cat-side-bg); }
.chip-drink { background: var(--cat-drink-bg); color: var(--cat-drink); border-color: var(--cat-drink-bg); }
.chip-dessert { background: var(--cat-dessert-bg); color: var(--cat-dessert); border-color: var(--cat-dessert-bg); }

/* ============ SEARCH INPUT ============ */
.search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 44px;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.search-wrap input::placeholder {
  color: var(--text-3);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,26,46,.06);
}

/* ============ FOOD CARD GRID ============ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.food-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--duration) var(--ease);
}

.food-card:hover {
  box-shadow: var(--shadow-md);
}

.food-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface);
}

.food-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s var(--ease);
}

.food-card:hover .food-card-img img {
  transform: scale(1.03);
}

.food-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}

.badge-pink { background: var(--accent); }
.badge-green { background: var(--success); }
.badge-gold { background: var(--gold); }

.food-card-body {
  padding: 10px 12px 12px;
}

.food-card-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
  line-height: 1.3;
  color: var(--text);
}

.food-card-desc {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.food-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.food-card-price {
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
}

/* ============ QTY STEPPER ============ */
.qty {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 2px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: all var(--duration) var(--ease);
}

.qty-btn:hover {
  background: var(--accent);
  color: #fff;
}

.qty-btn svg {
  width: 14px;
  height: 14px;
}

.qty-num {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ============ CART PANEL ============ */
.cart {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.cart-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.cart-head-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  color: var(--text);
}

.cart-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.cart-items {
  max-height: 320px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
  font-size: 13px;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-qty {
  background: var(--surface);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  margin-right: 8px;
}

.cart-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--text);
}

.cart-total-price {
  color: var(--gold);
}

.cart-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-3);
  font-size: 13px;
}

/* ============ BOTTOM BAR ============ */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

.bottom-bar-inner {
  max-width: 480px;
  margin: 0 auto;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 12px 18px;
  border-radius: var(--r);
  transition: all var(--duration) var(--ease);
  width: 100%;
  min-height: 44px;
  cursor: pointer;
  border: none;
  color: #fff;
}

.btn:active {
  transform: scale(.98);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(229,62,62,.2);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-3);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 8px;
  width: auto;
  min-height: auto;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  min-height: 36px;
  border-radius: var(--r-sm);
  width: auto;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #2F855A;
}

/* ============ FORMS ============ */
.field {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text);
}

.field-input {
  width: 100%;
  padding: 11px 12px;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.field-input::placeholder {
  color: var(--text-3);
}

.field-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,26,46,.06);
}

textarea.field-input {
  min-height: 80px;
  resize: vertical;
}

.field-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
}

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.badge-pending {
  background: var(--gold-light);
  color: #975A16;
}

.badge-pending .dot {
  background: var(--gold);
}

.badge-paid {
  background: var(--info-light);
  color: #2B6CB0;
}

.badge-paid .dot {
  background: var(--info);
}

.badge-arrived {
  background: var(--success-light);
  color: #276749;
}

.badge-arrived .dot {
  background: var(--success);
}

.badge-cancelled {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-cancelled .dot {
  background: var(--danger);
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

.badge-info .dot {
  background: var(--info);
}

/* ============ STEPPER ============ */
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0 4px;
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-dot.done {
  background: var(--success);
  color: #fff;
}

.step-dot.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(229,62,62,.25);
}

.step-dot.todo {
  background: var(--surface);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.step-label.on {
  color: var(--text);
}

.step-track {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  min-width: 16px;
}

.step-track.done {
  background: var(--success);
}

/* ============ TICKET ============ */
.ticket {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.ticket-head {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ticket-head::before {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -70px;
  right: -40px;
}

.ticket-head h2 {
  color: #fff;
  position: relative;
}

.ticket-head p {
  opacity: .8;
  font-size: 13px;
  position: relative;
  margin-top: 4px;
}

.ticket-body {
  padding: 20px;
  text-align: center;
}

.ticket-qr {
  width: 168px;
  height: 168px;
  margin: 12px auto;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.ticket-divider {
  border-top: 2px dashed var(--border);
  margin: 16px 0;
  position: relative;
}

.ticket-divider::before,
.ticket-divider::after {
  content: '';
  position: absolute;
  top: -10px;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
}

.ticket-divider::before {
  left: -20px;
}

.ticket-divider::after {
  right: -20px;
}

/* ============ GPS STATUS ============ */
.gps {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
}

.gps svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.gps.loading {
  background: var(--gold-bg);
  color: #975A16;
}

.gps.success {
  background: var(--success-bg);
  color: #276749;
}

.gps.error {
  background: var(--accent-bg);
  color: var(--danger);
}

/* ============ KV ROWS ============ */
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 14px;
}

.kv + .kv {
  border-top: 1px solid var(--border-2);
}

.kv .k {
  color: var(--text-2);
}

.kv .v {
  font-weight: 600;
  color: var(--text);
}

.kv-total {
  border-top: 1px solid var(--border) !important;
  font-weight: 800;
  font-size: 15px;
}

.kv-total .v {
  color: var(--gold);
}

/* ============ EMPTY STATE ============ */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
}

.empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: .4;
}

.empty h3 {
  color: var(--text-2);
  margin-bottom: 4px;
}

.empty p {
  font-size: 13px;
  margin-top: 4px;
}

/* ============ SPINNER / LOADER ============ */
.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-full {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 999;
  transform: translateX(-50%) translateY(-120%);
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  transition: transform .25s var(--ease);
  max-width: 90vw;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

/* ============ STAT CARDS (admin) ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 12px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.stat-accent .stat-value {
  color: var(--accent);
}

.stat-gold .stat-value {
  color: var(--gold);
}

.stat-success .stat-value {
  color: var(--success);
}

/* ============ ORDER CARD (admin) ============ */
.order {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 8px;
}

.order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.order-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.order-meta {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

.order-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-price {
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
}

.order-table {
  font-size: 11px;
  font-weight: 700;
  background: var(--success-light);
  color: #276749;
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.order-items {
  margin: 8px 0;
  padding: 8px 0;
  border-top: 1px solid var(--border-2);
  border-bottom: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--text-2);
}

/* ============ ICON BUTTON ============ */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: all var(--duration) var(--ease);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
}

.icon-btn-sm svg {
  width: 14px;
  height: 14px;
}

/* ============ FOOTER ============ */
.foot-note {
  text-align: center;
  padding: 20px 0 32px;
  font-size: 11px;
  color: var(--text-3);
}

/* ============ ADMIN DASHBOARD v2 ============ */

/* Page head */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 20px;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.page-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Stat cards (modern) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  transition: border-color var(--duration) var(--ease);
}
.stat-card:hover {
  border-color: var(--border-2);
}
.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg {
  width: 20px;
  height: 20px;
}
.stat-card-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat-card-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
  margin-top: 4px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.seg {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  font-family: inherit;
}
.seg:hover { color: var(--text); }
.seg.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.search-input {
  flex: 1;
  min-width: 180px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-input svg {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.search-input input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  background: var(--surface);
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--duration) var(--ease);
}
.search-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192,86,33,.08);
}

/* Data table */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow-x: auto;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table thead {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr {
  transition: background var(--duration) var(--ease);
}
.data-table tbody tr:hover {
  background: var(--surface-2);
}
.col-num { text-align: right; }
.col-action { text-align: right; }

.row-num {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.customer-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}
.customer-phone {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.order-id {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.time-cell {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.time-abs {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.time-rel {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.amount {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Status pills (refined) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-paid { background: var(--success-light); color: #166534; }
.status-paid .dot { background: var(--success); }
.status-pending { background: var(--gold-light); color: #92400E; }
.status-pending .dot { background: var(--gold); }
.status-cancelled { background: var(--rose-soft); color: #9F1239; }
.status-cancelled .dot { background: var(--rose); }

.table-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #E0F2F0;
  color: #0B5C56;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.muted-dash {
  color: var(--text-3);
  font-weight: 500;
}

.btn-assign {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--duration) var(--ease);
}
.btn-assign:hover {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

/* Skeleton / empty state */
.skeleton-row td {
  padding: 32px 16px !important;
  text-align: center;
  color: var(--text-3);
}
.loading-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.empty-row td { padding: 0 !important; }
.empty-state {
  padding: 48px 20px;
  text-align: center;
}
.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
}
.empty-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-sub {
  font-size: 13px;
  color: var(--text-2);
}

/* Pagination */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-btn, .page-num {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all var(--duration) var(--ease);
}
.page-btn:hover:not(:disabled), .page-num:hover {
  border-color: var(--text-2);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-num.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}
.page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 34px;
  color: var(--text-3);
  font-size: 13px;
}

@media (min-width: 700px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .data-table th, .data-table td { padding: 14px 20px; }
  .page-title { font-size: 30px; }
}

/* ============ EXPANDABLE ROW ============ */
.col-expand { width: 40px; text-align: center; }
.expand-chevron {
  color: var(--text-3);
  transition: transform var(--duration) var(--ease);
}
.data-row { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.data-row:hover { background: var(--surface-2); }
.data-row.row-warning {
  background: #FFFBEB;
  border-left: 3px solid var(--gold);
}
.data-row.row-open {
  background: var(--primary-bg);
}
.data-row.row-open .expand-chevron {
  transform: rotate(90deg);
  color: var(--primary);
}

.detail-row {
  background: var(--bg);
}
.detail-row > td {
  padding: 0 !important;
  border-bottom: 2px solid var(--primary) !important;
}
.order-detail {
  padding: 16px 20px 20px;
  background: var(--bg);
}
.detail-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 14px;
}
@media (min-width: 600px) {
  .detail-cols { grid-template-columns: 1.5fr 1fr; }
}
.detail-section h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin: 0 0 8px;
}
.detail-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-2);
}
.detail-kv:last-child { border-bottom: none; }
.detail-kv > span:first-child { color: var(--text-2); }
.detail-kv > span:last-child { color: var(--text); font-weight: 500; }
.detail-kv .mono { font-family: 'SF Mono', Menlo, monospace; font-size: 11px; color: var(--text-2); }

.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-2);
}
.item-row:last-child { border-bottom: none; }
.item-qty {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.item-name { flex: 1; color: var(--text); }
.item-price { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-detail-secondary {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.btn-detail-secondary:hover { background: var(--surface-2); }

/* ============ FLOW INFO PANEL ============ */
.flow-info {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.flow-info h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}
.flow-step strong { color: var(--text); }
.flow-step > div { color: var(--text-2); flex: 1; }
.flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.flow-note {
  font-size: 12px;
  color: var(--text-2);
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border-2);
}

.text-faint { color: var(--text-3); }
.text-xs { font-size: 11px; }

/* ============ TABLE GRID (assign table) ============ */
.table-grid-pick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.table-cell {
  background: #16A34A;
  color: white;
  padding: 12px 8px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
  user-select: none;
}
.table-cell:hover:not(.occupied) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}
.table-cell.occupied {
  background: #DC2626;
  cursor: not-allowed;
  opacity: 0.85;
}
.table-cell.selected {
  background: #2563EB;
  border-color: #93C5FD;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.table-num-big {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1;
}
.table-status-text {
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============ WALK-IN ORDER ============ */
.walkin-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: left;
  position: relative;
  color: var(--text);
}
.walkin-item:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}
.walkin-item.active {
  background: var(--primary-bg);
  border-color: var(--primary);
}
.walkin-item-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.walkin-item-price {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.walkin-item-qty {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.walkin-item.active .walkin-item-qty {
  background: var(--primary);
  color: white;
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: var(--surface);
  border-radius: 16px;
  max-width: 380px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 24px 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.92) translateY(8px);
  transition: transform 0.25s var(--ease);
}
.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}
.modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-icon svg { width: 26px; height: 26px; }
.modal-card.modal-info .modal-icon { background: #DBEAFE; color: #2563EB; }
.modal-card.modal-success .modal-icon { background: var(--success-light); color: var(--success); }
.modal-card.modal-danger .modal-icon { background: var(--danger-light); color: #C53030; }
.modal-card.modal-warn .modal-icon { background: #FEF3C7; color: #B45309; }

.modal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text);
}
.modal-msg {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0 0 18px;
}
.modal-body {
  text-align: left;
  margin-bottom: 18px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.modal-btn {
  flex: 1;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  border: 1px solid transparent;
}
.modal-btn-primary {
  background: var(--text);
  color: var(--surface);
}
.modal-btn-primary:hover { background: #1a1a2e; }
.modal-btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
}
.modal-btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.modal-card.modal-danger .modal-btn-primary { background: #C53030; }
.modal-card.modal-danger .modal-btn-primary:hover { background: #9B2C2C; }

.modal-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.modal-input:focus {
  outline: none;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}

/* ============ ANIMATIONS ============ */
.reveal {
  animation: rise .35s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-in {
  animation: pageIn .3s var(--ease) both;
}

@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn .3s var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp .3s var(--ease) both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .page-in,
  .fade-in,
  .slide-up {
    animation: none;
    opacity: 1;
  }

  .food-card:hover .food-card-img img {
    transform: none;
  }
}

/* ============ DESKTOP MEDIA QUERY ============ */
@media (min-width: 900px) {
  .page-shell {
    max-width: 1100px;
    padding: 0 32px 40px;
  }

  .container {
    max-width: 1100px;
    padding: 0 32px;
  }

  .page-content-desktop {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
  }

  #desktop-cart {
    position: sticky;
    top: 80px;
  }

  .bottom-bar {
    display: none !important;
  }

  .desktop-only {
    display: block !important;
  }

  .mobile-only {
    display: none !important;
  }

  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .slot-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 22px;
  }

  .hero-banner {
    height: 180px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .hero-content p {
    font-size: 13px;
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 899px) {
  .desktop-only {
    display: none !important;
  }
}

/* ============ MOBILE FIXES ============ */
@media (max-width: 899px) {
  body { padding-bottom: 80px; }
  .page-shell { padding-bottom: 120px; }
  .bottom-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .date-pill, .slot-card, .cat-chip, .btn, .field-input, .icon-btn { min-height: 44px; }

  /* Dashboard mobile */
  .page-head { margin-top: 16px; }
  .page-title { font-size: 22px; }
  .page-actions { width: 100%; justify-content: flex-end; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; gap: 10px; }
  .segmented { overflow-x: auto; width: 100%; justify-content: stretch; }
  .seg { flex: 1; }
  .search-input { width: 100%; }

  /* Hide less important columns on mobile */
  .data-table .col-order,
  .data-table th:nth-child(3),
  .data-table td:nth-child(3) { display: none; }
  .data-table .col-expand,
  .data-table th:last-child,
  .data-table td:last-child { display: none; }

  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 12px; }
  .customer-cell { gap: 8px; }
  .avatar { width: 32px; height: 32px; font-size: 11px; }
  .customer-name { font-size: 13px; }
  .customer-phone { font-size: 11px; }
  .amount { font-size: 13px; }
  .time-cell { flex-direction: row; gap: 4px; }
  .time-abs { font-size: 12px; }
  .time-rel { font-size: 11px; }
  .pagination-bar { flex-direction: column; align-items: center; gap: 8px; }
  .pagination-controls { justify-content: center; }
}

@media (hover: none) and (pointer: coarse) {
  .date-pill,
  .slot-card,
  .cat-chip,
  .food-card,
  .qty-btn,
  .icon-btn {
    min-height: 44px;
  }
}

/* ============ SETTINGS PAGE ============ */
.setting-tab { margin-top: 16px; }
