/* ============================================================
   ZOUKI ORDER SYSTEM — Design System
   Cross-platform optimised: iOS Safari, Android Chrome,
   Windows (Edge/Chrome/Firefox), tablet, small mobile
   ============================================================ */

/* ── Google Fonts ── */
/* ── CSS Custom Properties ── */
:root {
  /* Brand Palette */
  --forest:        #1a3a2a;
  --forest-light:  #2d6a4f;
  --forest-faint:  #e8f4ec;
  --cream:         #f5f0eb;
  --cream-dark:    #ede7e0;
  --gold:          #e8d5a3;
  --gold-mid:      #d4b97a;
  --gold-dark:     #c4a96b;
  --sage:          #a0c4a0;

  /* Semantic */
  --text:          #2c2c2c;
  --text-mid:      #4b5563;
  --muted:         #6b7280;
  --border:        #e5e0da;
  --border-focus:  var(--forest);
  --white:         #ffffff;

  /* Status */
  --success:       #198754;
  --success-bg:    #d1fae5;
  --success-text:  #065f46;
  --danger:        #dc3545;
  --danger-bg:     #fff5f5;
  --danger-text:   #991b1b;
  --warning:       #d97706;
  --warning-bg:    #fef9c3;
  --warning-text:  #854d0e;
  --info-bg:       #dbeafe;
  --info-text:     #1e40af;

  /* Typography */
  --font-display:  'Calibri', 'Candara', 'Segoe UI', Arial, sans-serif;
  --font-body:     'Calibri', 'Candara', 'Segoe UI', Arial, sans-serif;

  --text-xs:       0.6875rem;  /* 11px */
  --text-sm:       0.8125rem;  /* 13px */
  --text-base:     0.9375rem;  /* 15px */
  --text-md:       1rem;       /* 16px */
  --text-lg:       1.125rem;   /* 18px */
  --text-xl:       1.25rem;    /* 20px */
  --text-2xl:      1.5rem;     /* 24px */
  --text-3xl:      1.875rem;   /* 30px */
  --text-4xl:      2.25rem;    /* 36px */

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radii */
  --r-sm:   6px;
  --r:      10px;
  --r-md:   14px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.07);
  --shadow:    0 2px 16px rgba(0,0,0,.08);
  --shadow-md: 0 4px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.13);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.18);

  /* Transitions */
  --t-fast:   120ms ease;
  --t:        200ms ease;
  --t-slow:   350ms ease;

  /* Layout */
  --container:     1400px;
  --sidebar-w:     240px;

  /* Touch target minimum */
  --touch-min: 44px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Prevent font size inflation on orientation change (iOS) */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Smooth momentum scrolling on iOS */
  -webkit-overflow-scrolling: touch;
  /* Prevent double-tap zoom on interactive elements */
  touch-action: manipulation;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
  /* Remove default iOS button styling */
  -webkit-appearance: none;
  appearance: none;
}

a {
  color: inherit;
  text-decoration: none;
  /* Prevent tap highlight flash on iOS */
  -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  /* Remove iOS inner shadow */
  -webkit-appearance: none;
  appearance: none;
}

/* Prevent iOS zoom on focus (input font-size must be ≥16px or use this) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  font-size: max(16px, 1em);
}

/* ── Base body ── */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport for mobile browsers with toolbars */
  /* Smooth font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--forest);
  /* Prevent widows on small screens */
  text-wrap: balance;
}
h1 { font-size: clamp(1.5rem, 4vw, var(--text-4xl)); }
h2 { font-size: clamp(1.25rem, 3vw, var(--text-3xl)); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p { color: var(--text-mid); }

.label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-8);
}

