/* Estilos de la interfaz web (login y formulario). Colores de marca CIGTECH. */
:root {
  --azul: #2b7fe8; --azul-osc: #1d63bf; --verde: #4cb81a;
  --texto: #1c2430; --suave: #647083; --borde: #dde3eb; --fondo: #f4f7fb;
  --error: #c0392b; --radio: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texto);
  background: radial-gradient(1200px 500px at 50% -10%, #e3eefc 0%, var(--fondo) 60%);
}
main { width: 100%; max-width: 460px; }
.tarjeta {
  background: #fff; border: 1px solid var(--borde); border-radius: 16px;
  padding: 28px; box-shadow: 0 10px 30px rgba(28, 36, 48, .06);
}
.tarjeta::before {
  content: ""; display: block; height: 4px; margin: -28px -28px 24px; border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--verde), var(--azul));
}
.logo { display: block; height: 42px; margin: 0 auto 18px; }
h1 { font-size: 20px; margin: 0; text-align: center; letter-spacing: -.2px; }
.sub { text-align: center; color: var(--suave); font-size: 13px; margin: 4px 0 22px; }

label.campo { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.grupo { margin-bottom: 16px; }
select, input[type=text] {
  width: 100%; font: inherit; padding: 10px 12px; color: var(--texto); background: #fff;
  border: 1px solid var(--borde); border-radius: var(--radio); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
select:focus, input[type=text]:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(43,127,232,.15); }

fieldset { border: 0; padding: 0; margin: 4px 0 0; }
legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.opcion {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--borde); border-radius: var(--radio); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opcion:hover { border-color: #b9c6d6; }
.opcion:has(input:checked) { border-color: var(--azul); background: #f2f7fe; }
.opcion input { accent-color: var(--azul); margin: 3px 0 0; }
.opcion b { display: block; font-size: 14px; }
.opcion small { display: block; color: var(--suave); font-size: 12.5px; margin-top: 2px; }
fieldset + fieldset { margin-top: 8px; }
.segmento { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmento .opcion { margin-bottom: 0; }
@media (max-width: 380px) { .segmento { grid-template-columns: 1fr; } }

button {
  width: 100%; margin-top: 12px; padding: 12px; font: inherit; font-weight: 600; color: #fff;
  background: var(--azul); border: 0; border-radius: var(--radio); cursor: pointer;
  display: flex; gap: 10px; align-items: center; justify-content: center; transition: background .15s;
}
button:hover { background: var(--azul-osc); }
button:disabled { background: #8db6ee; cursor: progress; }
.giro {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%; animation: giro .7s linear infinite; display: none;
}
button:disabled .giro { display: inline-block; }
@keyframes giro { to { transform: rotate(360deg); } }

select:disabled, input:disabled { background: #f6f8fb; color: var(--suave); }
.bloqueado .opcion { opacity: .6; cursor: not-allowed; }

/* Panel de progreso */
.progreso { margin-top: 14px; padding: 14px; border: 1px solid #cfe0f7; background: #f5f9ff; border-radius: var(--radio); }
.progreso[hidden] { display: none; }
.prog-cab { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.prog-cab b { flex: 1; font-weight: 600; }
.prog-tiempo { color: var(--suave); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.giro-azul {
  width: 18px; height: 18px; border: 2px solid #c9dcf6; border-top-color: var(--azul);
  border-radius: 50%; animation: giro .7s linear infinite; flex: none;
}
.barra { height: 6px; background: #dfe9f7; border-radius: 3px; overflow: hidden; margin: 12px 0 10px; position: relative; }
.barra div { height: 100%; width: 0; background: linear-gradient(90deg, var(--verde), var(--azul)); border-radius: 3px; transition: width .2s; }
.barra.indeterminada div { width: 35%; position: absolute; animation: vaiven 1.3s ease-in-out infinite; }
@keyframes vaiven { 0% { left: -35%; } 100% { left: 100%; } }
.pasos { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--suave); }
.pasos li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.pasos li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #b9c6d6; flex: none;
}
.pasos li.activo { color: var(--texto); font-weight: 600; }
.pasos li.activo::before { border-color: var(--azul); background: var(--azul); animation: latido 1s ease-in-out infinite; }
.pasos li.hecho::before { border-color: var(--verde); background: var(--verde); }
@keyframes latido { 50% { opacity: .35; } }

.mensaje { margin: 14px 0 0; font-size: 13px; padding: 10px 12px; border-radius: var(--radio); display: none; }
.mensaje.error { display: block; color: var(--error); background: #fdf1ef; border: 1px solid #f3d3ce; }
.mensaje.ok { display: block; color: #2e7d32; background: #f1f8f1; border: 1px solid #cfe6d0; }
.nota { color: var(--suave); font-size: 12px; text-align: center; margin: 14px 0 0; }
footer { text-align: center; color: var(--suave); font-size: 12px; margin-top: 18px; }

input[type=password] {
  width: 100%; font: inherit; padding: 10px 12px; color: var(--texto); background: #fff;
  border: 1px solid var(--borde); border-radius: var(--radio); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type=password]:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(43,127,232,.15); }

/* Barra del usuario con sesión */
.usuario-barra {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--borde); border-radius: 12px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--verde), var(--azul));
}
.quien { flex: 1; min-width: 0; line-height: 1.25; }
.quien b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quien small { color: var(--suave); font-size: 12px; }
.usuario-barra form { margin: 0; }
button.salir {
  width: auto; margin: 0; padding: 7px 12px; font-size: 13px; font-weight: 600;
  color: var(--texto); background: #fff; border: 1px solid var(--borde);
}
button.salir:hover { background: #f4f7fb; border-color: #b9c6d6; }
a.salir.enlace { display: inline-block; text-decoration: none; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--texto); border: 1px solid var(--borde); border-radius: var(--radio); }
a.salir.enlace:hover { background: #f4f7fb; }
