/* =========================================================================
   Pool Party Event Management System — Staff Module
   Matched to the existing Admin Panel visual language:
     Primary   White   #FFFFFF
     Secondary Navy    #0A3E8F
     Tertiary  Orange  #F68121
   Layout: fixed left sidebar (grouped nav) + top bar + content cards
   with a navy gradient header bar, mirroring the admin dashboard.
   ========================================================================= */

:root {
  --navy: #0A3E8F;
  --navy-deep: #0C2D6B;
  --navy-darker: #081F4D;
  --orange: #F68121;
  --orange-light: #FFA24D;
  --white: #FFFFFF;
  --page-bg: #EEF1F6;
  --border: #E6EAF1;
  --ink: #1F2937;
  --ink-soft: #6B7688;
  --ink-faint: #9AA4B5;

  --ok: #1FA97C;
  --ok-bg: #E4F8F0;
  --warn: #C98A0E;
  --warn-bg: #FFF3DE;
  --danger: #D64545;
  --danger-bg: #FCE9E8;
  --info-bg: #EAF1FB;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 18px -8px rgba(10, 46, 107, 0.12);
  --sidebar-w: 250px;
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; max-width: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  min-height: 100vh;
}

h1, h2, h3, h4, .display-font {
  font-family: 'Baloo 2', 'Inter', sans-serif;
  color: var(--navy-deep);
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--orange); }

/* ============================= APP SHELL ============================= */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ------------------------------ Sidebar ------------------------------ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo img {
  height: 44px;
  display: block;
}

.sidebar-nav {
  padding: 14px 12px;
  flex: 1;
}

.nav-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.9px;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 16px 10px 6px;
}
.nav-group-label:first-child { margin-top: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  transition: background .12s ease, color .12s ease;
}
.nav-item i { font-size: 1.05rem; color: var(--navy); width: 20px; text-align: center; }
.nav-item:hover { background: var(--info-bg); color: var(--navy); text-decoration: none; }
.nav-item.active {
  background: var(--info-bg);
  border-left-color: var(--orange);
  color: var(--navy-deep);
}
.nav-item.active i { color: var(--navy-deep); }

.sidebar-footer {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border);
}
.btn-sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--danger);
  font-weight: 700;
  font-size: 0.85rem;
}
.btn-sidebar-logout:hover { background: var(--danger-bg); color: var(--danger); }

/* ------------------------------ Main col ------------------------------ */
.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar h1 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}
.topbar .topbar-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-welcome {
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.topbar-welcome strong { color: var(--ink); }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: 'Baloo 2', sans-serif;
  flex-shrink: 0;
}

.stall-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--info-bg);
  color: var(--navy-deep);
  border: 1px solid #D6E3F7;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.btn-topbar-logout {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--danger-bg);
  background: var(--danger-bg);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
}
.btn-topbar-logout:hover { background: #f9dcda; color: var(--danger); }

.content-area {
  padding: 24px 26px 50px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

/* ============================ CONTENT CARDS ============================ */

/* Card with navy gradient header bar — mirrors the admin "Dashboard" card */
.section-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}
.section-card-head {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-darker) 100%);
  color: var(--white);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.section-card-head h2 {
  color: var(--white);
  font-size: 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-card-head .head-action a,
.section-card-head .head-action button {
  font-size: 0.78rem;
}
.section-card-body {
  padding: 22px;
}

/* Plain flat card (no header bar) — used for stats/filters/side panels */
.pool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}
/* Only stretch to fill height when explicitly placed inside a Bootstrap
   row/col grid (e.g. the 4 dashboard stat cards) — never by default,
   or a lone stat-card with no row/col sibling (Delivery History) blows
   up to fill all available space with nothing to constrain it. */
.row > [class*="col-"] > .stat-card {
  height: 100%;
}
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-card .stat-value {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--navy-deep);
}
.stat-card .stat-label {
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.icon-navy   { background: var(--info-bg); color: var(--navy); }
.icon-sun    { background: #FFF1DF;  color: var(--orange); }
.icon-ok     { background: var(--ok-bg); color: var(--ok); }
.icon-teal   { background: var(--info-bg); color: var(--navy); }

.page-heading { margin-bottom: 18px; }
.page-heading .eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--orange);
}
.page-heading h1 {
  font-size: 1.4rem;
  margin: 2px 0 4px;
}
.page-heading p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.88rem;
}

/* ------------------------------ Buttons ------------------------------ */
.btn-pool {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  transition: background .12s ease;
}
.btn-pool:hover { background: var(--navy-deep); color: var(--white); }

