:root {
  --bg: #eef0f5;
  --card-bg: #ffffff;
  --border: #e3e6ed;
  --border-strong: #cbd0da;
  --text: #1f2430;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-tint: #eaf1ff;
  --primary-tint-strong: #d7e6ff;
  --error: #dc2626;
  --error-tint: #fdecec;
  --success: #16a34a;
  --success-tint: #eafaf0;
  --warning: #d97706;
  --warning-tint: #fef3e2;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 8px 20px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.05);

  /* Table floor-map fills — solid, not tinted, matching the /design/
     reference mockups (occupied = solid blue, a bright green for a
     highlighted/reserved-style state, both with white text). */
  --tile-occupied: #4f8ef7;
  --tile-occupied-nub: #85b2f9;
  --tile-occupied-ring: #1d4ed8;
  --tile-highlight: #1fa464;
  --tile-highlight-nub: #6cca9c;

  /* Category accent swatches — assigned by position, not by name, since
     a restaurant's categories are arbitrary (see app/staff/pos.php).
     Positions 0-4 follow the reference mockup's own Appetizer/Main
     Course/Side Dish/Beverage/Dessert palette (charcoal/green/amber/
     blue/red); position 5 is a spare for a 6th category. */
  --cat-0: #52525b; --cat-0-tint: #ececee;
  --cat-1: #16a34a; --cat-1-tint: #e6f5ec;
  --cat-2: #d97706; --cat-2-tint: #faf0e0;
  --cat-3: #2563eb; --cat-3-tint: #e3ecfd;
  --cat-4: #dc2626; --cat-4-tint: #fbe9e9;
  --cat-5: #9333ea; --cat-5-tint: #f1e7f8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: 1180px;
  margin: 16px auto 0;
}

/* Backoffice sidebar shell — dashboard, staff, settings, shifts, tables,
   menu, membership (app/staff/_sidebar.php). POS and Kitchen Display stay
   fullscreen and keep the plain .topbar above instead. */
.app-shell { display: flex; align-items: stretch; min-height: 100vh; }
.app-sidebar {
  width: 232px; flex: none; background: var(--card-bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.app-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-bottom: 22px; }
.app-sidebar-brand .brand-mark { margin: 0; width: 34px; height: 34px; font-size: 14px; flex: none; }
.app-sidebar-brand-name { font-weight: 800; font-size: 15px; }

.app-sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.app-sidebar-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600;
}
.app-sidebar-link svg { flex: none; }
.app-sidebar-link:hover { background: var(--bg); color: var(--text); }
.app-sidebar-link.active { background: var(--primary-tint); color: var(--primary); }

.app-sidebar-footer { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.app-sidebar-staff { display: flex; flex-direction: column; gap: 5px; padding: 0 4px 12px; }
.app-sidebar-staff-name { font-weight: 700; font-size: 13px; }
.app-sidebar-footer button { width: 100%; }

.app-main { flex: 1; min-width: 0; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; position: static; }
  .app-sidebar-nav { flex-direction: row; flex-wrap: wrap; }
  .app-sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .app-sidebar-staff { padding-bottom: 0; }
  .app-sidebar-footer button { width: auto; }
}

.topbar a { color: var(--primary); text-decoration: none; }

.muted { color: var(--muted); font-size: 14px; margin-left: 8px; }

.card {
  max-width: 640px;
  margin: 40px auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-page .card { margin: 0; width: 320px; }
.auth-page h1 { text-align: center; }

h1 { margin-top: 0; font-size: 22px; }
h2 { font-size: 16px; margin-top: 32px; }

label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--muted);
}

label.checkbox { display: flex; align-items: center; gap: 8px; }
label.checkbox input { width: auto; }

input, select {
  width: 100%;
  padding: 9px 10px;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
}

