@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=DM+Sans:wght@400;500;600&display=swap');
/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* ── Desert Spice Theme ─── */
  --orange: #c2692a;
  --orange-light: #fdf0e0;
  --orange-hover: #5c2d0e;
  --bg: #fdf3e3;
  --white: #fffaf3;
  --border: #e8d5b7;
  --text: #2c1a0e;
  --text-muted: #8a6a4a;
  --text-sm: 0.875rem;
  --radius: 0.5rem;
  --shadow: 0 1px 3px rgba(92,45,14,0.12);
  --shadow-md: 0 4px 6px rgba(92,45,14,0.09);
  --green: #3a7d44; --green-bg: #edf7ee; --green-border: #b2ddb8;
  --red: #b91c1c; --red-bg: #fef2f2; --red-border: #fecaca;
  --blue: #1d6fa4; --blue-bg: #eff7ff; --blue-border: #bfdbfe;
  --yellow: #e8a840; --yellow-bg: #fffbeb; --yellow-border: #fde68a;
  --purple: #7c3aed; --purple-bg: #f5f3ff; --purple-border: #ddd6fe;
  --sidebar-w: 240px;
}
body { font-family: 'DM Sans', -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.5; }
button { cursor: pointer; font-family: inherit; border: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
a { text-decoration: none; color: inherit; }

/* ── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1rem; border-radius: var(--radius); font-size: var(--text-sm); font-weight: 500; transition: all 0.15s; }
.btn-primary { background: #89471b; color: #fff; }
.btn-primary:hover { background: var(--orange-hover); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.icon-btn { padding: 0.4rem; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg); }

/* ── Form Elements ───────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label { font-size: var(--text-sm); font-weight: 500; color: var(--text); }
.form-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; outline: none; font-size: var(--text-sm); transition: border-color 0.15s; }
.form-input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(234,88,12,0.1); }
.form-select { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; outline: none; font-size: var(--text-sm); 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='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; }
.form-select:focus { border-color: var(--orange); outline: none; }
.form-textarea { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; outline: none; font-size: var(--text-sm); resize: vertical; min-height: 80px; }
.form-textarea:focus { border-color: var(--orange); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { padding: 1rem 1.25rem 0.5rem; }
.card-title { font-size: 0.95rem; font-weight: 600; }
.card-content { padding: 0.5rem 1.25rem 1.25rem; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-gray { background: #f3f4f6; color: var(--text-muted); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.clickable-badge {cursor: pointer; transition: 0.2s;}
.clickable-badge:hover {opacity: 0.8;}

/* ── Toast ───────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.75rem 1.25rem; border-radius: var(--radius); color: #fff; font-size: var(--text-sm); font-weight: 500; box-shadow: var(--shadow-md); animation: slideIn 0.2s ease; min-width: 220px; }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--blue); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.2); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-lg { max-width: 680px; }
.modal-header { padding: 1.25rem 1.5rem 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.1rem; font-weight: 600; }
.modal-desc { font-size: var(--text-sm); color: var(--text-muted); margin-top: 0.2rem; }
.modal-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer { padding: 0 1.5rem 1.5rem; display: flex; justify-content: flex-end; gap: 0.5rem; }
.modal-close { background: none; border: none; font-size: 1.25rem; color: var(--text-muted); cursor: pointer; padding: 0.25rem; }

/* ── Landing Page ────────────────────────────────────────────── */
#page-landing { min-height: 100vh; background: linear-gradient(135deg, #fdf0e0 0%, #fffaf3 50%, #faebd0 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; }
.landing-header { text-align: center; margin-bottom: 2.5rem; }
.landing-logo { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.landing-logo-icon { width: 3rem; height: 3rem; background: var(--orange); border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; }
.landing-logo h1 { font-size: 2rem; font-weight: 700; }
.landing-logo p { color: var(--text-muted); }
.landing-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; max-width: 560px; width: 100%; }
.role-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; text-align: center; box-shadow: var(--shadow); }
.role-icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.5rem; font-size: 1.2rem; }
.role-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.2rem; }
.role-card p { font-size: 0.75rem; color: var(--text-muted); }
.auth-box { background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 420px; overflow: hidden; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tab { flex: 1; padding: 0.75rem; text-align: center; font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); cursor: pointer; background: none; border: none; border-bottom: 2px solid transparent; transition: all 0.15s; }
.auth-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.auth-panel { padding: 1.5rem; }
.demo-accounts { margin-top: 1rem; padding: 0.75rem; background: var(--bg); border-radius: var(--radius); font-size: 0.75rem; }
.demo-accounts p { font-weight: 500; margin-bottom: 0.35rem; }
.demo-accounts span { display: block; color: var(--text-muted); line-height: 1.8; }

