/* /home/botfred/StreetFoodOS/public/css/style.css */

/* ========================================
   CSS VARIABLES & RESET
   ======================================== */
:root {
  /* === SLATE / TEAL PALETTE === */
  --bg: #1a1d23;
  --bg-panel: #23272f;
  --bg-card: #2d323b;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --success: #34d399;
  --success-bg: #0d3b2e;
  --danger: #f87171;
  --danger-bg: #3b1a1a;
  --warning: #fbbf24;
  --warning-bg: #3b2e0d;
  --info: #60a5fa;
  --border: #3a3f4a;
  --radius: 4px;
  --radius-sm: 2px;
  --shadow: 3px 3px 0px rgba(0,0,0,0.4);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.015) 2px,
    rgba(255,255,255,0.015) 4px
  );
}

/* ========================================
   NAVIGATION
   ======================================== */
.main-nav {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-panel);
  border-bottom: 3px double var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.2s;
}


.nav-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-right: 12px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}


.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}
.nav-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-clock {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 1px;
  margin-left: auto;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 60px;
  text-align: center;
}

@media (max-width: 600px) {
  .nav-title {
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-right: 8px;
    padding-right: 8px;
  }
  .nav-clock {
    font-size: 0.8rem;
    padding: 3px 8px;
    min-width: 50px;
  }
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

/* Headings — uppercase like nav */
h1, h2, h3, h4,
.col-header h2,
.order-item-name,
.order-total span:first-child,
.card-label {
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-link:hover { background: var(--bg-card); color: var(--text); border-bottom-color: var(--accent); }
.nav-link.active { background: var(--accent); color: #fff; border-bottom-color: var(--accent); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 2px solid var(--border);
    flex-direction: column;
    padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 10px 16px; }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  background: var(--bg-card);
  color: var(--text);
}

.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-success { background: var(--success); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #000; }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-fab {
  width: 56px; height: 56px; border-radius: 0;
  padding: 0; font-size: 1.5rem;
  box-shadow: var(--shadow);
}

/* ========================================
   FORMS
   ======================================== */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(212,118,44,0.3);
}
.form-control-sm {
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  font-size: 0.85rem;
}
.btn-row { display: flex; gap: 10px; margin-top: 16px; }

/* ========================================
   TERMINAL PAGE
   ======================================== */
.terminal-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
  height: calc(100vh - 70px);
}

@media (max-width: 767px) {
  .terminal-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }
  .terminal-container .panel {
    display: block;
    max-height: none;
    overflow: visible;
  }
  .menu-list {
    max-height: 50vh;
  }
}

@media (min-width: 768px) {
  .terminal-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    height: calc(100vh - 70px);
  }
  .terminal-container .panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
  .terminal-container .panel > .form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
  }
  .menu-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }
  .order-items {
    flex: 1;
    min-height: 200px;
    overflow-y: auto;
  }
}

.panel {
  background: var(--bg-panel);
  border-radius: 0;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.panel h2 { margin-bottom: 16px; font-size: 1.2rem; }

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.menu-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s;
}

.menu-item-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.menu-item-info h3 { font-size: 1rem; margin-bottom: 2px; }
.menu-item-info p { font-size: 0.75rem; color: var(--text-muted); }

.menu-allergen-hint {
  font-size: 0.6rem;
  margin-left: 2px;
  opacity: 0.7;
  white-space: nowrap;
}
.menu-item-price { font-weight: 700; color: var(--accent); font-size: 0.9rem; }

/* Customise Panel */
.customise-panel {
  background: var(--bg-card);
  border-radius: 0;
  padding: 16px;
  margin-top: 12px;
  border: 1px solid var(--border);
  max-height: 50vh;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .customise-panel {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }
}
.customise-panel h3 { margin-bottom: 4px; }
.customise-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }

.customise-section { margin-bottom: 14px; }
.customise-section h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.ingredient-list { display: flex; flex-wrap: wrap; gap: 6px; }

