@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --green-deep:  #00703C;
  --green-mid:   #2d9b5a;
  --green-light: #54b666;
  --green-pale:  #e6f5ec;
  --ink:         #0f1f14;
  --ink-soft:    #3a4a40;
  --sidebar-bg:  #1a2e22;
  --bg:          #f0f5f2;
  --white:       #ffffff;
  --border:      #d8e8dc;
  --muted:       #7a8c80;
  --radius:      12px;
  --radius-lg:   18px;
  --shadow:      0 4px 24px rgba(0,0,0,0.07);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
}

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
  width: 72px;
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 200;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar-logo {
  width: 44px; height: 44px;
  background: var(--green-deep);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  overflow: hidden;
}

.sidebar-logo img { width: 30px; height: 30px; object-fit: contain; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  width: 100%;
  padding: 0 10px;
}

.sidebar-bottom { padding: 0 10px; width: 100%; }

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  border-radius: 12px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 18px;
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.nav-item.active { background: var(--green-deep); color: #fff; box-shadow: 0 4px 14px rgba(0,112,60,0.4); }

.nav-item::after {
  content: attr(title);
  position: absolute;
  left: 60px;
  background: var(--ink);
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 999;
}
.nav-item:hover::after { opacity: 1; }

/* ══════════════════════════════════════
   MAIN WRAPPER
══════════════════════════════════════ */
.main-wrapper {
  margin-left: 72px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 40px;
}

/* ── TOP HEADER ── */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.page-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: block;
  margin-top: 2px;
}

.header-right { display: flex; align-items: center; gap: 20px; }

.header-date {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg);
  padding: 8px 14px;
  border-radius: 30px;
  border: 1px solid var(--border);
}
.header-date i { color: var(--green-deep); font-size: 13px; }

.header-user { display: flex; align-items: center; gap: 10px; cursor: pointer; }

.user-avatar {
  width: 36px; height: 36px;
  background: var(--green-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
}

.user-name { font-size: 0.9rem; font-weight: 600; color: var(--ink); }

/* ══════════════════════════════════════
   STAT CARDS
══════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 2px;
  padding: 28px 36px 0;
}



.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-info { display: flex; flex-direction: column; gap: 2px; }

.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  font-family: 'Playfair Display', serif;
}

.stat-change { font-size: 0.78rem; font-weight: 600; }
.stat-change.positive { color: #2d9b5a; }
.stat-change.negative { color: #e05555; }
.stat-change.neutral  { color: var(--muted); }

/* ══════════════════════════════════════
   CONTENT GRID
══════════════════════════════════════ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  padding: 20px 36px 0;
}

.table-panel,
.summary-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}

/* ── PANEL ACTIONS ── */
.panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
}
.search-wrap i { color: var(--muted); font-size: 13px; }
.search-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.87rem;
  color: var(--ink);
  width: 160px;
}
.search-wrap input::placeholder { color: var(--muted); }

#statusFilter {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  padding: 7px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.87rem;
  color: var(--ink);
  outline: none;
  cursor: pointer;
}

#categoryFilter {
    border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  padding: 7px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.87rem;
  color: var(--ink);
  outline: none;
  cursor: pointer;
}

.btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green-deep);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-refresh:hover { background: var(--green-mid); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table thead th {
  padding: 13px 18px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: #fafcfb;
}

.admin-table tbody td {
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid #f0f5f2;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background 0.15s ease; }
.admin-table tbody tr:hover td { background: #f6fbf7; }

.order-id { font-weight: 700; color: var(--green-deep); font-size: 0.88rem; }

.customer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--ink);
}

.avatar-sm {
  width: 32px; height: 32px;
  background: var(--green-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green-deep);
  flex-shrink: 0;
  text-transform: uppercase;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f5f2;
  color: var(--ink-soft);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.time-chip i { color: var(--muted); font-size: 11px; }

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: capitalize;
}
.status-pending   { background: #fff8e1; color: #c47d00; }
.status-completed { background: #e6f5ec; color: #00703C; }
.status-cancelled { background: #fdecea; color: #c0392b; }

.action-btns { display: flex; gap: 6px; }

.act-btn {
  width: 30px; height: 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.2s, transform 0.15s;
}
.act-btn.done   { background: #e6f5ec; color: #00703C; }
.act-btn.cancel { background: #fdecea; color: #c0392b; }
.act-btn:hover  { transform: scale(1.12); }
.act-btn.done:hover   { background: #c8ebd4; }
.act-btn.cancel:hover { background: #f5cac8; }

.loading-row, .empty-row {
  text-align: center;
  padding: 40px !important;
  color: var(--muted);
  font-size: 0.9rem;
}

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2.5px solid #d8e8dc;
  border-top-color: var(--green-deep);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   SUMMARY PANEL
══════════════════════════════════════ */
.summary-panel { display: flex; flex-direction: column; }

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e6f5ec;
  color: var(--green-deep);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.live-dot {
  width: 7px; height: 7px;
  background: var(--green-deep);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.pickup-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d8e8dc transparent;
}

.pickup-empty { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 20px 0; }

.pickup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 0.15s;
}
.pickup-item:hover { background: var(--green-pale); }

.pickup-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #54b666, #00703C);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.pickup-info { flex: 1; min-width: 0; }
.pickup-name { display: block; font-size: 0.88rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickup-detail { display: block; font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pickup-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green-deep);
  white-space: nowrap;
  background: var(--green-pale);
  padding: 3px 8px;
  border-radius: 6px;
}

.divider { height: 1px; background: var(--border); margin: 8px 16px; }

.quick-stats { padding: 8px 16px 20px; display: flex; flex-direction: column; gap: 12px; }

.qs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.qs-label { font-size: 0.83rem; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; }
.qs-val { font-size: 0.88rem; font-weight: 700; color: var(--ink); max-width: 100px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr; }
  .summary-panel { display: none; }
}
@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stats-row, .content-grid { padding: 16px 20px 0; }
  .top-header { padding: 0 20px; }
  .search-wrap input { width: 100px; }
}
/* ══════════════════════════════════════
   MENU PAGE — CARD GRID, DRAWER, MODAL
══════════════════════════════════════ */
    /* ══════════════════════════════════════
       MENU PAGE — CARD GRID LAYOUT
    ══════════════════════════════════════ */

    .menu-toolbar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 18px 36px;
      background: var(--white);
      margin-top: 18px;
      border-bottom: 1px solid var(--border);
      flex-wrap: wrap;
    }

    .menu-toolbar .search-wrap { flex: 1; min-width: 180px; }
    .menu-toolbar .search-wrap input { width: 100%; }

    /* ── CARD GRID ── */
    .menu-card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 20px;
      padding: 24px 36px 40px;
    }

    .menu-card {
      background: var(--white);
      border-radius: 18px;
      border: 1px solid var(--border);
      box-shadow: 0 4px 20px rgba(0,112,60,0.08);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: transform 0.22s ease, box-shadow 0.22s ease;
      position: relative;
    }

    .menu-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 32px rgba(0,112,60,0.14);
    }

    .menu-card-img {
      width: 100%;
      height: 150px;
      object-fit: cover;
      background: var(--green-pale);
      display: block;
    }

    .menu-card-img-placeholder {
      width: 100%;
      height: 150px;
      background: linear-gradient(135deg, #e6f5ec, #c8ebd4);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.8rem;
      color: var(--green-deep);
      font-weight: 700;
      font-family: 'Playfair Display', serif;
    }

    .menu-card-body {
      padding: 14px 16px;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .menu-card-name {
      font-weight: 700;
      font-size: 0.95rem;
      color: var(--ink);
      line-height: 1.3;
      margin: 0;
    }

    .menu-card-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 2px;
    }

    .menu-card-price {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--green-deep);
    }

    .menu-card-cat {
      font-size: 0.72rem;
      font-weight: 600;
      background: var(--green-pale);
      color: var(--green-deep);
      padding: 3px 9px;
      border-radius: 20px;
    }

    /* Status pill overlaid on image */
    .menu-card-status {
      position: absolute;
      top: 10px;
      right: 10px;
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 3px 9px;
      border-radius: 20px;
    }

    .menu-card-status.available   { background: rgba(230,245,236,0.95); color: #00703C; }
    .menu-card-status.unavailable { background: rgba(253,236,234,0.95); color: #c0392b; }

    /* Stock badge */
    .menu-card-stock {
      font-size: 0.78rem;
      color: var(--muted);
      margin-top: auto;
      padding-top: 8px;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .menu-card-stock i { font-size: 11px; }
    .menu-card-stock.low  { color: #c47d00; }
    .menu-card-stock.out  { color: #c0392b; }

    /* Card action buttons */
    .menu-card-actions {
      display: flex;
      gap: 0;
      border-top: 1px solid var(--border);
    }

    .menu-card-actions button {
      flex: 1;
      height: 40px;
      border: none;
      background: transparent;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background 0.18s, color 0.18s;
    }

    .menu-card-actions .card-edit {
      color: var(--green-deep);
      border-right: 1px solid var(--border);
    }

    .menu-card-actions .card-edit:hover { background: var(--green-pale); }

    .menu-card-actions .card-delete { color: #c0392b; }
    .menu-card-actions .card-delete:hover { background: #fdecea; }

    /* Empty state card */
    .menu-empty {
      grid-column: 1 / -1;
      text-align: center;
      padding: 60px 20px;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }

    .menu-empty i { font-size: 3rem; opacity: 0.4; }
    .menu-empty p { font-size: 0.95rem; margin: 0; }

    .loading-card {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 60px;
      color: var(--muted);
      font-size: 0.92rem;
    }

    /* Ensure delete modal sits above the drawer */
    .modal-overlay { z-index: 600 !important; }
    .drawer-overlay {
      position: fixed;
      inset: 0;
      background: rgba(8,20,12,0.45);
      backdrop-filter: blur(3px);
      z-index: 400;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s;
    }

    .drawer-overlay.open { opacity: 1; pointer-events: all; }

    .form-drawer {
      position: fixed;
      top: 0; right: -480px; bottom: 0;
      width: 440px;
      max-width: 96vw;
      background: var(--white);
      z-index: 500;
      box-shadow: -12px 0 40px rgba(0,0,0,0.18);
      display: flex;
      flex-direction: column;
      transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
      overflow: hidden;
    }

    .form-drawer.open { right: 0; }

    .drawer-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 22px 24px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }

    .drawer-header h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--ink);
      margin: 0;
    }

    .drawer-close {
      width: 32px; height: 32px;
      background: var(--bg);
      border: none;
      border-radius: 50%;
      font-size: 18px;
      color: #666;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    .drawer-close:hover { background: #e0e0e0; color: #111; }

    .drawer-body {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      scrollbar-width: thin;
      scrollbar-color: var(--border) transparent;
    }

    /* Image preview inside drawer */
    .img-preview-wrap {
      width: 100%;
      height: 160px;
      border-radius: 12px;
      overflow: hidden;
      border: 2px dashed var(--border);
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      margin-bottom: 4px;
    }

    .img-preview-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: none;
    }

    .img-preview-wrap img.loaded { display: block; }

    .img-preview-placeholder {
      text-align: center;
      color: var(--muted);
      font-size: 0.82rem;
    }

    .img-preview-placeholder i { font-size: 2rem; display: block; margin-bottom: 6px; opacity: 0.4; }

    .drawer-footer {
      padding: 16px 24px;
      border-top: 1px solid var(--border);
      display: flex;
      gap: 10px;
      flex-shrink: 0;
      background: var(--white);
    }

    .drawer-footer .btn-secondary { flex: 0 0 auto; padding: 10px 18px; }
    .drawer-footer .btn-save {
      flex: 1;
      height: 46px;
      background: var(--green-deep);
      color: #fff;
      border: none;
      border-radius: 10px;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.95rem;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 4px 16px rgba(0,112,60,0.22);
      transition: background 0.2s, transform 0.15s;
    }

    .drawer-footer .btn-save:hover {
      background: var(--green-mid);
      transform: translateY(-1px);
    }

    /* Form groups inside drawer */
    .drawer-body .form-group label {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.65px;
      color: var(--muted);
      margin-bottom: 5px;
      display: block;
    }

    .drawer-body .form-group input,
    .drawer-body .form-group select,
    .drawer-body .form-group textarea {
      border: 1.5px solid var(--border);
      border-radius: 8px;
      padding: 10px 13px;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.9rem;
      color: var(--ink);
      background: var(--bg);
      outline: none;
      width: 100%;
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
      resize: vertical;
    }

    .drawer-body .form-group input:focus,
    .drawer-body .form-group select:focus,
    .drawer-body .form-group textarea:focus {
      border-color: var(--green-light);
      box-shadow: 0 0 0 3px rgba(84,182,102,0.13);
      background: #fff;
    }

    /* Two-column row inside form */
    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .form-error-msg {
      color: #e05555;
      font-size: 0.8rem;
      background: #fdecea;
      border-radius: 8px;
      padding: 8px 12px;
      display: none;
    }

    /* ── STOCKS input extra ── */
    .stocks-hint {
      font-size: 0.75rem;
      color: var(--muted);
      margin-top: 3px;
    }

    @media (max-width: 768px) {
      .menu-card-grid { padding: 16px 20px 30px; }
      .menu-toolbar { padding: 12px 20px; }
      .form-row { grid-template-columns: 1fr; }
    }

/* ── DELETE MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,20,12,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  transform: translateY(12px);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.active .modal-box { transform: translateY(0); }

.modal-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 10px;
}
.modal-box p { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.btn-danger {
  background: #e05555;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-danger:hover { background: #c0392b; }

.btn-secondary {
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--border); }

/* item--unavailable used by menu cards */
.item--unavailable { opacity: 0.68; }

/* --- Tooltip Container --- */
.items-cell {
    position: relative;
    overflow: visible !important; 
    cursor: help;
}

/* --- The Tooltip Box --- */
.items-cell .summary-tooltip {
    visibility: hidden;
    width: 240px; 
    background-color: #ffffff;
    color: var(--ink);
    text-align: left;
    border-radius: 10px;
    padding: 15px;
    position: absolute;
    z-index: 99999;
    
   
    bottom: 30px; 
    left: 20px;
    
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
    opacity: 0;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.summary-tooltip strong {
    display: block;
    color: var(--green-deep);
    font-size: 0.85rem;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f5f2;
    padding-bottom: 5px;
}

.tooltip-list {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* --- Clipping Preventer --- */
.table-wrap {
    overflow: visible !important;
}

.items-cell:hover .summary-tooltip {
    visibility: visible;
    opacity: 1;
    bottom: 45px;
}