/* ── App Shell ───────────────────────────────────────────────── */
#app-shell { display: flex; min-height: 100vh; max-width: 100vw; overflow-x: hidden; }
.sidebar { width: var(--sidebar-w); background: #89471b; border-right: 1px solid #4a2e18; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100; }
.sidebar-logo { padding: 1.25rem; display: flex; align-items: center; gap: 0.6rem; border-bottom: 1px solid #4a2e18; }
.sidebar-logo-icon { width: 2rem; height: 2rem; background: var(--orange); border-radius: 0.4rem; display: flex; align-items: center; justify-content: center; color: white; font-size: 1rem; flex-shrink: 0; }
.sidebar-logo span { font-weight: 700; font-size: 0.95rem; color: #fdf0e0; letter-spacing: 0.03em; }
.sidebar-title{ font-family: "Dancing Script", cursive; font-size: 50rem; font-optical-sizing: auto; font-style: normal;}
.sidebar-nav { flex: 1; padding: 0.75rem 0.5rem; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem; border-radius: var(--radius); font-size: var(--text-sm); font-weight: 500; color: black; cursor: pointer; transition: all 0.15s; margin-bottom: 0.1rem; border: none; background: none; width: 100%; }
.nav-item:hover { background: var(--orange-hover); color: white;}
.nav-item.active { background:var(--orange-hover); color: white; }
.nav-item svg { flex-shrink: 0; }
.sidebar-footer { padding: 1rem; border-top: 1px solid #4a2e18; }
.user-info { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.user-avatar { width: 2rem; height: 2rem; background: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.8rem; font-weight: 600; flex-shrink: 0; }
.user-name { font-size: var(--text-sm); font-weight: 500; color: #fdf0e0; }
.user-role { font-size: 0.75rem; color: #c4a882; text-transform: capitalize; }
.main-content { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; min-width: 0; max-width: 100%; }
.page-content { padding: 2rem; }
.page-header { margin-bottom: 2rem; display: flex; align-items: flex-start; justify-content: space-between; }
.page-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.25rem; font-family: 'Lora', Georgia, serif; color: #2c1a0e; }
.page-header p { color: var(--text-muted); font-size: var(--text-sm); }

/* ── Staff Portal ────────────────────────────────────────────── */
.staff-header { background: white; border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.staff-header h1 { font-size: 1.1rem; font-weight: 700; }
.staff-content { padding: 1.5rem; }

/* ── Stats Grid ──────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.stat-label { font-size: var(--text-sm); color: var(--text-muted); font-weight: 500; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; }
.stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Tables Grid ─────────────────────────────────────────────── */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.table-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; cursor: pointer; transition: all 0.15s; }
.table-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.table-card.occupied { border-color: #fca5a5; background: #fff5f5; }
.table-card.available { border-color: #86efac; }
.table-card.reserved { border-color: #fcd34d; background: #fffbeb; }
.table-status-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; margin-right: 0.4rem; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.dot-yellow { background: var(--yellow); }

/* ── Orders ──────────────────────────────────────────────────── */
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.order-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.order-card-header { padding: 1rem 1.25rem 0.5rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.order-card-body { padding: 1rem 1.25rem; }
.order-item-row { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6; }
.order-item-row:last-child { border-bottom: none; }
.item-status-btns { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.35rem; }
.item-status-btn { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); background: #f9fafb; color: var(--text-muted); cursor: pointer; }
.item-status-btn.active-pending { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow-border); }
.item-status-btn.active-preparing { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); }
.item-status-btn.active-ready { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.item-status-btn.active-served { background: #f3f4f6; color: var(--text-muted); }
.order-total { display: flex; justify-content: space-between; font-weight: 700; padding-top: 0.75rem; margin-top: 0.5rem; border-top: 1px solid var(--border); font-size: 1.1rem; }
.order-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* ── Menu ────────────────────────────────────────────────────── */
.menu-category { margin-bottom: 2rem; }
.menu-category h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.menu-category-tabs { display:flex; flex-wrap:wrap; gap:0.5rem; margin-bottom:1.25rem; }
.category-tab {
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.category-tab:hover { background: var(--orange-light); }
.category-tab.active { background: var(--orange); color: white; border-color: var(--orange); }
.menu-item-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.menu-item-top { display: flex; justify-content: space-between; align-items: flex-start; }
.menu-item-name { font-weight: 600; }
.menu-item-desc { font-size: var(--text-sm); color: var(--text-muted); flex: 1; }
.menu-item-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 0.25rem; }
.menu-item-price { font-size: 1.1rem; font-weight: 700; color: var(--orange); }
.menu-item-actions { display: flex; gap: 0.35rem; }

/* ── Staff ───────────────────────────────────────────────────── */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.staff-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.staff-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.staff-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 1rem; flex-shrink: 0; }
.staff-info { margin-left: 0.75rem; }
.staff-name { font-weight: 600; }
.staff-role-text { font-size: var(--text-sm); color: var(--text-muted); text-transform: capitalize; }
.staff-detail-row { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 0.35rem; }
.staff-card-actions { display: flex; gap: 0.35rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ── Kitchen View ────────────────────────────────────────────── */
.kitchen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.kitchen-card { background: white; border: 2px solid var(--border); border-radius: var(--radius); }
.kitchen-card-header { padding: 0.75rem 1rem; background: var(--bg); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.kitchen-item { padding: 0.75rem 1rem; border-bottom: 1px solid #f3f4f6; }
.kitchen-item:last-child { border-bottom: none; }
.kitchen-item-name { font-weight: 500; margin-bottom: 0.35rem; }

/* ── Loading ─────────────────────────────────────────────────── */
#loading-screen { position: fixed; inset: 0; background: #fdf0e0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; }
.spinner { width: 2.5rem; height: 2.5rem; border: 3px solid #e8c9a0; border-top-color: var(--orange); border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; gap: 0.25rem; }
.tab-btn { padding: 0.5rem 1rem; font-size: var(--text-sm); font-weight: 500; color: var(--text-muted); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.15s; }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 1rem 0; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state p { margin-bottom: 1rem; font-size: 1.05rem; }

/* ── Two column layout ───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* ── Mobile hamburger toggle button ──────────────────────────── */
.mobile-menu-btn {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  background: var(--orange);
  color: white;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--bg);
  padding: 0.75rem 1rem;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.mobile-topbar h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .orders-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 150;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open ~ .sidebar-overlay,
  body.sidebar-open .sidebar-overlay { display: block; }

  .main-content { margin-left: 0; width: 100%; max-width: 100vw; overflow-x: hidden; }
  .mobile-menu-btn { display: flex; }
  .page-content { padding: 1rem; }
  .mobile-topbar { display: flex; }
  .page-header { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .page-header > div:last-child { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .page-header h1 { display: none; }
  .staff-header { padding: 0.75rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
  .staff-content { padding: 1rem; }

  .landing-roles { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }

  .stats-grid,
  .stats-grid[style] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }
  .tables-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .orders-grid, .menu-grid, .staff-grid, .kitchen-grid {
    grid-template-columns: 1fr;
  }

  .modal { max-width: 95vw; max-height: 92vh; margin: 0 0.5rem; }
  .modal-lg { max-width: 95vw; }
  .modal-header { padding: 1rem 1rem 0; flex-wrap: wrap; gap: 0.5rem; }
  .modal-body { padding: 1rem; }
  .modal-footer { padding: 0 1rem 1rem; flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; min-width: 120px; }

  /* Tab bars (cashier portal billing/takeaway/reservation tabs) */
  div[style*="border-bottom:2px solid var(--border)"][style*="display:flex"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Inline 3 / 4 column grids used in waiter, cashier, kitchen JS views */
  div[style*="grid-template-columns:repeat(3,1fr)"],
  div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  div[style*="grid-template-columns:1fr 1fr 1fr auto"] {
    grid-template-columns: 1fr !important;
  }

  .order-card-body { padding: 0.85rem; }
  .item-status-btns { gap: 0.2rem; }
  .item-status-btn { font-size: 0.7rem; padding: 0.2rem 0.45rem; }
  .order-actions { flex-direction: column; }

  #page-landing { padding: 1.25rem; }

  table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
  .stats-grid,
  .stats-grid[style] { grid-template-columns: 1fr !important; }
  .page-header h1 { font-size: 1.3rem; }
  .sidebar-title h1 { font-size: 1.1rem; }
  .staff-header { padding-left: 1rem; }
}

/* ── Payment System ─────────────────────────────────── */
.badge-red { background: #fee2e2; color: #dc2626; }
.dot-red   { background: #dc2626; }

.pay-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  background: white;
  transition: all 0.15s;
  flex: 1;
}
.pay-method-btn:hover { border-color: var(--orange); }
.pay-method-btn.active { border-color: var(--orange); background: #fff7ed; color: var(--orange); }

#qr-canvas-container img {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}