:root {
  --alden: #0b3d91;
  --alden-dark: #072a66;
  --serie-c1: #1b7f4b;      /* Serie Clase 1: verde */
  --serie-c1-bg: #e6f5ec;
  --serie-c23: #b07d0a;     /* Serie Clase 2 y 3: dorado */
  --serie-c23-bg: #fff4d6;
  --navidad: #c0262d;
}
body { background: #f3f5f9; }
.bg-alden { background: linear-gradient(90deg, var(--alden-dark), var(--alden)); }
.text-alden { color: var(--alden); }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.kpi .valor { font-size: 2rem; font-weight: 700; line-height: 1; }
.kpi .etiqueta { color: #6c757d; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.badge-c1 { background: var(--serie-c1) !important; color: #fff; }
.badge-c23 { background: var(--serie-c23) !important; color: #fff; }
.table thead th a { color: inherit; text-decoration: none; }
.table thead th a:hover { text-decoration: underline; }
.th-sort.activo { color: var(--alden); }
.gafete-mini { height: 54px; border-radius: 4px; box-shadow: 0 0 0 1px #ddd; }
.progress { height: 1.1rem; }

/* ---------------- Login ---------------- */
.login-bg { min-height: 100vh; background: radial-gradient(circle at 20% 20%, #1d4fb0, var(--alden-dark) 60%); }

/* ---------------- Estación ---------------- */
.estacion-body { background: #0f1d3a; color: #fff; }
.estacion-body .navbar { display: none; }
.estacion-top { background: rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.1); }
.scan-input { font-size: 1.6rem; text-align: center; letter-spacing: .15em; background: #fff; }
.scan-box { border: 2px dashed rgba(255,255,255,.35); border-radius: 18px; padding: 1.2rem; }
.gafete-grande { max-height: 62vh; width: auto; max-width: 100%; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.gafete-vacio { height: 52vh; aspect-ratio: 153/243; border-radius: 14px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; flex-direction: column; color: rgba(255,255,255,.5); margin: auto; }
.resultado-panel { border-radius: 22px; padding: 2rem; min-height: 52vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.resultado-panel.c1 { background: linear-gradient(160deg, #23a463, var(--serie-c1)); }
.resultado-panel.c23 { background: linear-gradient(160deg, #e2a823, var(--serie-c23)); }
.resultado-panel.sin { background: linear-gradient(160deg, #3b4d7a, #24325a); }
.resultado-panel.rolling { background: linear-gradient(160deg, #283d70, #13224a); }
.resultado-panel.error { background: linear-gradient(160deg, #d9434b, #8f1c22); }
.resultado-panel.aviso { background: linear-gradient(160deg, #f0a33a, #a95e05); }
.regalo-num { font-size: 6rem; font-weight: 800; line-height: 1; text-shadow: 0 4px 12px rgba(0,0,0,.3); }
.regalo-desc { font-size: 2.3rem; font-weight: 700; }
.frase { font-size: 1.6rem; line-height: 1.35; }
.nombre-emp { font-size: 2rem; font-weight: 700; }
.roll { font-size: 5rem; font-weight: 800; font-variant-numeric: tabular-nums; animation: pulse .25s infinite alternate; }
@keyframes pulse { from { opacity: .55; transform: scale(.97);} to { opacity: 1; transform: scale(1.03);} }
.pop { animation: pop .5s ease-out; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0;} 70% { transform: scale(1.06);} 100% { transform: scale(1); opacity: 1;} }
.historial-item { background: rgba(255,255,255,.07); border-radius: 10px; padding: .4rem .7rem; font-size: .9rem; }
.contador-serie { border-radius: 12px; padding: .35rem .8rem; font-weight: 600; }
.contador-serie.c1 { background: var(--serie-c1); }
.contador-serie.c23 { background: var(--serie-c23); }
.confeti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 9999; animation: caer linear forwards; pointer-events: none; }
@keyframes caer { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------------- Pantalla pública ---------------- */
.pantalla-body { background: radial-gradient(circle at 50% 0%, #1d3f88, #07142f 70%); color: #fff; min-height: 100vh; overflow: hidden; }
.pantalla-body .navbar { display: none; }
.pantalla-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
@media (max-width: 1200px) { .pantalla-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .pantalla-grid { grid-template-columns: 1fr; } }
.tarjeta { border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.07); display: flex; flex-direction: column; }
.tarjeta.nueva { animation: pop .6s ease-out, brillo 2.5s ease-out; }
@keyframes brillo { 0% { box-shadow: 0 0 0 0 rgba(255,215,0,.9);} 100% { box-shadow: 0 0 0 30px rgba(255,215,0,0);} }
.tarjeta img { width: 100%; aspect-ratio: 153/243; object-fit: cover; object-position: top; background: #fff; }
.tarjeta .pie { padding: .8rem; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.tarjeta .pie.c1 { background: var(--serie-c1); }
.tarjeta .pie.c23 { background: var(--serie-c23); }
.tarjeta .pie.sin { background: #33416a; }
.tarjeta .num { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.tarjeta .desc { font-size: 1.1rem; font-weight: 600; }
.tarjeta .nom { font-size: 1rem; font-weight: 700; }
.tarjeta .frase-p { font-size: .9rem; opacity: .9; }
.tarjeta.vacia { min-height: 55vh; border: 2px dashed rgba(255,255,255,.15); background: transparent; }
