:root {
  color-scheme: light;
  --azul-900: #071d33;
  --azul-800: #0c3157;
  --azul-700: #0057a8;
  --azul-100: #e3f0fa;
  --azul-050: #f4f9fd;
  --tinta: #132238;
  --texto-suave: #5d6b7b;
  --borde: #d5dee8;
  --fondo: #eef2f5;
  --blanco: #fff;
  --acento: #0057a8;
  --exito: #18764b;
  --error: #b4232f;
  --sombra: 0 22px 55px rgba(7, 29, 51, .1);
}

*, *::before, *::after { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

html { font-size: 14px; }
body {
  margin: 0;
  min-width: 320px;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 14px;
  background:
    linear-gradient(90deg, rgba(7, 29, 51, .025) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(7, 29, 51, .025) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(circle at 8% 0%, rgba(0, 87, 168, .12), transparent 30rem),
    var(--fondo);
  color: var(--tinta);
  line-height: 1.5;
}

.contenedor { max-width: 1160px; margin: 0 auto; padding: 2.75rem 1.5rem 4rem; }
.encabezado { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.7rem; }
.marca-logo { flex: 0 0 auto; height: 44px; width: auto; }

h1 { margin: .15rem 0 .3rem; font-size: 32px; line-height: 1.1; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.etiqueta, .sobrelinea { margin: 0; color: var(--azul-700); font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.sub { max-width: 680px; margin: 0; color: var(--texto-suave); font-size: 1rem; }
.navegacion-modulos { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1.4rem; padding: .3rem; border: 1px solid var(--borde); border-radius: 12px; background: rgba(255,255,255,.72); width: fit-content; }
.navegacion-modulos a { padding: .48rem .9rem; border-radius: 8px; color: var(--azul-800); font-size: .82rem; font-weight: 800; text-decoration: none; transition: background-color .16s, color .16s; }
.navegacion-modulos a:hover { background: var(--azul-100); }
.navegacion-modulos a[aria-current="page"] { background: var(--azul-800); color: var(--blanco); }

.panel-principal { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 1.25rem; align-items: start; }
.tarjeta { padding: 1.8rem; border: 1px solid rgba(213, 222, 232, .9); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: var(--sombra); }
.tarjeta-acceso { max-width: 620px; margin: 0 auto; }
.encabezado-seccion { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.5rem; }
.paso {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--acento);
  color: var(--blanco);
  font-weight: 800;
}
.paso-secundario { background: var(--azul-100); color: var(--azul-800); font-family: Georgia, serif; }

label:not(.zona-carga) { display: block; margin-bottom: .4rem; font-weight: 700; }
input[type="password"] {
  display: block;
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid #8796a5;
  border-radius: 10px;
  background: var(--blanco);
  font: inherit;
}

.boton-enlace {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 58px;
  margin-bottom: 1.25rem;
  padding: .65rem .85rem;
  border: 1px solid #b9cee0;
  border-radius: 10px;
  background: var(--azul-050);
  color: var(--azul-900);
  text-decoration: none;
}
.boton-enlace:hover { border-color: var(--azul-700); background: var(--azul-100); }
.boton-enlace strong, .boton-enlace small { display: block; }
.boton-enlace small { margin-top: .1rem; color: var(--texto-suave); font-weight: 400; }
.icono-descarga { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--blanco); color: var(--azul-700); font-size: 1.35rem; font-weight: 800; }

.zona-carga {
  display: flex;
  min-height: 245px;
  padding: 1.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #8db4d4;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fcff, var(--azul-050));
  text-align: center;
  cursor: pointer;
  transition: border-color .16s, background-color .16s, transform .16s;
}
.zona-carga:hover, .zona-carga.arrastrando { border-color: var(--acento); background: var(--azul-050); transform: translateY(-2px); }
.icono-archivo { display: grid; width: 58px; height: 66px; margin-bottom: 1rem; place-items: center; border-radius: 8px; background: var(--azul-800); box-shadow: 8px 8px 0 #cbdceb; color: var(--blanco); font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.titulo-zona { font-size: 1.08rem; font-weight: 800; }
.texto-zona { color: var(--azul-700); font-weight: 600; }
.restriccion { margin-top: .6rem; color: var(--texto-suave); font-size: .82rem; }
.entrada-archivo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.entrada-archivo:focus-visible + .archivo-seleccionado { outline: 3px solid var(--acento); outline-offset: 3px; }
.archivo-seleccionado { min-height: 1.5rem; margin: .8rem 0 0; color: var(--texto-suave); font-size: .9rem; text-align: center; overflow-wrap: anywhere; }
.archivo-seleccionado.listo { color: var(--exito); font-weight: 700; }
.nota { color: var(--texto-suave); font-size: .9rem; }
.nota-seguridad { margin: 1rem 0; padding-left: 1.4rem; position: relative; }
.nota-seguridad::before { content: "\2713"; position: absolute; left: 0; color: var(--exito); font-weight: 800; }

button {
  min-height: 46px;
  margin-top: 1rem;
  padding: .72rem 1.2rem;
  border: 0;
  border-radius: 8px;
  background: var(--acento);
  color: var(--blanco);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
button:hover { background: var(--azul-800); }
button:disabled { background: #718092; cursor: progress; }
.boton-principal { display: flex; width: 100%; align-items: center; justify-content: center; gap: .65rem; box-shadow: 0 8px 18px rgba(0, 87, 168, .2); }
button.secundario { border: 1px solid var(--azul-700); background: transparent; color: var(--azul-700); }
button.secundario:hover { background: var(--azul-100); }

.tarjeta-guia { padding: 0; overflow: hidden; }
.resumen-guia {
  display: flex;
  min-height: 92px;
  padding: 1.35rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.resumen-guia::-webkit-details-marker { display: none; }
.resumen-guia .encabezado-seccion { margin: 0; }
.titulo-guia { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.flecha-guia {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--azul-700);
  border-bottom: 2px solid var(--azul-700);
  transform: rotate(45deg);
  transition: transform .16s;
}
.tarjeta-guia[open] .flecha-guia { transform: rotate(225deg); }
.contenido-guia { padding: 0 1.5rem 1.5rem; border-top: 1px solid #e8edf2; }
.lista-pasos { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.lista-pasos li { display: flex; gap: .8rem; padding: .9rem 0; border-top: 1px solid #e8edf2; }
.lista-pasos li:first-child { padding-top: 0; border-top: 0; }
.lista-pasos li > span { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--azul-100); color: var(--azul-800); font-size: .8rem; font-weight: 800; }
.lista-pasos p, .lista-pasos small { display: block; margin: 0; }
.lista-pasos small { margin-top: .15rem; color: var(--texto-suave); line-height: 1.4; }
code { padding: .08rem .28rem; border-radius: 4px; background: #edf2f6; color: var(--azul-900); }

.detalles-limites { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--borde); }
.detalles-limites h3 { margin: 0; font-size: .95rem; }
.detalles-limites ul { margin: .6rem 0 0; padding-left: 1.2rem; color: var(--texto-suave); font-size: .9rem; }
.detalles-limites li + li { margin-top: .45rem; }
.salir { margin-top: 1rem; text-align: right; }

.mensaje { margin: 0 0 1.25rem; padding: .9rem 1rem; border: 1px solid #9aabb9; border-radius: 12px; background: var(--blanco); }
.mensaje.error { border-color: #e5a1a7; background: #fff0f1; color: #861923; }
.mensaje.ok { border-color: #82c5a5; background: #edfaf3; color: #105b38; }
.mensaje.cargando { border-color: #8db9dc; background: #eef7fe; color: var(--azul-900); }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .zona-carga, .flecha-guia { transition: none; }
}

@media (max-width: 820px) {
  .contenedor { padding-top: 2rem; }
  .panel-principal { grid-template-columns: 1fr; }
  .tarjeta-guia { order: -1; }
}

@media (max-width: 520px) {
  .contenedor { padding: 1.25rem .75rem 2.5rem; }
  .encabezado { align-items: flex-start; gap: .85rem; margin-bottom: 1.4rem; }
  .marca-logo { height: 34px; }
  h1 { font-size: 26px; }
  .sub { font-size: .95rem; }
  .tarjeta { padding: 1.15rem; border-radius: 14px; }
  .tarjeta-guia { padding: 0; }
  .resumen-guia { min-height: 82px; padding: 1rem 1.15rem; }
  .contenido-guia { padding: 0 1.15rem 1.15rem; }
  .zona-carga { min-height: 195px; padding: 1rem; }
  button { width: 100%; }
  .salir { text-align: center; }
}