.flex             { display: -webkit-flex; display: flex; }
.flex-col         { -webkit-flex-direction: column; flex-direction: column; }
.items-center     { -webkit-align-items: center; align-items: center; }
.items-start      { -webkit-align-items: flex-start; align-items: flex-start; }
.justify-center   { -webkit-justify-content: center; justify-content: center; }
.justify-between  { -webkit-justify-content: space-between; justify-content: space-between; }
.flex-1           { -webkit-flex: 1; flex: 1; }
.flex-shrink-0    { -webkit-flex-shrink: 0; flex-shrink: 0; }
.gap-2            { gap: var(--sp-2); }
.gap-3            { gap: var(--sp-3); }
.gap-4            { gap: var(--sp-4); }
.gap-6            { gap: var(--sp-6); }
.gap-8            { gap: var(--sp-8); }

.grid             { display: grid; }
.grid-2           { grid-template-columns: repeat(2, 1fr); }
.grid-3           { grid-template-columns: repeat(3, 1fr); }
.grid-4           { grid-template-columns: repeat(4, 1fr); }
.col-span-2       { grid-column: span 2; }
.col-span-full    { grid-column: 1 / -1; }

.text-center      { text-align: center; }
.text-right       { text-align: right; }
.w-full           { width: 100%; }
.hidden           { display: none; }

/* ============================================================
   SITE HEADER (Public-facing)
   ============================================================ */
.site-header {
  background: var(--forest);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 24px rgba(0,0,0,.3);
  /* Avoid notch overlap on modern iPhones */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--gold);
  letter-spacing: 3px;
  line-height: 1;
}
.site-logo small {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--sage);
  letter-spacing: 1px;
  margin-top: 3px;
  font-style: normal;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  /* Minimum touch target */
  min-height: var(--touch-min);
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn:active { transform: translateY(1px); }

/* Sizes */
.btn-sm  { padding: 7px 14px; font-size: var(--text-xs); min-height: 36px; }
.btn-lg  { padding: 14px 32px; font-size: var(--text-md); letter-spacing: .5px; }
.btn-xl  {
  width: 100%;
  padding: 16px;
  font-size: var(--text-md);
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--r-md);
  min-height: 54px;
}

/* Variants */
.btn-primary {
  background: var(--forest);
  color: var(--gold);
  border-color: var(--forest);
}
.btn-primary:hover:not(:disabled) {
  background: var(--forest-light);
  border-color: var(--forest-light);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--forest);
  border-color: var(--gold);
}
.btn-gold:hover:not(:disabled) {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--forest);
  color: var(--forest);
  background: var(--forest-faint);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover:not(:disabled) { background: #146c43; border-color: #146c43; }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: #b02a37; border-color: #b02a37; }

/* Cart button */
.cart-btn {
  background: var(--gold);
  color: var(--forest);
  border: none;
  padding: 10px 24px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  cursor: pointer;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--touch-min);
  transition: background var(--t-fast), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cart-btn:hover { background: var(--gold-dark); transform: translateY(-1px); }

.cart-count {
  background: var(--forest);
  color: var(--gold);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  background: var(--forest);
  padding: var(--sp-5) var(--sp-6);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: var(--sp-3);
}
.card-header h3 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: var(--text-lg);
  font-weight: 600;
}
.card-header-icon {
  width: 32px;
  height: 32px;
  background: rgba(232,213,163,.2);
  border-radius: var(--r-sm);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 15px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.card-body {
  padding: var(--sp-6) var(--sp-8);
}

/* Admin table card */
.table-card {
  background: var(--white);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 2px solid var(--border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}
.table-card-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--forest);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
}
.form-group {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: var(--sp-2);
}
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font-body);
  /* ≥16px prevents iOS auto-zoom on focus */
  font-size: max(16px, var(--text-base));
  color: var(--text);
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  width: 100%;
  /* Remove iOS inner shadow/styling */
  -webkit-appearance: none;
  appearance: none;
  /* Minimum touch height */
  min-height: var(--touch-min);
}
.form-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(26,58,42,.1);
}
select {
  cursor: pointer;
  /* Add native dropdown arrow back after -webkit-appearance reset */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}

/* ============================================================
   TABLES
   ============================================================ */