.btn-sun {
  background: var(--orange);
  border: 1px solid var(--orange);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
}
.btn-sun:hover { background: #DE7013; color: var(--white); }

.btn-outline-pool {
  background: var(--white);
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
}
.btn-outline-pool:hover { background: var(--info-bg); color: var(--navy-deep); }

.btn-ghost-light {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-ghost-light:hover { background: var(--page-bg); }

/* ------------------------------ Status badges ------------------------------ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: capitalize;
}
.status-received  { background: var(--warn-bg); color: var(--warn); }
.status-cooking    { background: #FFE4CC; color: var(--orange); }
.status-prepared   { background: var(--info-bg); color: var(--navy); }
.status-delivered { background: var(--ok-bg); color: var(--ok); }
.status-preparing { background: var(--info-bg); color: var(--navy); }
.status-cancelled  { background: var(--danger-bg); color: var(--danger); }
/* legacy values kept mapped in case any old data hasn't been migrated yet */
.status-pending   { background: var(--warn-bg); color: var(--warn); }
.status-partially_delivered { background: var(--info-bg); color: var(--navy); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ------------------------------ Item pipeline actions ------------------------------ */
.item-action-form { display: inline-flex; align-items: center; gap: 8px; }
.delivered-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ok);
  cursor: pointer;
  user-select: none;
}
.delivered-check input[type="checkbox"] {
  width: 19px; height: 19px;
  accent-color: var(--ok);
  cursor: pointer;
}

/* ------------------------------ Pickup card ------------------------------ */
.pickup-card {
  background: linear-gradient(120deg, var(--info-bg) 0%, var(--white) 70%);
  border: 1px solid #D6E3F7;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 20px;
}
.pickup-card .pickup-code {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.9rem;
  letter-spacing: 4px;
  color: var(--navy-deep);
}
.pickup-card .pickup-message {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 8px;
}

/* ------------------------------ Order rows / tables ------------------------------ */
.order-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: box-shadow .15s ease;
}
.order-row:hover { box-shadow: var(--shadow-card); }
.order-row .order-number {
  font-family: 'Baloo 2', sans-serif;
  color: var(--navy-deep);
  font-size: 1rem;
}
.order-row .order-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.table-pool thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 12px 10px;
  white-space: nowrap;
}
.table-pool td {
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
}
.table-pool tr:last-child td { border-bottom: none; }
.table-pool td:first-child, .table-pool th:first-child { padding-left: 20px; }
.table-pool td:last-child, .table-pool th:last-child { padding-right: 20px; }

/* ------------------------------ Sticky-header, scrollable-body tables ------------------------------ */
.table-scroll {
  overflow: auto;
  max-height: 62vh;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.table-scroll table { margin-bottom: 0; min-width: 560px; }
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.table-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: #C9D6EA; border-radius: 8px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }

/* Tables switch to a card list below the md breakpoint — desktop table
   markup gets .table-scroll-wrap (hidden on mobile), the matching card
   markup gets .mobile-card-list (hidden on desktop). No horizontal
   scrolling needed on phones. */
.table-scroll-wrap { display: block; }
.mobile-card-list { display: none; }

@media (max-width: 767.98px) {
  .table-scroll-wrap { display: none; }
  .mobile-card-list { display: block; }
}

.data-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.data-card:last-child { margin-bottom: 0; }
.data-card .data-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.data-card .data-card-title {
  font-family: 'Baloo 2', sans-serif;
  color: var(--navy-deep);
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.3;
}
.data-card .data-card-sub {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.data-card .data-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  padding: 6px 0;
  border-top: 1px dashed var(--border);
}
.data-card .data-card-row:first-of-type { border-top: none; }
.data-card .data-card-row .label {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.data-card .data-card-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.data-card .data-card-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ------------------------------ Filter chips (wrapping, never overflow) ------------------------------ */
.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  flex: 1 1 100px;
  text-align: center;
  white-space: nowrap;
}

/* ------------------------------ Forms ------------------------------ */
.form-pool label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 4px;
}
.form-pool .form-control,
.form-pool .form-select {
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: 9px 13px;
}
.form-pool .form-control:focus,
.form-pool .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10,62,143,0.12);
}

/* ------------------------------ Auth (login) screen ------------------------------ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--page-bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 20px 44px -18px rgba(10, 46, 107, 0.25);
  padding: 32px 30px 28px;
  position: relative;
}
.auth-card .auth-topbar {
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--orange) 100%);
  border-radius: 4px;
  margin: -32px -30px 24px;
}
.auth-card .auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.auth-card .auth-logo img { height: 52px; }
.auth-card h1 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 2px;
}
.auth-card .sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.84rem;
  margin-bottom: 22px;
}

/* ------------------------------ Scan card ------------------------------ */
.scan-frame {
  border: 2px dashed #C7D6EE;
  border-radius: var(--radius-lg);
  background: var(--info-bg);
  padding: 30px 20px;
  text-align: center;
}
.scan-frame .scan-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  color: var(--navy);
  box-shadow: var(--shadow-card);
}

