/* Embotits — pensado para el móvil: botones grandes, legible con las manos ocupadas.
   Mismo sistema visual que Alfa Car, con el granate de los embutidos como color principal. */
:root {
  --bg: #f5f2f0; --card: #ffffff; --text: #1c1416; --muted: #6b5f62; --line: #e7e0dd;
  --primary: #9b1c31; --primary-2: #741425; --primary-soft: #f8e6e9; --primary-text: #fff;
  --top: #1c1416; --top-2: #2c2023; --top-text: #faf7f5;
  --btn: #ffffff; --btn-text: #1c1416; --btn-line: #e0d7d3;
  --ok: #15803d; --ok-bg: #e8f7ee; --warn: #92400e; --warn-bg: #fff7e6; --danger: #b91c1c; --danger-bg: #fdecec;
  --info-bg: #eef2fb; --accent: #2563eb;
  --shadow-sm: 0 1px 2px rgba(28, 20, 22, .06);
  --shadow: 0 1px 2px rgba(28, 20, 22, .05), 0 6px 18px rgba(28, 20, 22, .07);
  --radius: 16px; --tap: 56px;
  --dot: rgba(107, 95, 98, .12); --glow: rgba(155, 28, 49, .07); --glow-2: rgba(180, 120, 60, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120d0e; --card: #1e1719; --text: #f1eaea; --muted: #a8999c; --line: #352a2d;
    --primary: #c4334b; --primary-soft: #3a1520; --top: #0b0708; --top-2: #1a1214;
    --btn: #261d20; --btn-text: #f1eaea; --btn-line: #3d3134;
    --ok: #6ee7a0; --ok-bg: #10291c; --warn: #fcd27a; --warn-bg: #2e2410; --danger: #fca5a5; --danger-bg: #331617;
    --info-bg: #1a2133;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
    --dot: rgba(200, 180, 180, .06); --glow: rgba(196, 51, 75, .10); --glow-2: rgba(180, 120, 60, .06);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120d0e; --card: #1e1719; --text: #f1eaea; --muted: #a8999c; --line: #352a2d;
  --primary: #c4334b; --primary-soft: #3a1520; --top: #0b0708; --top-2: #1a1214;
  --btn: #261d20; --btn-text: #f1eaea; --btn-line: #3d3134;
  --ok: #6ee7a0; --ok-bg: #10291c; --warn: #fcd27a; --warn-bg: #2e2410; --danger: #fca5a5; --danger-bg: #331617;
  --info-bg: #1a2133;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
  --dot: rgba(200, 180, 180, .06); --glow: rgba(196, 51, 75, .10); --glow-2: rgba(180, 120, 60, .06);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* lo oculto no se muestra nunca, aunque su estilo diga display */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font: 17px/1.45 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.005em; -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 0% 0%, var(--glow), transparent 70%),
    radial-gradient(800px 520px at 100% 100%, var(--glow-2), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 1.5px);
  background-size: auto, auto, 22px 22px;
  background-attachment: fixed;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1 { font-size: 1.55rem; font-weight: 750; letter-spacing: -.02em; margin: .4rem 0 .8rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .7rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h3 { font-size: 1.05rem; font-weight: 650; margin: 1rem 0 .3rem; }
p { margin: .4rem 0; }
::selection { background: var(--primary-soft); }
.muted { color: var(--muted); }
.small, small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }

/* Iconos */
.ic { width: 1.2em; height: 1.2em; flex: 0 0 auto; vertical-align: -.22em; }
h1 > .ic:first-child { width: 1.15em; height: 1.15em; color: var(--primary); }
.card h2 > .ic:first-child, .section-title > .ic:first-child {
  width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }

/* Cabecera fija */
.top { position: sticky; top: 0; z-index: 20; color: var(--top-text); background: linear-gradient(180deg, var(--top), var(--top-2));
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25); padding: 10px 14px 0; padding-top: max(10px, env(safe-area-inset-top)); }
.top-row { display: flex; gap: 10px; align-items: center; max-width: 960px; margin: 0 auto; min-height: 44px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.logo img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 8px rgba(155, 28, 49, .4); }
.entorno { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: #f59e0b; color: #1f1300; }
.top-user { margin-left: auto; font-size: .9rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 2px; overflow-x: auto; max-width: 960px; margin: 10px auto 0; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 10px 14px 12px; border-radius: 12px 12px 0 0; text-decoration: none;
  font-weight: 600; font-size: .92rem; color: rgba(250, 247, 245, .72); position: relative; white-space: nowrap; }
.nav a .ic { width: 18px; height: 18px; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { color: #fff; }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }

.wrap { max-width: 960px; margin: 0 auto; padding: 18px 12px 80px; }
.hello { color: var(--muted); font-size: .95rem; font-weight: 500; margin-bottom: 8px; }
.card { background: color-mix(in srgb, var(--card) 95%, transparent); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin: 14px 0; }
.section-title { margin: 22px 4px 10px; font-size: 1.1rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 18px;
  border-radius: 14px; border: 1px solid var(--btn-line); background: var(--btn); color: var(--btn-text); box-shadow: var(--shadow-sm);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; text-align: center; user-select: none;
  -webkit-tap-highlight-color: transparent; transition: transform .14s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn .ic { width: 1.25em; height: 1.25em; }
.btn-primary { background: linear-gradient(180deg, #b52440, var(--primary-2)); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(155, 28, 49, .28); }
.btn-go { background: linear-gradient(180deg, #22a55a, #15803d); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(21, 128, 61, .25); }
.btn-warn { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #1f1300; border-color: transparent; }
.btn-danger { background: var(--card); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); box-shadow: none; }
.btn-wa { background: linear-gradient(180deg, #2bd46e, #1fae55); color: #fff; border-color: transparent; }
.btn-big { min-height: 64px; font-size: 1.05rem; width: 100%; }
.btn-huge { min-height: 84px; font-size: 1.3rem; width: 100%; border-radius: 18px; padding-left: 12px; padding-right: 12px; }
.btn-small { min-height: 44px; padding: 6px 12px; font-size: .95rem; }
.link-danger { background: none; border: 0; color: var(--danger); font: inherit; font-size: .85rem; padding: 6px 0; cursor: pointer; text-decoration: underline; }
form.inline { display: contents; }
.grid-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.grid-buttons.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-buttons.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-buttons > *, .grid-buttons .btn { min-width: 0; width: 100%; }

/* Formularios */
.form label { display: block; margin: 10px 0; font-weight: 600; font-size: .92rem; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .filter {
  display: block; width: 100%; margin-top: 4px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--btn-line); border-radius: 12px;
  background: var(--card); color: var(--text); font: inherit; font-weight: 400; box-shadow: inset 0 1px 2px rgba(28, 20, 22, .04); }
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .filter:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form .check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.form .check input { width: 28px; height: 28px; flex: 0 0 auto; accent-color: var(--primary); }
.form fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px 8px; margin: 12px 0; }
.form legend { font-weight: 700; padding: 0 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.input-huge { min-height: 76px !important; font-size: 2rem !important; text-align: center; }

/* Chips y opciones (selección en un toque) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip { min-height: 48px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--btn-line); background: var(--card); color: var(--text);
  box-shadow: var(--shadow-sm); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.chip:active { transform: scale(.97); }
.chip.sel, .form .opt input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.form .opt { display: block; margin: 0; position: relative; }
.form .opt input { position: absolute; opacity: 0; pointer-events: none; }
.form .opt span { display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 4px 6px; text-align: center; line-height: 1.15;
  border: 1px solid var(--btn-line); border-radius: 12px; background: var(--card); font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.form .opt input:focus-visible + span { outline: 3px solid var(--primary); }

/* Listas */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 8px; min-height: 64px; text-decoration: none; border-radius: 12px; }
.item:hover { background: color-mix(in srgb, var(--bg) 70%, transparent); }
.item-btn { width: 100%; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.item-main small { color: var(--muted); font-weight: 400; }
.list a.item::after { content: ""; flex: 0 0 auto; width: 8px; height: 8px; margin-left: 4px;
  border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); opacity: .45; }

/* Tarjetas grandes (modo fábrica) */
.big-card { display: flex; align-items: center; gap: 14px; min-height: 92px; padding: 14px 16px; margin: 12px 0; text-decoration: none;
  background: color-mix(in srgb, var(--card) 95%, transparent); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.big-card:active { transform: scale(.98); }
.big-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 1.15rem; font-weight: 700; }
.big-card-main small { font-weight: 400; color: var(--muted); font-size: .9rem; }

/* Etiquetas de estado */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 650;
  background: var(--btn); color: var(--btn-text); white-space: nowrap; }
.badge[class*="est-"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }

/* Avisos de la página */
.flash { padding: 12px 14px; border-radius: 14px; margin: 10px 0; font-weight: 600; border: 1px solid transparent; box-shadow: var(--shadow-sm); }
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.flash-info { background: var(--info-bg); border-color: color-mix(in srgb, var(--accent) 20%, transparent); }

/* Plegables y tablas */
details.more { margin: 12px 0; }
details.more > summary { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 16px; list-style: none; cursor: pointer; font-weight: 700;
  background: var(--card); border: 1px solid var(--btn-line); border-radius: 14px; box-shadow: var(--shadow-sm); }
details.more > summary::-webkit-details-marker { display: none; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; white-space: nowrap; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }

/* Entrar */
.login { max-width: 420px; margin: 8vh auto; }
.login h1 { font-size: 2rem; }
.login h1 img { border-radius: 12px; }

/* Barra inferior en el móvil */
.bottombar { display: none; }
@media (max-width: 760px) {
  header.top .nav { display: none; }
  .top { padding-bottom: 10px; }
  body { padding-bottom: 84px; }
  .bottombar { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--top) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(0, 0, 0, .3); }
  .bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px;
    color: rgba(250, 247, 245, .65); text-decoration: none; font-size: .75rem; font-weight: 600; }
  .bottombar a span { display: flex; font-size: 1.4rem; line-height: 1; }
  .bottombar a .ic { width: 23px; height: 23px; }
  .bottombar a.active { color: #fff; }
  .bottombar a.active span { color: #f28b9c; }
}

/* ===== Modo fábrica (Elvira): todo más grande ===== */
body.simple { font-size: 20px; }
body.simple .btn { min-height: 72px; font-size: 1.15rem; border-radius: 16px; }
body.simple .btn-huge { min-height: 100px; font-size: 1.5rem; }
body.simple .item { min-height: 80px; }
body.simple .badge { font-size: .95rem; padding: 5px 12px; }
body.simple .form input:not([type=checkbox]):not([type=radio]), body.simple .form select, body.simple .form textarea { min-height: 64px; font-size: 1.15rem; }
@media (max-width: 760px) {
  body.simple { padding-bottom: 100px; }
  body.simple .bottombar a { min-height: 78px; font-size: .85rem; }
  body.simple .bottombar a .ic { width: 28px; height: 28px; }
}

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .logo span { display: none; }
  .row2 { grid-template-columns: 1fr; }
}

/* Animaciones discretas */
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes baja { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.wrap > .card, .wrap > .big-card, .wrap > .grid-buttons, .wrap > .list { animation: aparece .38s cubic-bezier(.2, .7, .2, 1) both; }
.flash { animation: baja .3s ease-out both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .top, .bottombar, .btn, form { display: none !important; } body { background: #fff; } .card { border: 0; box-shadow: none; } }

/* ===== Pedidos ===== */
.titulo-con-boton { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.titulo-con-boton h1 { margin-bottom: .4rem; }
.est-pendiente { background: #fff3d6; color: #a16207; }
.est-en_preparacion { background: #e3edff; color: #1d4ed8; }
.est-preparado { background: #dcf7e6; color: #15803d; }
.est-entregado { background: #efe9fb; color: #6d28d9; }
.est-cancelado { background: #eef2f6; color: #64748b; text-decoration: line-through; }
:root[data-theme="dark"] .badge[class*="est-"] { background: color-mix(in srgb, currentColor 18%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge[class*="est-"] { background: color-mix(in srgb, currentColor 18%, transparent); } }
.item-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nota-linea { font-style: italic; }
.grupo-dia { padding-top: 12px; padding-bottom: 6px; }
.grupo-dia h2.dia { margin-bottom: .2rem; }
.filtros .chips { margin-bottom: 6px; }
.filtros-form label { margin: 6px 0; }
.filtros-form .btn { margin-top: 6px; }
.buscador input[type=search] { margin-top: 0 !important; }
.resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.resumen-item { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 14px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.resumen-item strong { font-size: 1.7rem; line-height: 1.1; color: var(--primary); }
.resumen-item span { font-size: .82rem; color: var(--muted); }
.pedido-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pedido-cab h1 { margin: 0 0 .2rem; }
.pedido-cliente { font-size: 1.1rem; }
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 14px; margin: 12px 0 0; }
.datos dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.datos dd { margin: 0; font-weight: 600; }
blockquote { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid var(--primary); background: var(--bg); border-radius: 8px; }

/* ===== Formulario rápido de pedido ===== */
.pf-bloque h2 { margin-bottom: .5rem; }
.pf-elegido { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.pf-elegido strong { display: block; font-size: 1.15rem; }
.pf-elegido small { color: var(--muted); }
.pf-sugerencias { margin-top: 4px; }
.pf-sugerencias .item { min-height: 56px; }
.pf-crear { color: var(--primary); font-weight: 700; }
.pf-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pf-prod { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 64px; padding: 8px 12px; text-align: left;
  border-radius: 14px; border: 1px solid var(--btn-line); background: var(--card); color: var(--text); font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm); -webkit-tap-highlight-color: transparent; }
.pf-prod small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.pf-prod:active { transform: scale(.97); }
.pf-prod.sel { border-color: var(--primary); background: var(--primary-soft); }
.pf-lineas { display: grid; gap: 10px; margin-top: 12px; }
.pf-linea { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: color-mix(in srgb, var(--bg) 60%, var(--card)); transition: box-shadow .3s; }
.pf-linea.pf-brilla { box-shadow: 0 0 0 4px var(--primary-soft); }
.pf-linea-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 1.08rem; }
.pf-quitar { width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.pf-cant { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.form .pf-cant input.pf-num { width: 9rem; margin: 0; font-size: 1.5rem; font-weight: 800; text-align: center; min-height: 56px; }
.pf-unidad { font-weight: 700; color: var(--muted); }
.pf-rapidas { margin: 4px 0 0; }
.pf-rapidas .chip { min-width: 52px; justify-content: center; }
.pf-nota-btn { color: var(--muted); }
.form input.pf-nota { min-height: 46px; margin-top: 8px; font-size: .95rem; }
.pf-canal { margin-top: 4px; }
.pf-guardar { position: sticky; bottom: 0; z-index: 25; margin: 14px -12px 0; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pf-aviso { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-weight: 700; }
.pf-cancelar-edicion { width: 100%; margin-top: 8px; }
/* En el formulario la barra inferior se oculta: el botón Guardar ocupa su sitio */
@media (max-width: 760px) {
  body.pagina-form { padding-bottom: 0; }
  body.pagina-form .bottombar { display: none; }
  body.pagina-form .wrap { padding-bottom: 12px; }
}

.pf-canal { gap: 8px; }
.form .pf-canal .opt span { font-size: 1rem; padding: 4px 2px; }
#pf-frecuentes .chip { max-width: 100%; }

/* ===== Modo fábrica (Elvira) ===== */
.contador { display: inline-flex; align-items: center; justify-content: center; min-width: 1.8em; height: 1.8em; padding: 0 .4em; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: .8em; }
.pedido-card { text-decoration: none; }
.big-card-col { flex-direction: column; align-items: stretch; gap: 6px; }
.pedido-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 1.25rem; }
.pedido-card-prod { font-size: 1.05rem; font-weight: 600; }
.pedido-card-nota { font-size: .95rem; font-style: italic; color: var(--muted); }
.pedido-card-pie { font-size: .9rem; color: var(--muted); font-weight: 600; }
.pedido-card.tarde { border-left: 6px solid var(--danger); }
.prep-cab h1 { font-size: 1.6rem; margin-bottom: .2rem; }
.prep-entrega { font-size: 1.1rem; }
.prep-nota { font-size: 1.1rem; font-weight: 600; }
.prep-linea { border-width: 2px; }
.prep-linea.hecha { border-color: #22a55a; background: color-mix(in srgb, var(--ok-bg) 55%, var(--card)); }
.prep-prod { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.prep-prod h2 { font-size: 1.45rem; margin: 0; }
.prep-pedida { font-size: 1.2rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.prep-pedida span { font-size: 2rem; color: var(--text); font-weight: 800; }
.prep-nota-linea { font-weight: 600; font-style: italic; }
.prep-cant { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; margin-top: 4px; }
.form .prep-cant input.prep-num { margin: 0; }
.prep-cant .btn { min-height: 76px; white-space: nowrap; }
.form input.prep-lote { font-size: 1.3rem; font-weight: 700; letter-spacing: .02em; min-height: 64px; }
.prep-lotes .chip { font-size: .95rem; }
.prep-guardar { margin-top: 4px; }
.prep-acciones { position: sticky; bottom: 0; z-index: 25; display: grid; gap: 10px; margin: 14px -12px 0; padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

body.simple .prep-acciones .btn-huge { min-height: 84px; }

/* Contraseña temporal recién generada */
.temporal { border: 2px solid var(--warn); background: var(--warn-bg); }
.temporal-clave { font-size: 1.6rem; font-weight: 800; letter-spacing: .06em; padding: 10px 14px; border-radius: 12px; background: var(--card);
  text-align: center; user-select: all; }

/* Preparación en kg */
.prep-cant { grid-template-columns: minmax(0, 1fr) auto auto; }
.prep-kg { align-self: center; font-size: 1.4rem; font-weight: 800; color: var(--muted); }
.prep-aviso-kg { display: block; margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .95rem; font-weight: 700; }

/* Lista de productos con acciones visibles */
.producto-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px; flex-wrap: wrap; }
.producto-fila.inactivo .item-main strong { color: var(--muted); }
.producto-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.producto-acciones .btn { min-width: 0; }
.enlace-fila { text-decoration: none; flex: 1; min-width: 140px; }
