/* estilo_sky.css — Centro de Capacitación SKY, mandato 2771 (Obrero de Campo).
   Colores SKY: azul #13233F, rojo #C8102E. Letra grande, botones de 44px mínimo, hecha para
   celular (mobile-first). Compartido por las 3 vistas (capacitado, atención, motorizado). */

:root {
  --sky-azul: #13233F;
  --sky-azul-claro: #1d3460;
  --sky-rojo: #C8102E;
  --sky-rojo-claro: #e13a53;
  --sky-verde: #1b8a4a;
  --sky-ambar: #b06b00;
  --fondo: #f3f4f7;
  --tarjeta: #ffffff;
  --texto: #1a1a1a;
  --texto-suave: #5a6270;
  --borde: #dfe3ea;
  --radio: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  font-size: 18px;
  line-height: 1.45;
  padding-bottom: 90px; /* espacio para la barra inferior fija */
}

.encabezado {
  background: var(--sky-azul);
  color: #fff;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.encabezado h1 { font-size: 20px; margin: 0; font-weight: 700; }
.encabezado .sub { font-size: 14px; opacity: .85; margin: 0; }
.encabezado-logo {
  width: 36px; height: 36px; border-radius: 8px; background: var(--sky-rojo);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex: none;
}

main { padding: 16px; max-width: 560px; margin: 0 auto; }

.tarjeta {
  background: var(--tarjeta);
  border-radius: var(--radio);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tarjeta h2 { margin-top: 0; font-size: 19px; color: var(--sky-azul); }
.tarjeta h3 { margin-top: 0; font-size: 17px; color: var(--sky-azul); }

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
}
.boton-primario { background: var(--sky-rojo); color: #fff; }
.boton-primario:active { background: var(--sky-rojo-claro); }
.boton-secundario { background: var(--sky-azul); color: #fff; }
.boton-secundario:active { background: var(--sky-azul-claro); }
.boton-claro { background: #fff; color: var(--sky-azul); border: 2px solid var(--sky-azul); }
.boton-chico { width: auto; min-height: 44px; padding: 10px 16px; font-size: 15px; }
.boton[disabled] { opacity: .5; cursor: not-allowed; }

input, select, textarea {
  width: 100%;
  font-size: 17px;
  padding: 12px 14px;
  min-height: 44px;
  border: 2px solid var(--borde);
  border-radius: 10px;
  margin-bottom: 14px;
  background: #fff;
  color: var(--texto);
  font-family: inherit;
}
label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--sky-azul); }

.aviso {
  background: #fff6e5;
  border: 2px solid var(--sky-ambar);
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  margin-bottom: 14px;
  color: #6b4a00;
}
.aviso-fijo {
  background: var(--sky-azul);
  color: #fff;
  text-align: center;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  position: sticky;
  top: 74px;
  z-index: 19;
}

.franja-oferta {
  background: linear-gradient(135deg, var(--sky-rojo), #8f0b20);
  color: #fff;
  border-radius: var(--radio);
  padding: 18px;
  margin-bottom: 16px;
}
.franja-oferta .precio { font-size: 30px; font-weight: 800; }
.franja-oferta .precio span { font-size: 16px; font-weight: 500; opacity: .85; }

.barra-inferior {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--borde);
  display: flex;
  z-index: 30;
}
.barra-inferior a {
  flex: 1;
  text-align: center;
  padding: 10px 4px 12px;
  text-decoration: none;
  color: var(--texto-suave);
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
}
.barra-inferior a.activo { color: var(--sky-rojo); }
.barra-inferior .icono { font-size: 22px; display: block; }

.insignia { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; }
.insignia-ok { background: #e4f6ea; color: var(--sky-verde); }
.insignia-espera { background: #fff2d6; color: var(--sky-ambar); }
.insignia-rojo { background: #fde3e7; color: var(--sky-rojo); }
.insignia-azul { background: #e4e9f5; color: var(--sky-azul); }

.paso-linea { position: relative; padding-left: 36px; margin-bottom: 4px; }
.paso-linea::before {
  content: '';
  position: absolute; left: 10px; top: 28px; bottom: -6px; width: 3px; background: var(--borde);
}
.paso-linea:last-child::before { display: none; }
.paso-punto {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--borde); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
}
.paso-linea.hecho .paso-punto { background: var(--sky-verde); }
.paso-linea.actual .paso-punto { background: var(--sky-rojo); }
.paso-titulo { font-weight: 700; margin: 0 0 2px; }
.paso-detalle { font-size: 14px; color: var(--texto-suave); margin: 0 0 16px; }

.estado-guardado {
  position: fixed; top: 10px; right: 10px; z-index: 50;
  background: rgba(0,0,0,.75); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 20px;
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.estado-guardado.visible { opacity: 1; }

.selector-rol { max-width: 420px; margin: 40px auto; padding: 0 20px; text-align: center; }
.selector-rol .boton { margin-bottom: 14px; }

.chip-fila { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { background: var(--fondo); border: 1px solid var(--borde); border-radius: 20px; padding: 6px 12px; font-size: 13px; }

.lista-fila {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--borde);
}
.lista-fila:last-child { border-bottom: none; }
.lista-fila .titulo { font-weight: 700; }
.lista-fila .detalle { font-size: 14px; color: var(--texto-suave); }

.chat-caja { border: 2px solid var(--borde); border-radius: var(--radio); display: flex; flex-direction: column; height: 60vh; overflow: hidden; background: #fff; }
.chat-mensajes { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-burbuja { max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 15px; }
.chat-burbuja.yo { align-self: flex-end; background: var(--sky-azul); color: #fff; border-bottom-right-radius: 2px; }
.chat-burbuja.ia { align-self: flex-start; background: var(--fondo); color: var(--texto); border-bottom-left-radius: 2px; }
.chat-entrada { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--borde); }
.chat-entrada input { margin-bottom: 0; flex: 1; }
.chat-entrada button { width: 54px; min-width: 44px; flex: none; }

.foto-previa { width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px; border: 2px solid var(--borde); margin-bottom: 12px; background: #fafafa; }

.marca-prueba {
  text-align: center; font-size: 12px; color: var(--texto-suave); padding: 10px 0 0;
}

/* MANDATO 2799 — captura de selfie para el carnet (cámara frontal + guía de encuadre). */
.camara-contenedor {
  position: relative; width: 100%; max-width: 320px; aspect-ratio: 4 / 5; margin: 0 auto 14px;
  border-radius: 12px; overflow: hidden; background: #000;
}
.camara-contenedor video, .camara-contenedor img.camara-previa {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scaleX(-1); /* espejo, como cualquier cámara frontal/selfie */
}
.camara-guia {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.camara-guia::before {
  content: ''; width: 62%; height: 78%; border: 3px solid rgba(255,255,255,.85);
  border-radius: 50% / 42%; box-shadow: 0 0 0 999px rgba(0,0,0,.35);
}
.camara-controles { display: flex; gap: 10px; }
.camara-controles .boton { flex: 1; }
.camara-aviso-error {
  text-align: center; padding: 20px 14px; color: var(--texto-suave); font-size: 14px;
}

@media (min-width: 600px) {
  main { padding: 24px; }
}