.size-option-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  background: var(--bg-panel);
  border: 2px solid var(--border);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  transition: all 0.15s;
}
.size-option-btn:hover {
  border-color: var(--accent);
  background: var(--bg-card);
  transform: translateY(-1px);
}
.size-option-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.size-option-btn:active {
  transform: translateY(0);
}

/* Event Details Wrapper */
.event-details-wrapper {
  margin-bottom: 12px;
}

/* Collapsed summary row */
.event-details-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
  transition: background 0.15s;
}
.event-details-summary:hover {
  background: var(--bg-panel);
}
.event-details-toggle {
  font-size: 0.7rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.event-details-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.event-details-preview {
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* Expanded panel */
.event-details-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-left: 3px solid var(--accent);
  padding: 12px;
}
.event-details-panel .form-group {
  margin-bottom: 8px;
}
.event-details-panel .form-group:last-child {
  margin-bottom: 0;
}

.ing-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.ing-tag.default { background: var(--bg-panel); color: var(--text); border-color: var(--border); }
.ing-tag.removed { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); text-decoration: line-through; }
.ing-tag.excluded { opacity: 0.6; cursor: pointer; border-color: var(--accent); border-style: dashed; }
.ing-tag.added { background: var(--success-bg); color: var(--success); border-color: var(--success); }

.ing-tag .tag-icon { font-weight: 700; }
.ing-tag.added .tag-icon { color: var(--success); }
.ing-tag.removed .tag-icon { color: var(--danger); }

/* Order Review */
.order-items {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
}

.order-item {
  background: var(--bg-card);
  border-radius: 0;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}

.order-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.order-item-name { font-weight: 600; }
.order-item-qty {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.order-item-size {
  background: var(--info);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 6px;
  text-transform: uppercase;
}

.order-item-ingredients {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 10px;
}

.order-item-ingredients .ing-added { color: var(--success); }
.order-item-ingredients .ing-removed { color: var(--danger); text-decoration: line-through; }
.order-item-ingredients .ing-default { color: var(--text); }

.extra-dec-btn {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 0;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 4px;
  line-height: 1;
  transition: all 0.15s;
  vertical-align: middle;
}
.extra-dec-btn:hover {
  background: var(--danger);
  color: #fff;
}

.order-item-price {  font-weight: 600; color: var(--success); }
.remove-item-btn {
  background: none; border: none; color: var(--danger);
  cursor: pointer; font-size: 1.2rem; padding: 0 4px;
}

.order-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.total-price { color: var(--success); font-size: 1.5rem; }

/* Payment status */
.payment-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--border);
}
.payment-status.pending { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }
.payment-status.paid { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.payment-status.cash { background: var(--info); color: #fff; border-color: var(--info); }
.payment-status.failed { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }

.offline-status {
  background: var(--warning-bg);
  color: var(--warning);
  padding: 8px 12px;
  border-radius: 0;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--warning);
}

/* ========================================
   DISPLAY PAGE (KDS)
   ======================================== */
.display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-panel);
  border-bottom: 2px solid var(--border);
}
.display-header h1 { font-size: 1.1rem; margin: 0; }
#toggleNavBtn {
  font-size: 0.9rem;
  padding: 4px 10px;
  margin-left: 8px;
}
.nav-hidden .main-nav {
  display: none;
}
.nav-hidden .kanban-board {
  min-height: calc(100vh - 50px);
}
.event-label {
  background: var(--accent);
  color: #fff;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 10px;
}
.order-count { color: var(--text-muted); font-weight: 600; }

.kanban-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px;
  min-height: calc(100vh - 80px);
}

@media (max-width: 768px) {
  .kanban-board { grid-template-columns: 1fr; }
}

.kanban-col {
  background: var(--bg-panel);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
  border: 1px solid var(--border);
}

.col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 0;
  font-weight: 700;
}

.col-header h2 { font-size: 1rem; letter-spacing: 1px; text-transform: uppercase; }
.col-count {
  background: rgba(0,0,0,0.3);
  padding: 2px 10px;
  border-radius: 0;
  font-size: 0.85rem;
}

