/* ===== SMART-DINE DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --sd-bg-start: #e8eaf6;
  --sd-bg-mid: #ede7f6;
  --sd-bg-end: #e3f2fd;
  --sd-glass-bg: rgba(255, 255, 255, 0.55);
  --sd-glass-border: rgba(255, 255, 255, 0.35);
  --sd-glass-shadow: 0 8px 32px rgba(100, 100, 140, 0.10);
  --sd-glass-blur: blur(16px);
  --sd-text-primary: #1a1a2e;
  --sd-text-secondary: #6b7280;
  --sd-text-muted: #9ca3af;
  --sd-accent-violet: #7c3aed;
  --sd-accent-indigo: #4f46e5;
  --sd-accent-gradient: linear-gradient(135deg, #7c3aed, #4f46e5);
  --sd-accent-glow: 0 4px 20px rgba(124, 58, 237, 0.35);
  --sd-success: #10b981;
  --sd-warning: #f59e0b;
  --sd-danger: #ef4444;
  --sd-radius: 1rem;
  --sd-radius-sm: 0.75rem;
  --sd-radius-pill: 9999px;
  --sd-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--sd-text-primary);
  min-height: 100vh;
  background: var(--sd-bg-start);
  background-image:
    radial-gradient(ellipse at 20% 50%, var(--sd-bg-mid), transparent 60%),
    radial-gradient(ellipse at 80% 20%, var(--sd-bg-end), transparent 50%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

#root { max-width: 1000px; margin: 0 auto; padding: 1.5rem; }

/* Utilities */
.glass-card {
  background: var(--sd-glass-bg);
  backdrop-filter: var(--sd-glass-blur);
  border: 1px solid var(--sd-glass-border);
  border-radius: var(--sd-radius);
  box-shadow: var(--sd-glass-shadow);
  padding: 1.5rem;
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 2rem; background: var(--sd-accent-gradient); color: #fff;
  border: none; border-radius: var(--sd-radius-sm); font-weight: 600; cursor: pointer;
  transition: var(--sd-transition); box-shadow: var(--sd-accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1.25rem;
  background: transparent; color: var(--sd-accent-violet);
  border: 1.5px solid var(--sd-accent-violet); border-radius: var(--sd-radius-sm);
  font-weight: 600; cursor: pointer; transition: var(--sd-transition);
}
.btn-outline:hover { background: var(--sd-accent-gradient); color: #fff; border-color: transparent; }

/* Navigation */
.nav-floating {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 0.75rem 1.5rem; margin-bottom: 2.5rem; width: fit-content; margin-inline: auto;
}
.nav-brand { font-weight: 800; font-size: 1.25rem; background: var(--sd-accent-gradient); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-right: 1rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem;
  background: transparent; border: none; border-radius: var(--sd-radius-sm);
  color: var(--sd-text-secondary); font-weight: 500; cursor: pointer; transition: var(--sd-transition);
}
.nav-link.active { background: #fff; color: var(--sd-accent-violet); font-weight: 600; }
.nav-link i { width: 16px; height: 16px; }

/* Layouts & Pages */
.dashboard-header, .planner-header, .kds-header { margin-bottom: 2rem; text-align: center; }
.dashboard-header .avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--sd-accent-gradient); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; margin: 0 auto 1rem auto; }
.dashboard-header p, .planner-header p { color: var(--sd-text-muted); margin-top: 0.5rem; }

.segmented-control { display: flex; background: rgba(0,0,0,0.05); padding: 0.25rem; border-radius: var(--sd-radius-pill); margin-bottom: 2rem; }
.segmented-control button { flex: 1; padding: 0.75rem; border: none; background: transparent; border-radius: var(--sd-radius-pill); cursor: pointer; font-weight: 600; color: var(--sd-text-secondary); transition: var(--sd-transition); }
.segmented-control button.active { background: white; color: var(--sd-accent-violet); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.metric-card { display: flex; flex-direction: column; justify-content: center; }
.metric-card.full-width { grid-column: 1 / -1; }
.metric-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: white; }
.metric-icon.violet { background: var(--sd-accent-violet); }
.metric-icon.amber { background: var(--sd-warning); }
.metric-icon.emerald { background: var(--sd-success); }
.metric-label { font-size: 0.9rem; color: var(--sd-text-secondary); margin-bottom: 0.25rem; }
.metric-value { font-size: 2rem; font-weight: 700; color: var(--sd-text-primary); }
.seats-row { display: flex; align-items: center; justify-content: space-between; }

/* Progress Ring */
.progress-ring-bg { stroke: #e5e7eb; }
.progress-ring-fill { stroke: var(--sd-accent-violet); transition: stroke-dashoffset 0.6s ease; }

.status-row { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; background: white; border-radius: var(--sd-radius-sm); font-weight: 500; }
.badge-glow { padding: 0.35rem 0.8rem; border-radius: var(--sd-radius-pill); font-size: 0.8rem; display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; }
.badge-glow.success { background: rgba(16, 185, 129, 0.15); color: var(--sd-success); }
.badge-glow.warning { background: rgba(245, 158, 11, 0.15); color: var(--sd-warning); }
.badge-glow.danger { background: rgba(239, 68, 68, 0.15); color: var(--sd-danger); }

#my-orders-section { margin-bottom: 1rem; }

/* Forms & KDS */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--sd-text-secondary); }
.form-input { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid rgba(0,0,0,0.12); border-radius: var(--sd-radius-sm); background: white; font-family: inherit; outline: none; font-size: 0.95rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form-input:focus { border-color: var(--sd-accent-violet); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.input-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--sd-text-secondary); }
.date-shortcut-row, .quick-time-row { display: flex; gap: 0.4rem; margin-top: 0.6rem; flex-wrap: wrap; }
.quick-time-btn, .date-shortcut-btn { padding: 0.25rem 0.65rem; border: 1.5px solid rgba(124, 58, 237, 0.3); border-radius: var(--sd-radius-pill); background: transparent; font-family: inherit; font-size: 0.75rem; font-weight: 600; color: var(--sd-accent-violet); cursor: pointer; transition: var(--sd-transition); }
.quick-time-btn:hover, .date-shortcut-btn:hover { background: rgba(124, 58, 237, 0.08); }
.quick-time-btn.active, .date-shortcut-btn.active { background: var(--sd-accent-violet); color: white; border-color: var(--sd-accent-violet); box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3); }
.select-wrap { position: relative; }
.select-wrap select.form-input { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.select-arrow { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--sd-text-muted); pointer-events: none; }
.prediction-metrics { display: flex; gap: 2rem; margin-bottom: 1rem; }

