/* ─── Estilos globales de la aplicación ─────────────────── */
/* Este archivo contiene los estilos compartidos por todas   */
/* las páginas de la aplicación.                             */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.contenedor {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  margin: 2rem auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

h1, h2 {
  text-align: center;
  color: #C0392B;
  margin-bottom: 2rem;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }

label {
  display: block;
  font-size: 0.9rem;
  color: #2C2C2C;
  margin-bottom: 4px;
}

input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #2C2C2C;
}

input:focus {
  outline: none;
  border-color: #C0392B;
}

input:read-only {
  background: #f5f5f5;
  color: #888;
}

button {
  width: 100%;
  padding: 12px;
  background: #C0392B;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

button:hover { background: #a93226; }

.btn-secundario {
  background: white;
  color: #C0392B;
  border: 1px solid #C0392B;
}

.btn-secundario:hover { background: #f5f5f5; }

.mensaje {
  font-size: 0.85rem;
  text-align: center;
  margin-top: 1rem;
  display: none;
  padding: 8px;
  border-radius: 4px;
}

.mensaje.error { color: #C0392B; }
.mensaje.exito { color: #27AE60; }

.error-campo {
  color: #C0392B;
  font-size: 0.8rem;
  margin-top: -0.8rem;
  margin-bottom: 0.8rem;
  display: none;
}

.input-telefono {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.prefijo-telefono {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-right: none;
  padding: 10px;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
  color: #2C2C2C;
}

.input-telefono input {
  border-radius: 0 4px 4px 0;
  margin-bottom: 0;
}

.video-contenedor {
  position: relative;
  width: 100%;
  margin-bottom: 0.5rem;
  display: none;
}

#videoCaptura {
  width: 100%;
  border-radius: 4px;
  border: 3px solid #ddd;
  display: block;
}

.video-contenedor.rostro-detectado #videoCaptura {
  border-color: #27AE60;
}

.video-contenedor.rostro-no-detectado #videoCaptura {
  border-color: #C0392B;
}

.indicador-rostro {
  text-align: center;
  font-size: 0.95rem;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: none;
}

.indicador-rostro.detectado {
  color: #27AE60;
  background: #eafaf1;
  border: 1px solid #27AE60;
  font-weight: bold;
}

.indicador-rostro.no-detectado {
  color: #888;
  background: #f5f5f5;
  border: 1px solid #ddd;
}

.indicador-rostro.advertencia {
  color: #C0392B;
  background: #fdf2f2;
  border: 1px solid #C0392B;
  font-weight: bold;
  font-size: 1rem;
  padding: 10px;
}

/* ── Contador visual de frames ── */
.contador-frames {
  text-align: center;
  margin-bottom: 0.5rem;
  display: none;
}

.contador-frames p {
  font-size: 0.85rem;
  color: #27AE60;
  font-weight: bold;
  margin-bottom: 6px;
}

.contador-circulos {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.circulo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #27AE60;
  background: white;
  transition: background 0.2s;
}

.circulo.lleno {
  background: #27AE60;
}

#imgRostro {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: none;
}

.estado-rostro {
  text-align: center;
  font-size: 0.9rem;
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: none;
}

.estado-rostro.buscando {
  color: #1E6B3C;
  background: #eafaf1;
  border: 1px solid #1E6B3C;
  font-weight: bold;
  font-size: 1rem;
  padding: 10px;
}
.estado-rostro.capturado { color: #27AE60; background: #eafaf1; }