/* Layout: una columna tipo app de celular, cabecera fija con el negocio y las cuatro vistas (cliente, ayudante, dueño, ficha) */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --soft: #eef0f6;
  --fg: #1f1d2b;
  --muted: #676577;
  --line: #e2e2ec;
  --ok: #17784f;
  --ok-bg: #e1f3ea;
  --warn: #965400;
  --warn-bg: #fcefd9;
  --info: #2a56a6;
  --info-bg: #e4ecfa;
  --danger: #b4233c;
  --brand: #d6336c;
  --brand-ink: #ffffff;
  --font-display: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13121a; --surface: #1d1b25; --soft: #26242f; --fg: #f1f0f6; --muted: #a4a2b4; --line: #312e3c;
    --ok: #62d29e; --ok-bg: #153527; --warn: #f1b45e; --warn-bg: #382a13; --info: #92b5f6; --info-bg: #1a2944; --danger: #ff8094;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #13121a; --surface: #1d1b25; --soft: #26242f; --fg: #f1f0f6; --muted: #a4a2b4; --line: #312e3c;
  --ok: #62d29e; --ok-bg: #153527; --warn: #f1b45e; --warn-bg: #382a13; --info: #92b5f6; --info-bg: #1a2944; --danger: #ff8094;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }
.wrap { max-width: 560px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Cabecera */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding-block: 12px 10px; }
.logo { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1; }
.brand h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.15; text-wrap: balance; }
.brand p { margin: 0; color: var(--muted); font-size: 13px; }
.brand > div { min-width: 0; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-block: 0 10px; }
.tab { border: 0; background: var(--soft); border-radius: 10px; padding: 8px 4px; font-weight: 700; font-size: 13px; color: var(--muted); }
.tab[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.tab small { display: block; font-weight: 600; font-size: 11px; opacity: .8; }

main { padding-block: 18px 120px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.2; text-wrap: balance; }
.section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hint { margin: 0; color: var(--muted); font-size: 13.5px; }
.example-note { font-size: 12px; color: var(--muted); text-align: center; padding-block: 4px; }

/* Catálogo */
.prods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.prod { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 0; overflow: hidden; text-align: left; display: grid; }
.prod:disabled { cursor: not-allowed; }
.prod:disabled .pic { filter: grayscale(1); opacity: .5; }
.pic { aspect-ratio: 1; max-width: 100%; width: 100%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 34px; color: #2b2633; object-fit: cover; }
.prod-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.prod-name { font-weight: 800; font-size: 15.5px; line-height: 1.25; }
.prod-price { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.p-nuevo { background: var(--info-bg); color: var(--info); }
.p-preparando { background: var(--warn-bg); color: var(--warn); }
.p-entregado { background: var(--soft); color: var(--muted); }
.p-pendiente { background: var(--warn-bg); color: var(--warn); }
.p-comprobante { background: var(--info-bg); color: var(--info); }
.p-confirmado { background: var(--ok-bg); color: var(--ok); }
.p-agotado { background: var(--soft); color: var(--muted); }

/* Botones */
.btn { border: 0; border-radius: 12px; padding: 11px 16px; font-weight: 800; background: var(--brand); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--soft); color: var(--fg); }
.btn.line { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.big { padding: 16px; font-size: 17px; border-radius: 16px; }
.linkish { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 800; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: var(--danger); }

/* Resumen */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 2px; min-width: 0; }
.tile span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; }
.tile strong { font-family: var(--font-display); font-size: 21px; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile.ok strong { color: var(--ok); }
.tile.warn strong { color: var(--warn); }

/* Pedidos */
.orders { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.order.done { opacity: .72; }
.order-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.order-who { font-weight: 800; }
.order-who small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.lines { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 14px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; }
.lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.total { display: flex; justify-content: space-between; font-weight: 800; border-top: 1px dashed var(--line); padding-top: 8px; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wait { font-size: 13px; color: var(--muted); }

/* Lista de productos (ayudante y dueño) */
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.row + .row { border-top: 1px solid var(--line); }
.row > .pill { white-space: normal; text-align: center; flex: 0 1 auto; max-width: 45%; }
.row .pic { width: 44px; height: 44px; border-radius: 10px; font-size: 16px; flex: none; }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; line-height: 1.25; }
.row-main small { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; border: 0; border-radius: 999px; background: var(--line); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }

/* Formularios */
.field { display: grid; gap: 5px; }
.field label, .label { font-weight: 800; font-size: 13.5px; }
.field input, .field select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; }
.field input[type="color"] { padding: 4px; height: 44px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 14px; }
.pres-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; }
.pres-row input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 10px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--fg); }
.err { color: var(--danger); font-size: 13px; font-weight: 700; margin: 0; }

