/* ==========================================================================
   MeatClub dashboard theme — "Simona" (design pass D1, 02.10.2026)
   One typeface (Simona Pro, Moshe's brand font) and one restrained palette: a warm-neutral ramp, one bordeaux brand,
   five muted semantics. Loaded AFTER style.css so it restyles the existing markup without touching its structure.
   ========================================================================== */

@font-face {
  font-family: "Simona Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/SimonaPro-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Simona Pro";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/SimonaPro-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Simona Pro";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/SimonaPro-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Simona Pro";
  font-style: normal;
  font-weight: 800 900;
  font-display: swap;
  src: url("fonts/SimonaPro-Black.woff2") format("woff2");
}

:root {
  /* ---- The ramp: warm neutrals (low chroma) ---- */
  --n-0: #ffffff;
  --n-25: #faf9f7;
  --n-50: #f3f1ee;
  --n-100: #eae7e2;
  --n-200: #ddd8d1;
  --n-300: #b9b1a8;
  --n-500: #80776f;
  --n-600: #686059;
  --n-700: #49423d;
  --n-800: #36302b;
  --n-900: #26211e;
  /* ---- The brand: bordeaux — the only loud colour ---- */
  --b-50: #f6ecec;
  --b-100: #f6ecec;
  --b-600: #782f35;
  --b-700: #63262b;
  /* ---- Semantics: status only, never decoration (text on its tint ≥ 4.5:1) ---- */
  --success: #35664f;   --success-tint: #eaf1ec;
  --warning: #805d28;   --warning-tint: #f6f0e5;
  --danger: #a13737;    --danger-tint: #f8eaea;
  --info: #486277;      --info-tint: #ebf0f4;
  --neutral: #625c55;   --neutral-tint: #efeeeb;

  /* ---- The names the rest of this file (and style.css) use, mapped onto the ramp ---- */
  /* Paper & ink */
  --mc-paper: var(--n-25);
  --mc-paper-2: var(--n-50);
  --mc-paper-3: var(--n-100);
  --mc-surface: var(--n-0);
  --mc-espresso: var(--n-900);
  --mc-espresso-2: #312b27;
  --mc-ink: var(--n-900);
  --mc-text: var(--n-800);
  --mc-muted: var(--n-600);
  --mc-faint: var(--n-600);
  --mc-line: var(--n-200);
  --mc-line-strong: var(--n-300);
  --mc-on-dark: #f7f5f2;
  --mc-on-dark-muted: #c4bcb4;

  /* Brand */
  --mc-brand: var(--b-600);
  --mc-brand-hover: var(--b-700);
  --mc-brand-tint: var(--b-100);
  --mc-on-brand: #ffffff;
  /* Brass is retired: "attention" reads as the warning semantic, nothing is gold any more. */
  --mc-brass: var(--warning);
  --mc-brass-text: var(--warning);
  --mc-brass-tint: var(--warning-tint);
  --mc-wa: #1f7a55;          /* WhatsApp only */
  --mc-wa-hover: #17644a;

  /* Order statuses */
  --st-new: var(--b-600);
  --st-new-tint: var(--b-100);
  --st-weighing: var(--warning);
  --st-weighing-tint: var(--warning-tint);
  --st-ready: var(--success);
  --st-ready-tint: var(--success-tint);
  --st-done: var(--neutral);
  --st-done-tint: var(--neutral-tint);
  --st-cancel: var(--danger);
  --st-cancel-tint: var(--danger-tint);
  --st-delivery: var(--info);
  --st-delivery-tint: var(--info-tint);

  --mc-danger: var(--danger);
  --mc-danger-tint: var(--danger-tint);
  --mc-warning: var(--warning);
  --mc-warning-tint: var(--warning-tint);
  --mc-success: var(--success);

  /* Type: Simona Pro only */
  --mc-font-display: "Simona Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mc-font-body: "Simona Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  /* Scale (Codex Astra review): no 900 in the working dashboard */
  --fs-page: 24px;     /* page title 24/700/32 */
  --fs-modal: 22px;    /* modal title 22/700/30 */
  --fs-section: 17px;  /* column / section headings 17/700/24, card totals 17/700 */
  --fs-name: 18px;     /* customer name 18/700/25 */
  --fs-time: 16px;     /* pickup time 16/500/22 */
  --fs-body: 15px;     /* body & controls 15/400/22, buttons 15/500 */
  --fs-small: 13px;    /* supporting 13/400/19 */
  --fs-micro: 12px;    /* chips 12/500/16 */
  --fs-metric: 28px;   /* analytics values 28/700/34 */

  /* Shape & depth */
  --mc-radius-sm: 8px;
  --mc-radius: 12px;
  --mc-radius-lg: 16px;
  --mc-radius-pill: 999px;
  --mc-shadow-sm: 0 1px 2px rgba(38, 33, 30, 0.05);
  --mc-shadow-md: 0 2px 4px rgba(38, 33, 30, 0.05), 0 8px 24px rgba(38, 33, 30, 0.08);
  --mc-shadow-lg: 0 8px 20px rgba(38, 33, 30, 0.10), 0 28px 64px rgba(38, 33, 30, 0.18);
  --mc-focus: 0 0 0 3px rgba(120, 47, 53, 0.22);
  --mc-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Legacy variables used all over style.css, remapped onto the brand */
  --color-primary: var(--mc-espresso);
  --color-confirmed: var(--st-new);
  --color-weighing: var(--st-weighing);
  --color-ready: var(--st-ready);
  --color-archive: var(--st-done);
  --color-cancelled: var(--st-cancel);
  --color-analytics: var(--mc-espresso-2);
  --color-products: var(--mc-brass-text);
  --color-deliveries: var(--st-delivery);
  --color-danger: var(--mc-danger);
  --color-customers: var(--mc-brand);
  --primary: var(--mc-brand);
  --border: var(--mc-line-strong);
  --text: var(--mc-ink);
  --text-light: var(--mc-faint);
  --touch-min: 48px;
}

/* ---------- Base ---------- */
body {
  font-family: var(--mc-font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  background: var(--mc-paper);
  color: var(--mc-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums; /* Simona Pro has old-style figures too — prices and weights stay lining */
}
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: none; box-shadow: var(--mc-focus); }
::selection { background: var(--mc-brand-tint); }

/* ---------- Login ---------- */
#login-screen {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(169, 121, 58, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(126, 42, 40, 0.22), transparent 60%),
    var(--mc-espresso);
}
.login-box {
  background: var(--mc-paper);
  border-radius: var(--mc-radius-lg);
  box-shadow: var(--mc-shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.login-box h1, .login-box h2 {
  font-family: var(--mc-font-display);
  color: var(--mc-ink);
  letter-spacing: -0.01em;
}
.login-box input {
  border: 1.5px solid var(--mc-line-strong);
  border-radius: var(--mc-radius);
  background: var(--mc-surface);
  color: var(--mc-ink);
}
.login-box input:focus { border-color: var(--mc-brand); box-shadow: var(--mc-focus); outline: none; }
/* The legacy PIN-style 8px letter-spacing broke Hebrew words apart ("ש ם  מ ש ת מ ש"). */
.login-box input { letter-spacing: normal; font-size: 18px; }
/* A toast on its way out takes no more taps (a double tap on "ביטול" hit the leaving toast). */
.mc-toast.is-leaving { pointer-events: none; }
.login-box input[type="password"] { letter-spacing: 0.12em; }
.login-box button {
  background: var(--mc-brand);
  color: var(--mc-on-brand);
  border-radius: var(--mc-radius);
  font-weight: 700;
  transition: background 0.15s var(--mc-ease);
}
.login-box button:hover { background: var(--mc-brand-hover); }

/* ---------- Header ---------- */
header {
  background: var(--mc-espresso);
  color: var(--mc-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
header h1 {
  font-family: var(--mc-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--mc-on-dark);
}
.status-dot { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }

/* ---------- Tab bar ---------- */
.tab-bar {
  background: var(--mc-paper-2);
  border-bottom: 1px solid var(--mc-line);
  gap: 4px;
}
.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--mc-muted);
  box-shadow: none;
  border-radius: var(--mc-radius-pill);
  font-weight: 600;
  padding: 10px 16px;
}
.tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--mc-line);
  color: var(--mc-ink);
}
.tab-btn.active,
.tab-btn.active[data-column] {
  background: var(--mc-espresso);
  border-color: var(--mc-espresso);
  color: var(--mc-on-dark);
  box-shadow: var(--mc-shadow-sm);
}
.tab-btn.tab-new-order,
.tab-btn.tab-new-order:hover {
  background: var(--mc-brand);
  border-color: var(--mc-brand);
  color: var(--mc-on-brand);
}
.tab-btn.tab-new-order:hover { background: var(--mc-brand-hover); }
.tab-badge {
  background: var(--mc-brand);
  box-shadow: 0 0 0 2px var(--mc-paper-2);
}
.tab-btn.active .tab-badge { box-shadow: 0 0 0 2px var(--mc-espresso); }

/* ---------- Board lanes ---------- */
.columns { gap: 14px; }
.column-header,
.column-header.confirmed,
.column-header.in-weighing,
.column-header.ready,
.column-header.products,
.column-header.deliveries,
.column-header.archive,
.column-header.analytics,
.column-header.customers,
.column-header.conversations {
  background: var(--mc-surface);
  color: var(--mc-ink);
  font-family: var(--mc-font-display);
  font-size: 20px;
  border: 1px solid var(--mc-line);
  border-bottom: none;
  border-top: 4px solid var(--mc-line-strong);
  border-radius: var(--mc-radius-lg) var(--mc-radius-lg) 0 0;
  letter-spacing: -0.01em;
}
.column-header.confirmed { border-top-color: var(--st-new); }
.column-header.in-weighing { border-top-color: var(--st-weighing); }
.column-header.ready { border-top-color: var(--st-ready); }
.column-header.deliveries { border-top-color: var(--st-delivery); }
.column-header.archive { border-top-color: var(--st-done); }
.column-header.products { border-top-color: var(--mc-brass); }
.column-header.customers,
.column-header.conversations,
.column-header.analytics { border-top-color: var(--mc-brand); }
.order-list {
  background: var(--mc-paper-2);
  border: 1px solid var(--mc-line);
  border-top: none;
  border-radius: 0 0 var(--mc-radius-lg) var(--mc-radius-lg);
}
.empty-state { color: var(--mc-faint); }

