:root { --az: #0b3a5b; --az2: #135d8c; --ok: #1f8f4e; --mal: #c0392b; --am: #e8a317; --fondo: #eef2f5; --linea: #9aa7b2; --tx: #14212b; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fondo); color: var(--tx); font: 16px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
.carga { text-align: center; padding: 40px; color: #567; }
.barra { position: sticky; top: 0; z-index: 5; background: var(--az); color: #fff; padding: 8px 10px; display: grid; gap: 6px; padding-top: calc(8px + env(safe-area-inset-top)); }
.barra h1 { margin: 0; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.barra small { font-weight: 400; opacity: .85; }
.prog { height: 6px; background: rgba(255,255,255,.25); border-radius: 3px; overflow: hidden; } .prog i { display: block; height: 100%; background: #6ee7a0; }
.fila-b { display: flex; gap: 6px; align-items: center; }
.fila-b input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 0; font: inherit; }
.fila-b button { padding: 8px 10px; border-radius: 8px; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 13px; white-space: nowrap; }
.fila-b button.on { background: #fff; color: var(--az); }
.sync { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.18); white-space: nowrap; } .sync.ok { background: var(--ok); } .sync.pen { background: var(--am); color: #111; } .sync.mal { background: var(--mal); }
.ub { background: #fff; border: 2px solid var(--az); border-radius: 10px; margin: 8px; overflow: hidden; }
.ub > button { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; background: var(--az2); color: #fff; border: 0; font-weight: 700; text-align: left; }
.ub > button span { font-weight: 400; font-size: 13px; opacity: .9; }
.ub.listo > button { background: var(--ok); }
.it { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 8px 12px; border-top: 2px solid var(--linea); background: #fff; width: 100%; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; min-height: 52px; }
.it:active { background: #dff0ff; }
.it b { font-size: 15px; letter-spacing: .01em; } .it em { font-style: normal; display: block; font-size: 12.5px; color: #4a5a66; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw; }
.cant { min-width: 74px; text-align: center; padding: 6px 10px; border-radius: 10px; border: 2px dashed var(--linea); color: #789; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.cant.hecho { border: 2px solid var(--ok); background: #e7f7ee; color: #0e5c31; } .cant small { font-size: 11px; font-weight: 600; margin-left: 2px; }
.vacio { padding: 30px 16px; text-align: center; color: #567; }
.hoja-fondo { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 20; display: flex; align-items: flex-end; }
.hoja { background: #fff; width: 100%; max-width: 520px; margin: 0 auto; border-radius: 16px 16px 0 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 8px; max-height: 96vh; overflow: auto; }
.hoja h2 { margin: 0; font-size: 17px; } .hoja p { margin: 0; color: #4a5a66; font-size: 13px; }
.pantalla { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 14px; border: 2px solid var(--az); border-radius: 12px; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 60px; }
.pantalla small { font-size: 13px; color: #567; font-weight: 600; }
.teclas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.teclas button { padding: 16px 0; font-size: 26px; font-weight: 600; background: #f3f6f8; border: 2px solid #c9d3da; border-radius: 12px; }
.teclas button:active { background: #d6e8f5; }
.rapidos { display: flex; gap: 6px; } .rapidos button { flex: 1; padding: 10px 0; border-radius: 10px; border: 2px solid var(--az2); background: #fff; color: var(--az2); font-weight: 700; font-size: 16px; }
.sumar { padding: 16px; font-size: 20px; font-weight: 800; border: 0; border-radius: 12px; background: var(--ok); color: #fff; } .sumar:disabled { background: #a8b5bd; }
.cerrar { padding: 11px; border-radius: 10px; border: 2px solid #c9d3da; background: #fff; font-weight: 600; }
.log { display: grid; gap: 4px; } .log div { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #f3f6f8; border-radius: 8px; font-size: 14px; }
.log button { border: 0; background: none; color: var(--mal); font-weight: 700; padding: 4px 8px; }
.entrada { max-width: 380px; margin: 0 auto; padding: 24px 16px; display: grid; gap: 14px; text-align: center; }
.entrada h1 { margin: 10px 0 0; color: var(--az); font-size: 22px; } .entrada p { margin: 0; color: #4a5a66; }
.puntos { display: flex; gap: 8px; justify-content: center; } .puntos i { width: 40px; height: 52px; border: 2px solid var(--az); border-radius: 10px; display: grid; place-items: center; font-size: 28px; font-style: normal; font-weight: 700; background: #fff; }
.error { color: var(--mal); font-weight: 600; min-height: 1.3em; }
.aviso { margin: 8px; padding: 10px 12px; border-radius: 10px; background: #fff3d6; border: 2px solid var(--am); font-size: 14px; }
.aviso.mal { background: #fde4e1; border-color: var(--mal); }
@media (min-width: 700px) { #app { max-width: 720px; margin: 0 auto; } }
