* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }

/* ---------- Pantallas del celular ---------- */
.pantalla { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
            justify-content: center; text-align: center; padding: 28px; color: #fff; }
/* Máscara asomándose al pie de la pantalla */
:root { --mascara: min(52vw, 240px); }
.pantalla { padding-bottom: calc(var(--mascara) * .72 + 24px); }
.mascara { position: fixed; left: 50%; bottom: 0; width: var(--mascara); z-index: 5;
           pointer-events: none; transform: translate(-50%, 8%);
           animation: asoma .7s cubic-bezier(.2, .8, .3, 1.2) .15s both; }
@keyframes asoma { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 8%); } }

.exito    { background: #15803d; }
.aviso    { background: #b45309; }
.error    { background: #b91c1c; }
.neutra   { background: #1f4e79; }
.fin      { background: #1c2128; color: #9aa4b2; }
.registro { background: #f2f4f7; color: #1c2128; }

.icono { width: 120px; height: 120px; border: 6px solid currentColor; border-radius: 50%;
         display: flex; align-items: center; justify-content: center;
         font-size: 64px; font-weight: 700; margin-bottom: 28px; }
.icono-texto { font-size: 30px; letter-spacing: .05em; }
.exito .icono { animation: entra .35s ease-out; }
@keyframes entra { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

h1 { font-size: 2.3rem; line-height: 1.15; margin-bottom: 10px; }
.sub { font-size: 1.25rem; opacity: .92; max-width: 28ch; }
.cuenta { margin-top: 36px; font-size: 1rem; opacity: .75; }

.caja { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 14px;
        align-items: center; }
.caja h1 { font-size: 1.8rem; }
.caja p { color: #5b6573; line-height: 1.45; }
.msg { color: #b91c1c; min-height: 1.4em; }

/* ---------- Reporte ---------- */
body.reporte { background: #f2f4f7; color: #1c2128; }
.contenedor { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
.barra { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap;
         gap: 8px; margin-bottom: 20px; }
.barra h1 { font-size: 1.8rem; margin: 0; }
.barra a { color: #15803d; }
.filtros { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 20px; }
.filtros label { display: flex; flex-direction: column; font-size: .9rem; gap: 4px; color: #5b6573; }
.filtros input { font-size: 1rem; padding: 8px 10px; border: 1px solid #c9d0da; border-radius: 8px; }
.filtros button, .boton-sec { font-size: 1rem; padding: 9px 16px; border-radius: 8px; font-weight: 600;
                              text-decoration: none; }
.filtros button { border: 0; background: #15803d; color: #fff; }
.boton-sec { border: 1px solid #15803d; color: #15803d; background: #fff; }
.vacio { color: #5b6573; }
.tabla-scroll { overflow-x: auto; background: #fff; border-radius: 10px; border: 1px solid #dde2e9; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #eef1f5; white-space: nowrap; }
th { font-weight: 600; color: #5b6573; background: #f8f9fb; }
.tipo { padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.tipo.entrada { background: #dcfce7; color: #166534; }
.tipo.salida  { background: #e5e7eb; color: #374151; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