/* ---------- Order cards ---------- */
.order-card {
  background: var(--mc-surface);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  box-shadow: var(--mc-shadow-sm);
  transition: box-shadow 0.15s var(--mc-ease), transform 0.1s var(--mc-ease), border-color 0.15s;
}
.order-card:hover { box-shadow: var(--mc-shadow-md); border-color: var(--mc-line-strong); }
.order-card.status-CONFIRMED { border-right: 5px solid var(--st-new); }
.order-card.status-IN_WEIGHING { border-right: 5px solid var(--st-weighing); }
.order-card.status-READY { border-right: 5px solid var(--st-ready); }
.order-card.status-ARCHIVED { border-right: 5px solid var(--st-done); }
.order-card.status-CANCELLED { border-right: 5px solid var(--st-cancel); }
.order-card .order-name { color: var(--mc-ink); font-size: 19px; font-weight: 700; }
.order-card .order-phone { color: var(--mc-muted); font-size: 15px; direction: ltr; text-align: right; }
.order-card .order-pickup { color: var(--mc-muted); }
.order-card .order-summary { color: var(--mc-text); font-weight: 600; }
.order-number {
  background: var(--mc-paper-2);
  color: var(--mc-muted);
  border-radius: var(--mc-radius-pill);
}
.unviewed-badge {
  background: var(--mc-brand);
  color: var(--mc-on-brand);
}
@keyframes mc-pulse-new {
  0%, 100% { box-shadow: var(--mc-shadow-sm); }
  35% { box-shadow: 0 0 0 4px rgba(169, 121, 58, 0.35), var(--mc-shadow-md); }
}
.order-card.new-order { animation: mc-pulse-new 1.6s var(--mc-ease) 2; }
.ready-section-header,
.delivery-city-header {
  color: var(--mc-muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Chips (cards, modals, lists) ---------- */
.mc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--mc-radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.mc-chip--delivery { background: var(--st-delivery-tint); color: var(--st-delivery); }
.mc-chip--transit { background: var(--st-delivery); color: var(--n-0); }
.mc-chip--delivered { background: var(--st-ready-tint); color: var(--st-ready); }
.mc-chip--discount { background: var(--mc-brand-tint); color: var(--mc-brand); }
.mc-chip--owner { background: var(--mc-brass-tint); color: var(--mc-brass-text); }
.mc-chip--late { background: var(--mc-danger); color: var(--n-0); }
.mc-chip--soon { background: var(--mc-warning-tint); color: var(--mc-warning); }
.mc-chip--muted { background: var(--mc-paper-2); color: var(--mc-muted); }
.mc-alert {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: var(--mc-radius-sm);
  font-size: 13px;
  font-weight: 700;
  background: var(--mc-danger-tint);
  color: var(--mc-danger);
  border: 1px solid var(--danger-tint);
}

/* ---------- Buttons ---------- */
.btn {
  border-radius: var(--mc-radius);
  font-weight: 700;
  min-height: 48px;
  border: 1.5px solid transparent;
  transition: background 0.15s var(--mc-ease), border-color 0.15s, color 0.15s, transform 0.08s;
  box-shadow: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-start,
.btn-done,
.btn-send,
.btn-confirm-yes {
  background: var(--mc-brand);
  color: var(--mc-on-brand);
  border-color: var(--mc-brand);
}
.btn-start:hover:not(:disabled),
.btn-done:hover:not(:disabled),
.btn-send:hover:not(:disabled),
.btn-confirm-yes:hover:not(:disabled) { background: var(--mc-brand-hover); border-color: var(--mc-brand-hover); }
.btn-collected {
  background: var(--st-ready);
  color: var(--n-0);
  border-color: var(--st-ready);
}
.btn-collected:hover:not(:disabled) { background: #2b5541; }
.btn-back,
.btn-confirm-no,
.btn-save-back {
  background: var(--mc-surface);
  color: var(--mc-ink);
  border-color: var(--mc-line-strong);
}
.btn-back:hover, .btn-confirm-no:hover, .btn-save-back:hover { background: var(--mc-paper-2); }
.btn-add-item,
.btn-print,
.btn-schedule,
.btn-add-product,
.btn-refresh-analytics,
.btn-pagination,
.btn-broadcast {
  background: var(--mc-surface);
  color: var(--mc-brand);
  border-color: rgba(126, 42, 40, 0.35);
}
.btn-add-item:hover:not(:disabled),
.btn-print:hover:not(:disabled),
.btn-schedule:hover:not(:disabled),
.btn-add-product:hover:not(:disabled),
.btn-refresh-analytics:hover:not(:disabled),
.btn-pagination:hover:not(:disabled),
.btn-broadcast:hover:not(:disabled) { background: var(--mc-brand-tint); border-color: var(--mc-brand); }
.btn-cancel-order,
.btn-danger {
  background: var(--mc-surface);
  color: var(--mc-danger);
  border-color: rgba(180, 35, 24, 0.35);
}
.btn-cancel-order:hover:not(:disabled),
.btn-danger:hover:not(:disabled) { background: var(--mc-danger-tint); border-color: var(--mc-danger); }
.btn-chat {
  background: var(--mc-surface);
  color: var(--mc-wa);
  border: 1.5px solid rgba(31, 122, 85, 0.4);
  border-radius: var(--mc-radius-pill);
}
.btn-chat:hover { background: var(--success-tint); }
.fab-btn {
  background: var(--mc-brand);
  color: var(--mc-on-brand);
  box-shadow: 0 8px 24px rgba(126, 42, 40, 0.35);
}

/* ---------- Modals ---------- */
.modal {
  background: rgba(35, 28, 24, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal-content,
.product-modal-content,
.chat-modal-content,
.broadcast-modal-content,
.new-order-content,
.add-item-content,
.handoff-modal-container {
  background: var(--mc-surface);
  border-radius: var(--mc-radius-lg);
  box-shadow: var(--mc-shadow-lg);
  color: var(--mc-ink);
}
.modal-header h2,
.modal-content h2 {
  font-family: var(--mc-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--mc-ink);
}
.close-btn { color: var(--mc-faint); border-radius: var(--mc-radius-pill); }
.close-btn:hover { color: var(--mc-ink); background: var(--mc-paper-2); }
#modal-info { color: var(--mc-text); }
#modal-info strong { color: var(--mc-ink); }

/* ---------- Tables ---------- */
th {
  background: var(--mc-paper-2);
  color: var(--mc-muted);
  font-weight: 700;
  font-size: 14px;
}
th, td { border-bottom: 1px solid var(--mc-line); }
.price-per-kg, .unit-label, .pkg-meta { color: var(--mc-faint); }
.product-name { color: var(--mc-ink); font-weight: 600; }

/* ---------- Inputs ---------- */
.weight-input,
.inline-edit-input,
.inline-edit-small,
.search-input,
.products-filter-input,
.export-date-input,
.delivery-notes-input,
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--mc-line-strong);
  border-radius: var(--mc-radius-sm);
  background: var(--mc-surface);
  color: var(--mc-ink);
}
.weight-input:focus,
.inline-edit-input:focus,
.inline-edit-small:focus,
.search-input:focus,
.products-filter-input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--mc-brand);
  box-shadow: var(--mc-focus);
  outline: none;
}
.weight-input.saved { border-color: var(--st-ready); background: var(--st-ready-tint); }
.weight-stepper {
  border: 1.5px solid var(--mc-line-strong);
  background: var(--mc-paper);
  color: var(--mc-ink);
  border-radius: var(--mc-radius-sm);
}
.weight-stepper:active { background: var(--mc-paper-3); }

/* ---------- Numpad ---------- */
.numpad-container { border-radius: var(--mc-radius-lg) var(--mc-radius-lg) 0 0; background: var(--mc-surface); box-shadow: var(--mc-shadow-lg); }
.numpad-display { background: var(--mc-paper); border: 1.5px solid var(--mc-line-strong); border-radius: var(--mc-radius); color: var(--mc-ink); font-variant-numeric: tabular-nums; }
.numpad-key { background: var(--mc-paper-2); color: var(--mc-ink); border-radius: var(--mc-radius); border: 1px solid var(--mc-line); font-weight: 700; }
.numpad-key:active { background: var(--mc-paper-3); }
.numpad-confirm { background: var(--mc-brand); color: var(--mc-on-brand); border-radius: var(--mc-radius); }
.numpad-backspace { color: var(--mc-brand); }

/* ---------- Stat cards (analytics) ---------- */
.stat-card {
  background: var(--mc-surface);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  box-shadow: var(--mc-shadow-sm);
}
.stat-value { color: var(--mc-ink); font-family: var(--mc-font-display); }
.stat-label { color: var(--mc-muted); }

/* ---------- Misc ---------- */
.schedule-badge { color: var(--mc-brass-text); background: var(--mc-brass-tint); border-radius: var(--mc-radius-pill); }
.confirm-banner { border-radius: var(--mc-radius); }
.product-category-header { color: var(--mc-brass-text); font-family: var(--mc-font-display); }
.product-row { border-color: var(--mc-line); }
.product-sale-tag { background: var(--mc-brand-tint); color: var(--mc-brand); }
.toggle-btn { border-radius: var(--mc-radius-pill); }
a { color: var(--mc-brand); }

@media print {
  body { background: var(--n-0); }
}

/* style.css pins the desktop "new order" tab with !important (blue). */
@media (min-width: 769px) {
  .tab-new-order {
    background: var(--mc-brand) !important;
    border-color: var(--mc-brand) !important;
    color: var(--mc-on-brand) !important;
    border-radius: var(--mc-radius-pill);
    box-shadow: 0 4px 14px rgba(126, 42, 40, 0.28);
  }
  .tab-new-order:hover {
    background: var(--mc-brand-hover) !important;
    border-color: var(--mc-brand-hover) !important;
  }
}

/* ---------- Order card v2 content ---------- */
.order-card .order-header-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.order-card .order-header-row .mc-chip { margin-inline-start: auto; }
.order-card .order-name { margin-bottom: 2px; line-height: 1.25; }
.order-card .order-phone { margin-bottom: 4px; }
.order-card .order-pickup { font-size: 15px; font-weight: 600; color: var(--mc-text); margin: 4px 0 6px; }
.order-items-preview {
  font-size: 14px;
  color: var(--mc-muted);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.order-items-preview .mc-qty { color: var(--mc-text); font-weight: 600; white-space: nowrap; }
.order-items-preview .mc-sep { margin: 0 6px; color: var(--mc-line-strong); }
.order-items-preview .mc-more { color: var(--mc-brass-text); font-weight: 600; }
.order-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.order-card .order-summary {
  border-top: 1px dashed var(--mc-line);
  padding-top: 8px;
  font-size: 15px;
}
.order-card .order-total { color: var(--mc-ink); font-weight: 800; font-size: 17px; }
.order-card .schedule-badge { display: inline-block; margin-top: 8px; padding: 2px 10px; font-size: 13px; font-weight: 700; }

/* ---------- Prep list ---------- */
.column[data-col="prep"].active { grid-column: 1 / -1; }
.column-header.prep { border-top-color: var(--mc-brand); }
.prep-content { padding: 16px; }
.prep-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.prep-toolbar .prep-print-btn { margin-inline-start: auto; min-height: 44px; padding: 0 18px; }
.prep-toolbar .prep-print-btn + .prep-print-btn { margin-inline-start: 0; }
.label-size-select { min-height: 44px; padding: 0 10px; border: 1px solid var(--mc-line); border-radius: var(--mc-radius-sm); background: var(--mc-surface); color: var(--mc-text); font: inherit; }
.prep-include-ready { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--mc-text); cursor: pointer; }
.prep-include-ready input { width: 20px; height: 20px; accent-color: var(--mc-brand); }
.mc-segmented {
  display: inline-flex;
  background: var(--mc-paper-3);
  border-radius: var(--mc-radius-pill);
  padding: 4px;
  gap: 2px;
}
.mc-seg {
  border: none;
  background: transparent;
  color: var(--mc-muted);
  font-weight: 700;
  font-size: 15px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--mc-radius-pill);
  cursor: pointer;
}
.mc-seg.active { background: var(--mc-surface); color: var(--mc-ink); box-shadow: var(--mc-shadow-sm); }
.prep-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 14px; }
.prep-summary-title { font-family: var(--mc-font-display); font-size: 24px; color: var(--mc-ink); }
.prep-summary-stats { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: var(--mc-muted); font-size: 15px; }
.prep-summary-stats strong { color: var(--mc-ink); font-size: 17px; }
.prep-category { margin-bottom: 18px; }
.prep-category-title {
  font-family: var(--mc-font-display);
  font-size: 18px;
  color: var(--mc-brass-text);
  margin: 6px 2px 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--mc-line);
}
.prep-product {
  background: var(--mc-surface);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  box-shadow: var(--mc-shadow-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: opacity 0.2s, background 0.2s;
}
.prep-product-head { display: flex; align-items: center; gap: 12px; }
.prep-check {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--mc-line-strong);
  background: var(--mc-surface);
  color: transparent;
  font-size: 22px; font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.prep-product.is-done .prep-check { background: var(--st-ready); border-color: var(--st-ready); color: var(--n-0); }
.prep-product.is-done { background: var(--mc-paper); opacity: 0.72; }
.prep-product.is-done .prep-product-name { text-decoration: line-through; text-decoration-color: var(--mc-faint); }
.prep-product-main { flex: 1; min-width: 0; }
.prep-product-name { font-size: 18px; font-weight: 700; color: var(--mc-ink); }
.prep-product-meta { font-size: 14px; color: var(--mc-muted); margin-top: 2px; }
.prep-product-qty { font-size: 22px; font-weight: 800; color: var(--mc-ink); white-space: nowrap; }
.prep-pkgs { font-size: 14px; font-weight: 600; color: var(--mc-muted); }
.prep-variants { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 56px 0 0; }
.prep-variant {
  background: var(--mc-brass-tint);
  color: var(--mc-brass-text);
  border-radius: var(--mc-radius-pill);
  padding: 3px 12px;
  font-size: 14px;
}
.prep-variant b { color: var(--mc-ink); }
.prep-variant i { font-style: normal; color: var(--mc-muted); }
.prep-lines { margin: 8px 56px 0 0; }
.prep-lines summary { cursor: pointer; color: var(--mc-brand); font-size: 14px; font-weight: 600; padding: 4px 0; }
.prep-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  width: 100%;
  text-align: right;
  background: transparent;
  border: none;
  border-top: 1px solid var(--mc-line);
  padding: 8px 2px;
  font-size: 15px;
  color: var(--mc-text);
  cursor: pointer;
}
.prep-line:hover { background: var(--mc-paper); }
.prep-line-num { color: var(--mc-muted); font-weight: 700; }
.prep-line-name { font-weight: 600; color: var(--mc-ink); }
.prep-line-qty { font-weight: 700; }
.prep-line-note { color: var(--mc-brass-text); }
.prep-line-when { color: var(--mc-muted); margin-inline-start: auto; }
.prep-empty { padding: 48px 12px; font-size: 18px; }
@media (max-width: 768px) {
  .prep-content { padding: 10px; }
  .prep-variants, .prep-lines { margin-right: 0; }
  .prep-product-qty { font-size: 19px; }
  .prep-toolbar .prep-print-btn { margin-inline-start: 0; }
}

