/* La app de recuento (VANT-105). Medidas y colores, los tokens del diseño en Paper (BauSystems, «07 · App de recuento»). */
@font-face { font-family: "Geist"; src: url("/fuentes/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --background: #FFFFFF; --ink: #0D0D0D; --muted: #5B615D; --quiet: #8C938F; --line: #DCE1DE;
  --accent: #0A6B4C; --amber: #A86A12; --error: #B23B2E; --night: #0A0F0C; --surface: #F2F4F2;
  --pad: 24px; --tap: 52px; --row: 72px; --digit: 48px;
  --t-titulo: 32px; --l-titulo: 38px; --t-local: 48px; --l-local: 52px;
}
@media (min-width: 768px) and (min-height: 600px) {
  :root { --pad: 64px; --t-titulo: 40px; --l-titulo: 44px; --t-local: 64px; --l-local: 68px; }
}

* { box-sizing: border-box; margin: 0; }
html, body { background: var(--background); }
/* Tocar + dos veces seguidas no hace zoom (Carlos, 16/11, en el móvil); pellizcar para ampliar sigue funcionando */
html { touch-action: manipulation; }
body { color: var(--ink); font: 400 16px/24px "Geist", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
       -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
button { cursor: pointer; text-align: left; }

.p { display: flex; flex-direction: column; min-height: 100dvh; max-width: 834px; margin: 0 auto;
     padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.crece { flex: 1 0 auto; }
.lado { padding-inline: var(--pad); }

/* Cabecera: el logo de la empresa, o «volver» */
.cab { display: flex; align-items: center; justify-content: space-between; height: var(--tap); flex-shrink: 0; }
.cab.volver { padding-left: calc(var(--pad) - 10px); }
.cab .atras { width: 44px; height: 44px; display: grid; place-items: center; }
.logo { height: 18px; width: auto; }
.cab .yo { height: var(--tap); color: var(--muted); font-size: 15px; line-height: 20px; font-weight: 500; }

/* Texto */
.titulo { font-size: var(--t-titulo); line-height: var(--l-titulo); font-weight: 300; letter-spacing: -0.04em; }
.grande { font-size: 40px; line-height: 44px; font-weight: 300; letter-spacing: -0.04em; }
.local { font-size: var(--t-local); line-height: var(--l-local); font-weight: 300; letter-spacing: -0.04em; }
.suave { color: var(--muted); }
.zona, .peque, .etiqueta { font-size: 15px; line-height: 20px; }
.zona, .etiqueta { color: var(--muted); font-weight: 500; }
.zona { padding: 24px 0 8px; }
.diminuta { font-size: 13px; line-height: 18px; }
.error { color: var(--error); max-width: 300px; }
.pie { color: var(--quiet); font-size: 13px; line-height: 18px; padding: 16px var(--pad) 24px; }

/* Entrar */
.entrar { display: flex; flex-direction: column; gap: 48px; padding-top: 64px; }
.codigo { position: relative; display: flex; flex-direction: column; gap: 16px; }
.cifras { display: flex; gap: 8px; align-items: flex-end; }
.cifra { width: var(--digit); height: 64px; border-bottom: 2px solid var(--line); display: flex; align-items: flex-end;
         justify-content: center; padding-bottom: 8px; font-size: 40px; line-height: 44px; }
.cifra.llena, .cifra.ahora { border-color: var(--ink); }
.cifra.ahora::after { content: ""; width: 2px; height: 36px; margin-bottom: 4px; background: var(--ink); animation: parpadeo 1s steps(1) infinite; }
.mal .cifra { border-color: var(--error); }
.codigo input { position: absolute; inset: 0 auto auto 0; width: calc(6 * var(--digit) + 40px); height: 64px; opacity: 0;
                font-size: 16px; caret-color: transparent; }
@keyframes parpadeo { 50% { opacity: 0; } }

/* Filas: personas, tareas y lo que falta. Separadas por línea fina, sin cajas */
.filas > * { border-top: 1px solid var(--line); }
.filas > :last-child { border-bottom: 1px solid var(--line); }
.fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: var(--row); }
.fila .nombre, .tarea .nombre { font-size: 20px; line-height: 28px; font-weight: 500; }
.fila.otra { color: var(--muted); font-size: 18px; line-height: 26px; }
.marca { width: 28px; height: 28px; border-radius: 999px; background: var(--ink); display: grid; place-items: center; flex-shrink: 0; }
.tarea { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: var(--row); padding-block: 16px; }
.tarea .icono { width: 32px; height: 28px; display: flex; align-items: center; flex-shrink: 0; }
.tarea .texto { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tarea .flecha { height: 28px; display: flex; align-items: center; }
.hoy { display: flex; gap: 8px; padding-top: 8px; font-size: 15px; line-height: 20px; font-weight: 500; }
.hoy::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--ink); margin-top: 6px; flex-shrink: 0; }
@media (min-width: 768px) and (min-height: 600px) { .tarea { padding-block: 24px; } }

/* Escribe tu nombre */
.campo { height: 56px; border: 1.5px solid var(--ink); border-radius: 8px; padding-inline: 16px; font-size: 20px; width: 100%; outline: none; }
.parecido { min-height: var(--tap); }
.parecido .nombre { font-size: 20px; line-height: 28px; font-weight: 500; }

/* Recuento */
.cuenta { display: flex; align-items: center; gap: 16px; padding-block: 12px; border-top: 1px solid var(--line); }
.cuenta .texto { flex: 1; display: flex; flex-direction: column; }
.cuenta .nombre { font-size: 18px; line-height: 26px; font-weight: 500; }
.sin { color: var(--amber); font-weight: 500; }
.contador { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.redondo { width: var(--tap); height: var(--tap); border: 1px solid var(--line); border-radius: 999px; display: grid; place-items: center; }
.valor { width: 56px; height: var(--tap); text-align: center; font-size: 32px; line-height: 38px; outline: none; }
.valor:placeholder-shown { background: linear-gradient(var(--line), var(--line)) center bottom 10px / 28px 2px no-repeat; }

/* Botones a lo ancho */
.botones { display: flex; flex-direction: column; gap: 12px; padding: 16px var(--pad) 32px; }
.boton { height: var(--tap); border-radius: 999px; display: flex; align-items: center; justify-content: center;
         font-weight: 500; background: var(--ink); color: var(--background); width: 100%; text-align: center; }
.boton.claro { background: none; color: var(--ink); border: 1px solid var(--ink); }
.boton:disabled { opacity: 0.35; }

/* El aviso de local abierto sube como una hoja */
.velo { position: fixed; inset: 0; background: color-mix(in srgb, var(--night) 45%, transparent); }
.hoja { position: fixed; left: 0; right: 0; bottom: 0; max-width: 834px; margin: 0 auto; background: var(--background);
        border-radius: 14px 14px 0 0; padding: 32px var(--pad) calc(32px + env(safe-area-inset-bottom));
        display: flex; flex-direction: column; gap: 24px; }
.hoja h2 { font-size: 24px; line-height: 30px; font-weight: 400; letter-spacing: -0.035em; }
.hoja .botones { padding: 0; }

/* Hecho */
.hecho { display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.ok { width: 64px; height: 64px; border-radius: 999px; background: var(--accent); display: grid; place-items: center; }

/* Pestañas: el local en Ver stock, a dónde en Enviar (VANT-108) */
.pestanas { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); }
.pestana { flex: 1 1 0; min-width: 0; height: 44px; border-radius: 999px; display: grid; place-items: center; text-align: center;
           font-size: 15px; line-height: 20px; font-weight: 500; color: var(--muted); padding-inline: 8px; }
.pestana[aria-selected="true"] { background: var(--background); color: var(--ink); box-shadow: 0 1px 3px #0D0D0D1F; }

/* Ver stock: lo último que se contó, en grande a la derecha */
.existencia { display: flex; align-items: center; gap: 16px; min-height: var(--row); padding-block: 12px; border-top: 1px solid var(--line); }
.existencia .texto { flex: 1; display: flex; flex-direction: column; }
.existencia .nombre { font-size: 18px; line-height: 26px; font-weight: 500; }
.hay { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.hay .cantidad { font-size: 32px; line-height: 38px; }
.hay .nada { color: var(--quiet); }

/* Buscar qué se ha tirado o qué sale */
.busca { display: flex; align-items: center; gap: 12px; height: 56px; padding-inline: 16px; border: 1.5px solid var(--ink); border-radius: 8px; }
.busca svg { flex-shrink: 0; }
.busca input { flex: 1; min-width: 0; height: 100%; font-size: 20px; line-height: 28px; outline: none; }
.fila.resultado { min-height: 64px; }
.resultado .texto { display: flex; flex-direction: column; }
.resultado .nombre { font-size: 18px; line-height: 26px; }

/* Cuánto y por qué */
.cuanto { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.cuanto .nombre { font-size: 18px; line-height: 26px; font-weight: 500; }
.opcion { display: flex; align-items: center; gap: 12px; width: 100%; height: var(--tap); font-size: 18px; line-height: 26px; }
.opcion .punto { width: 22px; height: 22px; border-radius: 999px; border: 1.5px solid var(--quiet); flex-shrink: 0; display: grid; place-items: center; }
.opcion[aria-checked="true"] { font-weight: 500; }
.opcion[aria-checked="true"] .punto { border: 0; background: var(--ink); }
.opcion[aria-checked="true"] .punto::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--background); }
.anadir { display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--row); font-size: 18px; line-height: 26px; font-weight: 500; }
.anadir .icono { width: 32px; display: flex; flex-shrink: 0; }