table.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table thead tr { background: #f8f5f0; }
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table th.right  { text-align: right; }
.data-table th.center { text-align: center; }

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #faf8f5; }
.data-table td {
  padding: 12px 16px;
  font-size: var(--text-sm);
  vertical-align: middle;
}
.data-table td.right  { text-align: right; }
.data-table td.center { text-align: center; }
.data-table td.price  { text-align: right; font-weight: 700; color: var(--forest); }
.data-table td.muted  { color: var(--muted); font-size: var(--text-xs); }

/* ============================================================
   PRODUCT TABLE
   Col %: Item 38 | Unit Volume 24 | QTY 24 | Add 14
   ============================================================ */
.product-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 0 0 var(--r) var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  table-layout: fixed;
}

/* Identical % widths — all category tables align perfectly */
.product-table col.col-item { width: 38%; }
.product-table col.col-unit { width: 24%; }
.product-table col.col-qty  { width: 24%; }
.product-table col.col-add  { width: 14%; }

/* Header */
.product-table thead tr { background: var(--white); }
.product-table th {
  padding: 12px 24px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-align: left;
  overflow: hidden;
}
.product-table th.center { text-align: center; }

/* Rows */
.product-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.product-table tbody tr:last-child { border-bottom: none; }
.product-table tbody tr:hover { background: #faf8f5; }

/* Cells — left-aligned by default */
.product-table td {
  padding: 16px 24px;
  font-size: var(--text-base);
  overflow: hidden;
  vertical-align: middle;
  text-align: left;
}

.td-item {
  font-size: var(--text-base);
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
  text-align: left;
}
.td-unit {
  color: var(--muted);
  font-size: var(--text-base);
  word-break: break-word;
  text-align: left;
}
.td-qty { text-align: center; padding: 12px 12px; }
.td-add { text-align: center; padding: 12px 24px; }

/* ── Qty stepper: − [ 1 ] + ── */
.qty-stepper {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  gap: 6px;
  -webkit-justify-content: center;
  justify-content: center;
}
.qty-step-btn {
  width: 34px;
  height: 38px;
  /* Ensure minimum touch target via padding trick */
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  background: var(--white);
  border: 1.5px solid #cec8bf;
  border-radius: 9px;
  font-size: 22px;
  font-weight: 300;
  color: #555;
  cursor: pointer;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: 0;
  box-sizing: border-box;
  transition: background 0.12s, border-color 0.12s;
  -webkit-appearance: none;
  appearance: none;
}
.qty-step-btn:active {
  background: var(--cream-dark);
  border-color: #a09890;
}
.qty-display {
  width: 80px;
  height: 38px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
  background: var(--white);
  border: 1.5px solid #cec8bf;
  border-radius: 9px;
  box-sizing: border-box;
}

/* Add-to-cart button */
.add-btn {
  background: var(--forest);
  color: var(--gold);
  border: none;
  padding: 9px 18px;
  min-height: var(--touch-min);
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast);
  white-space: nowrap;
  width: 100%;
  text-align: center;
  display: block;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.add-btn:hover  { background: var(--forest-light); }
.add-btn.added  { background: var(--success); color: #fff; }

/* ── Product table responsive ── */
@media (max-width: 900px) {
  .product-table th,
  .product-table td { padding: 12px 16px; }
  .td-qty { padding: 10px 8px; }
  .td-add { padding: 10px 16px; }
}
@media (max-width: 600px) {
  /* On small screens hide Unit Volume col and expand Item */
  .product-table col.col-item { width: 44%; }
  .product-table col.col-unit { width: 0; display: none; }
  .product-table col.col-qty  { width: 30%; }
  .product-table col.col-add  { width: 26%; }
  .product-table th.th-unit,
  .product-table td.td-unit { display: none; }
  .product-table th { padding: 10px 10px; }
  .product-table td { padding: 12px 10px; }
  .td-item { font-size: 13px; }
  .qty-step-btn { min-width: 36px; min-height: 36px; font-size: 18px; }
  .qty-display  { width: 38px; font-size: 13px; }
  .add-btn { font-size: 12px; padding: 8px 6px; }
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
}
.badge-collected, .badge-active { background: var(--success-bg); color: var(--success-text); }
.badge-pending                  { background: var(--warning-bg); color: var(--warning-text); }
.badge-inactive                 { background: #f3f4f6; color: var(--muted); }
.badge-info                     { background: var(--info-bg); color: var(--info-text); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--r);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--sp-5);
  border-left: 4px solid;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: var(--success-text); }
.alert-danger  { background: var(--danger-bg);  border-color: var(--danger);  color: var(--danger-text); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: var(--warning-text); }
.alert-info    { background: var(--info-bg);    border-color: #2563eb;        color: var(--info-text); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1000;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: var(--sp-4);
  /* Safe area for notch devices */
  padding-left: max(var(--sp-4), env(safe-area-inset-left));
  padding-right: max(var(--sp-4), env(safe-area-inset-right));
  padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
}
.modal-overlay.active { display: -webkit-flex; display: flex; }

.modal-box {
  background: var(--white);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 480px;
  padding: var(--sp-10);
  animation: modalIn .25s ease;
  position: relative;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-box h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--forest);
  margin-bottom: var(--sp-4);
}

