/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }
body {
  font-family: "Heebo", "Rubik", "Arial Hebrew", system-ui, -apple-system, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-size: 18px;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea { font-family: inherit; }

/* ===== Top Bar ===== */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(72px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: white;
  display: flex; align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 50;
}
#topbar h1 {
  margin: 0; flex: 1;
  font-size: 24px; font-weight: 600;
  text-align: center;
  letter-spacing: .2px;
}
.icon-btn {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  transition: background .15s;
  position: relative;
}
.icon-btn:active { background: rgba(255,255,255,.18); }
.cart-btn .badge {
  position: absolute;
  top: 6px; left: 6px;
  background: #ef4444;
  color: white;
  font-size: 13px; font-weight: 700;
  min-width: 22px; height: 22px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
  border: 2px solid white;
}

/* ===== Main ===== */
#app {
  position: absolute;
  top: calc(72px + env(safe-area-inset-top));
  left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}
.screen {
  display: none;
  padding: 24px;
  min-height: 100%;
}
.screen.active { display: block; }

/* ===== Categories grid (fit all on one screen) ===== */
#screen-categories {
  padding: 10px;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
#screen-categories.active { display: grid; }
.cat-grid {
  display: grid;
  /* Default: 5 cols × 6 rows = 30 cells (enough for 27 categories) */
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 8px;
  height: 100%;
  width: 100%;
}
.cat-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--cat-bg, linear-gradient(135deg,#64748b 0%,#334155 100%));
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  transition: transform .15s, box-shadow .15s;
  color: white;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 6px;
  text-align: center;
  min-height: 0;
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,.22) 0%, transparent 60%);
  pointer-events: none;
}
.cat-card:active { transform: scale(.95); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.cat-card .cat-icon {
  width: clamp(40px, 7vh, 64px);
  height: clamp(40px, 7vh, 64px);
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--cat-ico, #475569);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: clamp(4px, 1vh, 8px);
  box-shadow: 0 3px 10px rgba(0,0,0,.18), inset 0 2px 4px rgba(255,255,255,.5);
  flex-shrink: 0;
}
.cat-card .cat-icon svg {
  width: 55%;
  height: 55%;
}
.cat-card .cat-icon .cat-custom-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
/* Has custom image: icon takes the full card, name overlay at bottom */
.cat-card.has-custom-image {
  padding: 0;
}
.cat-card.has-custom-image .cat-icon {
  width: 100%; height: 100%;
  border-radius: 16px;
  margin-bottom: 0;
  background: white;
  box-shadow: none;
  position: absolute;
  inset: 0;
}
.cat-card.has-custom-image .cat-icon .cat-custom-img {
  border-radius: 16px;
}
.cat-card.has-custom-image .cat-name,
.cat-card.has-custom-image .cat-count {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,.7);
  background: linear-gradient(0deg, rgba(0,0,0,.7) 30%, transparent);
  width: 100%;
  padding: 6px 4px;
  margin-top: auto;
  align-self: flex-end;
}
.cat-card .cat-name {
  font-size: clamp(11px, 1.6vh, 15px);
  font-weight: 700;
  line-height: 1.15;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,.25);
  width: 100%;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-card .cat-count {
  margin-top: 2px;
  font-size: clamp(9px, 1.2vh, 11px);
  font-weight: 500;
  opacity: .85;
}

/* Landscape: more columns, fewer rows */
@media (orientation: landscape) {
  .cat-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}
