/* Persycom Material. Hoja unica, sin frameworks. Movil primero; en pantalla ancha la barra de
   secciones sube arriba y la pagina de oficina se ensancha. Paleta tomada del tema Persycom del
   Presupuestador (rojo de marca #e32b36, tinta #0f172a). */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../lib/inter/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../lib/inter/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Paleta. Dos temas (0004): claro por defecto y oscuro bajo [data-theme="dark"] en <html>, que
   pone el script sincrono del <head> de _Layout leyendo localStorage['tema'] y conmuta el
   selector de /Yo (app.js). REGLA: ningun color de fondo, texto o borde va suelto en hexadecimal
   fuera de este bloque; los unicos fijos son el rojo de marca y los --*-solid, pensados para
   fondo con texto blanco. */
:root {
  color-scheme: light;
  --bg: #f4f5f7; --panel: #fff; --soft: #f3f4f6; --line: #e5e7eb; --line-2: #d1d5db;
  --text: #1f2937; --strong: #0f172a; --muted: #6b7280; --muted-2: #9ca3af;
  --ink: #0f172a; --on-ink: #f8fafc; --top-bg: #0f172a;
  --red: #e32b36; --red-dark: #c1222c; --red-text: #e32b36;
  --ok: #166534; --ok-bg: #dcfce7; --ok-line: #bbf7d0; --ok-solid: #16a34a;
  --danger: #b91c1c; --danger-bg: #fee2e2; --danger-line: #fecaca;
  --warn: #92400e; --warn-bg: #fef3c7; --warn-line: #fcd34d; --warn-solid: #d97706;
  --info: #1e40af; --info-bg: #dbeafe; --info-line: #bfdbfe; --info-solid: #2563eb;
  --violet: #5b21b6; --violet-bg: #ede9fe; --violet-line: #ddd3fb; --violet-solid: #6d28d9;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,23,42,.06);
  --tabs: 64px; --top: 52px;
}
/* Tema oscuro: las mismas variables con valores oscuros. --red-text es el rojo cuando va como
   TEXTO (pestana activa, "urgente"): mas claro que el de marca para que se lea sobre fondo
   oscuro; el rojo de relleno (botones, FAB) no cambia. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a; --panel: #1e293b; --soft: #283548; --line: #334155; --line-2: #475569;
  --text: #e2e8f0; --strong: #f8fafc; --muted: #94a3b8; --muted-2: #7f8ea3;
  --ink: #475569; --on-ink: #f8fafc; --top-bg: #0b1220;
  --red-text: #f26d75;
  --ok: #4ade80; --ok-bg: #12261b; --ok-line: #1f6b3a;
  --danger: #f87171; --danger-bg: #2c1618; --danger-line: #7f2a2e;
  --warn: #fbbf24; --warn-bg: #2a2110; --warn-line: #7a5a12;
  --info: #60a5fa; --info-bg: #14213a; --info-line: #2b4a86;
  --violet: #c4b5fd; --violet-bg: #251c3d; --violet-line: #4c3a8a;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.35;
  background: var(--bg); color: var(--text); padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--strong); letter-spacing: -.01em; }
h2 { font-size: 20px; } h3 { font-size: 15px; }
p { margin: 0; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .centro { text-align: center; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }

/* Cabecera y barra de secciones */
.top { position: sticky; top: 0; z-index: 20; height: var(--top); background: var(--top-bg); color: var(--on-ink);
  display: flex; align-items: center; gap: 12px; padding: 0 16px; }
[data-theme="dark"] .top { box-shadow: inset 0 -1px 0 var(--line); }
.top .brand { font-size: 14px; opacity: .85; white-space: nowrap; } .top .brand b { color: #fff; }
.top .seccion { flex: 1; text-align: center; font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .who { font-size: 13px; font-weight: 600; background: rgba(255,255,255,.12); padding: 6px 10px; border-radius: 999px; white-space: nowrap; max-width: 34%; overflow: hidden; text-overflow: ellipsis; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--panel); border-top: 1px solid var(--line); display: flex; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); min-height: 44px; }
.tabs a.on { color: var(--red-text); }
.tabs a .ic { width: 24px; height: 24px; }

main { max-width: 680px; margin: 0 auto; padding: 14px 16px 24px; }
main.solo { padding-top: 24px; }
body.wide main { max-width: 1400px; }