button {
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

button:hover { background: var(--primary-hover); }

#cancel-edit, #product-cancel-btn, .topbar button, .btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); color: var(--text); }

.error { color: var(--error); font-size: 14px; }
.success { color: var(--success); font-size: 14px; }

.cart-line { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.pos-cart-lines { margin: 10px 0; }
.cart-line:last-child { border-bottom: none; }

table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); font-size: 14px; }
td button { margin-right: 4px; font-size: 13px; padding: 6px 10px; }

.link-list { display: flex; gap: 16px; margin-top: 16px; }
.link-list a { color: var(--primary); text-decoration: none; font-weight: 500; }

/* Phase 2: catalog management page */
.card.wide { max-width: 900px; }

section { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: none; }

.inline-form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; margin-top: 0; }
.inline-form label { margin-bottom: 0; font-size: 13px; }

.option-group-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.option-group-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* Phase 5: kitchen display */
.topbar select { width: auto; margin-top: 0; }

.kds-board {
  display: flex;
  gap: 16px;
  padding: 16px 24px 40px;
  align-items: flex-start;
  max-width: 1180px;
  margin: 0 auto;
}
.kds-column {
  flex: 1;
  min-width: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.kds-column h2 { margin-top: 0; font-size: 15px; }
.kds-cards { display: flex; flex-direction: column; gap: 10px; }

.kds-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg);
}
.kds-card-late { border-color: var(--error); }
.kds-card-table { font-weight: 700; font-size: 13px; color: var(--primary); }
.kds-card-item { font-weight: 600; margin-top: 2px; }
.kds-card-options { font-size: 13px; color: var(--muted); }
.kds-card-time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kds-card button { margin-top: 8px; width: 100%; }

/* Phase 6: POS session management + walk-in order entry */
.pos-topbar {
  display: flex; align-items: center; gap: 16px; padding: 12px 24px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  max-width: 1180px; margin: 16px auto 0;
}
.pos-topbar-brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; color: inherit; }
.pos-topbar-avatar {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none;
}
.pos-topbar-brand-text { display: flex; flex-direction: column; gap: 1px; }
.pos-topbar-name { font-weight: 700; font-size: 13.5px; }
.pos-topbar-open {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--success); background: var(--success-tint); padding: 2px 8px 2px 6px; border-radius: 999px;
  width: fit-content; margin-top: 2px;
}
.pos-topbar-open::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: var(--success); }

.pos-topbar-search { flex: 1; position: relative; max-width: 380px; }
.pos-topbar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pos-topbar-search input {
  width: 100%; margin-top: 0; padding: 8px 14px 8px 34px; border-radius: 999px; background: var(--bg);
  border: 1px solid var(--border); font-size: 13px;
}

.pos-topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pos-icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-bg);
  color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; padding: 0;
}
.pos-icon-btn:hover { background: var(--bg); color: var(--text); }
.pos-staff-avatar {
  width: 34px; height: 34px; border-radius: 999px; background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; flex: none;
}

.pos-layout { display: flex; gap: 20px; align-items: flex-start; padding: 16px 24px 40px; max-width: 1180px; margin: 0 auto; }
.pos-left { flex: 1; min-width: 0; }
.pos-right {
  width: 380px; flex: none; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 20px;
  position: sticky; top: 16px;
}
@media (max-width: 980px) {
  .pos-layout { flex-direction: column; }
  .pos-right { width: 100%; position: static; }
  .pos-topbar-search { display: none; }
}

.pos-floor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pos-hall-tabs { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 999px; width: fit-content; margin-bottom: 0; }
.pos-hall-tab { border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.pos-hall-tab.active { background: var(--card-bg); color: var(--text); box-shadow: var(--shadow-sm); }

.pos-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); }
.pos-legend-item { display: flex; align-items: center; gap: 5px; }
.pos-legend-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }

.pos-hall-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 18px 0 10px; }
.pos-hall-label:first-child { margin-top: 0; }
.pos-hall-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 22px 24px;
  background: var(--bg); border-radius: var(--radius-lg); padding: 20px;
}