/* Keep calendar popup above prediction graph/card */
.planner-form {
  position: relative;
  z-index: 30;
  overflow: visible;
}

#prediction-result {
  position: relative;
  z-index: 1;
}

/* Custom Calendar Picker */
.custom-date-picker { position: relative; }
.date-trigger { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid rgba(0,0,0,0.12); border-radius: var(--sd-radius-sm); background: white; font-family: inherit; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; color: var(--sd-text-primary); transition: border-color 0.2s, box-shadow 0.2s; }
.date-trigger:hover, .date-trigger.open { border-color: var(--sd-accent-violet); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.calendar-popup { display: none; position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; background: white; border: 1.5px solid rgba(124,58,237,0.2); border-radius: var(--sd-radius); box-shadow: 0 8px 30px rgba(100,100,140,0.18); z-index: 999; padding: 1rem; }
.calendar-popup.open { display: block; animation: slideUp 0.2s ease; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.cal-nav-btn { width: 32px; height: 32px; border: none; background: rgba(124,58,237,0.08); border-radius: 8px; cursor: pointer; font-size: 1.3rem; color: var(--sd-accent-violet); display: flex; align-items: center; justify-content: center; line-height: 1; transition: background 0.2s; }
.cal-nav-btn:hover { background: rgba(124,58,237,0.16); }
.cal-title { text-align: center; }
.cal-title > span { font-weight: 700; font-size: 1rem; display: block; color: var(--sd-text-primary); }
.cal-year-ctrl { display: flex; align-items: center; gap: 0.4rem; justify-content: center; margin-top: 0.2rem; }
.cal-yr-arrow { border: none; background: none; cursor: pointer; font-size: 1rem; color: var(--sd-accent-violet); padding: 0 0.2rem; font-weight: 700; line-height: 1; }
#cal-year-display { font-size: 0.85rem; font-weight: 600; color: var(--sd-text-secondary); min-width: 34px; text-align: center; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 0.4rem; }
.cal-weekdays span { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--sd-text-muted); padding: 0.25rem 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(6, 1fr); gap: 5px; }
.cal-day { height: 34px; width: 100%; border: none; background: transparent; border-radius: 7px; font-family: inherit; font-size: 0.82rem; cursor: pointer; color: var(--sd-text-primary); display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; }
.cal-empty { height: 34px; width: 100%; background: transparent; border: none; pointer-events: none; }
.cal-day:hover:not([disabled]) { background: rgba(124,58,237,0.1); color: var(--sd-accent-violet); }
.cal-day.today { font-weight: 700; color: var(--sd-accent-violet); }
.cal-day.selected { background: #10b981 !important; color: white !important; box-shadow: 0 2px 8px rgba(16,185,129,0.35); }
.cal-day.past, .cal-day[disabled] { color: rgba(0,0,0,0.2); cursor: not-allowed; }

.disabled-date {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

/* Drum Time Picker */
.drum-picker { display: flex; align-items: center; height: 132px; background: white; border: 1.5px solid rgba(0,0,0,0.12); border-radius: var(--sd-radius-sm); overflow: hidden; position: relative; transition: border-color 0.2s, box-shadow 0.2s; }
.drum-picker:focus-within { border-color: var(--sd-accent-violet); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.drum-col { flex: 1; height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.drum-col::-webkit-scrollbar { display: none; }
.drum-item { height: 44px; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; font-size: 1rem; font-weight: 500; color: var(--sd-text-secondary); cursor: pointer; user-select: none; }
.drum-sep { flex-shrink: 0; font-size: 1.5rem; font-weight: 800; color: var(--sd-text-primary); padding: 0 0.4rem; z-index: 2; }
.drum-highlight { position: absolute; top: 50%; left: 0; right: 0; height: 44px; transform: translateY(-50%); background: rgba(124,58,237,0.07); border-top: 1.5px solid rgba(124,58,237,0.25); border-bottom: 1.5px solid rgba(124,58,237,0.25); pointer-events: none; z-index: 1; }
.drum-picker::before, .drum-picker::after { content: ''; position: absolute; left: 0; right: 0; height: 44px; z-index: 2; pointer-events: none; }
.drum-picker::before { top: 0; background: linear-gradient(to bottom, white 40%, transparent); }
.drum-picker::after { bottom: 0; background: linear-gradient(to top, white 40%, transparent); }

.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.order-card .order-top { display: flex; justify-content: space-between; margin-bottom: 1rem; font-weight: 600; }
.order-id { color: var(--sd-accent-violet); }
.order-detail { font-size: 0.85rem; color: var(--sd-text-secondary); margin-bottom: 0.5rem; }
.order-items { font-size: 1.1rem; font-weight: 500; margin-bottom: 1.5rem; }

.card {
  background: var(--sd-glass-bg);
  backdrop-filter: var(--sd-glass-blur);
  border: 1px solid var(--sd-glass-border);
  border-radius: var(--sd-radius);
  box-shadow: var(--sd-glass-shadow);
  padding: 1.5rem;
}

.order-list { list-style: none; padding: 0; margin: 0; }
[id^="completed-orders-list-"] {
  max-height: 220px;
  overflow-y: auto;
}
.order-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; margin-bottom: 8px; background: #f8f9fa; border-radius: 8px; border-left: 4px solid #ccc; }
.order-item.preparing { border-left-color: #f59e0b; }
.order-item.served { border-left-color: #10b981; }
.badge { padding: 4px 8px; border-radius: 12px; font-size: 0.8rem; font-weight: bold; }
.badge.preparing { background: #fef3c7; color: #d97706; }
.badge.served { background: #d1fae5; color: #059669; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.orders-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.order-section-card h3 { font-size: 1.1rem; }
.order-section-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.order-subtitle { font-size: 0.78rem; color: var(--sd-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.35rem; }
.serve-notice {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--sd-radius-pill);
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Animations */
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ===== MOBILE — LIVE DASHBOARD ===== */
@media (max-width: 640px) {
  /* Give page bottom clearance for the fixed nav bar */
  #root { padding: 1rem 0.75rem 6rem; }

  /* Sticky bottom tab bar */
  .nav-floating {
    position: fixed; bottom: 0; left: 0; right: 0;
    width: 100%; margin: 0; border-radius: 1.25rem 1.25rem 0 0;
    padding: 0.4rem 0.5rem 0.6rem; justify-content: space-around; gap: 0;
    z-index: 200; border-bottom: none;
  }
  .nav-brand { display: none; }
  .nav-link {
    flex: 1; flex-direction: column; align-items: center;
    gap: 0.15rem; padding: 0.45rem 0.25rem; border-radius: 0.75rem;
  }
  .nav-link i { width: 22px; height: 22px; }
  .nav-label { font-size: 0.62rem; font-weight: 600; line-height: 1; }

  /* Dashboard header: row layout, tighter */
  .dashboard-header {
    display: flex; flex-direction: row; align-items: center;
    gap: 0.875rem; text-align: left; margin-bottom: 1.25rem;
  }
  .dashboard-header .avatar {
    margin: 0; flex-shrink: 0;
    width: 42px; height: 42px; font-size: 0.95rem;
  }
  .dashboard-header h1 { font-size: 1.05rem; line-height: 1.3; }
  .dashboard-header p { font-size: 0.72rem; margin-top: 0.2rem; }

  /* Segmented control */
  .segmented-control { margin-bottom: 1rem; }
  .segmented-control button { padding: 0.6rem 0.25rem; font-size: 0.82rem; }

  /* Bento grid: strict 2-column on mobile */
  .bento-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
  .glass-card { padding: 1.1rem; }
  .metric-icon { width: 30px; height: 30px; border-radius: 8px; margin-bottom: 0.6rem; }
  .metric-label { font-size: 0.75rem; }
  .metric-value { font-size: 1.5rem; }

  /* Seats card: shrink the progress ring */
  .seats-row svg { width: 56px; height: 56px; }
  .seats-row svg text { font-size: 14px; }

  /* Status row */
  .status-row { padding: 0.8rem 1rem; font-size: 0.85rem; }
  .badge-glow { font-size: 0.75rem; padding: 0.3rem 0.65rem; }

  /* Join Queue button full-width tap target */
  .action-section { margin-top: 1.25rem; }
  .action-section .btn-primary { width: 100%; padding: 1rem; font-size: 1rem; border-radius: var(--sd-radius); }

  /* ── Future Planner ── */
  /* Header */
  .planner-header h1 { font-size: 1.25rem; }
  .planner-header p   { font-size: 0.8rem; }

  /* Stack the two-column form grid to single column */
  .form-grid { grid-template-columns: 1fr; gap: 1rem; }
  .form-group.full { grid-column: 1; }

  /* Calendar popup: prevent overflow beyond screen edges */
  .calendar-popup { left: 0; right: 0; padding: 0.75rem; }
  .cal-day { height: 36px; font-size: 0.8rem; }

  /* Drum picker: slightly shorter on small screens */
  .drum-picker { height: 120px; }
  .drum-item  { height: 40px; font-size: 0.9rem; }
  .drum-highlight { height: 40px; }

  /* Date shortcut pills: wrap and fill row */
  .date-shortcut-row { gap: 0.5rem; }
  .date-shortcut-btn { flex: 1; text-align: center; padding: 0.35rem 0.4rem; }

  /* Predict button */
  #predict-btn { padding: 1rem; font-size: 1rem; border-radius: var(--sd-radius); }

  /* Result card: metrics side-by-side, equal width */
  .prediction-metrics { gap: 0; }
  .pred-metric { flex: 1; text-align: center; padding: 0.5rem; }
  .pred-metric h3 { font-size: 1.6rem; }
  .pred-metric p  { font-size: 0.72rem; color: var(--sd-text-muted); margin-top: 0.2rem; }

  /* Chart height reduced to avoid too much vertical scroll */
  .chart-container { height: 160px !important; }

  /* Result card top margin */
  #prediction-result { margin-top: 1rem !important; }

  /* ── Staff KDS ── */
  /* Header */
  .kds-header h1 { font-size: 1.25rem; }

  /* Summary stat bar: full-width, equal columns, tighter gap */
  .kds-summary { gap: 0 !important; margin-bottom: 1.25rem !important; padding: 1rem !important; }
  .kds-stat { flex: 1; text-align: center; }
  .kds-stat h3 { font-size: 1.6rem; font-weight: 700; color: var(--sd-text-primary); }
  .kds-stat p  { font-size: 0.72rem; color: var(--sd-text-muted); margin-top: 0.2rem; display: flex; align-items: center; justify-content: center; gap: 0.3rem; }

  /* Order grid: single column so cards are fully readable */
  .kds-grid { grid-template-columns: 1fr; gap: 0.75rem; }

  /* Order cards: bigger Mark Served tap target */
  .order-card { padding: 1rem; }
  .order-card .btn-outline { padding: 0.875rem; font-size: 0.95rem; }

  /* Toast: lift above the fixed bottom nav */
  .toast-container { bottom: 5.5rem; right: 1rem; left: 1rem; align-items: stretch; }
  .toast { text-align: center; }
}
.slide-up { opacity: 0; animation: slideUp 0.5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Toast */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: var(--sd-success); color: white; padding: 1rem 1.5rem; border-radius: var(--sd-radius-sm); font-weight: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: slideUp 0.3s ease forwards; }

.order-card { transition: all 0.3s ease; border-left: 6px solid transparent; }
.order-card.warning { border-left-color: #f59e0b; background: #fffbeb; }
.order-card.urgent { border-left-color: #ef4444; background: #fef2f2; animation: pulseUrgent 2s infinite; }
@keyframes pulseUrgent {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--sd-radius-sm);
}
.skeleton-order-card {
    height: 56px;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== MASTER MENU — SHARED BADGES ===== */
.badge-available {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.75rem; border-radius: var(--sd-radius-pill);
    font-size: 0.78rem; font-weight: 700;
    background: rgba(16, 185, 129, 0.15); color: #059669;
    white-space: nowrap;
}
.badge-sold-out {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.75rem; border-radius: var(--sd-radius-pill);
    font-size: 0.78rem; font-weight: 700;
    background: rgba(239, 68, 68, 0.15); color: #dc2626;
    white-space: nowrap;
}

/* ===== MASTER MENU — KDS Staff Section ===== */
#manage-menu-section {
    margin-top: 2rem;
}
#manage-menu-section h3 {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.menu-add-form {
    display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.menu-add-form .form-input { flex: 1; min-width: 140px; }
.menu-add-form button { flex-shrink: 0; }

.menu-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.menu-table th {
    text-align: left; padding: 0.5rem 0.75rem; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--sd-text-muted); border-bottom: 1.5px solid rgba(0,0,0,0.06);
}
.menu-table td { padding: 0.75rem 0.75rem; border-bottom: 1px solid rgba(0,0,0,0.05); vertical-align: middle; }
.menu-table tr:last-child td { border-bottom: none; }
.menu-table tr:hover td { background: rgba(124, 58, 237, 0.04); }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #e5e7eb; border-radius: 999px; transition: background 0.25s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    background: white; top: 3px; left: 3px; transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: #10b981; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.menu-delete-btn {
    background: none; border: none; cursor: pointer; padding: 0.35rem 0.5rem;
    border-radius: 6px; color: var(--sd-text-muted); font-size: 1rem;
    transition: background 0.2s, color 0.2s;
}
.menu-delete-btn:hover { background: rgba(239,68,68,0.1); color: var(--sd-danger); }

/* ===== MASTER MENU — Student Dashboard ===== */
#student-menu-container {
    margin-top: 2rem;
    background: var(--sd-glass-bg);
    backdrop-filter: var(--sd-glass-blur);
    border: 1px solid var(--sd-glass-border);
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-glass-shadow);
    padding: 1.5rem;
}
#student-menu-container h4 {
    font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--sd-text-muted); margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
#student-menu-container h4 i {
    background: var(--sd-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.menu-item-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem;
}
.menu-item-pill {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    border: 1.5px solid var(--sd-glass-border);
    border-radius: var(--sd-radius-sm);
    padding: 1rem 1.1rem;
    display: flex; flex-direction: column; gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.08);
}
.menu-item-pill::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--sd-accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.menu-item-pill:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
    border-color: var(--sd-accent-violet);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
}
.menu-item-pill:hover::before { opacity: 0.05; }
.menu-item-pill .item-name {
    font-weight: 700; font-size: 0.95rem; color: var(--sd-text-primary);
    line-height: 1.3;
}
.menu-item-pill .item-price {
    font-size: 1rem; font-weight: 800;
    background: var(--sd-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.menu-item-pill .availability-badge {
    font-size: 0.75rem; font-weight: 700;
    padding: 0.4rem 0.65rem;
    border-radius: var(--sd-radius-pill);
    display: inline-flex; align-items: center; gap: 0.4rem;
    width: fit-content;
    transition: all 0.2s ease;
}
.menu-item-pill .badge-available {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.menu-item-pill .badge-available i {
    width: 14px; height: 14px;
}
.menu-item-pill .badge-sold-out {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.25);
    opacity: 0.75;
}
.menu-item-pill .badge-sold-out i {
    width: 14px; height: 14px;
}
.menu-item-pill:hover .badge-available {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
}
.menu-item-pill:hover .badge-sold-out {
    opacity: 1;
}

@media (max-width: 640px) {
    .menu-add-form { flex-direction: column; }
    .menu-item-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    #student-menu-container { padding: 1.25rem; margin-top: 1.5rem; }
}