/* ===========================================================================
   estilos.css — Sistema de Pases FENAFRE
   Color MORADO Fresnillo (como el prototipo del pase), para distinguirlo del
   simulador de eGob (oscuro/dorado).
   =========================================================================== */
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; background: #f4f0f6; color: #241a28; }

header.barra {
  background: #5b1e6e; color: #fff; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
header.barra h1 { font-size: 18px; margin: 0; }
header.barra .sub { font-size: 12px; opacity: .85; }
header.barra nav a { color: #fff; text-decoration: none; margin-left: 14px; font-size: 14px; }
header.barra nav a:hover { text-decoration: underline; }
.etiqueta-org { background: #3a1147; font-size: 12px; padding: 4px 10px; border-radius: 12px; font-weight: bold; }

.layout { display: grid; grid-template-columns: 1fr 400px; gap: 18px; padding: 18px; align-items: start; }
@media (max-width: 950px) { .layout { grid-template-columns: 1fr; } }
main, .panel { background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
h2 { margin-top: 0; color: #5b1e6e; }
h3 { color: #5b1e6e; }

label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 14px; }
input[type="text"], input[type="password"], input[type="date"], select {
  width: 100%; padding: 10px; border: 1px solid #c7c7c7; border-radius: 6px; font-size: 15px;
}
button {
  background: #5b1e6e; color: #fff; border: 0; padding: 11px 18px; border-radius: 6px;
  font-size: 15px; cursor: pointer; margin-top: 12px;
}
button:hover { background: #74278c; }
button.secundario { background: #5a5a5a; }
button.peligro { background: #b3261e; }

.pista { background: #fff8e1; border-left: 4px solid #e0b400; padding: 10px 14px; font-size: 13px; border-radius: 4px; margin: 14px 0; }
.mini { font-size: 12px; color: #777; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
th, td { border: 1px solid #ddd; padding: 7px 9px; text-align: left; }
th { background: #5b1e6e; color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: #faf6fb; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11.5px; font-weight: bold; }
.badge.emitido { background: #e2f0e7; color: #1c6b38; }
.badge.usado { background: #e5e0f0; color: #4a3a80; }
.badge.cancelado, .badge.expirado { background: #f6dcda; color: #a32f28; }
.badge.valido { background: #e2f0e7; color: #1c6b38; }
.badge.aun_no_vigente { background: #fff3cd; color: #946200; }

/* ====================  VALIDADOR DE PUERTA (celular)  ==================== */
.pantalla-puerta { max-width: 520px; margin: 0 auto; padding: 14px; }
.tabs { display: flex; gap: 8px; margin: 10px 0; }
.tabs button { flex: 1; margin: 0; background: #ddd; color: #333; }
.tabs button.activa { background: #5b1e6e; color: #fff; }

#lector { width: 100%; border-radius: 10px; overflow: hidden; background: #000; min-height: 240px; }

/* Resultado fullscreen verde/rojo */
#resultado {
  position: fixed; inset: 0; z-index: 50; display: none;
  place-items: center; text-align: center; color: #fff; padding: 20px;
}
#resultado.ok { background: #1c6b38; display: grid; }
#resultado.mal { background: #8a1c1c; display: grid; }
#resultado h1 { font-size: 34px; margin: 0; }
#resultado .tipo { font-size: 44px; font-weight: bold; margin: 12px 0; }
#resultado .datos { font-size: 17px; line-height: 1.5; }
#resultado .contador { margin-top: 16px; font-size: 13px; opacity: .8; }

.tarjeta-resultado {
  border: 1px solid #e0d4e6; border-radius: 10px; padding: 12px 14px; margin: 10px 0; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
}
.tarjeta-resultado button { margin: 0; }

/* Stats admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: #f7f1fa; border: 1px solid #e5d5ee; border-radius: 10px; padding: 14px; text-align: center; }
.stat .num { font-size: 26px; font-weight: bold; color: #5b1e6e; }
.stat .txt { font-size: 12.5px; color: #666; }

pre { background: #1e1e1e; color: #d4d4d4; padding: 10px; border-radius: 6px; font-size: 11px; overflow-x: auto; white-space: pre-wrap; }