.pos-tile {
  position: relative; border: none; border-radius: 16px;
  background: var(--card-bg); padding: 10px 8px; cursor: pointer; text-align: center;
  min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-shadow: var(--shadow-sm);
}
.pos-tile:hover { box-shadow: var(--shadow-md); }
.pos-tile-nub { position: absolute; width: 8px; height: 16px; border-radius: 4px; background: var(--border-strong); }
.pos-tile-nub-l1 { left: -7px; top: 14px; }
.pos-tile-nub-l2 { left: -7px; bottom: 14px; }
.pos-tile-nub-r1 { right: -7px; top: 14px; }
.pos-tile-nub-r2 { right: -7px; bottom: 14px; }
.pos-tile-occupied { background: var(--tile-occupied); color: #fff; }
.pos-tile-occupied .pos-tile-nub { background: var(--tile-occupied-nub); }
.pos-tile-occupied .pos-tile-status, .pos-tile-occupied .pos-tile-elapsed-row { color: rgba(255, 255, 255, 0.85); }
.pos-tile-selected { box-shadow: 0 0 0 3px var(--tile-occupied-ring); }
.pos-tile-calling::after {
  content: ""; position: absolute; top: -6px; right: -6px; width: 14px; height: 14px; border-radius: 999px;
  background: var(--warning); border: 2px solid var(--bg);
}
.pos-tile-label { font-weight: 800; font-size: 13.5px; }
.pos-tile-elapsed-row { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 10.5px; color: var(--muted); }
.pos-tile-total { font-weight: 700; font-size: 12.5px; }
.pos-tile-status { font-size: 11px; color: var(--muted); }

.pos-call-row { display: flex; align-items: center; gap: 10px; background: var(--warning-tint); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.pos-call-row.is-ack { background: var(--bg); }
.pos-call-row-text { flex: 1; }
.pos-call-row button { font-size: 12px; padding: 6px 10px; }

.pos-detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pos-detail-head h2 { margin: 0; font-size: 18px; }
.pos-status-badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pos-status-badge.unpaid { background: var(--warning-tint); color: var(--warning); }
.pos-status-badge.paid { background: var(--success-tint); color: var(--success); }

.pos-detail-title-row { display: flex; align-items: center; gap: 12px; }
.pos-detail-avatar {
  width: 38px; height: 38px; border-radius: 999px; background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none;
}
.pos-detail-title { font-size: 19px; font-weight: 700; margin: 0; }
.pos-detail-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pos-detail-tags { display: flex; flex-direction: column; gap: 4px; margin-left: auto; align-items: flex-end; }
.pos-tag-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.pos-elapsed-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; background: var(--primary-tint); color: var(--primary); margin-top: 8px;
}
.pos-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0; }

.pos-call-banner { display: flex; align-items: center; gap: 10px; background: var(--warning-tint); border-radius: var(--radius-sm); padding: 10px 12px; margin: 14px 0; font-size: 12.5px; }
.pos-call-banner-text { flex: 1; }
.pos-call-banner button { font-size: 11.5px; padding: 6px 10px; background: var(--card-bg); color: var(--text); border: 1px solid var(--border); }

.pos-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 14px 0 8px; }
.pos-order-block { margin-top: 16px; }
.pos-order-head { font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.pos-item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.pos-item-row:last-child { border-bottom: none; }
.pos-item-name { font-size: 13.5px; font-weight: 600; }
.pos-item-mods { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pos-item-price { font-size: 13px; font-weight: 700; white-space: nowrap; }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
  padding: 3px 9px 3px 7px; border-radius: 999px; margin-top: 5px;
}
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: currentColor; }
.status-queued { background: var(--bg); color: var(--muted); }
.status-in_progress { background: var(--primary-tint); color: var(--primary); }
.status-ready { background: var(--warning-tint); color: var(--warning); }
.status-served { background: var(--success-tint); color: var(--success); }
.status-void { background: var(--error-tint); color: var(--error); }