/* ---------- Products tab ---------- */
.products-toolbar { gap: 10px; }
.products-summary { color: var(--mc-muted); font-size: 14px; padding: 4px 2px 10px; }
.product-category-header {
  background: transparent;
  color: var(--mc-brass-text);
  font-family: var(--mc-font-display);
  font-size: 16px;
  padding: 14px 4px 6px;
  border-bottom: 1px solid var(--mc-line);
}
.product-row {
  background: var(--mc-surface);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  margin: 8px 0;
  padding: 10px 14px;
  box-shadow: var(--mc-shadow-sm);
}
.product-row:hover { border-color: var(--mc-line-strong); }
.product-meta { color: var(--mc-faint); font-size: 13px; }
.stock-toggle {
  border-radius: var(--mc-radius-pill);
  min-height: 40px;
  min-width: 72px;
  font-weight: 700;
  border: 1.5px solid transparent;
}
.stock-toggle.in-stock { background: var(--st-ready-tint); color: var(--st-ready); border-color: rgba(36, 112, 76, 0.3); }
.stock-toggle.out-of-stock { background: var(--mc-danger-tint); color: var(--mc-danger); border-color: rgba(180, 35, 24, 0.3); }
.product-default-badge { background: var(--mc-brass-tint); color: var(--mc-brass-text); border-radius: var(--mc-radius-pill); }

/* ---------- Order modal facts ---------- */
.mc-facts { display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.mc-fact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 16px; }
.mc-fact-label { color: var(--mc-muted); min-width: 84px; }
.mc-fact--status { gap: 8px; }
.mc-ltr { direction: ltr; unicode-bidi: isolate; }
.mc-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: var(--mc-radius-pill);
  font-weight: 800; font-size: 14px;
}
.mc-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mc-status--new { background: var(--st-new-tint); color: var(--st-new); }
.mc-status--weighing { background: var(--st-weighing-tint); color: var(--st-weighing); }
.mc-status--ready { background: var(--st-ready-tint); color: var(--st-ready); }
.mc-status--done { background: var(--st-done-tint); color: var(--st-done); }
.mc-status--cancel { background: var(--st-cancel-tint); color: var(--st-cancel); }
.inline-edit-btn { background: transparent; border: none; cursor: pointer; border-radius: var(--mc-radius-pill); min-width: 44px; min-height: 44px; }
.inline-edit-btn:hover { background: var(--mc-paper-2); }
#modal-total { font-size: 18px; }

/* ---------- Header action ---------- */
header { gap: 12px; }
header h1 { margin-inline-end: auto; }
.header-action {
  background: rgba(255, 255, 255, 0.08);
  color: var(--mc-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--mc-radius-pill);
  min-height: 40px;
  padding: 0 16px;
  font: 700 15px var(--mc-font-body);
  cursor: pointer;
  white-space: nowrap;
}
.header-action:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- One-tap card actions ---------- */
.card-actions { display: flex; justify-content: flex-start; margin-top: 10px; }
.card-action {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--mc-radius-pill);
  font: 800 15px var(--mc-font-body);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.15s, transform 0.08s;
}
.card-action:active { transform: translateY(1px); }
.card-action--ready { background: var(--mc-brand); color: var(--mc-on-brand); }
.card-action--ready:hover { background: var(--mc-brand-hover); }
.card-action--collected { background: var(--st-ready-tint); color: var(--st-ready); border-color: rgba(36, 112, 76, 0.35); }
.card-action--collected:hover { background: var(--success-tint); }

/* ---------- Toasts ---------- */
.mc-toasts {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: 50%;
  transform: translateX(50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(560px, calc(100vw - 24px));
}
.mc-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--mc-espresso);
  color: var(--mc-on-dark);
  border-radius: var(--mc-radius);
  box-shadow: var(--mc-shadow-lg);
  padding: 12px 16px;
  font-size: 15px;
  animation: mc-toast-in 0.22s var(--mc-ease);
}
.mc-toast--error { background: var(--b-600); }
.mc-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; }
.mc-toast-text { flex: 1; }
.mc-toast-action {
  background: transparent;
  color: var(--warning);
  border: 1px solid rgba(242, 201, 139, 0.5);
  border-radius: var(--mc-radius-pill);
  min-height: 36px;
  padding: 0 14px;
  font: 800 14px var(--mc-font-body);
  cursor: pointer;
}
.mc-toast-progress {
  position: absolute;
  bottom: 0; right: 0;
  height: 3px; width: 100%;
  background: var(--warning);
  transform-origin: right;
  animation: mc-toast-progress linear forwards;
}
@keyframes mc-toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mc-toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 768px) {
  .mc-toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Close-day modal ---------- */
.close-day-content { max-width: 760px; }
.close-day-intro { color: var(--mc-muted); margin: 0 0 14px; line-height: 1.6; }
.close-day-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin-bottom: 14px; }
.close-day-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  background: var(--mc-paper);
}
.close-day-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.close-day-when { color: var(--mc-muted); font-size: 14px; }
.close-day-choice .mc-seg { min-height: 38px; padding: 0 14px; font-size: 14px; }
.close-day-notify { display: flex; align-items: center; gap: 8px; color: var(--mc-text); margin-bottom: 14px; }
.close-day-notify input { width: 20px; height: 20px; accent-color: var(--mc-brand); }
.close-day-actions { display: flex; gap: 10px; justify-content: flex-end; }
.close-day-actions .btn { padding: 0 22px; }
@media (max-width: 768px) {
  .header-action { padding: 0 12px; font-size: 14px; }
}

/* Phones: the "+" new-order FAB sits in the header's left corner — keep the close-day
   button clear of it and icon-only. */