/* Success modal */
.modal-success {
  text-align: center;
  max-width: 500px;
}
.modal-success .modal-icon { font-size: 60px; margin-bottom: var(--sp-4); display: block; }
.modal-success h2 { font-size: var(--text-3xl); color: var(--forest); margin-bottom: var(--sp-3); }
.modal-success p  { color: var(--muted); font-size: var(--text-base); line-height: 1.6; margin-bottom: var(--sp-2); }
.modal-success .order-number { font-size: var(--text-2xl); font-weight: 700; color: var(--gold-dark); margin: var(--sp-4) 0; font-family: var(--font-display); }

@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

/* ============================================================
   HERO
   ============================================================ */
.order-hero {
  background: var(--forest);
  border-radius: var(--r-lg);
  padding: var(--sp-10) var(--sp-8);
  margin-bottom: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.order-hero::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(232,213,163,.06);
  pointer-events: none;
}
.order-hero::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 60px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(160,196,160,.05);
  pointer-events: none;
}
.order-hero h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-2);
  position: relative;
}
.order-hero p {
  color: var(--sage);
  font-size: var(--text-sm);
  position: relative;
}

/* ============================================================
   CATEGORY NAV
   ============================================================ */
.cat-nav {
  display: -webkit-flex;
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.cat-nav a {
  padding: 8px 18px;
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--forest);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .5px;
  border: 2px solid var(--border);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
  min-height: var(--touch-min);
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cat-nav a:hover,
.cat-nav a.active {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--gold);
}

/* ============================================================
   CATEGORY SECTION
   ============================================================ */
.cat-section { margin-bottom: var(--sp-8); }

.cat-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--forest);
  padding: 20px 28px;
  background: #f2ece5;
  border-radius: var(--r) var(--r) 0 0;
  border-left: 4px solid var(--gold-dark);
}

/* ============================================================
   CART PANEL
   ============================================================ */