.pos-totals { background: var(--bg); border-radius: var(--radius-md); padding: 14px 16px; margin-top: 16px; }
.pos-totals-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 3px 0; }
.pos-totals-grand { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }

.pos-order-entry { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

/* Small pill tabs — reused for the order-entry filter row AND the
   Settle Payment "By Amount / By Item" mode toggle (payment modal). */
.pos-cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pos-cat-tab { border: 1px solid var(--border); background: var(--card-bg); color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.pos-cat-tab.active { color: #fff; border-color: transparent; }

/* Big colored category blocks, matching the /design/ reference mockup's
   order-entry screen — distinct from the small pill tabs above. */
.pos-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pos-category-tile {
  border: none; border-radius: var(--radius-md); padding: 12px 12px 14px; cursor: pointer; text-align: left;
  color: #fff; display: flex; flex-direction: column; gap: 18px; min-height: 72px; box-shadow: var(--shadow-sm);
}
.pos-category-tile.active { outline: 2.5px solid var(--text); outline-offset: 2px; }
.pos-category-tile-icon {
  width: 24px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, 0.92);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.pos-category-tile-name { font-weight: 700; font-size: 12.5px; }
.pos-category-tile-count { font-size: 10px; opacity: 0.85; margin-top: 1px; }
.pos-category-tile.all { background: var(--card-bg) !important; color: var(--text); border: 1.5px dashed var(--border-strong); box-shadow: none; }
.pos-category-tile.all .pos-category-tile-icon { background: var(--bg); }

.pos-product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; max-height: 340px; overflow-y: auto; }
.pos-product-row { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; background: var(--card-bg); }
.pos-product-row:hover { border-color: var(--border-strong); }
.pos-product-photo {
  width: 100%; aspect-ratio: 1.6; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.pos-product-name-row { display: flex; align-items: center; gap: 6px; }
.pos-product-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; }
.pos-product-name { font-size: 13px; font-weight: 600; }
.pos-product-price { font-size: 12.5px; font-weight: 700; color: var(--primary); }

.opt-group { margin-bottom: 16px; }
.opt-group-title { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.opt-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.opt-row input { width: auto; }

.pos-modal { position: fixed; inset: 0; background: rgba(15, 20, 30, 0.45); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pos-modal[hidden] { display: none; }
.pos-modal-content { background: var(--card-bg); border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 420px; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-md); }

.cat-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; display: inline-block; margin-right: 6px; }
.avail-dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; margin-right: 6px; }
.avail-dot.on { background: var(--success); }
.avail-dot.off { background: var(--error); }

/* Phase 7: payments */
.pos-add-items-pill { display: block; width: 100%; border-radius: 999px; margin: 12px 0; padding: 11px; font-weight: 600; border-style: dashed; }
.pos-bottom-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.pos-cta {
  flex: 1; background: var(--primary); color: #fff; border: none; border-radius: 999px;
  padding: 13px 18px; font-weight: 700; font-size: 14px; cursor: pointer;
}
.pos-cta:hover { background: var(--primary-hover); }
.pos-cta-block { width: 100%; border-radius: 999px; padding: 13px; margin-top: 4px; }

.pos-detail-actions { display: flex; gap: 10px; margin-top: 10px; }
.pos-detail-actions button { flex: 1; }
.pos-detail-actions-secondary { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pos-detail-actions-secondary button { font-size: 12px; padding: 8px 4px; }

.pay-items { margin: 14px 0; display: flex; flex-direction: column; gap: 2px; }
.pay-item-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 0; }
.pay-item-row input { width: auto; margin-top: 0; }
.pay-item-row.paid { color: var(--muted); }
.pay-item-name { flex: 1; }
.pay-item-amount { font-weight: 700; white-space: nowrap; }

.pay-mode-tabs { display: flex; gap: 6px; margin: 16px 0 10px; }

.pay-history { margin-top: 16px; }
.pay-history-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 4px 0; }

