/* ============================================================
   Easy Restaurant — Enhanced Design System v3.0
   Full Responsive + Multi-Theme Design Selector
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ============================================================
   DEFAULT THEME (Clean Modern Blue)
   ============================================================ */
:root {
  --primary:        #2563EB;
  --primary-dark:   #1D4ED8;
  --primary-light:  rgba(37,99,235,0.08);
  --primary-mid:    rgba(37,99,235,0.15);

  --surface:        #FFFFFF;
  --background:     #F8FAFC;
  --background-2:   #F1F5F9;

  --border:         rgba(0,0,0,0.08);
  --border-solid:   #E2E8F0;

  --text-primary:   #0F172A;
  --text-secondary: #64748B;
  --text-hint:      #94A3B8;

  --success:        #16A34A;
  --success-bg:     #F0FDF4;
  --success-border: #BBF7D0;
  --warning:        #D97706;
  --warning-bg:     #FFFBEB;
  --warning-border: #FDE68A;
  --danger:         #DC2626;
  --danger-bg:      #FEF2F2;
  --danger-border:  #FECACA;
  --info:           #0284C7;
  --info-bg:        #F0F9FF;
  --info-border:    #BAE6FD;

  --sidebar-width:  240px;
  --header-height:  64px;
  --border-radius:  8px;
  --card-radius:    12px;
  --transition:     0.15s ease;
  --font-body:      'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Button styles */
  --btn-radius:     8px;
  --btn-transform:  none;

  /* Card styles */
  --card-shadow:    0 1px 4px rgba(0,0,0,0.06), 0 0 0 0.5px rgba(0,0,0,0.06);
  --card-hover-shadow: 0 4px 20px rgba(0,0,0,0.10);

  /* Sidebar */
  --sidebar-bg:     #FFFFFF;
  --sidebar-border: 1px solid rgba(0,0,0,0.08);
  --nav-active-bg:  var(--primary-light);
  --nav-active-color: var(--primary);
}

/* ============================================================
   THEME: Foodpanda (Vibrant Pink/Magenta)
   ============================================================ */