.cart-panel {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.cart-panel-header {
  background: var(--forest);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  gap: 4px;
}
.cart-header-inner {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: var(--sp-4);
}
.cart-header-icon {
  font-size: 28px;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
  opacity: 0.85;
}
.cart-panel-header h3 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
.cart-panel-header p { color: var(--sage); font-size: var(--text-sm); margin: 0; }

.cart-items {
  -webkit-flex: 1;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: var(--sp-4);
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.cart-empty {
  text-align: center;
  padding: var(--sp-10) var(--sp-5);
  color: var(--muted);
}
.cart-empty-icon { font-size: 44px; display: block; margin-bottom: var(--sp-3); }

.cart-item {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r);
  background: var(--cream);
  margin-bottom: var(--sp-2);
  animation: slideIn .18s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.cart-item-info    { -webkit-flex: 1; flex: 1; min-width: 0; }
.cart-item-name    { font-size: var(--text-xs); font-weight: 700; color: var(--text); line-height: 1.3; }
.cart-item-sub     { font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }
.cart-item-price   { font-size: var(--text-sm); font-weight: 700; color: var(--forest); margin-top: 4px; }
.cart-item-remove  {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  min-width: var(--touch-min);
  min-height: var(--touch-min);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  line-height: 1;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  transition: color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.cart-item-remove:hover { color: var(--danger); }

.cart-footer {
  padding: var(--sp-5) var(--sp-6);
  /* Safe area padding for iPhone home bar */
  padding-bottom: max(var(--sp-5), env(safe-area-inset-bottom));
  border-top: 2px solid var(--border);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.cart-total {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: var(--sp-4);
}
.cart-total-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.cart-total-amount {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--forest);
  font-weight: 700;
}

/* ============================================================
   PAGE LAYOUT (public 2-col)
   ============================================================ */
.page-layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--sp-8);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-8);
  -webkit-align-items: start;
  align-items: start;
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Sidebar */
.sidebar {
  background: var(--forest);
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sidebar::-webkit-scrollbar { width: 0; }

.sidebar-logo {
  padding: var(--sp-6);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: var(--text-xl);
  letter-spacing: 2px;
}
.sidebar-logo span {
  color: var(--sage);
  font-size: var(--text-xs);
  display: block;
  margin-top: 3px;
  font-family: var(--font-body);
  font-weight: 400;
}

.sidebar-nav { -webkit-flex: 1; flex: 1; padding: var(--sp-4) 0; }

.nav-section {
  padding: var(--sp-2) var(--sp-6);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,.3);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-1);
}

.nav-link {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: var(--sp-3);
  padding: 11px var(--sp-6);
  min-height: var(--touch-min);
  color: rgba(255,255,255,.65);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(232,213,163,.12); color: var(--gold); }
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}
.nav-link-icon { font-size: 15px; width: 20px; text-align: center; -webkit-flex-shrink: 0; flex-shrink: 0; }

.sidebar-footer {
  padding: var(--sp-5) var(--sp-6);
  padding-bottom: max(var(--sp-5), env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.1);
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: var(--sp-2);
}
.sidebar-users-btn {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px var(--sp-4);
  min-height: var(--touch-min);
  background: rgba(232,213,163,.15);
  border: 1px solid rgba(232,213,163,.25);
  border-radius: var(--r);
  color: var(--gold);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast);
  cursor: pointer;
}
.sidebar-users-btn:hover,
.sidebar-users-btn.active {
  background: rgba(232,213,163,.28);
  border-color: rgba(232,213,163,.5);
}
.logout-link {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--touch-min);
  color: rgba(255,255,255,.45);
  font-size: var(--text-sm);
  transition: color var(--t-fast);
  padding: 4px 0;
}
.logout-link:hover { color: #fff; }

/* Admin main content */
.main-content { overflow: auto; }

.page-header {
  background: var(--white);
  padding: var(--sp-6) var(--sp-10);
  border-bottom: 2px solid var(--border);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: var(--sp-4);
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--forest);
}
.page-header p { color: var(--muted); font-size: var(--text-sm); margin-top: 4px; }

.page-body { padding: var(--sp-8) var(--sp-10); }

/* ============================================================
   STATS GRID (admin dashboard)
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}
.stat-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon  { font-size: 26px; margin-bottom: var(--sp-3); }
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--forest);
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: var(--sp-1);
  font-weight: 700;
}

/* Today banner */
.today-banner {
  background: var(--forest);
  color: var(--gold);
  padding: 16px 24px;
  border-radius: var(--r-md);
  margin-bottom: var(--sp-6);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  font-size: var(--text-base);
  font-weight: 600;
}
.today-banner a { color: var(--gold-dark); font-size: var(--text-xs); }
.today-banner a:hover { color: var(--gold); }

