/* Register layout shared by Food and Retail: products on the left, ticket on the right; payment and done sheets. */
.register { display: grid; grid-template-columns: minmax(0, 1fr) 390px; height: 100%; }
.menu-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* Categories wrap onto more lines instead of running off the screen; every one stays in view.
   A business with a great many scrolls them up and down inside a short band. */
.cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; flex: none; max-height: 30vh; overflow-y: auto; }
.cat {
  min-height: 52px; max-width: 100%; padding: 8px 20px; border-radius: 12px; border: 2px solid transparent;
  background: color-mix(in srgb, var(--tint) 14%, var(--panel)); color: var(--text);
  font: inherit; font-weight: 700; font-size: 17px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cat.on { background: var(--tint); color: #fff; }
.grid {
  flex: 1; overflow-y: auto; padding: 0 12px 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: 104px; gap: 10px; align-content: start;
}
.item {
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); border-left: 8px solid var(--tint);
  background: var(--panel); color: var(--text); font: inherit; cursor: pointer;
}
.item:active { background: color-mix(in srgb, var(--tint) 18%, var(--panel)); transform: scale(.98); }
.item-name { font-weight: 700; font-size: 17px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.item-price { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
/* an item with a photo: the photo fills the button, the name and price sit on a dark fade */
.item.has-img { position: relative; overflow: hidden; justify-content: flex-end; gap: 2px; color: #fff; background: #000; }
.item.has-img .item-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.item.has-img::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .05)); }
.item.has-img > span { position: relative; z-index: 2; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.item.has-img .item-price, .item.has-img .item-cal, .item.has-img .item-meta, .item.has-img .stock { color: rgba(255, 255, 255, .88); }

.ticket { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); }
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.order-no { font-size: 20px; font-weight: 700; }
.lines { flex: 1; overflow-y: auto; }
.line {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: start; width: 100%;
  padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
div.line { cursor: default; }
.line:active { background: var(--panel-2); }
.qty { font-weight: 700; }
.lname { font-weight: 600; min-width: 0; }
.lname small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.lname small.note { color: var(--warn); font-style: italic; }
.lprice { font-weight: 600; font-variant-numeric: tabular-nums; }
.pad-msg { padding: 16px 14px; }
.totals { padding: 10px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.totals > div { display: flex; justify-content: space-between; padding: 2px 0; color: var(--muted); }
.totals .grand { color: var(--text); font-size: 22px; font-weight: 800; padding-top: 6px; }
.ticket-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 56px; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ticket-actions .btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ticket-actions .pay { grid-column: 1 / -1; min-height: 64px; font-size: 20px; background: #15803d; border-color: #15803d; color: #fff; }
.ticket-actions .ot-btn { padding-left: 10px; padding-right: 10px; container: ot / inline-size; }
.ot-short { display: none; }
/* The short label when the long one wouldn't fit (Spanish is longer). */
@container ot (max-width: 122px) { .ot-long { display: none; } .ot-short { display: inline; } }
@container ot (max-width: 152px) { :lang(es) .ot-long { display: none; } :lang(es) .ot-short { display: inline; } }
.ot-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-n { flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-text); font-size: 13px; font-weight: 800; line-height: 22px; text-align: center; font-variant-numeric: tabular-nums; }
/* "Nuevo pedido" / "Nueva venta" on a narrow button: two lines instead of running past the edges. */
.ticket-actions .btn[data-a="hold"] { white-space: normal; line-height: 1.1; padding-top: 2px; padding-bottom: 2px; }
.ticket-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }

/* modifier picker */
.mod-group { margin-bottom: 16px; }
.mg-head { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  min-height: 52px; padding: 8px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel-2);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.chip-btn small { color: var(--muted); font-weight: 600; }
.chip-btn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent); }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper .btn { width: 52px; font-size: 22px; padding: 0; }
.stepper span { min-width: 28px; text-align: center; font-size: 20px; font-weight: 700; }