.col-header-new { background: #b45309; }
.col-header-progress { background: #c2410c; }
.col-header-done { background: #15803d; }

.col-orders {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}

/* Order Card on Display */
.disp-order-card {
  background: var(--bg-card);
  border-radius: 0;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 4px solid var(--border);
  position: relative;
}

.disp-order-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.disp-order-card.status-pending { border-left-color: #eab308; }
.disp-order-card.status-in_progress { border-left-color: #f97316; }
.disp-order-card.status-completed { border-left-color: var(--success); }

.disp-order-card.urgent {
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0%, 100% { border-left-color: var(--danger); box-shadow: 0 0 0 0 rgba(255,82,82,0.4); }
  50% { border-left-color: var(--danger); box-shadow: 0 0 10px 3px rgba(255,82,82,0.3); }
}

.order-timer {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.order-timer.urgent { color: var(--danger); }

.order-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.order-card-id { font-weight: 700; font-size: 0.95rem; }
.order-card-name { color: var(--text-muted); font-size: 0.85rem; }

.order-card-items { margin: 8px 0; }

.order-card-item {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: opacity 0.15s;
}

.order-card-item.item-crossed {
  cursor: pointer;
  opacity: 0.45;
}

.order-card-item.item-crossed:hover {
  opacity: 0.7;
}

.card-item-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.card-item-name .qty-badge {
  background: var(--accent);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.card-item-ings {
  font-size: 0.75rem;
  padding-left: 6px;
  line-height: 1.4;
}

.card-item-ings .ing-added {
  color: var(--success);
  font-weight: 600;
}
.card-item-ings .ing-removed {
  color: var(--danger);
  text-decoration: line-through;
}
.card-item-ings .ing-default {
  color: var(--text);
  opacity: 0.7;
}

.order-card-notes {
  margin-top: 8px;
  padding: 6px 8px;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
}

.order-card-payment-status {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.order-card-payment-status.paid {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}
.order-card-payment-status.cash {
  background: var(--info);
  color: #fff;
  border: 1px solid var(--info);
}

.order-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.order-card-actions .btn { flex: 1; padding: 8px; font-size: 0.8rem; }

/* Past Orders Panel */
.past-orders-panel {
  position: fixed;
  top: 0; right: 0;
  width: 400px; max-width: 90vw;
  height: 100vh;
  background: var(--bg-panel);
  border-left: 2px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
}

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

.search-bar { padding: 10px 16px; }
.search-bar input { width: 100%; }

.past-orders-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
}

.past-order-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.past-order-card:hover { border: 1px solid var(--accent); }

.fixed-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
}

/* ========================================
   INVENTORY PAGE
   ======================================== */
.page-container { padding: 20px; max-width: 1200px; margin: 0 auto; width: 100%; box-sizing: border-box; overflow-x: hidden; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.page-header h1 { font-size: 1.3rem; }
.header-controls { display: flex; gap: 8px; align-items: center; }

.category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cat-tab {
  padding: 6px 16px;
  border-radius: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.cat-tab:hover, .cat-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.inv-card {
  background: var(--bg-panel);
  border-radius: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
}

.inv-card.low-stock { border-left-color: var(--danger); }
.inv-card.medium-stock { border-left-color: var(--warning); }
.inv-card.ok-stock { border-left-color: var(--success); }

.inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.inv-card-name { font-weight: 600; }
.inv-card-cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 10px;
}

.inv-stock-bar {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  margin: 8px 0;
  overflow: hidden;
}
.inv-stock-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.inv-stock-fill.ok { background: var(--success); }
.inv-stock-fill.medium { background: var(--warning); }
.inv-stock-fill.low { background: var(--danger); }

.inv-stock-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}
.inv-stock-level { font-weight: 700; }
.inv-stock-level.low { color: var(--danger); }
.inv-card-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ======================================== 
   MENU MANAGEMENT PAGE
   ======================================== */
.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.menu-card {
  background: var(--bg-panel);
  border-radius: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
}
.menu-card.disabled { opacity: 0.5; border-left-color: var(--text-muted); }
.menu-card.side { border-left-color: var(--info); }

.menu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.menu-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.menu-card-actions .btn {
  padding: 6px 10px;
  font-size: 0.75rem;
  text-align: center;
}

/* ========================================
   SUMMARY PAGE
   ======================================== */
.summary-content { padding: 10px 0; }

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .summary-cards { grid-template-columns: 1fr; }
}

.summary-card {
  background: var(--bg-panel);
  border-radius: 0;
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border);
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.card-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.summary-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .summary-details { grid-template-columns: 1fr; }
}

.detail-section {
  background: var(--bg-panel);
  border-radius: 0;
  padding: 16px;
  border: 1px solid var(--border);
}

.detail-section h3 { font-size: 0.95rem; margin-bottom: 10px; }

.detail-list { list-style: none; }
.detail-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.detail-list li:last-child { border-bottom: none; }
.detail-list .count {
  background: var(--accent);
  color: #fff;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ========================================
   MODALS
   ======================================== */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 20px;
}

.modal-content {
  background: var(--bg-panel);
  border-radius: 0;
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 6px 6px 0px rgba(0,0,0,0.5);
  border: 2px solid var(--border);
}
.modal-content h2 { margin-bottom: 16px; }
.modal-sm { max-width: 380px; }
.modal-lg { max-width: 650px; }

.stock-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.selected-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 30px;
}

.selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-card);
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid var(--border);
}

.selected-tag .remove-tag {
  cursor: pointer;
  color: var(--danger);
  font-weight: 700;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; border: 1px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ========================================
   MOBILE OVERRIDES
   ======================================== */
@media (max-width: 480px) {
  .panel { padding: 14px; }
  .disp-order-card { padding: 10px; }
  .order-timer { font-size: 1.1rem; }
}

/* Sandbox Payment Modal */
.sandbox-only { display: none; }
.sandbox-mode .sandbox-only { display: block; }

.sandbox-payment-modal {
  max-width: 420px;
  text-align: center;
  padding: 30px;
  position: relative;
}

.sandbox-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--warning);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border-radius: 3px;
}