/* Iconos: mascaras SVG en CSS, sin fuente de iconos */
.ic { display: inline-block; width: 20px; height: 20px; background: currentColor; vertical-align: -4px;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-list { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.ic-box { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 8l9-5 9 5v8l-9 5-9-5z'/%3E%3Cpath d='M3 8l9 5 9-5M12 13v8'/%3E%3C/svg%3E"); }
.ic-truck { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M1 6h14v10H1zM15 10h4l3 3v3h-7z'/%3E%3Ccircle cx='5.5' cy='18' r='2'/%3E%3Ccircle cx='17.5' cy='18' r='2'/%3E%3C/svg%3E"); }
.ic-grid { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.ic-user { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
.ic-plus { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ic-camera { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E"); }
.ic-image { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E"); }

/* Botones: minimo 48 px de alto, siempre */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 16px; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn.grande { width: 100%; min-height: 56px; font-size: 18px; margin-top: 6px; }
.btn.primario { background: var(--red); border-color: var(--red); }
.btn.ghost { background: var(--panel); color: var(--strong); border-color: var(--line-2); }
.btn.ghost.rojo { color: var(--danger); }
.btn.rojo { background: var(--danger); border-color: var(--danger); }
.btn.amber { background: var(--warn-solid); border-color: var(--warn-solid); }
.btn.blue { background: var(--info-solid); border-color: var(--info-solid); }
.btn.green, .btn.ok { background: var(--ok-solid); border-color: var(--ok-solid); }
.btn.purple { background: var(--violet-solid); border-color: var(--violet-solid); }
.btn.camara { background: var(--panel); color: var(--strong); border-color: var(--line-2); }
.btn.mini-btn { min-height: 40px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn .ic { width: 20px; height: 20px; }

/* Chips y filtros */
.chips, .filtros { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.filtros { margin: 0 0 10px; }
.tira { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 6px -16px 4px; padding: 0 16px; }
.tira::-webkit-scrollbar { display: none; }
.filtros .chip { padding: 6px 11px; font-size: 13px; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--strong); font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip b { font-weight: 700; color: var(--muted); }
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); } .chip.on b { color: inherit; opacity: .8; }
.chip.mini { min-height: 24px; padding: 2px 8px; font-size: 12px; background: var(--soft); border-color: transparent; }
.chips-radio .chip, .chips-check .chip { padding: 0; cursor: pointer; }
.chips-radio .chip input, .chips-check .chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chips-radio .chip span, .chips-check .chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; }
.chips-radio .chip input:checked + span, .chips-check .chip input:checked + span { background: var(--ink); color: var(--on-ink); }
.chips.grandes .chip span { min-height: 48px; font-size: 16px; padding: 8px 18px; }
.chips-radio .chip:focus-within, .chips-check .chip:focus-within { outline: 2px solid var(--info-solid); outline-offset: 1px; }

/* Estados */
.st { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.st.red { background: var(--danger-bg); color: var(--danger); }
.st.amber { background: var(--warn-bg); color: var(--warn); }
.st.blue { background: var(--info-bg); color: var(--info); }
.st.green { background: var(--ok-bg); color: var(--ok); }
.st.purple { background: var(--violet-bg); color: var(--violet); }
.st.gray { background: var(--soft); color: var(--muted); }
.urg { color: var(--red-text); font-weight: 800; font-size: 12px; letter-spacing: .04em; }
.fe { font-size: 12px; color: var(--muted); font-weight: 500; } .fe.tarde { color: var(--danger); font-weight: 700; }

/* Pendientes: grupos por pedido y tarjetas de falta */
.grupo { margin: 0 0 18px; }
.grupo > header { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 2px 8px; }
.grupo .px { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 17px; }
.grupo .px b { color: var(--strong); }
.grupo.apagado { opacity: .7; }
.falta { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.falta.alerta { border-left-color: var(--red); }
.falta .mini { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: var(--soft); }
.falta .cuerpo { flex: 1; min-width: 0; }
.falta .texto { font-size: 16px; color: var(--strong); margin-bottom: 8px; overflow-wrap: anywhere; }
.meta { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.vacio { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 16px; }
.vacio .btn { margin-top: 14px; }
.vacio-linea { padding: 10px 4px; }

.fab { position: fixed; right: 16px; bottom: calc(var(--tabs) + 14px + env(safe-area-inset-bottom)); z-index: 15; display: inline-flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 22px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; font-size: 17px; box-shadow: 0 8px 20px -6px rgba(227,43,54,.6); }
.fab .ic { width: 22px; height: 22px; }

/* Formularios */
.lbl { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.lbl small { text-transform: none; letter-spacing: 0; font-weight: 500; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=password], textarea, select {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); font-size: 17px; color: var(--strong); margin: 6px 0; }
textarea { resize: vertical; min-height: 92px; }
input:focus, textarea:focus { outline: 2px solid var(--info-solid); outline-offset: 0; border-color: transparent; }
input.corto { width: 110px; display: inline-block; min-height: 40px; padding: 6px 10px; font-size: 14px; margin: 2px 0; }
input.medio { width: 180px; display: inline-block; min-height: 40px; padding: 6px 10px; font-size: 14px; margin: 2px 0; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 2px; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--strong); margin: 6px 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .sw { position: relative; width: 52px; height: 30px; border-radius: 999px; background: var(--line-2); flex: none; transition: background .15s; }
.toggle .sw::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,.3); transition: left .15s; }
.toggle input:checked + .sw { background: var(--red); } .toggle input:checked + .sw::after { left: 25px; }
.toggle input:focus-visible + .sw { outline: 2px solid var(--info-solid); }
.fotos-input { display: flex; gap: 8px; margin: 6px 0; }
.fotos-input .btn { flex: 1; }
.previas { display: flex; gap: 8px; flex-wrap: wrap; }
.previas img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.px-detectado { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.nueva .btn.ghost { width: 100%; margin-top: 8px; }
.formulario .btn.grande { margin-top: 12px; }
.error { color: var(--danger); font-weight: 600; margin: 6px 0; }
.toast { position: sticky; top: calc(var(--top) + 8px); z-index: 18; margin: 0 0 12px; padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 16px -8px rgba(0,0,0,.3); }
.toast.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.toast.err { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card .acciones { margin-top: 12px; }
.resumen { display: flex; gap: 8px; margin: 10px 0; }
.resumen > div { flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.resumen b { display: block; font-size: 22px; color: var(--strong); line-height: 1.1; }
.resumen span { font-size: 11px; color: var(--muted); }
.resumen.fila { margin-top: 0; }

/* Selector de tema (en /Yo): dos botones, claro y oscuro; el estado lo pone app.js */
.tema-selector { display: flex; gap: 8px; margin-top: 10px; }
.tema-opcion { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 14px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--strong); font-weight: 600; font-size: 15px; }
.tema-opcion svg { width: 20px; height: 20px; }
.tema-opcion[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tema-opcion:focus-visible { outline: 2px solid var(--info-solid); outline-offset: 1px; }

/* Teclado numerico (PIN) */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.keypad button, .keypad label { min-height: 56px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--strong); font-size: 24px; font-weight: 700; }
.keypad .soft { font-size: 15px; background: var(--soft); }
.keypad .ok { background: var(--ok-solid); color: #fff; border-color: var(--ok-solid); font-size: 17px; }
.parte .fotos-input { margin-top: 2px; }
.pin { text-align: center; letter-spacing: .4em; font-size: 28px; }

/* Login */
.login { max-width: 420px; margin: 0 auto; }
.login-marca { text-align: center; margin-bottom: 20px; }
.login-marca .logo { display: inline-flex; width: 64px; height: 64px; border-radius: 16px; background: var(--red); color: #fff; align-items: center; justify-content: center; margin-bottom: 10px; }
.login-marca .logo .ic { width: 36px; height: 36px; }
.login-marca h1 { font-size: 22px; font-weight: 500; } .login-marca h1 b { font-weight: 800; }
.login-marca p { color: var(--muted); font-size: 14px; }
.login h2 { font-size: 16px; margin: 16px 0 8px; }
.usuarios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.usuario { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.usuario b { font-size: 16px; color: var(--strong); } .usuario small { color: var(--muted); font-size: 12px; }
.elegido { display: flex; justify-content: space-between; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.elegido b { font-size: 18px; } .elegido a { color: var(--info); font-weight: 600; font-size: 14px; }

/* Detalle de falta y ficha de pedido */
.cabecera-falta, .cabecera-pedido { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.cabecera-falta .px, .cabecera-pedido .px { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--muted); }
.cabecera-falta .px b { color: var(--strong); font-size: 17px; }
.texto-grande { font-size: 19px; color: var(--strong); margin: 8px 0 10px; overflow-wrap: anywhere; }
.cabecera-pedido h2 { font-size: 22px; }
.cabecera-pedido .meta { margin: 8px 0; }
.botonera { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.botonera .btn { flex: 1 1 auto; min-width: 44%; }
.panel { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin-top: 10px; }
.panel h3 { margin-bottom: 4px; }
.hilo { margin: 8px 0 16px; }
.hilo h3 { margin: 6px 2px 10px; }
.evento { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.evento.estado { background: transparent; border-color: transparent; padding: 4px 14px; }
.evento .quien { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.evento .quien b { color: var(--strong); }
.evento p { margin-top: 4px; overflow-wrap: anywhere; }
.evento .st { margin: 2px 0; }
.evento .fotos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.evento .fotos img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.acciones-falta { position: sticky; bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0 4px; }

/* Pedidos */
.buscador { display: flex; gap: 8px; margin-bottom: 12px; }
.buscador input { margin: 0; } .buscador .btn { flex: none; }
.lista .pedido { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.lista .pedido b { font-size: 17px; color: var(--strong); display: block; }
.lista .pedido small { color: var(--muted); display: block; margin-bottom: 4px; }

/* Expedicion */
.parte { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px 16px; margin-bottom: 18px; box-shadow: var(--shadow); }
/* Contador de bultos: pasos -/+ grandes a los lados y el numero tocable (teclado nativo) */
.num-bultos { display: flex; align-items: center; gap: 10px; }
.num-bultos input { flex: 1; min-width: 0; text-align: center; font-size: 36px; font-weight: 800; min-height: 64px; -moz-appearance: textfield; appearance: textfield; }
.num-bultos input::-webkit-outer-spin-button, .num-bultos input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-bultos .paso { flex: none; width: 72px; min-height: 64px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--strong); font-size: 32px; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.num-bultos .paso:active { background: var(--soft); transform: translateY(1px); }
.num-bultos .paso[disabled] { opacity: .35; cursor: default; }
.de-total { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; }
.de-total span, .de-total small { color: var(--muted); font-weight: 600; }
.de-total small { font-weight: 500; font-size: 13px; }
.de-total input { width: 110px; text-align: center; font-size: 20px; font-weight: 600; min-height: 48px; margin: 4px 0; }
.parte .btn.grande { margin-top: 12px; }
.bulto { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; min-height: 56px; }
.bulto input[type=checkbox] { width: 26px; height: 26px; margin: 0; accent-color: var(--ok-solid); flex: none; }
.bulto .cuerpo { flex: 1; min-width: 0; font-size: 15px; }
.bulto .cuerpo b { color: var(--strong); } .bulto .cuerpo .n { color: var(--info); }
.bulto .cuerpo small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.bulto .ir { font-size: 26px; color: var(--muted-2); padding: 0 6px; min-width: 32px; text-align: center; }
.bulto .mini-btn { flex: none; }

/* Oficina (escritorio) */
.panel-cabecera { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.panel-cabecera .filtros { margin: 0; flex: 1; }
.filtro-texto { max-width: 320px; min-height: 42px; margin: 0; font-size: 14px; }
.tabla { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; background: var(--soft); border-bottom: 1px solid var(--line); }
.tabla td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla tr[data-href] { cursor: pointer; } .tabla tr[data-href]:hover td { background: var(--soft); }
.tabla tr.alerta td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.tabla tr.apagado { opacity: .6; }
.tabla.compacta td { padding: 8px 10px; }
.tabla small { color: var(--muted); }
.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.dos-columnas h3 { margin-bottom: 8px; } .dos-columnas h3 small { color: var(--muted); font-weight: 500; }
.acciones-fila form { margin-right: 8px; }

@media (max-width: 640px) {
  .tabla { display: block; overflow-x: auto; }
  .dos-columnas { grid-template-columns: 1fr; }
}

/* Pantalla ancha: barra de secciones arriba, mas aire */
@media (min-width: 900px) {
  body { padding-bottom: 24px; }
  .top { padding: 0 24px; }
  .tabs { position: sticky; top: var(--top); bottom: auto; height: 48px; border-top: 0; border-bottom: 1px solid var(--line); justify-content: center; gap: 8px; padding: 0 24px; }
  .tabs a { flex: 0 0 auto; flex-direction: row; gap: 8px; padding: 0 16px; font-size: 14px; }
  .tabs a .ic { width: 18px; height: 18px; }
  main { padding: 20px 24px 40px; }
  .fab { bottom: 28px; right: 28px; }
  .acciones-falta { bottom: 0; }
  .usuarios { grid-template-columns: 1fr 1fr 1fr; }
}