@media (max-width: 768px) {
  .header-action { margin-inline-end: 50px; padding: 0 12px; min-height: 38px; }
  .header-action .header-action-label { display: none; }
  .fab-btn { box-shadow: 0 4px 14px rgba(126, 42, 40, 0.35); }
}

/* ---------- UX audit quick wins (P1-1, P1-2, P1-6, P1-7) ---------- */
.column-header { display: flex; align-items: center; justify-content: center; gap: 10px; }
.column-count {
  font-family: var(--mc-font-body);
  font-size: 15px;
  font-weight: 800;
  min-width: 30px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--mc-radius-pill);
  background: var(--mc-espresso);
  color: var(--mc-on-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.column-count.is-zero { background: var(--mc-paper-3); color: var(--mc-muted); }
/* The time the butcher works by is the most prominent line after the name. */
.order-card .order-pickup { font-size: 17px; font-weight: 700; color: var(--mc-ink); }
/* Touch targets: 44px minimum on the counter controls. */
.weight-stepper { width: 44px; height: 44px; font-size: 20px; }
.inline-edit-small, .inline-edit-input { min-height: 40px; font-size: 16px; }
.item-cancel-btn { min-width: 44px; min-height: 44px; }
.stock-toggle { min-height: 44px; }
.mc-qty-input { min-height: 44px; font-size: 18px; text-align: center; }
@media (max-width: 768px) {
  #modal-actions .btn { min-height: 48px; }
}


/* ---------- Second-opinion fixes (Codex Astra review, rounds/r1/codex-astra) ---------- */
/* Typography (superseded by D1: Simona Pro everywhere). */
.column-header,
.modal-header h2,
.modal-content h2,
.prep-category-title,
.product-category-header,
.stat-value { font-family: var(--mc-font-body); font-weight: 800; letter-spacing: 0; }
.prep-summary-title { font-family: var(--mc-font-body); font-weight: 800; }
.order-card .order-name { font-size: 21px; line-height: 1.25; }
.order-card .order-pickup { font-size: 18px; line-height: 1.3; }
/* Denser cards: more orders above the fold. */
.order-card { padding: 12px 14px; margin-bottom: 10px; }
.order-card .order-header-row { margin-bottom: 4px; }
.order-items-preview { margin-bottom: 6px; }
.order-notes {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--mc-brass-text);
  background: var(--mc-brass-tint);
  border-radius: var(--mc-radius-sm);
  padding: 4px 8px;
  margin-bottom: 8px;
}
.order-card .order-summary { padding-top: 6px; }
.card-actions { margin-top: 8px; }
.card-action { min-height: 48px; }
/* Keyboard focus that passes 3:1 on its own. */
:focus-visible { outline: 3px solid var(--mc-brand); outline-offset: 2px; box-shadow: none; }
/* The numpad always fits the viewport, confirm stays visible. */
#numpad-modal { align-items: center; padding: 16px; }
.numpad-container {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 18px 20px 0;
  border-radius: var(--mc-radius-lg);
}
.numpad-grid { gap: 8px; }
.numpad-key { min-height: 56px; font-size: 24px; }
.numpad-confirm { position: sticky; bottom: 0; margin: 12px -20px 0; width: calc(100% + 40px); border-radius: 0 0 var(--mc-radius-lg) var(--mc-radius-lg); min-height: 60px; }
/* Bigger targets for the small modal controls. */
.close-btn { min-width: 48px; min-height: 48px; }
.btn-cancel-order { background: transparent; border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.btn-cancel-order:hover:not(:disabled) { background: var(--mc-danger-tint); text-decoration: none; }
/* Close-day bulk bar */
.close-day-bulk { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--mc-muted); font-size: 14px; padding: 2px 2px 6px; }
.btn-link { background: none; border: none; color: var(--mc-brand); font: 700 14px var(--mc-font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; }
/* Sound control lives in the header now. */
.header-action--sound { background: var(--warning); border-color: var(--warning); color: var(--n-900); }
.header-action--sound:hover { background: var(--warning); }
@media (max-width: 768px) {
  header h1 { font-size: 16px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Fable second-opinion fixes ---------- */
/* Card: deadline first, then the customer; denser (the phone lives in the order modal). */
.order-card .order-pickup { font-size: 20px; margin: 2px 0 2px; }
.order-card .order-name { font-size: 19px; margin-bottom: 4px; }
/* One clearly primary action in the order modal; the rest are quieter. Desktop / tablet only: a phone
   keeps its compact two-column grid (loop R10 — this flex row had overridden it and squeezed the items). */
@media (min-width: 769px) {
  #modal-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  #modal-actions .btn { min-height: 46px; font-size: 16px; padding: 0 16px; }
  #modal-actions .btn-done,
  #modal-actions .btn-start,
  #modal-actions .btn-collected { min-height: 56px; font-size: 18px; padding: 0 28px; margin-inline-start: auto; }
}
/* Close-day: a real button to mark everything collected. */
.close-day-mark-all { min-height: 48px; padding: 0 18px; }
/* Prep list: a grid of product cards on wide screens, so the quantity sits next to its product. */
@media (min-width: 900px) {
  .prep-category { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 0 12px; }
  .prep-category-title { grid-column: 1 / -1; }
}

/* ---------- Inbox (פניות, loop R3) ---------- */
.column[data-col="inbox"].active { grid-column: 1 / -1; }
.tab-badge--inbox { background: var(--mc-brass); color: var(--mc-espresso); }
.tab-badge--inbox.is-late { background: var(--mc-danger); color: var(--n-0); }
.column-header.inbox, .column-header.settings { color: var(--mc-ink); }
.column[data-col="settings"].active { grid-column: 1 / -1; }
.inbox-intro { color: var(--mc-muted); font-size: 15px; margin: -4px 4px 10px; text-align: center; }
.inbox-list { display: flex; flex-direction: column; gap: 8px; font-family: var(--mc-font-body); }
.inbox-row {
  background: var(--mc-surface);
  border: 1px solid var(--mc-line);
  border-inline-start: 4px solid var(--st-ready);
  border-radius: var(--mc-radius);
  box-shadow: var(--mc-shadow-sm);
  padding: 12px;
}
.inbox-row--warn { border-inline-start-color: var(--mc-brass); }
.inbox-row--late { border-inline-start-color: var(--mc-danger); }
.inbox-row.is-resolved { border-inline-start-color: var(--mc-line-strong); background: var(--mc-paper); box-shadow: none; }
.inbox-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.inbox-who { font: 700 18px/1.25 var(--mc-font-body); color: var(--mc-ink); min-width: 0; overflow-wrap: anywhere; }
.inbox-age { font: 700 16px/1.25 var(--mc-font-body); color: var(--st-ready); white-space: nowrap; }
.inbox-row--warn .inbox-age { color: var(--mc-brass-text); }
.inbox-row--late .inbox-age { color: var(--mc-danger); }
.inbox-row.is-resolved .inbox-age { color: var(--mc-muted); font-weight: 600; font-size: 14px; }
.inbox-text {
  margin: 6px 0;
  font: 400 17px/1.4 var(--mc-font-body);
  color: var(--mc-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.inbox-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px;
  font-size: 14px; color: var(--mc-muted);
}
.inbox-dot { color: var(--mc-line-strong); }
.inbox-kind {
  border-radius: var(--mc-radius-pill);
  padding: 1px 9px;
  background: var(--mc-paper-2); color: var(--mc-espresso);
  font-weight: 700; font-size: 13px;
}
.inbox-phone { color: var(--mc-muted); }
.inbox-order-link {
  background: none; border: none; padding: 0;
  color: var(--mc-brand); font: 700 14px var(--mc-font-body);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  min-height: 32px;
}
.inbox-actions { display: flex; gap: 8px; margin-top: 10px; }
.inbox-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 16px;
  border-radius: var(--mc-radius-pill);
  border: 1.5px solid var(--mc-line-strong);
  background: var(--mc-surface); color: var(--mc-ink);
  font: 700 15px var(--mc-font-body);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.inbox-action:hover { background: var(--mc-paper-2); }
.inbox-action--reply { background: var(--mc-wa); border-color: var(--mc-wa); color: var(--n-0); }
.inbox-action--reply:hover { background: var(--mc-wa-hover); }
.inbox-action--done { background: var(--mc-paper-2); border-color: var(--mc-paper-3); margin-inline-start: auto; }
/* Loop R4: a "שילמתי" row's main action — first, and a full row on phones. */
.inbox-action--paid { order: -1; background: var(--st-ready-tint); border-color: var(--st-ready); color: var(--st-ready); }
.inbox-resolved { margin-top: 6px; }
.inbox-resolved > summary { cursor: pointer; color: var(--mc-muted); font-weight: 700; padding: 10px 2px; min-height: 44px; }
.inbox-resolved .inbox-row { margin-top: 8px; }
.inbox-empty { padding: 28px 12px; }
@media (min-width: 900px) {
  .inbox-list { max-width: 820px; margin: 0 auto; width: 100%; }
}
@media (max-width: 768px) {
  .inbox-actions { display: grid; grid-template-columns: minmax(0, 1fr) 76px 64px; }
  .inbox-action { padding: 0 8px; font-size: 14px; }
  .inbox-action--done { margin-inline-start: 0; }
  .inbox-action--call, .inbox-action--done { font-size: 13px; }
  .inbox-action--paid { grid-column: 1 / -1; }
  /* Room for the last card above the bottom navigation. */
  .column[data-col="inbox"] .inbox-list { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
/* Phones: six bottom-nav entries (פניות joined) must fit 360-390px — the desktop pill
   padding above (16px a side) pushed "עוד" off-screen. Labels stay readable (12px). */
@media (max-width: 768px) {
  .tab-bar .tab-btn { padding: 4px 1px; min-width: 0; min-height: 52px; font-size: 12px; }
  .tab-bar .tab-btn.active { background: var(--mc-espresso); color: var(--mc-on-dark); }
}

/* ---------- Payment at "ready" (loop R4) ---------- */
.mc-chip--pay-unpaid { background: var(--mc-brass-tint); color: var(--mc-brass-text); }
.mc-chip--pay-reported { background: var(--st-delivery-tint); color: var(--st-delivery); }
.mc-chip--pay-paid { background: var(--st-ready-tint); color: var(--st-ready); }
.mc-fact--pay { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pay-paid {
  min-height: 44px; padding: 0 18px;
  border-radius: var(--mc-radius-pill);
  border: none; background: var(--st-ready); color: var(--n-0);
  font: 800 15px var(--mc-font-body); cursor: pointer;
}
.pay-paid:hover { background: #2b5541; }
.pay-methods { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pay-methods-label { color: var(--mc-muted); font-size: 13px; }
.pay-method {
  min-height: 40px; padding: 0 12px;
  border-radius: var(--mc-radius-pill);
  border: 1.5px solid var(--mc-line-strong);
  background: var(--mc-surface); color: var(--mc-ink);
  font: 700 14px var(--mc-font-body); cursor: pointer;
}
.pay-method:hover { background: var(--mc-paper-2); }
.archive-filter { margin: 0 0 10px; }


/* ---------- Busy mode (loop R5) ---------- */
.header-action--busy.is-on { background: var(--mc-danger); border-color: var(--mc-danger); color: var(--n-0); }
.busy-banner {
  background: var(--mc-danger-tint); color: var(--mc-danger);
  border-bottom: 1px solid rgba(180, 35, 24, 0.25);
  padding: 8px 16px; font-weight: 700; text-align: center;
}
.busy-banner .btn-link { color: var(--mc-danger); }
/* Phones: the header keeps room for the "+" FAB once, instead of a 50px gap after every action. */
@media (max-width: 768px) {
  #dashboard header { padding-inline-end: 58px; }
  .header-action { margin-inline-end: 0; }
}

/* ── The shop's own settings (loop R7) ── */
.settings-intro { margin: 0 0 8px; text-align: center; color: var(--mc-muted); font: 500 14px var(--mc-font-body); }
.settings-page { display: flex; flex-direction: column; gap: 14px; font-family: var(--mc-font-body); max-width: 820px; margin: 0 auto; width: 100%; }
.settings-card {
  background: var(--mc-surface); border: 1px solid var(--mc-line); border-radius: var(--mc-radius-lg);
  box-shadow: var(--mc-shadow-sm); padding: 18px 20px;
}
.settings-card h3 { margin: 0 0 6px; font: 700 19px var(--mc-font-display); color: var(--mc-ink); }
.settings-card .form-hint { display: block; color: var(--mc-muted); font-size: 13px; margin-top: 4px; }
.settings-field { margin-top: 14px; }
.settings-field > label { display: block; font-weight: 700; color: var(--mc-text); margin-bottom: 6px; }
.settings-field input[type="time"], .settings-field input[type="date"], .settings-field input[type="number"],
.settings-field input[type="url"], .settings-field input[type="tel"], .settings-field select, .settings-field textarea {
  min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--mc-line-strong); border-radius: var(--mc-radius-sm);
  font: 500 16px var(--mc-font-body); color: var(--mc-ink); background: var(--mc-surface); box-sizing: border-box;
}
.settings-field input[type="url"], .settings-field input[type="tel"], .settings-field textarea, .settings-field select { width: 100%; }
.settings-field textarea { resize: vertical; }
.settings-field input:focus, .settings-field select:focus, .settings-field textarea:focus { outline: none; border-color: var(--mc-brand); box-shadow: var(--mc-focus); }
.settings-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.settings-inline input[type="number"] { width: 110px; }
.settings-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hours-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.hours-row { display: grid; grid-template-columns: 120px 120px 16px 120px 1fr; align-items: center; gap: 8px; }
.hours-row input[type="time"] { min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--mc-line-strong); border-radius: var(--mc-radius-sm); font: 500 16px var(--mc-font-body); }
.hours-day { display: flex; align-items: center; gap: 8px; font-weight: 700; min-height: 44px; cursor: pointer; }
.hours-day input { width: 20px; height: 20px; accent-color: var(--mc-brand); }
.hours-closed-label { display: none; color: var(--mc-muted); font-weight: 600; }
.hours-row.is-closed input[type="time"], .hours-row.is-closed .hours-dash { opacity: 0.35; }
.hours-row.is-closed .hours-closed-label { display: inline; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: var(--mc-radius-pill); background: var(--mc-brass-tint); color: var(--mc-brass-text); font-weight: 600; font-size: 14px; }
.chip button { border: 0; background: transparent; color: inherit; min-width: 32px; min-height: 32px; border-radius: var(--mc-radius-pill); cursor: pointer; font-size: 14px; }
.chip button:hover { background: rgba(125, 88, 38, 0.12); }
.weekday-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-chip { min-height: 44px; min-width: 64px; padding: 0 12px; border-radius: var(--mc-radius-pill); border: 1.5px solid var(--mc-line-strong); background: var(--mc-surface); color: var(--mc-text); font: 600 15px var(--mc-font-body); cursor: pointer; }
.weekday-chip.is-on { background: var(--mc-brand); border-color: var(--mc-brand); color: var(--mc-on-brand); }
.settings-kind { margin-top: 10px; flex-wrap: wrap; }
.pay-preview { margin-top: 14px; padding: 12px 14px; border-radius: var(--mc-radius); background: var(--mc-paper); border: 1px dashed var(--mc-line-strong); }
.pay-preview-label { color: var(--mc-muted); font-size: 13px; margin-bottom: 6px; }
.pay-preview-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 500 14px var(--mc-font-body); color: var(--mc-ink); unicode-bidi: plaintext; }
.pay-preview-text.is-empty { color: var(--mc-muted); word-break: normal; }
.settings-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.settings-save { min-height: 44px; min-width: 120px; }
.settings-status { color: var(--mc-muted); font-size: 14px; font-weight: 600; }
.settings-status.is-error { color: var(--mc-danger); }
.settings-warning { margin: 8px 0 0; padding: 8px 10px; border-radius: var(--mc-radius-sm); background: var(--mc-warning-tint); color: var(--mc-warning); font-weight: 600; font-size: 14px; }
.settings-toggle { display: flex; align-items: flex-start; gap: 14px; margin-top: 14px; }
.settings-toggle-label { font-weight: 700; color: var(--mc-text); }
.toggle-switch { flex: none; position: relative; width: 52px; height: 30px; border-radius: var(--mc-radius-pill); border: 0; background: var(--mc-line-strong); cursor: pointer; transition: background 0.2s var(--mc-ease); }
.toggle-switch span { position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--n-0); box-shadow: var(--mc-shadow-sm); transition: inset-inline-start 0.2s var(--mc-ease); }
.toggle-switch.is-on { background: var(--mc-success); }
.toggle-switch.is-on span { inset-inline-start: 25px; }
.toggle-switch:focus-visible { outline: none; box-shadow: var(--mc-focus); }
@media (max-width: 768px) {
  .settings-card { padding: 16px 14px; border-radius: var(--mc-radius); }
  .settings-two { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: minmax(0, 1fr) 104px 10px 104px; gap: 4px; }
  .hours-row input[type="time"] { padding: 6px 4px; font-size: 15px; min-width: 0; width: 100%; box-sizing: border-box; }
  .hours-day { gap: 6px; }
  .hours-row .hours-closed-label { grid-column: 2 / -1; }
  .hours-row.is-closed input[type="time"], .hours-row.is-closed .hours-dash { display: none; }
  .column[data-col="settings"] .settings-page { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
/* Small phones (320-374px): narrower time boxes, so the day name keeps its room. */
@media (max-width: 374px) {
  .hours-row { grid-template-columns: minmax(0, 1fr) 86px 8px 86px; gap: 3px; }
  .hours-row input[type="time"] { padding: 4px 2px; font-size: 14px; }
  .settings-card { padding: 14px 10px; }
}
.hours-day input { flex: none; }
@media (max-width: 768px) {
  .header-action--settings { display: none; }
}
/* Loop R8: arrival + the morning "ready" */
.mc-chip--arrived { background: var(--st-ready); color: var(--n-0); }
.mc-chip--arrived.is-fresh { animation: mc-arrived-pulse 1.6s ease-in-out infinite; }
.mc-chip--onway { background: var(--st-delivery-tint); color: var(--st-delivery); }
@keyframes mc-arrived-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(36, 112, 76, 0.45); } 50% { box-shadow: 0 0 0 6px rgba(36, 112, 76, 0); } }
@media (prefers-reduced-motion: reduce) { .mc-chip--arrived.is-fresh { animation: none; } }
.ready-batch { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--mc-radius); background: var(--mc-brass-tint); color: var(--mc-brass-text); font: 600 14px var(--mc-font-body); }
.ready-batch .btn { min-height: 40px; }
.header-action--settings.is-active { background: rgba(255, 255, 255, 0.22); border-color: rgba(255, 255, 255, 0.4); }

/* ── "השבוע שלך" (loop R9) ── */
.pulse { background: var(--mc-surface); border: 1px solid var(--mc-line); border-radius: var(--mc-radius-lg); box-shadow: var(--mc-shadow-sm); padding: 16px 18px; margin-bottom: 14px; font-family: var(--mc-font-body); }
.pulse-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pulse-head h3 { margin: 0; font: 700 19px var(--mc-font-display); color: var(--mc-ink); }
.pulse-range { color: var(--mc-muted); font-size: 13px; }
.pulse-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.pulse-tile { background: var(--mc-paper); border-radius: var(--mc-radius); padding: 12px; }
.pulse-label { color: var(--mc-muted); font-size: 13px; font-weight: 600; }
.pulse-value { font: 800 24px var(--mc-font-body); color: var(--mc-ink); margin: 4px 0 2px; }
.pulse-trend, .pulse-note { font-size: 12px; color: var(--mc-muted); }
.pulse-trend.is-up { color: var(--mc-success); }
.pulse-trend.is-down { color: var(--mc-danger); }
.pulse-saved { margin-top: 12px; padding: 10px 12px; border-radius: var(--mc-radius); background: var(--st-ready-tint); color: var(--st-ready); font-weight: 700; }
@media (max-width: 768px) {
  .pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Loop R9: the Sunday strip on the board ---------- */
.pulse-strip { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--mc-brass-tint); border-bottom: 1px solid var(--mc-line); }
.pulse-strip.hidden { display: none; }
.pulse-strip-open { flex: 1; min-width: 0; text-align: start; background: none; border: 0; padding: 4px 0; font: 600 14px var(--mc-font-body); color: var(--mc-ink); cursor: pointer; }
.pulse-strip-more { color: var(--mc-brand); white-space: nowrap; }
.pulse-strip-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--mc-muted); font-size: 16px; cursor: pointer; }
.pulse-strip-close:hover, .pulse-strip-open:hover .pulse-strip-more { text-decoration: underline; }

/* ---------- Loop R10: the order window on a phone ---------- */
/* The whole window scrolls (the items list had only what the facts and buttons left: a line or two). */
@media (max-width: 768px) {
  .modal-content { overflow-y: auto; }
  .modal-content .table-wrapper { flex: none; overflow: visible; }
  .mc-facts { gap: 4px; }
  .mc-fact { font-size: 14px; gap: 2px 8px; }
  .mc-fact-label { min-width: 64px; }
}


/* ---------- Loop R11: money 2 ---------- */
/* "נאסף + שולם" next to "נאסף" on a ready card at a shop that tracks payments. */
.card-actions--two { gap: 8px; flex-wrap: wrap; }
/* Secondary to "נאסף" (Astra review): outlined, so a rushed tap doesn't mark money by habit. */
.card-action--paid { background: var(--mc-surface); color: var(--st-ready); border-color: var(--st-ready); }
.card-action--paid:hover { background: var(--st-ready-tint); }
/* The order window's "נאסף" asks paid / not yet in the same tap. */
.confirm-banner--pay { flex-wrap: wrap; gap: 8px; }
.confirm-banner--pay .btn-confirm-alt { background: var(--mc-surface); color: var(--st-ready); border: 1.5px solid var(--st-ready); }
.confirm-banner--pay .btn-confirm-alt:hover:not(:disabled) { background: var(--st-ready-tint); }
/* Close-day: "💰 שולם" per row and for everything. */
.close-day-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.close-day-paid {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border-radius: var(--mc-radius-pill);
  border: 1.5px solid var(--mc-line-strong);
  background: var(--mc-surface); color: var(--mc-text);
  font: 700 14px var(--mc-font-body); cursor: pointer;
}
.close-day-paid input { width: 20px; height: 20px; accent-color: var(--st-ready); margin: 0; }
.close-day-paid.is-on { border-color: var(--st-ready); background: var(--st-ready-tint); color: var(--st-ready); }
.close-day-paid-all { min-height: 48px; padding: 0 18px; }
.close-day-bulk { flex-wrap: wrap; }
/* What the bot read from the customer's payment photo. */
.mc-proof { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin-top: 6px; min-height: 48px; padding: 8px 12px; border-radius: var(--mc-radius-sm); background: var(--mc-paper-2); font-size: 14px; color: var(--mc-text); cursor: pointer; }
.mc-proof:hover { background: var(--mc-paper-3); }
.mc-proof:focus-visible { outline: none; box-shadow: var(--mc-focus); }
.mc-proof-open { color: var(--mc-brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.inbox-action--proof { background: var(--mc-surface); }
.proof-lightbox {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(35, 28, 24, 0.82);
}
.proof-lightbox-inner { position: relative; max-width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.proof-lightbox-inner img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: var(--mc-radius); background: var(--n-0); box-shadow: var(--mc-shadow-lg); }
.proof-lightbox-close {
  position: absolute; top: -8px; inset-inline-start: -8px;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--mc-surface); color: var(--mc-ink);
  font-size: 18px; cursor: pointer; box-shadow: var(--mc-shadow-md);
}
.proof-lightbox-note { margin: 0; padding: 8px 12px; border-radius: var(--mc-radius-sm); background: var(--mc-warning-tint); color: var(--mc-warning); font-size: 14px; font-weight: 600; text-align: center; }
@media (max-width: 768px) {
  .card-actions--two .card-action { flex: 1 1 auto; }
  .close-day-controls { width: 100%; }
}

.close-day-paid-hint { margin: -6px 0 12px; color: var(--mc-muted); font-size: 13px; }
.inbox-proof-verdict { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--mc-text); }
.inbox-proof-verdict.is-warn { color: var(--mc-warning); }
.mc-chip--pay-diff { background: var(--mc-warning-tint); color: var(--mc-warning); font-weight: 700; }
.pay-diff { flex: 1 0 100%; color: var(--mc-warning); font-weight: 700; font-size: 14px; }

/* ---------- Loop R12: stock counts and the waitlist ---------- */
.stock-count { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-inline-start: auto; margin-inline-end: 10px; }
.stock-input { width: 76px; min-height: 40px; padding: 0 8px; border: 1.5px solid var(--mc-line-strong); border-radius: var(--mc-radius-sm); font: 700 15px var(--mc-font-body); text-align: center; background: var(--mc-surface); color: var(--mc-ink); }
.stock-input::placeholder { color: var(--mc-faint); font-weight: 500; }
.stock-count.is-out .stock-input { border-color: var(--mc-danger); color: var(--mc-danger); }
.stock-step { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--mc-line-strong); background: var(--mc-surface); color: var(--mc-ink); font: 800 18px var(--mc-font-body); cursor: pointer; }
.stock-step:hover { background: var(--mc-paper-2); }
.stock-unit { color: var(--mc-muted); font-size: 13px; min-width: 0; }
.mc-chip--out { background: var(--mc-danger-tint); color: var(--mc-danger); }
.mc-chip--waiting { background: var(--mc-brass-tint); color: var(--mc-brass-text); }
.mc-chip--call { background: var(--mc-paper-2); color: var(--mc-ink); border: 1px solid var(--mc-line-strong); cursor: pointer; font: inherit; }
.stock-notify { min-height: 40px; padding: 0 12px; border-radius: var(--mc-radius-pill); border: none; background: var(--mc-brand); color: var(--mc-on-brand); font: 700 14px var(--mc-font-body); cursor: pointer; }
.stock-notify:hover { background: var(--mc-brand-hover); }
@media (max-width: 768px) {
  /* Phone: name and the in-stock switch on the first line, the count on its own line below. */
  .product-row { flex-wrap: wrap; }
  .product-row .product-info { flex: 1 1 0; }
  .product-row .stock-count { order: 3; flex: 1 0 100%; margin: 2px 0 0; }
}
.mc-chip--reserved { background: var(--mc-paper-2); color: var(--mc-text); }
.stock-input { width: 84px; }


/* ---------- Loop R13: the courier's route sheet ---------- */
.route-summary { padding: 8px 2px 12px; color: var(--mc-text); }
.route-table td { vertical-align: top; }
.route-table tr.route-town td { background: var(--mc-paper-2); font-weight: 800; color: var(--mc-ink); }
.route-n { width: 32px; font: 800 18px var(--mc-font-body); color: var(--mc-brand); }
.route-collect { display: inline-block; border: 2px solid var(--mc-ink); border-radius: var(--mc-radius-sm); padding: 2px 8px; font-weight: 800; white-space: nowrap; }
.route-paid { color: var(--st-ready); font-weight: 700; }
.route-check { display: inline-block; border: 1px dashed var(--mc-ink); border-radius: var(--mc-radius-sm); padding: 2px 8px; color: var(--mc-ink); }
.route-day { color: var(--mc-brand); font-weight: 700; }
.route-note { color: var(--mc-muted); font-size: 13px; margin-top: 2px; }
.route-box { color: var(--mc-muted); font-size: 13px; margin-top: 4px; }
.route-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.route-tel { white-space: nowrap; }

/* ==========================================================================
   D1 — "Simona" design pass (02.10.2026; spec specs/D1-design-simona.md, Codex Astra review rounds/design-astra.md)
   Simona Pro, one warm-neutral ramp + one wine brand, five muted semantics, line icons, flatter surfaces.
   Later rules here win over the earlier rounds' styling; behaviour and markup structure are untouched.
   ========================================================================== */

/* ---- Icons ---- */
.ico {
  width: 18px; height: 18px;
  flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -3px;
}
.ico-sm { width: 15px; height: 15px; vertical-align: -2px; }
.tab-icon .ico, .more-sheet-icon .ico { width: 18px; height: 18px; }

/* ---- Type ---- */
h1, h2, h3, h4, .modal-header h2, .modal-content h2, .column-header, .stat-value, .prep-category-title,
.product-category-header, .prep-summary-title, .login-box h1, .login-box h2, header h1 {
  font-family: var(--mc-font-body);
  letter-spacing: 0;
}
b, strong { font-weight: 700; }

/* ---- Header: a quiet dark band; utility actions are plain buttons ---- */
header {
  min-height: 64px;
  background: var(--n-900);
  border-bottom: 0;
  gap: 4px;
}
header h1 { font-size: 19px; font-weight: 700; color: #fff; }
.header-action,
.header-action--sound,
.header-action--settings {
  background: transparent;
  border: 0;
  color: var(--mc-on-dark-muted);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
  font: 500 14px var(--mc-font-body);
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: none;
}
.header-action:hover,
.header-action--sound:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.header-action--settings.is-active { background: rgba(255, 255, 255, 0.12); border: 0; color: #fff; }
.header-action--sound { color: #f1e3c8; }
.header-action--busy.is-on { background: var(--danger); color: #fff; }
.status-dot { box-shadow: none; }
.status-dot.online { background: #5fae86; }
.status-dot.offline { background: #d9665b; }

/* ---- Tabs: rounded rectangles; active = wine on its tint ---- */
.tab-bar {
  background: var(--n-25);
  border-bottom: 1px solid var(--n-200);
  gap: 2px;
}
.tab-btn {
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
  font: 500 14px var(--mc-font-body);
  color: var(--n-600);
  display: inline-flex; align-items: center; gap: 7px;
}
.tab-btn:hover:not(.active) { background: var(--n-100); border-color: transparent; color: var(--n-900); }
.tab-btn.active,
.tab-btn.active[data-column] {
  background: var(--b-50);
  border-color: transparent;
  color: var(--b-600);
  font-weight: 700;
  box-shadow: none;
}
.tab-btn.tab-new-order,
.tab-btn.tab-new-order:hover { background: var(--b-600); color: #fff; font-weight: 700; border-radius: 10px; padding: 0 16px; }
.tab-btn.tab-new-order:hover { background: var(--b-700); }
.tab-badge { background: var(--b-600); color: #fff; box-shadow: 0 0 0 2px var(--n-25); font-weight: 700; }
.tab-btn.active .tab-badge { box-shadow: 0 0 0 2px var(--b-50); }
.tab-badge--inbox { background: var(--b-600); color: #fff; }
.tab-badge--inbox.is-late { background: var(--danger); color: #fff; }

/* ---- Board: flat lanes on the app background, a quiet header with a status dot ---- */
.columns { gap: 16px; }
.column-header,
.column-header.confirmed, .column-header.in-weighing, .column-header.ready, .column-header.products,
.column-header.deliveries, .column-header.archive, .column-header.analytics, .column-header.customers,
.column-header.conversations, .column-header.inbox, .column-header.settings, .column-header.prep {
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: 48px;
  padding: 0 4px;
  font-size: var(--fs-section);
  font-weight: 700;
  color: var(--n-900);
  justify-content: flex-start;
}
.column-header.confirmed::before, .column-header.in-weighing::before, .column-header.ready::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--b-600);
  flex-shrink: 0;
}
.column-header.in-weighing::before { background: var(--warning); }
.column-header.ready::before { background: var(--success); }
.column-count {
  font-size: 13px; font-weight: 500;
  min-width: 24px; height: 22px; padding: 0 7px;
  background: var(--n-100);
  color: var(--n-700);
}
.column-count.is-zero { background: var(--n-100); color: var(--n-500); }
.order-list {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.empty-state { color: var(--n-600); }

/* ---- Order cards: white, hairline, no status fence ---- */
.order-card {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: 12px;
  box-shadow: none;
  padding: 16px;
  margin-bottom: 12px;
}
.order-card:hover { border-color: var(--n-300); box-shadow: var(--mc-shadow-sm); }
.order-card.status-CONFIRMED, .order-card.status-IN_WEIGHING, .order-card.status-READY,
.order-card.status-ARCHIVED, .order-card.status-CANCELLED { border-right: 1px solid var(--n-200); }
.order-card.status-CONFIRMED:hover, .order-card.status-IN_WEIGHING:hover, .order-card.status-READY:hover { border-right-color: var(--n-300); }
.order-card.new-order { box-shadow: 0 0 0 2px var(--b-100); }
.order-card .order-header-row { gap: 8px; margin-bottom: 6px; }
.order-card .order-number { background: none; padding: 0; color: var(--n-500); font-size: 13px; font-weight: 500; }
.unviewed-badge {
  background: var(--b-50); color: var(--b-600);
  font-size: var(--fs-micro); font-weight: 700;
  height: 22px; padding: 0 8px; border-radius: 6px;
  display: inline-flex; align-items: center;
}
.order-card .order-pickup { font-size: var(--fs-time); font-weight: 500; color: var(--n-800); margin: 0 0 2px; display: flex; align-items: center; gap: 6px; }
.order-card .order-pickup .ico { color: var(--n-500); }
.order-card .order-name { font-size: var(--fs-name); font-weight: 700; color: var(--n-900); margin-bottom: 6px; }
.order-items-preview { font-size: 13px; line-height: 19px; color: var(--n-600); margin-bottom: 10px; }
.order-items-preview .mc-qty { color: var(--n-800); font-weight: 500; }
.order-items-preview .mc-sep { color: var(--n-300); }
.order-items-preview .mc-more { color: var(--n-700); font-weight: 500; }
.order-notes {
  background: var(--n-50);
  color: var(--n-700);
  font-size: 13px; font-weight: 400; line-height: 19px;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
  display: flex; gap: 6px; align-items: baseline;
}
.order-notes .ico { color: var(--n-500); align-self: center; }
.order-chips { gap: 6px; margin-bottom: 10px; }
.order-card .order-summary { border-top: 1px solid var(--n-100); padding-top: 10px; font-size: 13px; color: var(--n-600); font-weight: 400; }
.order-card .order-total { font-size: var(--fs-section); font-weight: 700; color: var(--n-900); }
.card-actions { margin-top: 12px; gap: 8px; }
.card-action {
  min-height: 40px;
  border-radius: 10px;
  font: 500 15px var(--mc-font-body);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: none;
}
.card-action--ready { background: var(--b-600); border: 1px solid var(--b-600); color: #fff; }
.card-action--ready:hover { background: var(--b-700); }
.card-action--collected { background: var(--n-0); border: 1px solid var(--n-300); color: var(--n-900); }
.card-action--collected:hover { background: var(--n-50); }
.card-action--paid { background: var(--n-0); border: 1px solid var(--n-300); color: var(--success); }
.card-action--paid:hover { background: var(--success-tint); }

/* ---- Chips: small, flat ---- */
.mc-chip {
  height: 22px; padding: 0 8px;
  border-radius: 6px;
  font: 500 var(--fs-micro) var(--mc-font-body);
  display: inline-flex; align-items: center; gap: 4px;
  box-shadow: none;
  white-space: nowrap;
}
.mc-chip--owner { background: var(--n-100); color: var(--n-700); }
.mc-chip--transit { background: var(--info); color: #fff; }
.mc-chip--late { background: var(--danger); color: #fff; }
.mc-chip--waiting, .mc-chip--pay-unpaid { background: var(--warning-tint); color: var(--warning); }
.mc-chip--reserved, .mc-chip--muted { background: var(--n-100); color: var(--n-700); }
.mc-chip--call { background: var(--n-0); color: var(--n-800); border: 1px solid var(--n-300); cursor: pointer; }
.mc-chip--arrived { background: var(--success); color: #fff; }

/* ---- Buttons: one family ---- */
.btn {
  font-family: var(--mc-font-body);
  font-weight: 500;
  border-radius: 10px;
  min-height: 40px;
  box-shadow: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-start, .btn-done, .btn-collected, .btn-primary { background: var(--b-600); border: 1px solid var(--b-600); color: #fff; }
.btn-start:hover:not(:disabled), .btn-done:hover:not(:disabled), .btn-collected:hover:not(:disabled), .btn-primary:hover:not(:disabled) { background: var(--b-700); border-color: var(--b-700); }
.btn-back, .btn-print, .btn-schedule, .btn-chat, .btn-secondary {
  background: var(--n-0); border: 1px solid var(--n-300); color: var(--n-900);
}
.btn-back:hover:not(:disabled), .btn-print:hover:not(:disabled), .btn-schedule:hover:not(:disabled), .btn-chat:hover:not(:disabled) { background: var(--n-50); }
.btn-chat { color: var(--mc-wa); }
.btn-cancel-order { color: var(--danger); background: transparent; border-color: transparent; font-weight: 500; }
.btn-cancel-order:hover:not(:disabled) { background: var(--danger-tint); }
.btn-link { color: var(--b-600); font-weight: 500; }
.inline-edit-btn { color: var(--n-600); background: transparent; border: 0; border-radius: 8px; min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.inline-edit-btn:hover { background: var(--n-100); color: var(--n-900); }
.item-cancel-btn { color: var(--n-500); background: transparent; border: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.item-cancel-btn:hover { color: var(--danger); background: var(--danger-tint); }

/* ---- Inputs ---- */
input[type="text"], input[type="number"], input[type="tel"], input[type="date"], input[type="time"],
input[type="search"], input[type="password"], select, textarea {
  font-family: var(--mc-font-body);
  border-color: var(--n-300);
  border-radius: 8px;
  background: var(--n-0);
  color: var(--n-900);
}
input:focus, select:focus, textarea:focus { border-color: var(--b-600); }
::placeholder { color: var(--n-600); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--b-600); }

/* ---- Order window: a quiet metadata grid, one neutral stepper group, a tidy footer ---- */
.modal-content { border-radius: 16px; box-shadow: var(--mc-shadow-lg); }
.modal-header h2, .modal-content h2 { font-size: var(--fs-modal); font-weight: 700; color: var(--n-900); }
.weight-stepper, .qty-step, .stepper-btn {
  background: var(--n-0);
  border: 1px solid var(--n-300);
  color: var(--n-800);
  border-radius: 8px;
  box-shadow: none;
}
.weight-stepper:hover, .qty-step:hover, .stepper-btn:hover { background: var(--n-50); }
.final-weight-input, .mc-qty-input, .weight-input {
  background: var(--n-0);
  border: 1px solid var(--n-300);
  color: var(--n-900);
  border-radius: 8px;
  font-weight: 700;
}
table th { background: var(--n-50); color: var(--n-700); font-weight: 500; }
table td { border-color: var(--n-100); }
.mc-fact-label { color: var(--n-600); }

/* ---- Toasts ---- */
.mc-toast { background: var(--n-900); color: #fff; border-radius: 12px; box-shadow: var(--mc-shadow-md); font-family: var(--mc-font-body); }
.mc-toast--error { background: var(--danger-tint); color: var(--danger); border: 1px solid #ecc9c9; }
.mc-toast-action { color: #f1e3c8; border-color: rgba(241, 227, 200, 0.45); font-weight: 700; }
.mc-toast--error .mc-toast-action { color: var(--danger); border-color: rgba(161, 55, 55, 0.4); }
.mc-toast-progress { background: rgba(255, 255, 255, 0.35); }
.mc-toast--error .mc-toast-progress { background: rgba(161, 55, 55, 0.35); }

/* ---- Deliveries tab ---- */
.delivery-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 4px 12px; }
.delivery-select-all { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; font-size: 14px; color: var(--n-800); }
.delivery-counts { margin-inline-start: auto; font-size: 13px; color: var(--n-600); }
.delivery-group-header { display: flex; align-items: center; gap: 8px; padding: 14px 4px 8px; font-size: 15px; font-weight: 700; color: var(--n-900); }
.delivery-group-header .ico { color: var(--n-500); }
.count-pill { font-size: 12px; font-weight: 500; background: var(--n-100); color: var(--n-700); border-radius: 999px; padding: 1px 8px; }
.delivery-card {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.delivery-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.delivery-card-who { display: flex; align-items: center; gap: 8px; }
.delivery-card-num { color: var(--n-500); font-size: 13px; font-weight: 500; }
.delivery-card-name { font-weight: 700; font-size: 16px; color: var(--n-900); }
.delivery-status--pending { background: var(--warning-tint); color: var(--warning); }
.delivery-status--in_transit { background: var(--info-tint); color: var(--info); }
.delivery-status--delivered { background: var(--success-tint); color: var(--success); }
.delivery-card-line { font-size: 14px; color: var(--n-700); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.delivery-card-line .ico { color: var(--n-500); }
.delivery-card-tel { color: var(--n-800); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.delivery-card-tel:hover { color: var(--b-600); }
.delivery-card-day { display: inline-flex; align-items: center; gap: 6px; color: var(--n-600); }
.delivery-card-items { font-size: 13px; color: var(--n-600); }
.delivery-card-note { display: flex; align-items: center; gap: 6px; color: var(--n-500); }
.delivery-card-note .delivery-notes-input { flex: 1; }
.delivery-card-actions { display: flex; gap: 8px; margin-top: 4px; }

/* ---- Analytics: compact metric cards, no individual shadows ---- */
.analytics-toolbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 12px; }
.analytics-testdata-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--n-600); cursor: pointer; }
.analytics-export label { font-size: 13px; color: var(--n-600); }
.analytics-export input[type="date"] { min-height: 36px; padding: 0 8px; }
.stat-card {
  background: var(--n-0);
  border: 1px solid var(--n-200);
  border-radius: 12px;
  box-shadow: none;
  padding: 16px 18px;
  text-align: start;
}
.stat-value { font-size: var(--fs-metric); line-height: 34px; font-weight: 700; color: var(--n-900); }
.stat-label { font-size: 13px; color: var(--n-600); margin-top: 2px; }
.chart-container { background: var(--n-0); border: 1px solid var(--n-200); border-radius: 12px; box-shadow: none; }
.chart-container h3 { font-size: var(--fs-section); font-weight: 700; color: var(--n-900); }

/* ---- Settings: a real form ---- */
.settings-card { background: var(--n-0); border: 1px solid var(--n-200); border-radius: 12px; box-shadow: none; padding: 24px; }
.settings-card h3 { font-size: var(--fs-section); font-weight: 700; color: var(--n-900); display: flex; align-items: center; gap: 8px; }
.settings-card h3 .ico { color: var(--n-500); width: 20px; height: 20px; }
.hours-row { min-height: 48px; }
.form-hint { color: var(--n-600); }

/* ---- Bundle warnings on a card ---- */
.bundle-warning-badge { background: var(--warning-tint); color: var(--warning); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; }

/* ---- Login ---- */
#login-screen { background: var(--n-900); }
.login-box { background: var(--n-0); border-radius: 16px; border: 0; box-shadow: var(--mc-shadow-lg); }
.login-box h1 { font-size: 26px; font-weight: 700; color: var(--n-900); }
.login-box p { color: var(--n-600); }
.login-box input { border: 1px solid var(--n-300); border-radius: 10px; }
.login-box button { background: var(--b-600); border-radius: 10px; font-weight: 700; }
.login-box button:hover { background: var(--b-700); }

/* ---- Phone ---- */
@media (max-width: 768px) {
  header { min-height: 56px; }
  header h1 { font-size: 16px; }
  .tab-bar {
    background: var(--n-0);
    border-top: 1px solid var(--n-200);
    border-bottom: 0;
    box-shadow: none;
  }
  .tab-btn, .tab-btn.active, .tab-btn.active[data-column] {
    flex-direction: column;
    gap: 2px;
    min-height: 52px;
    padding: 6px 4px;
    font-size: 11px; font-weight: 500;
    border-radius: 10px;
    background: transparent;
    color: var(--n-600);
  }
  .tab-btn .ico { width: 22px; height: 22px; }
  .tab-btn.active, .tab-btn.active[data-column] { color: var(--b-600); font-weight: 700; }
  .tab-btn.active .tab-icon { background: var(--b-50); border-radius: 999px; padding: 2px 12px; }
  .card-action { min-height: 44px; }
  .btn { min-height: 44px; }
  .order-card { padding: 14px; }
}

/* ---- D1 round 2 (first screenshots) ---- */
/* Single-surface tabs: the header is the page title (24/700), aligned with the content. */
.column[data-col="prep"] .column-header, .column[data-col="products"] .column-header, .column[data-col="deliveries"] .column-header,
.column[data-col="archive"] .column-header, .column[data-col="customers"] .column-header, .column[data-col="inbox"] .column-header,
.column[data-col="conversations"] .column-header, .column[data-col="analytics"] .column-header, .column[data-col="settings"] .column-header {
  font-size: var(--fs-page); line-height: 32px; min-height: 56px;
}
.inbox-intro, .settings-intro, .column-subtitle { text-align: start; margin-inline: 4px; color: var(--n-600); }
/* Category headings: ink, not amber. */
.product-category-header, .prep-category-title {
  color: var(--n-800); font-size: 15px; font-weight: 700;
  border-bottom: 1px solid var(--n-200);
}
/* A new order: the "חדשה" chip says it — no pulsing orange glow, no fence. */
.order-card.unviewed { animation: none; border-right: 1px solid var(--n-200); box-shadow: 0 0 0 3px var(--b-50); }
/* The order window's steppers: one neutral group (the ±0.05 pair a shade stronger than ±0.01). */
.weight-stepper,
.weight-stepper.stepper-big,
.weight-stepper.stepper-small,
#modal-content .weighing-controls .weight-stepper.stepper-big,
#modal-content .weighing-controls .weight-stepper.stepper-small {
  background: var(--n-0);
  border: 1px solid var(--n-300);
  color: var(--n-800);
  border-radius: 8px;
  box-shadow: none;
  font: 500 18px var(--mc-font-body);
}
.weight-stepper.stepper-big,
#modal-content .weighing-controls .weight-stepper.stepper-big { background: var(--n-50); font-weight: 700; }
.weight-stepper:hover { background: var(--n-100); }
.weight-input, .weight-input.saved { background: var(--n-0); border: 1px solid var(--n-300); border-radius: 8px; color: var(--n-900); font-weight: 700; }
.weight-input.saved { border-color: var(--success); box-shadow: inset 0 0 0 1px var(--success); }
/* Buttons that were oversized or shadowed. */
.btn-add-product { min-height: 40px; padding: 0 16px; font: 500 15px var(--mc-font-body); border-radius: 10px; box-shadow: none; }
.tab-btn.tab-new-order { box-shadow: none; }
.prep-print-btn { min-height: 40px; }
.label-size-select { min-height: 40px; }
.inbox-row { border-inline-start-width: 3px; }
.inbox-action { font-family: var(--mc-font-body); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.stock-toggle { font-family: var(--mc-font-body); font-weight: 500; }
/* Conversations: the live / abandoned switch is a segmented control like every other one. */
.conv-subtab { font-family: var(--mc-font-body); font-weight: 500; border-radius: 8px; background: var(--n-0); border: 1px solid var(--n-300); color: var(--n-700); }
.conv-subtab.active { background: var(--n-900); border-color: var(--n-900); color: #fff; font-weight: 700; }
.conv-count { background: rgba(0, 0, 0, 0.06); color: inherit; }
.conv-subtab.active .conv-count { background: rgba(255, 255, 255, 0.16); }
.login-box input[type="password"]:placeholder-shown { letter-spacing: normal; }
@media (max-width: 768px) {
  /* "עוד" open (a secondary tab is shown): the same active look as any tab. */
  .more-tab.active { background: transparent; color: var(--b-600); font-weight: 700; }
  .more-tab.active .tab-icon { background: var(--b-50); border-radius: 999px; padding: 2px 12px; color: var(--b-600); }
  .more-sheet-panel { background: var(--n-0); border-radius: 16px 16px 0 0; }
  .more-sheet-item { font: 500 16px var(--mc-font-body); color: var(--n-900); display: flex; align-items: center; gap: 12px; }
  .more-sheet-icon { color: var(--n-600); display: inline-flex; }
}
@media (max-width: 768px) {
  .tab-bar .tab-btn.active, .tab-bar .tab-btn.more-tab.active { background: transparent; color: var(--b-600); }
}
/* Prep list: variants are facts, not warnings. */
.prep-variant { background: var(--n-50); color: var(--n-700); border: 0; }
.prep-variant b { color: var(--n-900); }

/* ---- D1 round 3 (Codex Astra after-QA, rounds/design-astra-after.md) ---- */
/* Customers: one RTL grid — checkbox · identity · status, the purchase facts under the identity. */
.customer-card { background: var(--n-0); border: 1px solid var(--n-200); border-radius: 12px; padding: 14px 20px; box-shadow: none; }
.customer-card:hover { border-color: var(--n-300); }
.customer-card-head { display: grid; grid-template-columns: 24px minmax(200px, 1fr) auto; align-items: center; gap: 16px; }
.customer-name { text-align: start; font-size: 16px; font-weight: 700; color: var(--n-900); }
.customer-phone { font-size: 13px; font-weight: 400; color: var(--n-600); direction: ltr; text-align: right; unicode-bidi: isolate; }
.customer-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-inline-start: 40px; }
.customer-chip { background: var(--n-50); border: 0; border-radius: 6px; color: var(--n-700); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; }
.customer-chip .chip-icon { color: var(--n-500); display: inline-flex; }
/* The order window: narrower, the facts in two columns. */
@media (min-width: 769px) {
  #order-modal .modal-content { max-width: 960px; }
  .mc-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
  .mc-fact--status, .mc-fact--pay { grid-column: 1 / -1; }
}
.mc-fact { font-size: 15px; }
.mc-fact strong { font-weight: 700; }
.weight-stepper, .weight-stepper.stepper-big, .weight-stepper.stepper-small { min-width: 44px; height: 44px; padding: 0 8px; font-size: 14px; font-weight: 500; direction: ltr; }
.weight-stepper.stepper-big { font-weight: 700; }
.weight-input { width: 72px; }
/* Settings: a focused form column. */
.settings-page { max-width: 640px; margin-inline: auto; }
.settings-intro { max-width: 640px; margin-inline: auto; }
/* Analytics: four compact metrics a row (two on a phone). */
.analytics-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { min-height: 96px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 768px) { .analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Deliveries: identity block on the right, the note and the actions on one row. */
.delivery-card { max-width: 980px; }
.delivery-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.delivery-card-foot .delivery-card-note { flex: 1 1 240px; }
.delivery-card-foot .delivery-card-actions { margin-top: 0; }
.delivery-card-foot .delivery-card-actions .btn { min-width: 140px; }
/* Phone: 44 px utilities, 20 px icons, 12 px nav labels, room above the bottom bar. */
@media (max-width: 768px) {
  .header-action, .header-action--sound, .header-action--settings { min-width: 44px; min-height: 44px; padding: 0 10px; justify-content: center; }
  .header-action .ico { width: 20px; height: 20px; }
  .tab-bar .tab-btn, .tab-btn, .tab-btn.active, .tab-btn.active[data-column] { font-size: 12px; }
  .tab-bar { padding-bottom: env(safe-area-inset-bottom, 0px); }
}
/* The order window's footer on one row: buttons as wide as their words, the primary at the far end. */
@media (min-width: 769px) {
  #modal-actions { gap: 8px; }
  #modal-actions .btn { min-width: 0; width: auto; flex: 0 0 auto; padding: 0 14px; min-height: 44px; font-size: 15px; }
  #modal-actions .btn-done, #modal-actions .btn-start, #modal-actions .btn-collected { min-height: 48px; padding: 0 24px; font-size: 16px; font-weight: 700; }
}
@media (max-width: 768px) {
  /* Settings stay in "עוד" on a phone (loop R7): the header keeps its three actions. */
  .header-action--settings { display: none; }
}