.sandbox-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.sandbox-payment-details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.sandbox-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.9rem;
}

.sandbox-value {
  font-weight: 700;
}

.sandbox-value.mono {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sandbox-card-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.sandbox-card-animation.tapping {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: scale(1.02);
}

.sandbox-card-animation.success {
  border-color: var(--success);
  background: var(--success-bg);
}

.sandbox-card-animation.failed {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.card-icon {
  font-size: 3rem;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.sandbox-card-animation.tapping .card-icon {
  animation: tap-pulse 0.5s ease-in-out 3;
}

@keyframes tap-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.tap-indicator {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.sandbox-pay-result {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
}

.sandbox-pay-result.success {
  display: block;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

.sandbox-pay-result.failed {
  display: block;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.sandbox-btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.sandbox-btn-row .btn-lg {
  padding: 14px 40px;
  font-size: 1.1rem;
}

/* Cash Payment Modal */
.cash-modal {
  max-width: 400px;
  text-align: center;
  padding: 30px;
}

.cash-total-display {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.cash-total-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cash-total-amount {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.cash-input {
  font-size: 1.5rem !important;
  text-align: center;
  font-weight: 700;
  padding: 12px !important;
  width: 100%;
  box-sizing: border-box;
}

.cash-quick-btns {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cash-quick-btn {
  min-width: 60px;
  padding: 8px 14px !important;
  font-size: 0.9rem;
  font-weight: 600;
}

.cash-change {
  background: var(--success-bg);
  border: 2px solid var(--success);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.cash-change-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--success);
  margin-bottom: 4px;
}

.cash-change-amount {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--success);
}

.cash-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--danger);
  font-weight: 600;
  display: none;
}

/* PWA Install Button */
.pwa-install-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: all 0.2s;
  display: none;
}

.pwa-install-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.pwa-install-btn:active {
  transform: translateY(0);
}

/* Extras collapse/expand */
.extra-collapsed { display: none; }
.extra-expanded { animation: extraFadeIn 0.2s ease-out; }

@keyframes extraFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.show-more-extras-btn {
  margin-top: 6px;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  padding: 6px 12px !important;
  border-style: dashed !important;
}

/* Brand Selector */
.brand-selector {
  position: relative;
}

.brand-current {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.brand-current:hover {
  border-color: var(--accent);
}

.brand-dot {
  font-size: 1.2rem;
}

.brand-name {
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-chevron {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.brand-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
  overflow: hidden;
}

.brand-dropdown-list {
  max-height: 240px;
  overflow-y: auto;
}

.brand-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.brand-option:hover {
  background: var(--bg-card);
}

.brand-option.active {
  background: var(--accent-bg);
  font-weight: 600;
}

.brand-option-emoji {
  font-size: 1.2rem;
}

.brand-option-name {
  flex: 1;
}

.brand-option-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.brand-add-btn {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.brand-add-btn:hover {
  background: var(--accent-bg);
}

:root {
  --brand-color: #2dd4bf;
}

/* ========================================
   ALLERGENS PAGE
   ======================================== */

.allergen-date-bar {
  
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 0 8px 0;
  letter-spacing: 0.5px;
}

.allergen-matrix-wrapper {
  width: 100%;
}

/* Allergen table is now full-width, no scroll wrapper */
.allergen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  table-layout: fixed;
}

.allergen-table th,
.allergen-table td {
  padding: 4px 6px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
}

.allergen-table thead th {
  background: var(--bg-panel);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 0.6rem;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.allergen-col-header {
  min-width: 50px;
  width: 55px;
}

.allergen-header-icon {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 1px;
}

.allergen-header-name-row {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.allergen-header-name {
  display: block;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.allergen-item-header {
  text-align: left;
  min-width: 120px;
  width: 130px;
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--bg-panel);
  font-size: 0.7rem;
}

.allergen-brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  color: var(--accent);
  padding: 8px 8px 4px 8px;
  border-top: 2px solid var(--accent);
  margin-top: 8px;
}

.allergen-date-inline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.5px;
}

.allergen-item-cell {
  text-align: left;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: var(--bg);
  z-index: 1;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.7rem;
}
  font-weight: 600;
}

.allergen-inline-icon {
  font-size: 0.65rem;
  margin-left: 1px;
  cursor: help;
}

.allergen-present {
  background: rgba(248, 113, 113, 0.15);
  text-align: center;
}

.allergen-tick {
  color: var(--danger);
  font-weight: 700;
  font-size: 0.85rem;
}

.allergen-specific-label {
  display: block;
  font-size: 0.5rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
  line-height: 1.1;
}

.allergen-absent {
  background: var(--bg);
}

/* Tooltip on hover for allergen columns */
.allergen-table td[title]:hover::after,
.allergen-table th[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  color: var(--text);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.allergen-table td,
.allergen-table th {
  position: relative;
}

/* ========================================
   ALLERGEN CHECKBOXES (in inventory form)
   ======================================== */
.allergen-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  max-height: 150px;
  overflow-y: auto;
}

.allergen-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.8rem;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
  transition: all 0.15s;
  color: var(--text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.allergen-checkbox:hover {
  border-color: var(--accent);
}

.allergen-checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.allergen-checkbox:has(input:checked) {
  background: var(--warning-bg);
  border-color: var(--warning);
  color: var(--warning);
}

.allergen-loading {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* Temps Page */
.temps-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}
.temps-tab {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s;
}
.temps-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}
.temps-tab.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.temps-date-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.temps-date-label {
  font-weight: 700;
  font-size: 1rem;
  min-width: 180px;
  text-align: center;
}

.temps-section {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.temps-section h3 {
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.temps-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.temps-section-header h3 {
  margin-bottom: 0;
}

.temps-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.temps-row label {
  min-width: 140px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.temps-input {
  padding: 8px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  width: 120px;
  box-sizing: border-box;
}
.temps-input:focus {
  outline: none;
  border-color: var(--accent);
}
.temps-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.temps-hot-hold-header {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.temps-hot-hold-header span:first-child {
  flex: 1;
}
.temps-hot-hold-header span:not(:first-child) {
  width: 60px;
  text-align: center;
}

.temps-hot-hold-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.temps-hot-name {
  flex: 1;
}

.temps-hot-temp {
  width: 60px;
  text-align: center;
  padding: 4px;
  font-size: 0.85rem;
}

.temps-reminder {
  background: var(--warning-bg, #fef3c7);
  color: var(--warning-text, #92400e);
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--warning-border, #f59e0b);
}

.temps-countdown {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.temps-status {
  font-size: 0.75rem;
}

.temps-log-slot {
  margin-bottom: 12px;
  padding: 8px;
  background: var(--bg-panel);
  border-radius: 4px;
  border: 1px solid var(--border);
}
.temps-log-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.temps-log-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.temps-log-entry:last-child { border-bottom: none; }
.temps-log-name { flex: 1; color: var(--text); }
.temps-log-val { font-weight: 700; color: var(--success); }

.fridge-row .temps-row { margin-bottom: 4px; }
.fridge-row .temps-row label { min-width: 40px; font-size: 0.8rem; text-align: left; }
.fridge-row .temps-input { padding: 4px 8px; font-size: 0.85rem; }

.temps-del-entry-btn {
  padding: 2px 6px;
  font-size: 0.7rem;
  line-height: 1;
  margin-left: 4px;
}

.temps-log-action-wrap {
  margin-top: 8px;
}

.temps-log-action {
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--bg-panel);
  border-left: 3px solid var(--warning-border, #f59e0b);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-radius: 0 4px 4px 0;
}

.temps-saved-msg {
  color: var(--success);
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 10px;
}

.temps-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.temps-history-table th,
.temps-history-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.temps-history-table th {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.allergen-checkbox-wrapper {
  margin-bottom: 4px;
}
.allergen-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.allergen-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.allergen-specific {
  margin: 4px 0 0 22px;
}
.allergen-specific-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.allergen-specific-select {
  padding: 4px 8px !important;
  font-size: 0.8rem !important;
  width: 100% !important;
}

.allergen-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px 0 8px 0;
}
.fsa-logo {
  height: 50px;
  width: auto;
  opacity: 0.7;
}


/* ========================================
   SLIDING NAVIGATION
   ======================================== */

/* Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Slide Nav Panel */
.slide-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.slide-nav.open {
  transform: translateX(0);
}

/* Nav Header */
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.nav-brand-text {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nav-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.nav-close:hover {
  color: var(--text);
}

/* Nav User */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-user-avatar {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.nav-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nav-user-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Nav Sections */
.nav-sections {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.nav-section {
  margin-bottom: 4px;
}
.nav-section-title {
  padding: 8px 16px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

/* Nav Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
  cursor: pointer;
}
.nav-item:hover {
  background: var(--bg-card);
}
.nav-item.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
}
.nav-item.active .nav-icon {
  background: var(--accent);
}

/* Nav Icons — CSS-only, no emojis */
.nav-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--text-muted);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  opacity: 0.7;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
  background: var(--accent);
}

/* Icon masks using SVG data URIs */
.nav-icon-terminal { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }
.nav-icon-display { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cline x1='8' y1='21' x2='16' y2='21'/%3E%3Cline x1='12' y1='17' x2='12' y2='21'/%3E%3C/svg%3E"); }
.nav-icon-inventory { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3C/svg%3E"); }
.nav-icon-menu { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E"); }
.nav-icon-allergens { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E"); }
.nav-icon-temps { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z'/%3E%3C/svg%3E"); }
.nav-icon-dashboard { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.nav-icon-summary { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E"); }
.nav-icon-reports { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E"); }
.nav-icon-annual { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"); }
.nav-icon-events { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.nav-icon-pitch { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='12' y1='1' x2='12' y2='23'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E"); }
.nav-icon-users { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.nav-icon-brands { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E"); }
.nav-icon-permissions { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.nav-icon-settings { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); }
.nav-icon-logout { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E"); }

/* Admin-only items hidden by default */
.admin-only {
  display: none !important;
}
body.role-admin .admin-only {
  display: block !important;
}
body.role-admin .admin-only.top-bar-icon {
  display: flex !important;
}

/* Nav Footer */
.nav-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  border-radius: 4px;
}
.nav-logout:hover {
  background: var(--bg-card);
}

/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-panel);
  border-bottom: 2px solid var(--border);
  gap: 12px;
}
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.top-bar-center {
  flex: 1;
  min-width: 0;
}
.nav-brand-top {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-clock {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.top-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}
.top-bar-icon:hover {
  background: var(--bg-card);
  color: var(--text);
}
.top-bar-icon .nav-icon {
  width: 18px;
  height: 18px;
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
  padding: 16px;
  min-height: calc(100vh - 50px);
}

/* Settings Sidebar */
.settings-nav {
  position: fixed;
  top: 52px;
  left: 0;
  width: 180px;
  height: calc(100vh - 52px);
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 12px 0;
  z-index: 100;
  overflow-y: auto;
  display: none;
}

body.page-settings .settings-nav,
body.page-users .settings-nav,
body.page-permissions .settings-nav,
body.page-brands .settings-nav {
  display: block;
}

body.page-settings .main-content,
body.page-users .main-content,
body.page-permissions .main-content,
body.page-brands .main-content {
  margin-left: 180px;
}

.settings-nav-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 8px 16px 12px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.settings-nav-item:hover {
  background: var(--bg-card);
  color: var(--text);
}

.settings-nav-item.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
}

.settings-nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Hide old nav elements */
.main-nav { display: none !important; }


.nav-user-summary {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  flex-shrink: 0;
}
/* Nav Brand Selector */
.nav-brand-selector {
  position: relative;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-brand-current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.nav-brand-current:hover {
  background: var(--bg-card);
}
.nav-brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent);
}
.nav-brand-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-brand-chevron {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1;
}
.nav-brand-dropdown {
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.nav-brand-list {
  padding: 4px;
}
.nav-brand-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}
.nav-brand-item:hover {
  background: var(--bg-panel);
}
.nav-brand-item.active {
  font-weight: 600;
}
.nav-brand-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Hide scrollbars but keep scroll functionality */
.menu-list::-webkit-scrollbar,
.terminal-container .panel::-webkit-scrollbar,
.customise-panel::-webkit-scrollbar,
.kanban-col-orders::-webkit-scrollbar,
.allergen-matrix-wrapper::-webkit-scrollbar,
.nav-sections::-webkit-scrollbar,
.col-orders::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.menu-list,
.terminal-container .panel,
.customise-panel,
.kanban-col-orders,
.allergen-matrix-wrapper,
.nav-sections,
.col-orders {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.login-page .top-bar { display: none !important; }
.login-page .main-content { min-height: 100vh; }

/* Toggle top bar visibility (Display page hamburger) */
body.nav-hidden .top-bar { display: none !important; }
body.nav-hidden .main-content { padding-top: 0 !important; }

/* Checkbox alignment */
input[type="checkbox"] {
  vertical-align: middle;
  margin: 0 6px 0 0;
  width: auto;
  height: auto;
  accent-color: var(--accent);
  cursor: pointer;
}
label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
label:has(input[type="checkbox"]) input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

.nav-icon-compliance { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E"); }
.compliance-grid { width: 100%; }
.compliance-card:hover { border-color: var(--accent); }
.compliance-preview:hover { opacity: 0.9; }
.compliance-expiry-expired { background: #dc2626 !important; color: #fff !important; font-weight: 700; }
.compliance-expiry-warning { background: #f59e0b !important; color: #000 !important; font-weight: 600; }
.page-help-icon { display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--bg-card);border:1px solid var(--border);color:var(--text-muted);font-size:0;cursor:pointer;flex-shrink:0;transition:all 0.15s; }
.page-help-icon:hover { border-color:var(--accent); color:var(--accent); }
.page-help-icon svg { width:16px;height:16px;stroke:currentColor;stroke-width:2;fill:none; }



/* On small/vertical screens, increase top bar height for hamburger accessibility */
@media (max-width: 600px) and (orientation: portrait) {
  .top-bar { padding-top: 36px !important; }
}
