/* ----------------------------------------- */
/* ESTILOS GLOBALES - Se aplican a todas     */
/* ----------------------------------------- */

/* RESET GENERAL */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #222322, #26367E);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* CONTENEDOR PRINCIPAL */
.container {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 30px 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* LOGO */
.logo {
  text-align: center;
  margin-bottom: 15px;
}
.logo img {
  width: 150px;
  max-width: 100%;
}

/* TITULOS */
h1 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: #ffffff;
}

/* FORMULARIO */
label {
  display: block;
  text-align: left;
  margin-top: 12px;
  font-weight: bold;
  color: #e0f7ff;
}

input[type="text"],
select {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  margin-bottom: 20px;
  border: none;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1rem;
  outline: none;
}

select option {
  background-color: #1f4037;
  color: white;
}

/* BOTON SUBMIT */
button[type="submit"] {
  width: 100%;
  padding: 15px;
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 140, 255, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
button[type="submit"]:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 25px rgba(0, 140, 255, 0.4);
}

/* ALERTAS */
.alert {
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 10px;
  font-size: 0.9rem;
}
.alert-success {
  background-color: #28a745;
}
.alert-error {
  background-color: #dc3545;
}

/* KEYBOARD NUMERICO */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}
.keypad button {
  padding: 20px;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  transition: transform 0.1s;
}
.keypad button:hover {
  transform: scale(1.05);
}

.hidden-input {
  position: absolute;
  left: -9999px;
}

.document-display {
  font-size: 1.5rem;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-top: 10px;
  color: #fff;
  letter-spacing: 2px;
}

.scan-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 14px;
  background: rgba(8, 145, 178, 0.18);
  color: #e0f7ff;
  text-align: left;
}
.scan-panel strong,
.scan-panel span {
  display: block;
}
.scan-panel span {
  margin-top: 4px;
  font-size: 0.9rem;
  opacity: 0.9;
}
.scan-panel.ok {
  border-color: rgba(74, 222, 128, 0.65);
  background: rgba(22, 163, 74, 0.22);
}
.scan-panel.error {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(220, 38, 38, 0.22);
}
.camera-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: linear-gradient(to right, #0891b2, #2563eb);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}
.camera-modal[hidden] {
  display: none;
}
.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.78);
}
.camera-box {
  width: min(92vw, 460px);
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 18px;
  background: #0f172a;
  color: #e0f7ff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.camera-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.camera-head button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}
.camera-select {
  max-width: 45%;
  margin-left: auto;
  margin-right: 8px;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
}
.camera-preview {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #020617;
}
#cameraVideo {
  width: 100%;
  min-height: 260px;
  display: block;
  background: #020617;
  object-fit: cover;
}
.scan-frame {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 15%;
  height: 22%;
  border: 4px solid #22c55e;
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.25), 0 0 22px rgba(34, 197, 94, 0.85);
  pointer-events: none;
}
.scan-frame::before {
  content: "Ubique la cédula completa aquí";
  position: absolute;
  left: 50%;
  top: -34px;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.scan-frame.document-frame {
  left: 4%;
  right: 4%;
  top: 8%;
  bottom: 8%;
  height: auto;
}
.scan-frame span {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  background: rgba(134, 239, 172, 0.95);
  box-shadow: 0 0 12px rgba(134, 239, 172, 0.9);
  animation: scanLine 1.4s linear infinite;
}
@keyframes scanLine {
  0% { transform: translateY(-34px); }
  50% { transform: translateY(34px); }
  100% { transform: translateY(-34px); }
}
#cameraStatus {
  margin: 10px 0 0;
  font-size: 0.92rem;
  color: #cbd5e1;
}
.read-frame-button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: #16a34a;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}
.mobile-scan {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}
.mobile-scan img {
  width: 78px;
  height: 78px;
  border-radius: 8px;
  background: #fff;
}
.mobile-scan span {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.3;
}

/* VISOR OPCIONAL (si aplica) */
.kiosko {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.kiosko .publicidad {
  flex: 1;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.kiosko .publicidad video,
.kiosko .publicidad img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kiosko .turnos {
  flex: 1;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  overflow-y: auto;
}
.kiosko .turnos h2 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: white;
}
.turno-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  color: white;
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