/* Barra del pedido */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding-top: 12px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 6; }

/* Ventana */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(15, 12, 24, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-width: 560px; max-height: 92%; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 20px max(18px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); display: grid; gap: 16px; }
@media (min-width: 620px) { .modal { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.x { border: 0; background: var(--soft); width: 36px; height: 36px; border-radius: 50%; font-size: 18px; flex: none; }
.sheet .pic.hero { border-radius: var(--radius); max-height: 240px; aspect-ratio: auto; height: 220px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 12px; font-weight: 700; text-align: left; }
.chip small { display: block; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 12px; padding: 4px; }
.stepper button { border: 0; background: var(--surface); width: 36px; height: 36px; border-radius: 9px; font-size: 20px; font-weight: 800; }
.stepper output { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.photo-drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; display: grid; place-items: center; gap: 8px; text-align: center; cursor: pointer; color: var(--muted); font-weight: 700; }
.photo-drop img { width: 140px; height: 140px; object-fit: cover; border-radius: 12px; }
.photo-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gen { margin: 0; padding: 12px 14px; list-style: none; background: var(--soft); border-radius: 12px; display: grid; gap: 4px; font-size: 14px; }
.gen li { display: flex; justify-content: space-between; gap: 12px; }
.gen li span:last-child { font-variant-numeric: tabular-nums; font-weight: 800; }
.sinpe-box { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; font-size: 14px; }
.sinpe-num { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--font-display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Comprobante */
.receipt { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; background: var(--surface); }
.receipt-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.receipt-top strong { font-family: var(--font-display); font-size: 18px; }
.receipt dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 14px; }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.receipt-foot { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }
.proof { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }

.tab { position: relative; }
.badge { position: absolute; top: -5px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.alerta { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top, 0px)); width: min(528px, calc(100% - 24px)); background: var(--surface); border: 2px solid var(--brand); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.alerta-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 20px; }
.alerta-txt { flex: 1; min-width: 0; font-size: 14px; }
.alerta-txt strong { display: block; }
@media (prefers-reduced-motion: no-preference) { .alerta { animation: baja .3s ease-out; } @keyframes baja { from { transform: translate(-50%, -20px); opacity: 0; } } }
.report { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.report th, .report td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.report td:last-child, .report th:last-child { text-align: right; }
.scroll-x { overflow-x: auto; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; max-width: calc(100% - 32px); text-align: center; }

/* ---- Piezas de los prototipos de Don Beto y Nicobela ---- */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --slate: #a9d8b8; } }
:root[data-theme="dark"] { --slate: #a9d8b8; }
.brand-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { width: 50px; height: 50px; border-radius: 14px; flex: none; background: var(--cheese); display: grid; place-items: center; }
.logo-word { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.1; color: var(--slate); margin: 0; text-wrap: balance; }
.logo-sub { margin: 2px 0 0; color: var(--brand); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tab { position: relative; }
.tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabs .tab { font-size: 12.5px; padding-inline: 2px; }
.tabs .tab small { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { position: absolute; top: -5px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.alerta { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top, 0px)); width: min(528px, calc(100% - 24px)); background: var(--surface); border: 2px solid var(--brand); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.alerta-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 20px; }
.alerta-txt { flex: 1; min-width: 0; font-size: 14px; }
.alerta-txt strong { display: block; }
@media (prefers-reduced-motion: no-preference) { .alerta { animation: baja .3s ease-out; } @keyframes baja { from { transform: translate(-50%, -20px); opacity: 0; } } }
.report { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.report th, .report td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.report td:last-child, .report th:last-child { text-align: right; }
.scroll-x { overflow-x: auto; }
.biz { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.who { display: grid; gap: 4px; }
.who select, .field select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; font-weight: 700; }
.subtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--soft); border-radius: 12px; padding: 4px; }
.subtabs button { border: 0; background: none; border-radius: 9px; padding: 8px; font-weight: 800; color: var(--muted); }
.subtabs button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.balance { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); border-radius: var(--radius); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.balance strong { font-family: var(--font-display); font-size: 24px; font-variant-numeric: tabular-nums; }
.balance span { font-size: 13.5px; font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 8px; }
.timeline li { position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.4; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 16px; bottom: -10px; width: 1px; background: var(--line); }
.timeline small { display: block; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.collect { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.collect-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.day-head { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--muted); margin: 4px 0 0; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days .chip { padding: 6px 10px; min-width: 52px; text-align: center; }
.confirm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.confirm-row input, .confirm-row select { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 10px; }
.field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; font: inherit; color: inherit; resize: vertical; min-height: 60px; }
.p-borrador, .p-cancelado { background: var(--soft); color: var(--muted); }
.p-cancelado { text-decoration: line-through; }
.p-enviado { background: var(--info-bg); color: var(--info); }
.p-confirmado, .p-pagado, .p-vigente { background: var(--ok-bg); color: var(--ok); }
.p-recibido { background: var(--info-bg); color: var(--info); }
.p-vencida, .p-vencido { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.p-porvencer { background: var(--warn-bg); color: var(--warn); }
.lot { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.lot-lines { margin: 2px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--muted); }
.firma { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .04em; padding-block: 0 110px; margin-top: -90px; }
.firma strong { color: var(--fg); }
.mini-input { width: 96px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px; text-align: right; font-weight: 800; }

/* ---- App única: tokens propios de la marca de cada negocio (el color lo pone la ficha) ---- */
:root { --cheese: #f2c14e; --slate: #234a35; --milk: #0e7480; --water: #1e6fd0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --milk: #6fd0d9; --water: #8ab8f5; } }
:root[data-theme="dark"] { --milk: #6fd0d9; --water: #8ab8f5; }
html, body { min-height: 100%; }
.brand { justify-content: space-between; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.lang { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; flex: none; }
.lang button { border: 0; background: none; border-radius: 8px; padding: 5px 10px; font-weight: 800; font-size: 13px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.alt { color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.etq { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.etq.leche { color: var(--milk); }
.etq.agua { color: var(--water); }
.etq.tbc { color: var(--warn); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters .chip { padding: 6px 12px; font-size: 13.5px; }
.pack { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; background: var(--soft); border-radius: 12px; padding: 12px 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.photo-drop.small { padding: 10px; font-size: 13.5px; }
.vacio { padding: 18px; text-align: center; color: var(--muted); }
.check { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); padding: 0; color: #fff; font-weight: 800; display: grid; place-items: center; }
.check[aria-checked="true"] { background: var(--ok); border-color: var(--ok); }
.check[aria-checked="true"]::after { content: "✓"; }

/* Lista de precios del cliente (distribuidor) */
.mini-select { margin-top: 6px; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--surface); color: var(--text, inherit); font: inherit; font-size: 13px; font-weight: 600; }

/* Impresión: solo el ticket, angosto (rollo térmico de 58 u 80 mm o una hoja normal), negro sobre blanco */
#impresion { display: none; }
@media print {
  @page { margin: 3mm; }
  body.imprimiendo > *:not(#impresion) { display: none !important; }
  body.imprimiendo { background: #fff !important; padding: 0; }
  body.imprimiendo #impresion { display: block; }
  .ticket { width: 100%; max-width: 72mm; color: #000; background: #fff; font: 11.5px/1.35 "Nunito Sans", Arial, sans-serif; }
  .ticket hr { border: 0; border-top: 1px dashed #000; margin: 5px 0; }
  .ticket .t-centro { text-align: center; }
  .ticket .t-grande { font-size: 14px; font-weight: 800; }
  .ticket .t-linea { display: flex; justify-content: space-between; gap: 6px; }
  .ticket .t-linea span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ticket .t-parada { margin: 6px 0 8px; break-inside: avoid; }
  .ticket .t-firma { margin-top: 10px; }
  .ticket .t-pie { font-size: 10px; }
  /* Media carta (5½ × 8½): ancho completo y letra más grande */
  .ticket.media { max-width: none; font-size: 14px; line-height: 1.45; }
  .ticket.media .t-grande { font-size: 19px; }
  .ticket.media .t-pie { font-size: 11px; }
  .ticket.media hr { margin: 8px 0; }
}

/* A qué tienda va el pedido, antes de enviarlo */
.pedido-para { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.pedido-para strong { display: block; font-size: 1.1em; }

/* Inventario de un vistazo: el nombre puede ocupar dos líneas para que quepa en el celular */
.inv th:not(:first-child), .inv td:not(:first-child) { text-align: right; }
.inv td:first-child { white-space: normal; }
.inv td[colspan] { text-align: left; padding: 0 0 8px; }
.inv td small { display: block; color: var(--muted); font-size: 12px; }
.inv .mini-input { width: 62px; padding: 6px; }
.inv-total { position: sticky; bottom: 0; display: grid; gap: 8px; padding: 10px 0; background: var(--bg); border-top: 1px solid var(--line); }
.precio-fijo { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.precio-fijo .mini-input { width: 76px; padding: 4px 6px; }

[data-inv][hidden], .actions[hidden] { display: none; }
.botones-rapidos { display: grid; gap: 8px; }
/* Precio por paquete debajo de cada línea del pedido */
.lines .c-u { display: block; font-size: .78em; color: var(--muted, #777); font-weight: 400; }