/* ============================================================
   ADMIN LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--forest);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: var(--sp-5);
  padding-left: max(var(--sp-5), env(safe-area-inset-left));
  padding-right: max(var(--sp-5), env(safe-area-inset-right));
}
.login-card {
  background: var(--white);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.login-card-header {
  background: var(--forest);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
}
.login-card-header h1 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: var(--text-3xl);
  letter-spacing: 4px;
}
.login-card-header p { color: var(--sage); font-size: var(--text-xs); margin-top: 6px; }
.login-card-body { padding: var(--sp-10) var(--sp-8); }
.login-btn {
  width: 100%;
  padding: 16px;
  min-height: 54px;
  background: var(--forest);
  color: var(--gold);
  border: none;
  border-radius: var(--r-md);
  font-size: var(--text-md);
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background var(--t-fast), transform var(--t-fast);
  margin-top: var(--sp-2);
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
.login-btn:hover { background: var(--forest-light); transform: translateY(-2px); }
.back-link { text-align: center; margin-top: var(--sp-5); }
.back-link a { color: var(--forest); font-size: var(--text-sm); }
.back-link a:hover { text-decoration: underline; }

/* ============================================================
   COLLECT PAGE (QR scan)
   ============================================================ */
.collect-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-justify-content: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-4);
  padding-left: max(var(--sp-4), env(safe-area-inset-left));
  padding-right: max(var(--sp-4), env(safe-area-inset-right));
}
.collect-container { width: 100%; max-width: 600px; }

.status-badge {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 24px;
  border-radius: var(--r-full);
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--sp-6);
}
.status-collected { background: var(--success-bg); color: var(--success-text); }
.status-pending   { background: var(--warning-bg); color: var(--warning-text); }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.info-item {
  background: var(--cream);
  padding: 14px 18px;
  border-radius: var(--r);
}
.info-item label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}
.info-item span {
  font-weight: 700;
  color: var(--forest);
  font-size: var(--text-base);
}

.collect-btn {
  width: 100%;
  padding: 18px;
  min-height: 58px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: var(--text-lg);
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
  font-family: var(--font-body);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}
.collect-btn:hover {
  background: #15803d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22,163,74,.3);
}

.already-collected {
  text-align: center;
  padding: var(--sp-6);
  background: var(--success-bg);
  border-radius: var(--r-md);
  color: var(--success-text);
}
.already-collected .big-check { font-size: 52px; margin-bottom: var(--sp-3); display: block; }
.already-collected h3 { font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: var(--sp-2); }
.already-collected p  { font-size: var(--text-sm); opacity: .8; }

/* Collect page table */
.collect-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-6);
  font-size: var(--text-sm);
}
.collect-table thead tr { background: var(--forest); }
.collect-table thead th {
  color: var(--gold);
  padding: 10px 14px;
  text-align: left;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}
.collect-table thead th:last-child { text-align: right; }
.collect-table tbody tr { border-bottom: 1px solid var(--border); }
.collect-table tbody td { padding: 10px 14px; }
.collect-table tbody td:last-child { text-align: right; font-weight: 700; }
.collect-table tfoot td {
  padding: 12px 14px;
  font-weight: 700;
  font-size: var(--text-md);
  background: var(--cream);
}
.collect-table tfoot td:last-child {
  text-align: right;
  color: var(--forest);
  font-size: var(--text-lg);
}

/* ============================================================
   ORDER DETAIL GRID (admin)
   ============================================================ */
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--sp-6);
  -webkit-align-items: start;
  align-items: start;
}

.detail-field {
  background: var(--cream);
  padding: 14px;
  border-radius: var(--r);
}
.detail-field-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 700;
}
.detail-field-value {
  font-weight: 700;
  color: var(--forest);
  font-size: var(--text-base);
}
.detail-field.collected { background: var(--success-bg); }
.detail-field.collected .detail-field-label { color: var(--success-text); }
.detail-field.collected .detail-field-value { color: var(--success-text); }

.qr-panel { text-align: center; }
.qr-panel img { display: inline-block; margin-bottom: var(--sp-3); }

/* ============================================================
   FILTERS BAR (admin orders)
   ============================================================ */