/* Phase 8: cash shifts */
.shift-status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.shift-status-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--muted); flex: none; }
.shift-status-dot.open { background: var(--success); }
.shift-status button { font-size: 12.5px; padding: 6px 12px; }

.shift-history-row td.variance-pos { color: var(--success); }
.shift-history-row td.variance-neg { color: var(--error); }

/* Phase 10: discounts/voids/refunds */
.pos-void-btn { font-size: 11px; padding: 4px 8px; margin-top: 4px; }
.adj-approver-note { font-size: 12px; color: var(--muted); margin: 10px 0 4px; }

/* Phase 11: membership */
.pos-member-pill {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
  background: var(--primary-tint); color: var(--primary); border: none; cursor: pointer; margin: 6px 6px 0 0;
}
.pos-member-pill-empty { background: var(--bg); color: var(--muted); border: 1px dashed var(--border); }
.member-search-result { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; margin: 10px 0; }

/* Cross-app pass: dashboard, auth, staff roster, tables, kitchen */
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
  margin: 0 auto 18px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 18px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 16px 18px;
}
.stat-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.stat-card-value { font-size: 25px; font-weight: 800; margin-top: 7px; font-variant-numeric: tabular-nums; }
.stat-card-of { font-size: 15px; font-weight: 700; color: var(--muted); }
.stat-card-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 20px; }
.dash-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm);
}
.dash-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.dash-tile-icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.dash-tile-label { font-weight: 600; font-size: 14px; }

.role-badge {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--primary-tint); color: var(--primary); text-transform: capitalize;
}
.role-badge.role-owner, .role-badge.role-manager { background: var(--warning-tint); color: var(--warning); }
.role-badge.role-kitchen { background: var(--cat-1-tint); color: var(--cat-1); }

.qr-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; box-shadow: var(--shadow-sm);
}
.qr-card img { width: 64px; height: 64px; border-radius: 6px; }
.qr-card-label { font-weight: 700; font-size: 14px; }
.qr-card-sub { font-size: 12px; color: var(--muted); }
.qr-card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.qr-card-actions button { font-size: 11.5px; padding: 5px 9px; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }

.kds-card { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); background: var(--card-bg); }
.kds-card-late { border-color: var(--error); background: var(--error-tint); }
.kds-column { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

/* Design pass: menu.php product cards, matching the /design/ reference
   mockup's quick-edit card language (photo, badges, price, toggle) —
   nutrition/stock chips from that mockup are skipped since neither field
   exists in this schema; kitchen station + modifier count stand in. */
.toggle-switch {
  position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--border);
  border: none; cursor: pointer; flex: none; padding: 0;
}
.toggle-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.15s ease;
}
.toggle-switch.on { background: var(--success); }
.toggle-switch.on::after { transform: translateX(16px); }

.cat-tag-sm {
  display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  background: var(--bg); color: var(--muted);
}

.menu-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 20px; }
.menu-product-card {
  display: flex; gap: 12px; align-items: flex-start; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px; box-shadow: var(--shadow-sm);
}
.menu-product-card.is-deleted { opacity: 0.55; }
.menu-product-photo {
  width: 52px; height: 52px; border-radius: 10px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.menu-product-photo img { width: 100%; height: 100%; object-fit: cover; }
.menu-product-main { flex: 1; min-width: 0; }
.menu-product-name { font-weight: 700; font-size: 13.5px; }
.menu-product-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.menu-product-price { font-weight: 700; font-size: 13px; color: var(--primary); margin-top: 6px; }
.menu-product-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.menu-product-icon-row { display: flex; gap: 6px; }
.menu-product-icon-row button { font-size: 11px; padding: 5px 9px; }
