/* ===== Pantalla de asistencia: tarjeta con logo, fecha y hora en vivo (estilo BSA) ===== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', 'Gill Sans', Calibri, 'Trebuchet MS', sans-serif;
  background-color: #08397a;
  position: relative;
  overflow-x: hidden;
}

.fondo-decorado {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.blob-1 {
  width: 420px;
  height: 420px;
  top: -160px;
  left: -160px;
}
.blob-2 {
  width: 320px;
  height: 320px;
  bottom: -140px;
  right: -120px;
  background: rgba(255,255,255,0.06);
}

.boton-admin {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  padding: 6px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
}
.boton-admin img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.pantalla {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 50px 20px 30px;
}

.insignia {
  width: 78px;
  height: 78px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  margin-bottom: 14px;
}
.insignia img {
  width: 55%;
}

.nombre-app {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 30px;
  text-align: center;
}

.contenedor-asist {
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  padding: 22px 22px 28px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.encabezado-tarjeta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eef1f5;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.empresa {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #08397a;
  max-width: 150px;
  line-height: 1.2;
}
.logo-mini {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.fecha-hora {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 130px;
  text-align: right;
  font-size: 11px;
  color: #8b97a6;
}
.fecha-hora strong {
  font-size: 16px;
  color: #08397a;
}

.usuario-documento {
  color: #1c2b3a;
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 14px;
  width: 100%;
  text-align: left;
}

.campo-doc {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
}

.doc-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #e1e6eb;
  border-radius: 12px;
  font-size: 16px;
  background: #f7f9fb;
  outline: none;
  transition: border-color 0.2s;
}
.doc-input:focus {
  border-color: #08397a;
  background: #ffffff;
}

.boton-ir {
  background: #08397a;
  border: none;
  border-radius: 12px;
  width: 48px;
  height: 48px;
  padding: 10px;
  flex-shrink: 0;
}
.boton-ir img {
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: brightness(0) invert(1);
}
.boton-ir:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.saludo-usuario {
  margin-top: 12px;
  font-weight: 600;
  color: #08397a;
  text-align: center;
}

#cod_emp {
  color: black;
}

.botones-Ing-Sal {
  display: flex;
  width: 100%;
  justify-content: center;
}

.boton-ingreso {
  width: auto;
  min-width: 180px;
  padding: 12px 32px;
  background-color: #08397a;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  /* El JS lo muestra con display:flex, así que text-align no alcanza para centrar
     el texto — hace falta justify-content/align-items para ese caso */
  justify-content: center;
  align-items: center;
  transition: background-color 0.2s, transform 0.15s;
  margin-top: 20px;
}
.boton-ingreso:hover {
  background-color: #0a4ea4;
}
.boton-ir:active,
.boton-ingreso:active {
  transform: translateY(1px);
}

.zona-activar-huella,
.zona-huella {
  width: 100%;
  text-align: center;
  margin-top: 14px;
}
.boton-activar-huella {
  display: inline-block;
  width: auto;
  max-width: 220px;
  margin: 0 auto;
  padding: 6px 12px;
  background: #eef4fb;
  border: 1px solid #d6e4f5;
  border-radius: 8px;
  color: #08397a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s;
}
.boton-activar-huella:hover {
  background: #e1ecfa;
}
.boton-activar-huella:active {
  transform: translateY(1px);
}
.texto-privacidad-huella {
  font-size: 11px;
  color: #8b97a6;
  margin: 6px 0 0;
  text-align: center;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 10px 16px 24px;
  font-size: 12px;
  color: #cdd9ee;
}

#spinner {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #08397a;
  border-radius: 50%;
  width: 60px; height: 60px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loginadmin-container {
  display: none;
  position: fixed;
  top: 60px;
  right: 14px;
  background-color: #ffffff;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  width: 190px;
  z-index: 1000;
}
.loginadmin-container form {
  display: flex;
  flex-direction: column;
}
.loginadmin-container input {
  margin-bottom: 8px;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.loginadmin-container button {
  padding: 8px;
  font-size: 14px;
  background-color: #08397a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.loginadmin-container button:hover {
  background-color: #0a4ea4;
}