[data-design="foodpanda"] {
  --primary:        #F91880;
  --primary-dark:   #D60070;
  --primary-light:  rgba(249,24,128,0.08);
  --primary-mid:    rgba(249,24,128,0.15);
  --font-body:      'DM Sans', sans-serif;
  --btn-radius:     24px;
  --btn-transform:  none;
  --card-radius:    16px;
  --sidebar-bg:     #1A0A2E;
  --sidebar-border: none;
  --nav-active-bg:  rgba(249,24,128,0.15);
  --nav-active-color: #F91880;
  --text-primary:   #1A0A2E;
}
[data-design="foodpanda"] .sidebar {
  background: #1A0A2E !important;
  border-right: none !important;
}
[data-design="foodpanda"] .sidebar * { color: rgba(255,255,255,0.85) !important; }
[data-design="foodpanda"] .nav-item.active,
[data-design="foodpanda"] .nav-item:hover { background: rgba(249,24,128,0.2) !important; color: #F91880 !important; }
[data-design="foodpanda"] .nav-item.active { color: #F91880 !important; }
[data-design="foodpanda"] .nav-item.active * { color: #F91880 !important; }
[data-design="foodpanda"] .sidebar-brand-name { color: #fff !important; }
[data-design="foodpanda"] .nav-section-label { color: rgba(255,255,255,0.35) !important; }
[data-design="foodpanda"] .sidebar-footer { border-top-color: rgba(255,255,255,0.1) !important; }
[data-design="foodpanda"] .btn-primary { background: linear-gradient(135deg, #F91880, #C0007A) !important; border-radius: 24px !important; box-shadow: 0 4px 15px rgba(249,24,128,0.35) !important; }
[data-design="foodpanda"] .card { border-radius: 16px !important; border: none !important; box-shadow: 0 2px 16px rgba(0,0,0,0.08) !important; }
[data-design="foodpanda"] .stat-card { border-radius: 16px !important; border: none !important; box-shadow: 0 2px 16px rgba(0,0,0,0.08) !important; }
[data-design="foodpanda"] .topbar { border-bottom: none !important; box-shadow: 0 1px 8px rgba(0,0,0,0.08) !important; }

/* ============================================================
   THEME: Uber Eats (Black & Fresh Green)
   ============================================================ */
[data-design="ubereats"] {
  --primary:        #06C167;
  --primary-dark:   #049852;
  --primary-light:  rgba(6,193,103,0.08);
  --primary-mid:    rgba(6,193,103,0.15);
  --font-body:      'DM Sans', sans-serif;
  --btn-radius:     6px;
  --card-radius:    10px;
  --background:     #F6F6F6;
  --sidebar-bg:     #000000;
  --sidebar-border: none;
  --nav-active-bg:  rgba(255,255,255,0.12);
  --nav-active-color: #FFFFFF;
}
[data-design="ubereats"] .sidebar {
  background: #000 !important;
  border-right: none !important;
}
[data-design="ubereats"] .sidebar * { color: rgba(255,255,255,0.75) !important; }
[data-design="ubereats"] .nav-item:hover { background: rgba(255,255,255,0.08) !important; color: #fff !important; }
[data-design="ubereats"] .nav-item.active { background: rgba(255,255,255,0.12) !important; color: #fff !important; border-left: 3px solid #06C167 !important; }
[data-design="ubereats"] .nav-item.active * { color: #fff !important; }
[data-design="ubereats"] .sidebar-brand-name { color: #fff !important; font-weight: 700 !important; }
[data-design="ubereats"] .nav-section-label { color: rgba(255,255,255,0.3) !important; }
[data-design="ubereats"] .sidebar-footer { border-top-color: rgba(255,255,255,0.1) !important; }
[data-design="ubereats"] .btn-primary { background: #06C167 !important; color: #000 !important; font-weight: 700 !important; border-radius: 6px !important; }
[data-design="ubereats"] .btn-primary:hover { background: #049852 !important; }
[data-design="ubereats"] .topbar { border-bottom: 2px solid #000 !important; }

/* ============================================================
   THEME: Minimal Restaurant (Clean White/Slate)
   ============================================================ */
[data-design="minimal"] {
  --primary:        #0F172A;
  --primary-dark:   #020617;
  --primary-light:  rgba(15,23,42,0.06);
  --primary-mid:    rgba(15,23,42,0.12);
  --font-body:      'Inter', sans-serif;
  --btn-radius:     4px;
  --card-radius:    8px;
  --background:     #FAFAFA;
  --border-solid:   #E5E7EB;
}
[data-design="minimal"] .btn-primary { background: #0F172A !important; letter-spacing: 0.02em; }
[data-design="minimal"] .btn-primary:hover { background: #1E293B !important; }
[data-design="minimal"] .card { box-shadow: none !important; border: 1.5px solid #E5E7EB !important; }
[data-design="minimal"] .stat-card { box-shadow: none !important; border: 1.5px solid #E5E7EB !important; }
[data-design="minimal"] .topbar { border-bottom: 1.5px solid #E5E7EB !important; }
[data-design="minimal"] .sidebar { border-right: 1.5px solid #E5E7EB !important; }

/* ============================================================
   THEME: Dark Mode Food UI
   ============================================================ */
[data-design="darkmode"] {
  --primary:        #F59E0B;
  --primary-dark:   #D97706;
  --primary-light:  rgba(245,158,11,0.12);
  --primary-mid:    rgba(245,158,11,0.2);
  --surface:        #1E1E2E;
  --background:     #13131F;
  --background-2:   #252535;
  --border:         rgba(255,255,255,0.08);
  --border-solid:   rgba(255,255,255,0.12);
  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-hint:      #475569;
  --font-body:      'Plus Jakarta Sans', sans-serif;
  --btn-radius:     8px;
  --card-radius:    14px;
  --sidebar-bg:     #0F0F1A;
  --card-shadow:    0 4px 24px rgba(0,0,0,0.4);
}
[data-design="darkmode"] body { background: #13131F !important; color: #F1F5F9 !important; }
[data-design="darkmode"] .sidebar { background: #0F0F1A !important; border-right: 1px solid rgba(255,255,255,0.06) !important; }
[data-design="darkmode"] .topbar { background: #1E1E2E !important; border-bottom: 1px solid rgba(255,255,255,0.08) !important; }
[data-design="darkmode"] .card,
[data-design="darkmode"] .stat-card,
[data-design="darkmode"] .table-wrapper { background: #1E1E2E !important; border-color: rgba(255,255,255,0.08) !important; }
[data-design="darkmode"] .form-control { background: #252535 !important; border-color: rgba(255,255,255,0.12) !important; color: #F1F5F9 !important; }
[data-design="darkmode"] .data-table th { background: #252535 !important; }
[data-design="darkmode"] .data-table tbody tr:hover { background: #252535 !important; }
[data-design="darkmode"] .btn-secondary { background: #252535 !important; color: #F1F5F9 !important; border-color: rgba(255,255,255,0.12) !important; }
[data-design="darkmode"] .btn-ghost { background: transparent !important; color: #94A3B8 !important; border-color: rgba(255,255,255,0.12) !important; }
[data-design="darkmode"] .nav-item.active { background: rgba(245,158,11,0.15) !important; color: #F59E0B !important; }
[data-design="darkmode"] .sidebar-brand-name { color: #F1F5F9 !important; }
[data-design="darkmode"] .nav-item { color: #94A3B8 !important; }
[data-design="darkmode"] .topbar-title { color: #F1F5F9 !important; }
[data-design="darkmode"] .page-title { color: #F1F5F9 !important; }
[data-design="darkmode"] .text-muted { color: #64748B !important; }
[data-design="darkmode"] .btn-primary { background: #F59E0B !important; color: #000 !important; font-weight: 600 !important; }
[data-design="darkmode"] input,select,textarea { color-scheme: dark; }

/* ============================================================
   THEME: Premium Luxury Restaurant
   ============================================================ */
[data-design="luxury"] {
  --primary:        #B8860B;
  --primary-dark:   #8B6914;
  --primary-light:  rgba(184,134,11,0.08);
  --primary-mid:    rgba(184,134,11,0.15);
  --font-body:      'Plus Jakarta Sans', sans-serif;
  --btn-radius:     2px;
  --card-radius:    4px;
  --background:     #FFFDF7;
  --background-2:   #FFF8E7;
  --border-solid:   #E8D5A0;
  --sidebar-bg:     #1C1208;
}
[data-design="luxury"] .sidebar { background: #1C1208 !important; border-right: none !important; }
[data-design="luxury"] .sidebar * { color: rgba(255,248,220,0.8) !important; }
[data-design="luxury"] .sidebar-brand-name { color: #F5D77E !important; font-weight: 700 !important; letter-spacing: 0.05em !important; }
[data-design="luxury"] .nav-item.active { background: rgba(184,134,11,0.2) !important; color: #F5D77E !important; border-left: 2px solid #B8860B !important; }
[data-design="luxury"] .nav-item.active * { color: #F5D77E !important; }
[data-design="luxury"] .nav-item:hover { background: rgba(255,255,255,0.05) !important; }
[data-design="luxury"] .nav-section-label { color: rgba(255,248,220,0.3) !important; letter-spacing: 0.1em !important; }
[data-design="luxury"] .sidebar-footer { border-top-color: rgba(255,255,255,0.08) !important; }
[data-design="luxury"] .btn-primary { background: linear-gradient(135deg, #B8860B, #8B6914) !important; border-radius: 2px !important; letter-spacing: 0.06em !important; text-transform: uppercase !important; font-size: 12px !important; font-weight: 600 !important; }
[data-design="luxury"] .card { border: 1px solid #E8D5A0 !important; box-shadow: 0 2px 12px rgba(184,134,11,0.08) !important; border-radius: 4px !important; }
[data-design="luxury"] .topbar { border-bottom: 1px solid #E8D5A0 !important; background: #FFFDF7 !important; }

/* ============================================================
   THEME: Sunset Orange (Warm & Vibrant)
   ============================================================ */
[data-design="sunset"] {
  --primary:        #EA580C;
  --primary-dark:   #C2410C;
  --primary-light:  rgba(234,88,12,0.08);
  --primary-mid:    rgba(234,88,12,0.15);
  --font-body:      'DM Sans', sans-serif;
  --btn-radius:     10px;
  --card-radius:    14px;
  --background:     #FFF7F4;
  --background-2:   #FFEDE6;
}
[data-design="sunset"] .btn-primary { background: linear-gradient(135deg, #EA580C, #F97316) !important; border-radius: 10px !important; box-shadow: 0 4px 14px rgba(234,88,12,0.3) !important; }
[data-design="sunset"] .card { border-radius: 14px !important; border: none !important; box-shadow: 0 2px 16px rgba(234,88,12,0.07) !important; }
[data-design="sunset"] .nav-item.active { background: rgba(234,88,12,0.1) !important; color: #EA580C !important; }

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-width: 0;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }
input, textarea, select, button { font-family: var(--font-body); }

/* ============================================================
   Typography
   ============================================================ */
h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.35; color: var(--text-primary); }
.page-title    { font-size: 22px; font-weight: 700; }
.section-title { font-size: 18px; font-weight: 600; }
.card-title    { font-size: 15px; font-weight: 600; }
.text-sm       { font-size: 14px; }
.text-xs       { font-size: 12px; }
.text-muted    { color: var(--text-secondary); font-size: 13px; }
.text-hint     { color: var(--text-hint); }
.text-danger   { color: var(--danger); }
.text-success  { color: var(--success); }
.text-warning  { color: var(--warning); }
.text-primary-color { color: var(--primary); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--btn-radius, 8px);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
  transform: var(--btn-transform, none);
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { opacity: 0.75; transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-solid);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-solid);
}
.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-lg  { padding: 13px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn svg { width: 15px; height: 15px; }

/* ============================================================
   Form Elements
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border-solid);
  border-radius: var(--border-radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  min-width: 0;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-mid);
}
.form-control::placeholder { color: var(--text-hint); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-hint  { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* Toggle Switch */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #CBD5E1; border-radius: 24px; cursor: pointer;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: white; border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: var(--card-shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.card-title { font-weight: 600; font-size: 15px; }

.stat-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--card-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--card-hover-shadow); }
.stat-icon {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon-blue   { background: var(--primary-light);   color: var(--primary); }
.stat-icon-green  { background: var(--success-bg);      color: var(--success); }
.stat-icon-orange { background: var(--warning-bg);      color: var(--warning); }
.stat-icon-red    { background: var(--danger-bg);       color: var(--danger); }
.stat-icon-info   { background: var(--info-bg);         color: var(--info); }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--text-primary); word-break: break-all; }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-danger, .badge-error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info-border); }
.badge-gray    { background: var(--background-2); color: var(--text-secondary); border: 1px solid var(--border-solid); }
.badge-primary { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-mid); }

/* ============================================================
   Tables
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--card-radius);
  background: var(--surface);
  border: 0.5px solid var(--border);
  box-shadow: var(--card-shadow);
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.data-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  min-width: 480px;
}
.data-table th {
  background: var(--background);
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.6px;
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary); vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--background); }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--border-radius);
  font-size: 14px; margin-bottom: 16px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid var(--danger-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info-border); }

/* ============================================================
   Modal
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
.modal-backdrop.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface); border-radius: var(--card-radius);
  padding: 28px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px); transition: transform 0.2s;
}
.modal-backdrop.active .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-close {
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--text-secondary);
  display: flex; align-items: center; border-radius: 6px;
}
.modal-close:hover { background: var(--background); }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ============================================================
   Sidebar Navigation
   ============================================================ */
.app-layout { display: flex; min-height: 100vh; width: 100%; overflow-x: hidden; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg, var(--surface));
  border-right: var(--sidebar-border, 1px solid var(--border));
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; overflow-y: auto;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  scrollbar-width: thin;
  flex-shrink: 0;
}
.sidebar-brand {
  padding: 18px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; min-height: var(--header-height);
  flex-shrink: 0; min-width: 0;
}
.sidebar-logo {
  width: 38px; height: 38px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0; border: 1px solid var(--border);
}
.sidebar-logo-placeholder {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.sidebar-brand-name {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.sidebar-nav { flex: 1; padding: 12px 8px; }
.nav-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-hint);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 10px 10px 4px; margin-top: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  margin-bottom: 2px; transition: all var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--background); color: var(--text-primary); opacity: 1; }
.nav-item.active {
  background: var(--nav-active-bg, var(--primary-light));
  color: var(--nav-active-color, var(--primary));
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--primary); border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sub-status-bar { background: var(--background); border-radius: 8px; padding: 10px 12px; font-size: 12px; }
.sub-status-label { color: var(--text-secondary); margin-bottom: 4px; }
.sub-status-name  { font-weight: 700; color: var(--text-primary); font-size: 13px; }
.progress-bar { height: 4px; background: var(--border-solid); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.4s; }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger  { background: var(--danger); }

/* ============================================================
   Topbar
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 0; /* critical: prevents flex child from growing beyond container */
  min-width: 0;
  overflow-x: hidden;
}
.topbar {
  height: var(--header-height); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 50;
  gap: 12px;
}
.topbar-left  { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hamburger-btn {
  display: none; background: none; border: none; cursor: pointer;
  padding: 7px; color: var(--text-secondary); border-radius: 6px;
  align-items: center; flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--background); }
.topbar-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 99;
}

/* Notification */
.notif-btn {
  position: relative; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--text-secondary); border-radius: 8px;
  display: flex; align-items: center;
}
.notif-btn:hover { background: var(--background); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; background: var(--danger);
  color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 10px; display: none;
  align-items: center; justify-content: center; padding: 0 3px;
}
.notif-badge.visible { display: flex; }
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px;
  max-width: min(340px, calc(100vw - 16px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  z-index: 9999; display: none;
  transform: none;
}
/* On mobile/tablet: use fixed positioning anchored to top-right */
@media (max-width: 768px) {
  .notif-dropdown {
    position: fixed;
    top: 60px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
}
.notif-dropdown.open { display: block; }
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.notif-list    { max-height: 340px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition); cursor: pointer;
}
.notif-item:hover  { background: var(--background); }
.notif-item.unread { background: var(--primary-light); }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 6px; }
.notif-text { font-size: 13px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-hint); margin-top: 2px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-secondary); font-size: 14px; }

/* User Avatar */
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; cursor: pointer;
  border: 2px solid var(--primary-mid);
  flex-shrink: 0;
}

/* ============================================================
   Page Content
   ============================================================ */
.page-content { flex: 1; padding: 28px 24px; min-width: 0; overflow-x: hidden; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-actions {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}

/* ============================================================
   Grid System
   ============================================================ */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ============================================================
   Filter Row (responsive)
   ============================================================ */
.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-row .form-group {
  margin: 0;
  flex: 1;
  min-width: 130px;
}
.filter-row .filter-action {
  flex-shrink: 0;
}

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-container {
  position: fixed; top: 70px; right: 24px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px; max-width: 360px;
}
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  animation: toastIn 0.3s ease; font-size: 14px;
}
.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error   { border-left: 4px solid var(--danger); }
.toast.toast-warning { border-left: 4px solid var(--warning); }
.toast.toast-info    { border-left: 4px solid var(--info); }
@keyframes toastIn { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast-icon svg { width: 18px; height: 18px; }
.toast-body     { flex: 1; line-height: 1.5; }
.toast-close-btn { background: none; border: none; cursor: pointer; padding: 2px; color: var(--text-hint); flex-shrink: 0; }

/* ============================================================
   Order / Kitchen Cards
   ============================================================ */
.order-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--card-radius); padding: 16px; margin-bottom: 12px;
  box-shadow: var(--card-shadow);
}
.order-card.status-pending  { border-left: 4px solid var(--warning); }
.order-card.status-preparing { border-left: 4px solid var(--info); }
.order-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.order-table-name  { font-weight: 700; font-size: 15px; }
.order-items-list  { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.order-item-row    { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.order-actions     { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   Chart Container
   ============================================================ */
.chart-wrap { position: relative; height: 240px; }

/* ============================================================
   Color Swatches (Theme Picker)
   ============================================================ */
.color-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: transform 0.15s, border-color 0.15s;
}
.color-swatch:hover  { transform: scale(1.18); }
.color-swatch.active { border-color: var(--text-primary); }

/* Design Template Cards */
.design-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 12px; }
.design-card {
  border: 2px solid var(--border-solid); border-radius: 12px;
  overflow: hidden; cursor: pointer; transition: all 0.2s;
  background: var(--surface);
}
.design-card:hover  { border-color: var(--primary); box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.design-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-mid); }
.design-preview {
  height: 100px; display: flex; flex-direction: column; overflow: hidden;
}
.design-preview-sidebar { width: 30%; height: 100%; }
.design-preview-main    { flex: 1; padding: 8px; background: #F8FAFC; }
.design-preview-topbar  { height: 20px; margin-bottom: 6px; border-radius: 3px; }
.design-preview-card    { height: 14px; border-radius: 4px; background: #fff; margin-bottom: 5px; }
.design-info { padding: 10px 12px; }
.design-info-name { font-weight: 600; font-size: 13px; }
.design-info-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.design-check { display: none; }
.design-card.active .design-check { display: flex; }

/* ============================================================
   Empty State
   ============================================================ */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--text-hint); display: block; }
.empty-state h3  { font-size: 16px; color: var(--text-primary); margin-bottom: 6px; font-weight: 600; }
.empty-state p   { font-size: 14px; }

/* ============================================================
   Impersonation Banner
   ============================================================ */
.impersonation-bar {
  background: #7C3AED; color: #fff; padding: 8px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; gap: 12px; flex-wrap: wrap;
}

/* ============================================================
   Pagination
   ============================================================ */
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.page-btn {
  min-width: 34px; height: 34px; padding: 0 8px;
  border: 1px solid var(--border-solid); background: var(--surface);
  border-radius: var(--border-radius); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); transition: background var(--transition), border-color var(--transition);
}
.page-btn:hover    { background: var(--background); }
.page-btn.active   { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   Tabs
   ============================================================ */
.tab-nav {
  display: flex; border-bottom: 2px solid var(--border);
  margin-bottom: 20px; gap: 0; overflow-x: auto; scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 10px 16px; font-size: 13.5px; font-weight: 600;
  color: var(--text-secondary); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; transition: color var(--transition), border-color var(--transition);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  flex-shrink: 0;
}
.tab-btn:hover  { color: var(--text-primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane       { display: none; }
.tab-pane.active { display: block; }

/* ============================================================
   Upload
   ============================================================ */
.upload-preview {
  width: 80px; height: 80px; border-radius: 10px;
  object-fit: cover; border: 2px solid var(--border); margin-top: 8px;
}
.upload-area {
  border: 2px dashed var(--border-solid); border-radius: var(--border-radius);
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }

/* ============================================================
   Menu Item Grid
   ============================================================ */
.menu-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.menu-item-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--card-radius); overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.menu-item-card:hover { box-shadow: var(--card-hover-shadow); transform: translateY(-2px); }
.menu-item-img { width: 100%; height: 140px; object-fit: cover; }
.menu-item-img-placeholder {
  width: 100%; height: 140px; background: var(--background);
  display: flex; align-items: center; justify-content: center;
}
.menu-item-body { padding: 12px 14px; }

/* ============================================================
   Misc Utilities
   ============================================================ */
.w-full   { width: 100%; }
.text-center { text-align: center; }
.flex     { display: flex; }
.items-center { align-items: center; }
.gap-2    { gap: 8px; }
.gap-3    { gap: 12px; }
.mt-1     { margin-top: 4px; }
.mt-2     { margin-top: 8px; }
.mt-3     { margin-top: 12px; }
.mb-2     { margin-bottom: 8px; }
.mb-3     { margin-bottom: 12px; }
.ml-auto  { margin-left: auto; }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.rounded     { border-radius: var(--border-radius); }
.opacity-50  { opacity: 0.5; }

/* ============================================================
   Visibility Utilities (FIXED — was missing)
   ============================================================ */
.hide-mobile  { display: inline; }
.show-mobile  { display: none; }

.topping-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.topping-row:last-child { border-bottom: none; }

/* Table QR */
.table-qr-thumb {
  width: 60px; height: 60px; border-radius: 6px;
  object-fit: contain; border: 1px solid var(--border); cursor: pointer;
}
.kitchen-card { background: var(--surface); border-radius: var(--card-radius); padding: 20px; box-shadow: var(--card-shadow); }
.kitchen-card.pending   { border-top: 4px solid var(--warning); }
.kitchen-card.preparing { border-top: 4px solid var(--info); }

/* NS / Domain box */
.ns-box {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}
.ns-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.ns-row:last-child { border-bottom: none; }

/* ============================================================
   RESPONSIVE — TABLET (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4     { grid-template-columns: repeat(2, 1fr); }
  .grid-3     { grid-template-columns: repeat(2, 1fr); }
  .design-templates { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-height: 56px; }

  /* Sidebar collapses to off-canvas */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 200;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  .sidebar-overlay.visible { display: block; }

  .main-content { margin-left: 0 !important; width: 100% !important; }
  .hamburger-btn { display: flex; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card  { padding: 14px; }
  .stat-value { font-size: 20px; }
  .stat-icon  { width: 42px; height: 42px; }

  /* Grids */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* Page */
  .page-content { padding: 16px 14px; }
  .topbar       { padding: 0 14px; }
  .topbar-title { font-size: 15px; }
  .page-title   { font-size: 18px; }
  .page-header  { margin-bottom: 16px; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1; justify-content: center; }

  /* Cards */
  .card { padding: 16px; }
  .modal { padding: 20px; border-radius: 16px 16px 0 0; }
  .modal-backdrop { align-items: flex-end; }

  /* Tables become scrollable */
  .table-wrapper { border-radius: 10px; }

  /* Tabs scroll horizontally */
  .tab-nav { gap: 0; }
  .tab-btn { padding: 10px 12px; font-size: 13px; }

  /* Buttons */
  .btn-lg { padding: 12px 22px; font-size: 15px; }

  /* Design templates */
  .design-templates { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Menu item grid */
  .menu-item-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Toast */
  .toast-container { top: 70px; right: 12px; left: 12px; max-width: none; }

  /* Notif dropdown — handled by @media(max-width:400px) block in component section */

  /* Visibility utilities */
  .hide-mobile { display: none !important; }
  .show-mobile { display: inline !important; }

  /* Filter rows */
  .filter-row { flex-direction: column; }
  .filter-row .form-group { min-width: 0; width: 100%; }
  .filter-row .filter-action { width: 100%; }
  .filter-row .filter-action .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .design-templates { grid-template-columns: 1fr; }
  .menu-item-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header .btn { width: 100%; justify-content: center; }
  .topbar-right > .btn { display: none; }
  .topbar-right > .btn.always-show { display: flex !important; }
  .stat-value { font-size: 18px; }
}

/* ============================================================
   MOBILE RESPONSIVENESS PATCH v2 — Full Device Support
   Fixes: overflow, push-bar, notif-dropdown, tables,
          page-header, topbar, sidebar, modals, forms
   ============================================================ */

/* ---- Global overflow guard ---- */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
* { box-sizing: border-box; min-width: 0; }

/* ---- App layout: prevent horizontal scroll ---- */
.app-layout   { min-width: 0; overflow-x: hidden; }
.main-content { min-width: 0; overflow-x: hidden; }
.page-content { min-width: 0; overflow-x: hidden; }

/* ---- Tables always scrollable horizontally ---- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* ---- Cards: prevent inner overflow ---- */
.card { overflow: hidden; word-break: break-word; }

/* ---- Notification dropdown: full mobile fix ---- */
@media (max-width: 480px) {
  .notif-dropdown {
    position: fixed !important;
    top: var(--header-height, 56px) !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    z-index: 999;
    border-radius: 12px;
  }
}

/* ---- Push notification bar: full mobile fix ---- */
@media (max-width: 520px) {
  #push-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px !important;
    gap: 10px !important;
  }
  #push-bar > div:first-child {
    align-items: flex-start !important;
  }
  #push-bar > div:last-child {
    width: 100% !important;
  }
  #webpushr-subscribe-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .main-content { padding-bottom: 120px !important; }
}

/* ---- Page header: stack on small screens ---- */
@media (max-width: 640px) {
  .page-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .page-header-actions {
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .page-header-actions .btn {
    flex: 1 1 auto !important;
    min-width: 140px !important;
    justify-content: center !important;
  }
}

/* ---- Stats grid: single column on very small screens ---- */
@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr !important; }
  .stat-card  { flex-direction: row; align-items: center; }
}

/* ---- Topbar: prevent overflow, fix right section ---- */
.topbar-right {
  flex-shrink: 0;
  gap: 6px;
  flex-wrap: nowrap;
}
@media (max-width: 400px) {
  .topbar { padding: 0 10px; }
  .topbar-title { font-size: 14px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-avatar { width: 32px; height: 32px; font-size: 13px; }
}

/* ---- Modal: full-screen bottom sheet on mobile ---- */
@media (max-width: 600px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ---- Filter row: always vertical on mobile ---- */
@media (max-width: 640px) {
  .filter-row { flex-direction: column !important; align-items: stretch !important; }
  .filter-row .form-group,
  .filter-row .filter-action { width: 100% !important; min-width: 0 !important; }
  .filter-row .filter-action .btn { width: 100% !important; justify-content: center !important; }
}

/* ---- Grid fixes for tablet ---- */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr !important; }
}
@media (min-width: 481px) and (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---- Form controls: full width inputs on mobile ---- */
@media (max-width: 640px) {
  .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .form-row .form-group { width: 100% !important; }
}

/* ---- Tab nav: scrollable on mobile ---- */
.tab-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  display: flex;
  flex-wrap: nowrap;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn { flex-shrink: 0; }

/* ---- Kitchen / Order cards: responsive ---- */
@media (max-width: 640px) {
  .order-card-grid,
  .kitchen-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ---- Button groups: wrap on mobile ---- */
@media (max-width: 480px) {
  .btn-group {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
  .btn-group .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---- Safe area insets (iPhone notch / home indicator) ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #push-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .sidebar  { padding-bottom: env(safe-area-inset-bottom); }
}

/* ---- Topbar safe area ---- */
@supports (padding-top: env(safe-area-inset-top)) {
  .topbar { padding-top: env(safe-area-inset-top); }
}