/* ------------------------------ Utility ------------------------------ */
.text-teal { color: var(--navy); }
.text-navy { color: var(--navy); }
.text-sun { color: var(--orange); }
.bg-aqua { background: var(--info-bg); }
.divider-soft { border-top: 1px dashed var(--border); margin: 16px 0; }

.empty-state {
  text-align: center;
  padding: 46px 20px;
  color: var(--ink-soft);
}
.empty-state .empty-icon { font-size: 2.2rem; margin-bottom: 10px; }

.staff-footer {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.76rem;
  padding: 20px 0 6px;
}

/* ------------------------------ Hamburger toggle (mobile only) ------------------------------ */
.hamburger-btn {
  display: none;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--info-bg); }

.sidebar-close-btn {
  display: none;
  width: 32px; height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-soft);
  margin-left: auto;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 45, 0.45);
  z-index: 1040;
}
.sidebar-overlay.show { display: block; }

/* ------------------------------ Mobile (iPhone / small screens) ------------------------------ */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 78vw;
    max-width: 300px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 1050;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.25);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-logo {
    display: flex;
    align-items: center;
    padding: 14px 14px 12px;
  }
  .sidebar-close-btn { display: flex; }

  .sidebar-nav {
    display: block;
    padding: 10px 12px;
    overflow-y: auto;
  }
  .nav-group-label { display: block; }
  .nav-item { border-left: 3px solid transparent; border-bottom: none; }
  .nav-item.active { border-left-color: var(--orange); border-bottom-color: transparent; }

  .sidebar-footer { width: auto; }

  .hamburger-btn { display: flex; }

  .topbar { padding: 12px 16px; }
  .topbar > div:first-child { display: flex; align-items: center; gap: 12px; }
  .topbar h1 { font-size: 1.05rem; }
  .topbar-welcome { display: none; }
  .stall-pill { font-size: 0.7rem; padding: 4px 10px; }

  .content-area { padding: 16px 14px 40px; }
}

@media (max-width: 420px) {
  .avatar { width: 32px; height: 32px; font-size: 0.85rem; }
  .btn-topbar-logout { width: 32px; height: 32px; }
  .topbar h1 { font-size: 0.98rem; }
  .section-card-head { padding: 12px 16px; }
  .section-card-body { padding: 16px; }
}

/* =========================================================================
   NEW: Mobile-first card styles for Active Orders
   These styles power the new card-based interface on active-orders.php
   ========================================================================= */

/* Order card — main container for each order */
.order-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--page-bg);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.order-card-header .order-number {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-deep);
  font-family: 'Baloo 2', 'Inter', sans-serif;
}

.order-card-header .order-participant {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-left: 0.5rem;
}

.order-card-header .order-time {
  font-size: 0.72rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* Items list inside each order */
.order-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

/* Individual item row */
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: var(--page-bg);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.item-qty {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  min-width: 2rem;
}

.item-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
}

/* Status badge (reuses existing .status-pill but with consistent sizing) */
.item-row .status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Action buttons for each item */
.item-actions {
  flex-shrink: 0;
}

.action-form {
  display: inline-block;
}

.btn-ready,
.btn-deliver {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.btn-ready {
  background: var(--orange);
  color: var(--white);
}
.btn-ready:hover {
  background: #DE7013;
  color: var(--white);
}
.btn-ready:active {
  transform: scale(0.96);
}

.btn-deliver {
  background: var(--ok);
  color: var(--white);
}
.btn-deliver:hover {
  background: #0E8E66;
  color: var(--white);
}
.btn-deliver:active {
  transform: scale(0.96);
}

.delivered-badge {
  font-size: 0.78rem;
  color: var(--ok);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Order footer - shows overall order status */
.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.6rem;
  border-top: 1px solid var(--page-bg);
  font-size: 0.72rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: 0.25rem;
}

.order-card-footer .order-status {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.order-card-footer .order-waiting {
  font-weight: 600;
  color: var(--ink);
}

/* --- Mobile / touch optimizations --- */
@media (max-width: 576px) {
  .order-card {
    padding: 0.75rem;
  }
  .item-row {
    padding: 0.75rem;
  }
  .btn-ready,
  .btn-deliver {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    min-height: 44px;
  }
  .item-qty {
    font-size: 1rem;
  }
  .item-name {
    font-size: 0.95rem;
  }
  .order-card-header .order-participant {
    font-size: 0.75rem;
    margin-left: 0;
    display: block;
    width: 100%;
  }
  .order-card-header .order-time {
    font-size: 0.68rem;
  }
}

/* --- Tablet and up: keep cards clean and spacious --- */
@media (min-width: 577px) {
  .order-card {
    padding: 1.25rem;
  }
  .item-row {
    padding: 0.6rem 1rem;
  }
  .btn-ready,
  .btn-deliver {
    padding: 0.4rem 1.2rem;
  }
}