/* payment */
.pay-layout { display: grid; grid-template-columns: 280px 1fr; gap: 22px; }
.due-label { color: var(--muted); font-weight: 600; }
.due { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; margin-bottom: 12px; overflow-wrap: anywhere; }
.due.long { font-size: 34px; } /* $1,000,000.00 and up still fits its column */
.pay-summary .totals { border: 0; padding: 0; }
.paid-list { list-style: none; margin: 12px 0 0; padding: 0; }
.paid-list li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); }
.tip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.tip-row input { width: 100px; min-height: 44px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.pay-methods { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* Big amounts ($10,000.00 and up): two a row on a phone, and a figure too long even for that wraps. */
.quick.long { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.quick.long .btn { padding-inline: 10px; white-space: normal; overflow-wrap: anywhere; }
.amount-display { font-size: 26px; font-weight: 700; text-align: right; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; min-height: 56px; font-variant-numeric: tabular-nums; }
.amount-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amount-pad .pad-key { min-height: 52px; font-size: 20px; }
.done { text-align: center; }
.done-check { font-size: 56px; color: var(--good); line-height: 1; }
.change-label { color: var(--muted); font-weight: 600; margin-top: 8px; }
.change { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; }
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.done-actions .primary { grid-column: 1 / -1; min-height: 64px; font-size: 20px; }
.done-actions .wide { grid-column: 1 / -1; }
.done-actions .btn { white-space: normal; } /* long labels ("Imprimir comanda de cocina") wrap inside their half */
.done-check.warn { color: var(--warn); }
.done-check.bad { color: var(--bad); }

/* cash drawer */
.drawer-totals { border: 1px solid var(--line); border-radius: 12px; margin: 12px 0 0; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.drawer-actions .primary { grid-column: 1 / -1; }

.list { display: grid; gap: 8px; }
.list-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.list-row.on { border-color: var(--accent); }
.list-row .muted { grid-column: 1; font-size: 14px; }
.list-row > span:last-child { grid-row: 1 / span 2; grid-column: 2; font-weight: 700; font-variant-numeric: tabular-nums; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
.opt-row { display: grid; grid-template-columns: 1fr 120px 48px; gap: 8px; margin-bottom: 8px; }
.opt-row input { min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; }

.ticket-actions { padding-bottom: max(12px, env(safe-area-inset-bottom)); padding-right: max(14px, env(safe-area-inset-right)); }
.cats, .grid { padding-left: max(12px, env(safe-area-inset-left)); }
.cats { padding-right: max(12px, env(safe-area-inset-right)); }

/* small tablets, Surface Duo spanned, Fold opened sideways */
@media (max-width: 980px) {
  .register { grid-template-columns: minmax(0, 1fr) 330px; }
}
/* The order bar: only on phones (see below). */
.ticket-bar { display: none; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* phones, Fold opened (portrait), Duo single screen: the menu gets the screen; the order folds
   into a bar at the bottom (items, total, Pay). Tapping the bar opens the whole order. */
@media (max-width: 760px) {
  .register { position: relative; display: flex; flex-direction: column; }
  .menu-pane { flex: 1; min-height: 120px; }
  .ticket { flex: none; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -10px 28px rgba(0, 0, 0, .18); }
  .ticket-bar {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%;
    padding: 10px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left)); border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  }
  .tb-count { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-weight: 800; }
  .tb-count.zero { background: var(--panel-2); color: var(--muted); }
  .tb-count.bump { animation: bump .35s ease; }
  .tb-text { display: flex; flex-direction: column; min-width: 0; }
  .tb-text small { color: var(--muted); font-size: 13px; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .tb-total { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .tb-chev { display: grid; color: var(--muted); }
  /* folded: just the bar and the Pay button */
  .register:not(.ticket-open) :is(.ticket-head, .lines, .totals, .ticket-empty) { display: none; }
  .register:not(.ticket-open) .ticket-actions { grid-template-columns: 1fr; padding-top: 0; border-top: 0; }
  .register:not(.ticket-open) .ticket-actions > :not(.pay) { display: none; }
  .register:not(.ticket-open) .ticket-actions:not(:has(.pay)) { display: none; }
  /* open: the order covers the menu until it's folded again */
  .register.ticket-open .ticket { position: absolute; inset: 0; z-index: 3; border-top: 0; box-shadow: none; }
  .register.ticket-open .ticket-bar { border-bottom: 1px solid var(--line); }
  .register.ticket-open .order-no { display: none; } /* already in the bar */
  .register.ticket-open .menu-pane { visibility: hidden; }
  .ticket-empty { padding: 24px 16px; }
  .ticket-empty p { margin: 4px 0; }
  .lines { flex: 1 1 auto; min-height: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); grid-auto-rows: 92px; }
  /* Phones: one row of categories that slides sideways, so the items get the screen. */
  .cats { gap: 6px; padding-top: 10px; padding-bottom: 10px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none;
    scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { min-height: 44px; padding: 6px 16px; font-size: 16px; flex: none; max-width: 70vw; scroll-snap-align: start; }
  .pay-layout { grid-template-columns: 1fr; gap: 14px; }
  .due { font-size: 36px; }
  .ticket-head { padding: 10px 14px; }
}
/* very narrow: Galaxy Z Fold cover screen (~344px) */
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 8px 8px; }
  .item { padding: 10px; }
  .item-name { font-size: 15px; }
  .cat { padding: 8px 14px; font-size: 15px; min-height: 46px; }
  .ticket-actions { grid-template-columns: 1fr 1fr 48px; gap: 6px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .done-actions { grid-template-columns: 1fr; }
  .opt-row { grid-template-columns: 1fr 90px 44px; }
}
/* short screens: phones sideways. Keep the two-column layout but tighten everything. */
@media (max-height: 520px) and (min-width: 600px) {
  .register { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: none; }
  .ticket { max-height: none; border-left: 1px solid var(--line); border-top: 0; box-shadow: none; }
  .lines { max-height: none; }
  .cats { padding-top: 6px; padding-bottom: 6px; }
  .cat { min-height: 40px; padding: 6px 14px; font-size: 15px; }
  .grid { grid-auto-rows: 76px; }
  .item-name { font-size: 15px; }
  .ticket-head { padding: 6px 12px; }
  .order-no { font-size: 17px; }
  .line { padding: 8px 12px; }
  .ticket .totals { padding: 6px 12px; }
  .ticket .totals > div:not(.grand) { display: none; } /* subtotal and tax are on the receipt; keep the lines visible */
  .ticket .totals .grand { font-size: 18px; padding-top: 0; }
  .ticket-actions { padding-top: 8px; gap: 6px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; } /* a slimmer ⋯ so "Cuentas 3" fits */
  .ticket-actions .btn { min-height: 38px; padding: 4px 8px; }
  .ticket-actions .pay { min-height: 46px; font-size: 18px; }
  .pay-layout { grid-template-columns: 220px 1fr; }
  .due { font-size: 30px; }
  .due.long { font-size: 24px; }
  .amount-pad .pad-key { min-height: 40px; }
}

/* Quick edits: chips on a ticket line, your own edit, and the list editor (Settings, item editors). */
.edit-chips .chip-btn b { font-weight: 600; }
.edit-chips .chip-btn small { margin-left: 4px; opacity: .8; }
/* Quick-edit rows: a name, a price and ✕ (food's option rows have a calories column too). */
.opt-row.edit-row { grid-template-columns: minmax(0, 1fr) 110px 48px; }
.opt-row input { min-width: 0; }
.edit-own { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; margin-top: 10px; }
.edit-own input { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; min-width: 0; }
.edit-list-acts { margin: 4px 0 10px; }
.owner-checkup { border-inline-start: 4px solid var(--accent); }
.owner-checkup .kv { margin: 10px 0 14px; }
.owner-checkup .kv dd { overflow-wrap: anywhere; }
.owner-checkup .tool-grid { margin-bottom: 0; }
.owner-checkup .tool-grid .btn { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.edit-templates { display: grid; gap: 6px; margin-top: 4px; }
.edit-templates[hidden] { display: none; }
.edit-templates .chip-btn small { margin-left: 4px; opacity: .8; }
@media (max-width: 520px) {
  .opt-row.edit-row { grid-template-columns: minmax(0, 1fr) 84px 44px; }
  .edit-own { grid-template-columns: minmax(0, 1fr) 90px; }
  .edit-own .btn { grid-column: 1 / -1; }
}

/* Time clock: the clock in / out confirmation, who's on the clock now, and the day and week of hours. */
.tc-done .tc-who { margin: 4px 0 0; font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.tc-done .tc-at { margin: 6px 0 4px; font-size: 44px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tc-warn { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, var(--panel)); color: var(--text); text-align: left; }
.tc-warn-t { color: var(--warn); font-weight: 700; }
.badge.tc-warn-t, .badge.tc-ot { color: var(--warn); }
.tc-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.tc-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 2px 10px; align-items: center;
  min-height: 92px; padding: 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--good); border-radius: 12px;
  background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.tc-card .tc-av { grid-row: 1 / span 3; width: 40px; height: 40px; display: grid; place-items: center; font-size: 14px; cursor: inherit; }
.tc-card-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-live { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tc-missed { border-inline-start: 4px solid var(--warn); }
.tc-missed .tc-fix { color: var(--warn); }
.tc-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 12px; }
.tc-bar .seg button { min-height: 44px; min-width: 72px; }
.tc-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tc-nav .btn { min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 22px; line-height: 1; }
.tc-label { min-width: 0; text-align: center; font-weight: 700; white-space: nowrap; }
.tc-person { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); }
.tc-person-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tc-person-head .strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-total { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-entry {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; width: 100%; min-height: 48px;
  margin-top: 6px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--panel-2); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.tc-entry-min { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tc-sum, .tc-sum-row td { font-weight: 800; }
.tc-sum { display: flex; justify-content: space-between; padding: 10px 12px; font-variant-numeric: tabular-nums; }
.tc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.tc-day {
  display: grid; gap: 2px; justify-items: center; min-height: 52px; padding: 6px 2px; border: 1px solid transparent; border-radius: 10px;
  background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; min-width: 0;
}
.tc-day span { font-size: 12px; color: var(--muted); }
.tc-day b { font-size: 14px; font-variant-numeric: tabular-nums; }
.tc-day.off b { color: var(--muted); font-weight: 400; }
.tc-day.today { border-color: var(--accent); }
.tc-day.warn { border-color: var(--warn); }
.tc-day.warn b { color: var(--warn); }
.tc-day:disabled { opacity: .45; cursor: default; }
.tc-all { background: var(--panel-2); }
.tc-all .tc-day { background: var(--panel); }
.tc-empty { padding: 12px 0; }
.tc-actions .btn { min-height: 48px; }
@media (max-width: 520px) {
  .tc-now { grid-template-columns: minmax(0, 1fr); }
  .tc-bar { flex-direction: column; align-items: stretch; }
  .tc-bar .seg { display: flex; }
  .tc-bar .seg button { flex: 1; }
  .tc-nav { justify-content: space-between; }
  .tc-actions .spacer { display: none; }
  .tc-actions .btn { flex: 1 1 40%; }
  .tc-actions .primary { flex-basis: 100%; }
  .tc-day b { font-size: 13px; }
  .tc-day { padding: 6px 0; }
}

/* Schedule: the week of planned shifts (a grid; one day at a time on a phone), "Late" on the time
   clock, and someone's next shifts. */
.tc-card.tc-late { border-inline-start-color: var(--warn); cursor: default; }
.tc-bar .seg button { min-width: 0; }
.sc-next { margin-top: 14px; text-align: left; }
.sc-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.sc-list li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.sc-list li .strong { min-width: 96px; }
.sc-list li .muted { overflow-wrap: anywhere; }
.sc-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sc-tools .btn { min-height: 44px; }
.sc-grid {
  display: grid; grid-template-columns: minmax(96px, 1.3fr) repeat(7, minmax(0, 1fr)) minmax(64px, .9fr); gap: 4px;
  align-items: stretch; margin-bottom: 8px;
}
.sc-corner, .sc-th { min-width: 0; }
.sc-th { align-self: end; padding: 4px; font-size: 12px; color: var(--muted); text-align: center; }
.sc-dh {
  display: grid; justify-items: center; gap: 0; min-height: 44px; padding: 4px 2px; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text); font: inherit; cursor: pointer; min-width: 0;
}
.sc-dh span { font-size: 12px; color: var(--muted); }
.sc-dh.today { border-color: var(--accent); }
.sc-dh.sel { background: var(--panel-2); }
.sc-name { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 4px 2px; }
.sc-name .strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-name .badge { align-self: flex-start; }
.sc-cell {
  display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; min-height: 64px; padding: 5px 4px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font: inherit; text-align: center; cursor: pointer;
}
.sc-cell.today { border-color: var(--accent); }
.sc-cell.late, .sc-cell.missed, .sc-prow.late, .sc-prow.missed { border-color: var(--warn); }
.sc-shift { display: grid; padding: 3px 2px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.sc-shift b { font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sc-shift small, .sc-pshift small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-add { margin: auto; font-size: 20px; color: var(--muted); }
.sc-worked { font-size: 11px; color: var(--good); font-variant-numeric: tabular-nums; }
.sc-flag { font-size: 11px; font-weight: 700; color: var(--warn); }
.sc-tot, .sc-daytot { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-width: 0; padding: 4px 2px; font-variant-numeric: tabular-nums; }
.sc-tot b { font-size: 13px; white-space: nowrap; }
.sc-daytot { border-radius: 10px; background: var(--panel-2); }
.sc-phone { display: none; }
.sc-switch { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sc-switch button {
  display: grid; justify-items: center; min-height: 52px; min-width: 0; padding: 4px 0; border: 1px solid transparent; border-radius: 10px;
  background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer;
}
.sc-switch button span { font-size: 12px; color: var(--muted); }
.sc-switch button.today { border-color: var(--accent); }
.sc-switch button.on { background: var(--accent); color: var(--accent-text); }
.sc-switch button.on span { color: inherit; }
.sc-prow {
  display: grid; gap: 4px; width: 100%; min-height: 64px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.sc-prow-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-prow-head .strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-pshift { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.sc-prow-foot { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; }
.sc-row { padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sc-row input[type=time] { min-height: 48px; }
.sc-remove { min-height: 44px; color: var(--bad); }
.sc-addshift { width: 100%; margin: 4px 0 8px; }
.sc-pick { display: grid; gap: 6px; margin: 6px 0; }
.sc-check { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 10px; background: var(--panel-2); cursor: pointer; }
.sc-check input { width: 22px; height: 22px; }
.sc-check:has(input:disabled) { opacity: .45; cursor: default; }
@media (max-width: 760px) {
  .sc-grid { display: none; }
  .sc-phone { display: block; }
  .sc-phone .sheet-sub { margin-top: 14px; }
}
@media (max-width: 520px) {
  .sc-tools .btn { flex: 1 1 40%; }
  .sc-row .field-row { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* Each item on the ticket has − + ✕ right under it: change the sale without opening anything. */
.line-row { border-bottom: 1px solid var(--line); }
.line-row > .line { border-bottom: 0; padding-bottom: 4px; }
.line-ctl { display: flex; justify-content: flex-end; gap: 6px; padding: 0 14px 10px; }
.line-ctl .btn { min-height: 36px; min-width: 44px; padding: 4px 10px; font-size: 18px; line-height: 1; box-shadow: none; }
.line-ctl .line-del { color: var(--bad); }

/* Schedule, cleaner: the week tools fold away; each person's box reads at a glance. */
.sc-more { margin: 2px 0 10px; }
.sc-more summary { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--panel-2); color: var(--text); font-weight: 600; cursor: pointer; list-style: none; }
.sc-more summary::-webkit-details-marker { display: none; }
.sc-more summary::after { content: '▾'; margin-left: 8px; color: var(--muted); }
.sc-more[open] summary::after { content: '▴'; }
.sc-more .sc-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sc-more .sc-clear { color: var(--bad); }

/* ---------------------------------------------------------------------------
   The new look (0.26.0), to match the IT Console and the owners' portal: soft cards, a colored bar
   on the left of each tile and row, bold names over muted lines, a prominent total and Pay. Colors
   and sizes only: every button, id and data-* is the same. Phone and short-screen sizes for anything
   set here are repeated in the media blocks at the end, since this block comes after the ones above.
   --------------------------------------------------------------------------- */
/* Categories: calm pills with the category's color as a dot; the one you're on is filled. */
.cats { gap: 8px; }
.cat { border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font-weight: 650;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: background-color .15s, border-color .15s; }
.cat::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 9px; border-radius: 50%; vertical-align: 1px; background: var(--tint, var(--muted)); }
.cat:hover:not(.on) { border-color: color-mix(in srgb, var(--tint, var(--accent)) 55%, var(--line)); }
.cat.on { border-color: var(--tint); background: var(--tint); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--tint) 35%, transparent); }
.cat.on::before { background: #fff; opacity: .9; }

/* Item tiles: a soft card, a wash of the item's color, a short color bar on the left, the name in
   bold and the price easy to read. Rows grow with what's in them, so a name never gets cut off. */
.grid { gap: 10px; grid-auto-rows: minmax(104px, auto); }
.item { position: relative; gap: 6px; padding: 12px 14px 12px 22px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tint, var(--accent)) 10%, var(--panel)), var(--panel) 65%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: border-color .15s, box-shadow .15s, transform .08s; }
.item::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--tint, var(--accent)); }
.item:hover { border-color: color-mix(in srgb, var(--tint, var(--accent)) 55%, var(--line)); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.item:active { background: color-mix(in srgb, var(--tint, var(--accent)) 18%, var(--panel)); }
.item:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.item-name { font-weight: 700; letter-spacing: -.005em; }
.item-price { color: var(--text); font-weight: 700; font-size: 16px; }
.item.has-img { padding-left: 14px; border-color: transparent; }
.item.has-img::before { content: none; }
.item.has-img .item-price { color: #fff; }

/* The order: the number and customer at the top, each line a clean row, the total in its own card. */
.ticket { background: var(--panel); }
.ticket-head { padding: 14px 16px; }
.order-no { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
/* The order's name and number first; For here / To go moves under them when both don't fit. */
.ticket-head { flex-wrap: wrap; }
.ticket-head > div:first-child { min-width: 0; }
.ticket-head .seg { flex: none; }
.ticket-head .seg button { white-space: nowrap; }
.line { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 12px 16px; align-items: center; }
.line:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
div.line:hover { background: transparent; }
.qty { display: grid; place-items: center; min-width: 32px; height: 30px; padding: 0 6px; border-radius: 9px; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.lname { font-weight: 650; }
.lname small { margin-top: 1px; }
.lprice { font-weight: 700; }
.line-row > .line { padding-bottom: 4px; }
.line-ctl { gap: 8px; padding: 0 16px 12px; }
.line-ctl .btn { min-height: 44px; min-width: 48px; border-radius: 12px; background: var(--panel-2); box-shadow: none; font-weight: 700; }
.line-ctl .line-del { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); background: color-mix(in srgb, var(--bad) 6%, var(--panel)); }
.pad-msg { margin: 0; padding: 16px; font-size: 14px; }
.ticket .totals { margin: 10px 12px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--text) 3%, var(--panel)); }
.totals > div { font-size: 15px; }
.totals .grand { align-items: baseline; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 26px; letter-spacing: -.02em; }
.totals .grand > span:first-child { font-size: 17px; font-weight: 700; letter-spacing: 0; }
.ticket-actions { gap: 8px; padding: 12px; border-top: 0; }
.ticket-actions .btn:not(.pay) { min-height: 48px; }
/* Pay: the biggest, clearest thing on the screen (the same green in every look). */
.ticket-actions .pay { min-height: 68px; border-radius: 16px; font-size: 21px; font-weight: 800; letter-spacing: .01em; border-color: transparent;
  background: linear-gradient(180deg, #1a9148, #15803d); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 8px 22px rgba(21, 128, 61, .35); }
.ticket-actions .pay:hover:not(:disabled) { border-color: transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 10px 26px rgba(21, 128, 61, .45); }
.ticket-actions .pay:disabled { box-shadow: none; }
.ticket-empty strong { font-size: 17px; color: var(--text); }
/* Give the empty order a quieter hierarchy without changing its footprint. */
.ticket-empty > div { max-width: 28ch; line-height: 1.5; }
.ticket-empty strong { font-weight: 700; }

/* Fast-list labels stay prominent while secondary navigation reads more calmly. */
.register .grid .item .item-name { font-weight: 650; }
.register .grid .item .item-price { font-weight: 650; }

/* Options for an item (size, add-ons): soft pills; the chosen one in the accent color. */
.mod-group { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.chips .chip-btn { min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 15px; }
.chips .chip-btn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* Pay: what's due in a soft card on the left; Cash, Card and Other on the right. */
.pay-summary { align-self: start; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--text) 3%, var(--panel)); }
.due-label { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.due { margin: 2px 0 12px; letter-spacing: -.02em; color: var(--text); }
.pay-summary .totals { padding-top: 10px; border-top: 1px solid var(--line); }
.pay-summary .totals .grand { font-size: 20px; }
.paid-list li { font-variant-numeric: tabular-nums; }
.tip-row .btn { min-width: 56px; }
.tip-row input { border-radius: 12px; }
.pay-methods { gap: 12px; }
.quick { gap: 10px; }
.quick .btn.big { min-height: 60px; font-size: 18px; font-variant-numeric: tabular-nums; }
.amount-display { border-radius: 14px; background: color-mix(in srgb, var(--text) 4%, var(--panel)); }
.amount-pad { gap: 10px; }
.amount-pad .pad-key { border-radius: 14px; }
.pay-methods > .btn.big.primary { min-height: 64px; font-size: 19px; }
/* Paid: a big check in a soft circle, the change easy to read, then the receipt choices. */
.done-check { display: grid; place-items: center; width: 84px; height: 84px; margin: 4px auto 12px; border-radius: 50%; font-size: 46px; font-weight: 800;
  background: color-mix(in srgb, var(--good) 14%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--good) 6%, transparent); }
.done-check.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--warn) 6%, transparent); }
.done-check.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--bad) 6%, transparent); }
.change-label { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.change { letter-spacing: -.02em; line-height: 1.1; }
.done-actions .primary { border-radius: 16px; }

/* Lists of choices in a window (open tickets, drawers, variants): soft rows. */
.list-row { min-height: 56px; border-radius: 14px; transition: border-color .15s, background-color .15s; }
.list-row:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.list-row.on { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); box-shadow: 0 0 0 1px var(--accent) inset; }
.drawer-totals { border-radius: 14px; padding: 4px 14px; }

/* Time clock and schedule: the same soft cards, the color bar inside the card. */
.tc-card { position: relative; border-radius: 16px; border-inline-start: 1px solid var(--line); padding-inline-start: 22px; }
.tc-card::before { content: ""; position: absolute; inset-inline-start: 9px; top: 12px; bottom: 12px; width: 4px; border-radius: 4px; background: var(--good); }
.tc-card.tc-missed::before, .tc-card.tc-late::before { background: var(--warn); }
.tc-person, .sc-row, .sc-prow { border-radius: 16px; }
.tc-entry, .sc-list li, .sc-check, .tc-day, .sc-switch button, .sc-dh, .sc-cell { border-radius: 12px; }
.sc-shift { border-radius: 8px; }

@media (prefers-reduced-motion: reduce) { .cat, .item, .list-row { transition: none; } }
/* Phones: the sizes above, back to a phone's (one row of categories, smaller tiles). */
@media (max-width: 760px) {
  .grid { grid-auto-rows: minmax(92px, auto); }
  .ticket-head { padding: 10px 14px; }
  .line { padding: 10px 14px; }
  .line-ctl { padding: 0 14px 10px; }
  .ticket .totals { margin: 8px 10px 0; }
  .register:not(.ticket-open) .ticket-actions { padding-top: 0; }
  .ticket-actions .pay { min-height: 60px; font-size: 20px; }
  .pay-summary { padding: 14px; }
}
@media (max-width: 380px) {
  .grid { gap: 8px; }
  .item { padding: 10px 10px 10px 19px; }
  .item::before { left: 7px; }
  .item.has-img { padding-left: 10px; }
  .cat::before { margin-right: 7px; }
  .ticket-actions { gap: 6px; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .grid { grid-auto-rows: minmax(76px, auto); }
  .ticket-head { padding: 6px 12px; }
  .line { padding: 8px 12px; }
  .ticket .totals { margin: 6px 8px 0; padding: 6px 12px; }
  .ticket .totals .grand { margin-top: 0; padding-top: 0; border-top: 0; font-size: 20px; }
  .ticket-actions { padding-top: 8px; }
  .ticket-actions .btn:not(.pay) { min-height: 44px; }
  .ticket-actions .pay { min-height: 48px; font-size: 18px; }
  .quick .btn.big { min-height: 48px; }
}

/* Phones: each item's − + ✕ sit on its own line, to the right, instead of a row under it, so about
   twice as many items show before the cart scrolls. Buttons stay 44px to tap. */
@media (max-width: 760px) {
  .line-row { display: flex; align-items: center; }
  .line-row > .line { flex: 1 1 auto; min-width: 0; padding: 8px 6px 8px 12px; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; }
  .line-row > .line .lname { overflow-wrap: anywhere; }
  .line-row .line-ctl { flex: none; gap: 4px; padding: 0 10px 0 0; }
  .line-row .line-ctl .btn { min-width: 44px; min-height: 44px; padding: 0; border-radius: 11px; }
}
@media (max-width: 360px) {
  .line-row > .line { padding-left: 10px; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 6px; }
  .line-row .line-ctl .btn { min-width: 40px; }
}