/* Wide desktop */
@media (min-width: 1200px) and (orientation: landscape) {
  .cat-grid {
    grid-template-columns: repeat(9, 1fr);
  }
}
/* Small phones (under 480px) */
@media (max-width: 479px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Products grid (3 columns per row) ===== */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.prod-card {
  border-radius: 16px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: right;
  width: 100%;
}
.prod-card:active { transform: scale(.96); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.prod-card .pc-img {
  aspect-ratio: 1 / 1;
  background: white;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.prod-card .pc-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 10px;
  display: block;
}
.prod-card .pc-img .pc-noimg {
  font-size: 48px; color: #cbd5e1;
}
.prod-card .pc-info {
  padding: 10px 12px 12px;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
  display: flex; flex-direction: column; gap: 4px;
}
.prod-card .pc-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.prod-card .pc-price {
  font-size: 17px;
  font-weight: 700;
  color: #2563eb;
}
.prod-card.in-cart::after {
  content: "✓";
  position: absolute;
  top: 8px; left: 8px;
  width: 32px; height: 32px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  z-index: 1;
}
.prod-card.in-cart .pc-qty-tag {
  position: absolute;
  top: 8px; right: 8px;
  background: #10b981;
  color: white;
  font-weight: 700; font-size: 14px;
  border-radius: 16px;
  padding: 3px 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  z-index: 1;
}

/* ===== Modal ===== */
[hidden] { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.modal-content {
  position: relative;
  background: white;
  border-radius: 24px;
  padding: 32px;
  width: min(540px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: pop .2s ease-out;
}
@keyframes pop {
  from { transform: scale(.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px; left: 12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 28px; line-height: 1;
  color: #6b7280;
  background: #f3f4f6;
}
.modal-close:active { background: #e5e7eb; }
.modal-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f9fafb;
  border-radius: 16px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.modal-image-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
#modalName {
  margin: 0 0 20px;
  font-size: 22px; font-weight: 600;
  text-align: center;
  color: #111827;
  line-height: 1.4;
}

/* ===== Price edit in modal ===== */
.price-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.price-label {
  font-size: 15px;
  font-weight: 600;
  color: #4b5563;
}
.price-edit {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 6px 12px;
  gap: 4px;
}
.price-edit.changed {
  border-color: #f59e0b;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}
.price-edit .curr {
  color: #6b7280;
  font-size: 16px;
  font-weight: 600;
}
.price-edit input {
  width: 100px;
  border: none;
  text-align: left;
  font-weight: 700;
  font-size: 22px;
  outline: none;
  background: transparent;
  padding: 4px;
  direction: ltr;
  -moz-appearance: textfield;
}
.price-edit input::-webkit-outer-spin-button,
.price-edit input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.reset-price-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fef3c7;
  color: #92400e;
  font-size: 18px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.reset-price-btn:active { background: #fde68a; }

/* Line total */
.line-total {
  display: flex; justify-content: space-between; align-items: center;
  background: #eff6ff;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #4b5563;
}
.line-total strong { color: #1d4ed8; font-size: 20px; }

/* Stock toggle button */
.stock-toggle-btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
  border: 2px solid #fecaca;
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  transition: background .15s;
}
.stock-toggle-btn:active { background: #fee2e2; }
.stock-toggle-btn.is-out {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.stock-toggle-btn .stock-icon { font-size: 18px; }

/* Disabled product card on grid */
.prod-card.is-disabled {
  position: relative;
  border: 3px solid #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239,68,68,.15), 0 4px 16px rgba(239,68,68,.2) !important;
}
.prod-card.is-disabled .pc-img {
  filter: grayscale(1) opacity(.5);
}
.prod-card.is-disabled .pc-info {
  background: #fef2f2;
  border-top: 2px solid #fecaca;
}
.prod-card.is-disabled .pc-name,
.prod-card.is-disabled .pc-price {
  color: #991b1b;
  text-decoration: line-through;
}
/* Big red "OUT OF STOCK" stamp across the card */
.prod-card.is-disabled::after {
  content: "אזל מהמלאי";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: #dc2626;
  color: white;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 10px 22px;
  border-radius: 8px;
  border: 3px solid #fef2f2;
  box-shadow: 0 6px 20px rgba(0,0,0,.4), inset 0 0 0 2px #dc2626;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
/* Persistent corner ribbon as well for extra visibility */
.prod-card.is-disabled::before {
  content: "🚫 אזל";
  position: absolute;
  top: 8px; right: 8px;
  background: #dc2626;
  color: white;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 6;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  pointer-events: none;
}
/* Don't show qty tag on disabled — and block clicks via JS */

/* ===== Quantity ===== */
.qty-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.qty-btn {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: #e5e7eb;
  font-size: 32px; font-weight: 700;
  color: #1f2937;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:active { background: #d1d5db; }
#qtyInput {
  width: 90px; height: 56px;
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  text-align: center;
  font-size: 24px; font-weight: 700;
  color: #111827;
  background: white;
}
#qtyInput::-webkit-inner-spin-button,
#qtyInput::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ===== Buttons ===== */
.primary-btn {
  width: 100%;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  font-size: 20px; font-weight: 700;
  transition: transform .1s;
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.primary-btn:active { transform: scale(.98); box-shadow: 0 2px 6px rgba(37,99,235,.3); }
.secondary-btn {
  padding: 16px 20px;
  border-radius: 14px;
  background: #f3f4f6;
  color: #374151;
  font-size: 18px; font-weight: 600;
  border: 2px solid #e5e7eb;
}
.secondary-btn:active { background: #e5e7eb; }

/* ===== Cart Drawer ===== */
.drawer { position: fixed; inset: 0; z-index: 90; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(480px, 90vw);
  background: white;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.2);
  animation: slideIn .25s ease-out;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.drawer-header h2 { margin: 0; font-size: 22px; font-weight: 700; color: #111827; }
.drawer-close {
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 28px; line-height: 1;
  color: #6b7280;
  background: white;
}
.drawer-close:active { background: #e5e7eb; }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.cart-empty {
  text-align: center;
  color: #9ca3af;
  padding: 60px 20px;
  font-size: 18px;
}
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: #f9fafb;
  border-radius: 14px;
  margin-bottom: 10px;
}
.cart-item .ci-img {
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden; flex-shrink: 0;
  background: white;
  display: flex; align-items: center; justify-content: center;
}
.cart-item .ci-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-item .ci-body { flex: 1; min-width: 0; }
.cart-item .ci-name {
  font-size: 15px; font-weight: 600; color: #111827;
  margin: 0 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item .ci-price { font-size: 13px; color: #6b7280; }
.cart-item .ci-qty {
  display: flex; align-items: center; gap: 6px;
}
.cart-item .ci-qty button {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #e5e7eb;
  font-size: 18px; font-weight: 700;
  color: #1f2937;
}
.cart-item .ci-qty .ci-num {
  min-width: 32px;
  text-align: center;
  font-weight: 700; font-size: 17px;
}
.cart-item .ci-remove {
  width: 36px; height: 36px;
  border-radius: 8px;
  color: #dc2626;
  font-size: 20px;
}
.cart-item .ci-remove:active { background: #fee2e2; }

.drawer-footer {
  border-top: 1px solid #e5e7eb;
  padding: 16px 20px;
  background: #f9fafb;
}
.cart-summary {
  display: flex; justify-content: space-between;
  margin-bottom: 14px;
  font-size: 16px;
}
.cart-summary strong { color: #111827; font-size: 18px; }
.drawer-actions {
  display: flex; gap: 10px;
}
.drawer-actions .secondary-btn { flex: 1; }
.drawer-actions .primary-btn { flex: 2; padding: 16px; font-size: 18px; }

/* ===== Network pill ===== */
.net-pill {
  position: fixed;
  top: calc(80px + env(safe-area-inset-top));
  left: 0; right: 0;
  margin: 0 auto;
  width: max-content;
  max-width: 90vw;
  background: white;
  border-radius: 999px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  z-index: 45;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}
.net-pill .net-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 0 rgba(156,163,175,.5);
  animation: net-pulse 2s infinite;
}
.net-pill.offline { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.net-pill.offline .net-dot { background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
.net-pill.online { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.net-pill.online .net-dot { background: #10b981; }
.net-pill.precaching { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.net-pill.precaching .net-dot { background: #3b82f6; }
@keyframes net-pulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { opacity: .7; }
}
.pending-chip {
  background: #fbbf24;
  color: #78350f;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

/* ===== Customer autocomplete ===== */
.autocomplete-wrap {
  position: relative;
}
.autocomplete-list {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-top: 4px;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  z-index: 110;
}
.autocomplete-list .ac-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background .1s;
}
.autocomplete-list .ac-item:last-child { border-bottom: 0; }
.autocomplete-list .ac-item:hover,
.autocomplete-list .ac-item.focused { background: #eff6ff; }
.autocomplete-list .ac-item:active { background: #dbeafe; }
.autocomplete-list .ac-name { font-weight: 600; color: #111827; font-size: 16px; }
.autocomplete-list .ac-meta { font-size: 13px; color: #6b7280; margin-top: 2px; direction: ltr; text-align: right; }
.autocomplete-list .ac-empty {
  padding: 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}
.autocomplete-list mark {
  background: #fef3c7;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* ===== Refresh modal ===== */
.refresh-modal { text-align: center; padding: 32px 28px; max-width: 440px; }
.refresh-modal h2 { margin: 0 0 16px; font-size: 24px; color: #111827; }
.refresh-modal p {
  margin: 8px 0 18px;
  font-size: 16px; color: #4b5563;
  line-height: 1.5; min-height: 1.5em;
  white-space: pre-line;
}
.refresh-spinner {
  width: 48px; height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  margin: 12px auto 20px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.refresh-modal .err {
  color: #b91c1c; background: #fee2e2;
  padding: 14px; border-radius: 12px;
  font-size: 15px;
}
.refresh-modal .ok {
  color: #047857; background: #d1fae5;
  padding: 14px; border-radius: 12px;
  font-size: 17px; font-weight: 600;
}
.refresh-modal #refreshClose { margin-top: 12px; }

/* ===== Order modal ===== */
.order-modal { width: min(620px, 94vw); }
.field {
  display: block;
  margin-bottom: 14px;
}
.field span {
  display: block;
  font-size: 14px; font-weight: 600; color: #374151;
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  font-size: 17px;
  background: white;
  color: #111827;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: #2563eb;
}
.order-preview {
  background: #f9fafb;
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  max-height: 260px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.7;
}
.order-preview .op-row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.order-preview .op-row:last-child { border-bottom: 0; }
.order-preview .op-total {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid #d1d5db;
  font-weight: 700; font-size: 18px;
  display: flex; justify-content: space-between;
}
.order-actions {
  display: flex; gap: 8px; margin-top: 8px;
  flex-wrap: wrap;
}
.order-actions .primary-btn { flex: 1 1 100%; }
.order-actions .secondary-btn { flex: 1; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #047857;
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  z-index: 1000;
  transition: transform .3s ease-out;
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.warn { background: #d97706; }

/* ===== Print ===== */
@media print {
  body { background: white; font-size: 13px; }
  #topbar, .drawer, .modal-backdrop, .modal-close, .order-actions, #app { display: none !important; }
  .modal { position: static; }
  .modal-content { box-shadow: none; padding: 0; width: 100%; max-height: none; }
  .order-preview { max-height: none; }
}

/* ===== Larger tablets ===== */
@media (min-width: 900px) {
  .prod-grid { gap: 20px; }
}