.filters-bar {
  display: -webkit-flex;
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
  -webkit-align-items: center;
  align-items: center;
}
.filters-bar form {
  display: -webkit-flex;
  display: flex;
  gap: var(--sp-3);
  -webkit-flex: 1;
  flex: 1;
  min-width: 240px;
}
.filter-tabs { display: -webkit-flex; display: flex; gap: var(--sp-2); }

/* ============================================================
   DIVIDER
   ============================================================ */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: var(--sp-6);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
  border-radius: 2px;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .site-header,
  .cart-panel,
  #cartSidebar,
  .cat-nav,
  .add-btn,
  .qty-stepper,
  .btn,
  .sidebar,
  .mobile-topbar,
  .filters-bar { display: none !important; }

  body { background: #fff; font-size: 12pt; color: #000; }
  .page-layout { display: block; padding: 0; }
  .card, .table-card { box-shadow: none; border: 1px solid #ccc; }
  .product-table { border: 1px solid #ccc; }
  .product-table col.col-qty,
  .product-table col.col-add { display: none; }
  .td-qty, .td-add,
  .product-table th.center { display: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; color: #666; }
  .order-hero { background: #f0f0f0 !important; color: #000 !important; }
  .cat-title { background: #f5f5f5 !important; color: #000 !important; border-left: 3px solid #999; }
}

/* ============================================================
   RESPONSIVE — TABLET WIDE (≤1280px)
   ============================================================ */
@media (max-width: 1280px) {
  .page-layout {
    grid-template-columns: 1fr 340px;
    gap: var(--sp-6);
  }
  .page-layout { padding: var(--sp-6); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   RESPONSIVE — TABLET (≤1100px)
   ============================================================ */
@media (max-width: 1100px) {
  .page-layout { grid-template-columns: 1fr; }
  #cartSidebar { order: 2; }
  .cart-panel { position: static; max-height: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {

  /* ── Admin sidebar becomes off-canvas drawer ── */
  .admin-layout { grid-template-columns: 1fr; position: relative; }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    height: 100dvh;
    z-index: 500;
    transition: left .28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Safe area support */
    padding-left: env(safe-area-inset-left);
  }
  .sidebar.open { left: 0; }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 499;
  }
  .sidebar-overlay.open { display: block; }

  /* Mobile admin top bar */
  .mobile-topbar {
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    background: var(--forest);
    padding: 0 var(--sp-5);
    padding-left: max(var(--sp-5), env(safe-area-inset-left));
    padding-right: max(var(--sp-5), env(safe-area-inset-right));
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 400;
    box-shadow: 0 2px 12px rgba(0,0,0,.2);
  }
  .mobile-topbar-title {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: var(--text-lg);
    letter-spacing: 2px;
  }
  .hamburger {
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--sp-2);
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    background: none;
    border: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all .2s ease;
  }

  /* Admin spacing */
  .page-header { padding: var(--sp-4) var(--sp-5); flex-wrap: wrap; gap: var(--sp-3); }
  .page-header h1 { font-size: var(--text-xl); }
  .page-body { padding: var(--sp-4) var(--sp-5); }

  /* Stats */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .stat-value { font-size: 1.5rem; }

  /* Admin tables: horizontal scroll */
  .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }
  .data-table th, .data-table td { padding: 10px 12px; font-size: 12px; }
  #ordersTable { min-width: 750px; }

  /* Filters */
  .filters-bar { -webkit-flex-direction: column; flex-direction: column; gap: var(--sp-3); }
  .filters-bar form { -webkit-flex-direction: column; flex-direction: column; }
  .filter-tabs { flex-wrap: wrap; }

  /* Forms */
  .form-grid { grid-template-columns: 1fr; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }

  /* Modal */
  .modal-box { padding: var(--sp-6); }
  .modal-box h3 { font-size: var(--text-xl); }

  /* ── Public page ── */

  /* Header */
  .header-inner {
    padding: 0 var(--sp-4);
    padding-left: max(var(--sp-4), env(safe-area-inset-left));
    padding-right: max(var(--sp-4), env(safe-area-inset-right));
    height: 60px;
  }
  .site-logo { font-size: var(--text-md); letter-spacing: 2px; }
  .site-logo small { font-size: 10px; }
  .cart-btn { padding: 8px 14px; font-size: var(--text-sm); }

  /* Single-col layout */
  .page-layout {
    padding: var(--sp-4);
    padding-left: max(var(--sp-4), env(safe-area-inset-left));
    padding-right: max(var(--sp-4), env(safe-area-inset-right));
    gap: var(--sp-5);
    grid-template-columns: 1fr;
  }

  /* Hero */
  .order-hero { padding: var(--sp-6) var(--sp-5); }
  .order-hero h2 { font-size: var(--text-xl); }

  /* Category nav: horizontal scroll */
  .cat-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: var(--sp-2);
    scrollbar-width: none;
    gap: var(--sp-2);
  }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-nav a { -webkit-flex-shrink: 0; flex-shrink: 0; }

  /* Card body padding */
  .card-body { padding: var(--sp-4) var(--sp-5); }

  /* Cart: sticky bottom sheet on mobile */
  #cartSidebar {
    order: unset;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    padding: 0;
    /* Safe area for home bar */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .cart-panel {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    box-shadow: 0 -4px 30px rgba(0,0,0,.15);
    max-height: 80vh;
    max-height: 80dvh;
  }

  /* Cart collapsed by default on mobile */
  .cart-panel-header { display: none; }
  .cart-items { display: none; }
  .cart-panel.expanded .cart-panel-header { display: -webkit-flex; display: flex; }
  .cart-panel.expanded .cart-items { display: block; }

  /* Cart toggle bar */
  .cart-mobile-toggle {
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    background: var(--forest);
    padding: var(--sp-3) var(--sp-5);
    cursor: pointer;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    min-height: var(--touch-min);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .cart-mobile-toggle-left {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: var(--sp-3);
    color: var(--gold);
    font-weight: 700;
    font-size: var(--text-sm);
  }
  .cart-mobile-toggle-right {
    color: var(--sage);
    font-size: var(--text-xs);
    transition: transform .2s ease;
  }
  .cart-panel.expanded .cart-mobile-toggle-right { transform: rotate(180deg); }

  /* Content padding so it isn't hidden behind sticky cart */
  .page-layout { padding-bottom: 80px; }

  /* Signature canvas */
  #sigCanvas { height: 130px; }

  /* Success modal */
  .modal-success { padding: var(--sp-6); }
  .modal-success .modal-icon { font-size: 44px; }
  .modal-success h2 { font-size: var(--text-2xl); }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .page-layout { padding: var(--sp-3); }
  .card-body { padding: var(--sp-3) var(--sp-4); }
  .order-hero { padding: var(--sp-5) var(--sp-4); }
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
  .stat-card { padding: var(--sp-4); }
  .stat-value { font-size: 1.3rem; }
  .btn-sm { padding: 6px 10px; font-size: 11px; }
  .page-header { padding: var(--sp-3) var(--sp-4); }
  .page-body { padding: var(--sp-3) var(--sp-4); }
  .today-banner { -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: flex-start; align-items: flex-start; gap: var(--sp-2); }

  /* Product table on very small screens */
  .product-table col.col-item { width: 44%; }
  .product-table col.col-unit { width: 0; }
  .product-table col.col-qty  { width: 30%; }
  .product-table col.col-add  { width: 26%; }
  .product-table th.th-unit,
  .product-table td.td-unit { display: none; }
  .product-table th { padding: 10px 8px; }
  .product-table td { padding: 10px 8px; }
  .td-item { font-size: 13px; }
  .qty-step-btn { min-width: 36px; min-height: 36px; font-size: 18px; }
  .qty-display  { width: 36px; font-size: 13px; }
  .add-btn { font-size: 12px; padding: 7px 4px; }

  /* Cart footer */
  .cart-footer {
    padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
  }
}

/* ── Hidden-on-desktop elements ── */
.mobile-topbar { display: none; }
.hamburger { display: none; }
.cart-mobile-toggle { display: none; }
