/* ==========================================================================
   portal.css — portada de insusermx.com

   Paleta heredada del boletín para que se vea de la misma casa. No depende de
   css/tokens.css del generador: el portal vive en la raíz del sitio y el
   generador en /boletin/, así que lleva sus propios tokens.

   A diferencia de las hojas del boletín, que son de tamaño fijo, esta página
   SÍ es responsiva: es una web, no un documento para imprimir.
   ========================================================================== */

:root{
  --navy:   #0A2540;
  --navy-2: #123A63;
  --acc:    #1D6FA5;
  --soft:   #E4EDF5;
  --ink:    #17232F;
  --mut:    #5D6E7E;
  --rule:   #DCE4EC;
  --papel:  #F7F9FB;
  --sans: "Inter","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --serif: Georgia,"Times New Roman",serif;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}

.contenedor{
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Cabecera ------------------------------------------------------------ */
.cabecera{
  background: var(--navy);
  color: #fff;
  padding: 18px 0;
}
.cabecera .contenedor{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.marca{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.marca-sigla{
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .06em;
  color: #fff;
}
.marca-nombre{ min-width: 0; }
.marca-nombre b{
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}
.marca-nombre span{
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #A9C4DA;
}
.cabecera-contacto{
  font-size: 12.5px;
  color: #C6D9E8;
  white-space: nowrap;
}
.cabecera-contacto a{ color: inherit; text-decoration: none; }
.cabecera-contacto a:hover{ color: #fff; text-decoration: underline; }

/* ---- Portada ------------------------------------------------------------- */
.portada{
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 52px 0 60px;
}
.portada h1{
  margin: 0;
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.015em;
  max-width: 20ch;
}
.portada p{
  margin: 16px 0 0;
  font-size: clamp(14.5px, 1.8vw, 16.5px);
  line-height: 1.6;
  color: #C6D9E8;
  max-width: 62ch;
}
.portada-regla{
  width: 64px;
  height: 3px;
  margin: 0 0 22px;
  background: var(--acc);
  border-radius: 2px;
}

/* ---- Rejilla de herramientas --------------------------------------------- */
.seccion{ padding: 44px 0 56px; flex: 1; }

.seccion-titulo{
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--acc);
}
.seccion-titulo-2{ margin-top: 44px; }
.seccion-nota{
  margin: 0 0 26px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--mut);
  max-width: 62ch;
}

.rejilla{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 18px;
}

/* --- Tarjeta activa: es un enlace completo -------------------------------- */
.tarjeta{
  display: flex;
  flex-direction: column;
  min-height: 188px;
  padding: 22px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(10,37,64,.05);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tarjeta:hover{
  border-color: var(--acc);
  box-shadow: 0 8px 22px rgba(10,37,64,.13);
  transform: translateY(-2px);
}
.tarjeta:focus-visible{
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}

.tarjeta-icono{
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--acc);
}
.tarjeta-icono svg{ width: 20px; height: 20px; display: block; }

.tarjeta h2{
  margin: 0;
  font-size: 16.5px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--navy);
}
.tarjeta p{
  margin: 7px 0 0;
  font-size: 13.3px;
  line-height: 1.55;
  color: var(--mut);
}
.tarjeta-pie{
  margin-top: auto;
  padding-top: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--acc);
}
.tarjeta-pie::after{ content: " →"; }

/* --- Herramienta anunciada pero todavía sin construir ----------------------
   Misma caja que la activa, en tono apagado y SIN enlace: si fuera <a> daría
   404 al hacer clic. Para activarla, cambia el <div> por
   <a class="tarjeta" href="carpeta/">, quita la insignia y pon el pie "Abrir". */
.tarjeta-pendiente{
  border-style: dashed;
  border-color: #C3D0DC;
  background: transparent;
  box-shadow: none;
  cursor: default;
}
.tarjeta-pendiente:hover{
  border-color: #C3D0DC;
  box-shadow: none;
  transform: none;
}
.tarjeta-pendiente .tarjeta-icono{
  background: #E8EDF2;
  color: #8FA0B0;
}
.tarjeta-pendiente h2{ color: #5A6C7D; }

.insignia{
  align-self: flex-start;
  margin-top: auto;
  padding: 3px 9px;
  border: 1px solid #C3D0DC;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7A8A99;
}

/* ---- Pantalla de acceso -------------------------------------------------- */
.acceso{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
}
.acceso-caja{
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,.32);
}
.marca-acceso{ margin-bottom: 26px; }
.marca-acceso .marca-sigla{
  border-color: var(--rule);
  color: var(--navy);
}
.marca-acceso .marca-nombre b{ color: var(--navy); font-size: 14px; }
.marca-acceso .marca-nombre span{ color: var(--mut); }

.acceso-caja h1{
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}
.acceso-nota{
  margin: 8px 0 22px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--mut);
}
.acceso-nota code{
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--soft);
  color: var(--navy);
}

.acceso-caja label{
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mut);
}
.acceso-caja input[type="text"],
.acceso-caja input[type="password"]{
  width: 100%;
  margin-bottom: 18px;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 7px;
}
.acceso-caja input:focus{
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(29,111,165,.16);
}

.btn-acceso{
  width: 100%;
  padding: 12px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: var(--acc);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  transition: background .13s ease;
}
.btn-acceso:hover{ background: #17608F; }
.btn-acceso:focus-visible{ outline: 2px solid var(--navy); outline-offset: 2px; }

.acceso-error{
  margin: 0 0 18px;
  padding: 10px 13px;
  border-radius: 7px;
  border: 1px solid #E6B9BF;
  background: #FBEEF0;
  font-size: 13px;
  line-height: 1.5;
  color: #8C2733;
}

.acceso-hash{
  width: 100%;
  padding: 10px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--papel);
  border: 1px solid var(--rule);
  border-radius: 7px;
  resize: vertical;
}

/* ---- Pie ----------------------------------------------------------------- */
.pie{
  background: var(--navy);
  color: #C6D9E8;
  padding: 26px 0;
  font-size: 12.5px;
  line-height: 1.6;
}
.pie .contenedor{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pie b{ color: #fff; font-weight: 600; }
.pie a{ color: inherit; text-decoration: none; }
.pie a:hover{ color: #fff; text-decoration: underline; }

@media (max-width: 560px){
  .portada{ padding: 38px 0 44px; }
  .seccion{ padding: 32px 0 44px; }
  .cabecera-contacto{ white-space: normal; }
}

@media (prefers-reduced-motion: reduce){
  .tarjeta{ transition: none; }
  .tarjeta:hover{ transform: none; }
}

/* ==========================================================================
   Componentes de las herramientas

   Antes vivían repetidos dentro de un <style> en cada pantalla: 269 líneas
   entre las seis, con nueve clases definidas hasta seis veces y ya
   divergiendo —el mismo botón tenía tres rellenos distintos y la caja de
   búsqueda se llamaba .buscador, .filtros o .caja según la página—.
   Aquí están una sola vez. Lo que queda en cada pantalla es solo lo suyo.
   ========================================================================== */

/* --- caja de filtros y campos ------------------------------------------- */
.buscador{
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  padding: 20px 22px; background: #fff; border: 1px solid var(--rule);
  border-radius: 10px; margin-bottom: 20px;
}
.campo{ display: flex; flex-direction: column; gap: 5px; }
.campo label{
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mut);
}
.campo input, .campo select, .buscador textarea{
  font: inherit; font-size: 14.5px; padding: 9px 11px;
  border: 1px solid var(--rule); border-radius: 7px;
  color: var(--ink); background: #fff;
}
.campo input:focus, .campo select:focus, .buscador textarea:focus{
  outline: none; border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(29,111,165,.16);
}

/* Caja blanca sin disposición propia: el formulario del lote apila un
   textarea y una fila de botones, así que no puede ser flex como .buscador. */
.panel{
  padding: 20px 22px; background: #fff; border: 1px solid var(--rule);
  border-radius: 10px; margin-bottom: 18px;
}

/* --- botones ------------------------------------------------------------ */
.btn-buscar, .btn-accion{
  font: inherit; font-size: 14.5px; font-weight: 600; color: #fff;
  background: var(--acc); border: 0; border-radius: 7px;
  padding: 10px 20px; cursor: pointer;
}
.btn-buscar:hover, .btn-accion:hover{ background: #17608F; }
.btn-accion[disabled]{ background: #B9C6D3; cursor: not-allowed; }
.btn-menor{ padding: 8px 16px; font-size: 13px; }
.btn-csv{
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--acc);
  background: #fff; border: 1px solid var(--acc); border-radius: 7px;
  padding: 9px 16px; cursor: pointer;
}
.btn-csv:hover{ background: var(--soft); }
.limpiar{ font-size: 13px; color: var(--mut); text-decoration: none; padding: 10px 4px; }
.limpiar:hover{ color: var(--acc); text-decoration: underline; }

/* --- tablas ------------------------------------------------------------- */
table.datos{
  width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff;
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
}
table.datos th{
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mut); padding: 11px 12px; background: #F7F9FB;
  border-bottom: 1px solid var(--rule);
}
table.datos td{ padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.datos tr:last-child td{ border-bottom: 0; }

.mono{ font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.tenue{ color: var(--mut); font-size: 12.5px; }

/* --- avisos ------------------------------------------------------------- */
.alerta{
  padding: 12px 14px; border-radius: 8px; background: #FBEEF0;
  border: 1px solid #E6B9BF; color: #8C2733;
  font-size: 13.5px; line-height: 1.55; margin-bottom: 16px;
}
.aviso{
  padding: 12px 14px; border-radius: 8px; background: #FDF6E3;
  border: 1px solid #E8D9A8; color: #7A5D00;
  font-size: 13.5px; line-height: 1.55; margin-bottom: 16px;
}
.estado{
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  justify-content: space-between; padding: 18px 22px;
  background: #F2F8F4; border: 1px solid #BBDDC7;
  border-radius: 10px; margin-bottom: 20px;
}
.estado b{ color: var(--navy); font-size: 15px; }

/* --- fichas y cifras ---------------------------------------------------- */
.cifra{
  padding: 22px 24px; background: #fff; border: 1px solid var(--rule);
  border-radius: 10px; margin-bottom: 14px;
}
.cifra.destacada{ border-left: 4px solid var(--acc); }
.cifra h2{
  margin: 0 0 6px; font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mut);
}
.cifra .valor{ font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.cifra .pie{ margin-top: 8px; font-size: 13.5px; color: var(--mut); line-height: 1.6; }

/* --- etiquetas de situación --------------------------------------------- */
.etq{
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
}
.etq-Presunto,   .etq-alta  { background: #FDF0D5; color: #8A5B00; }
.etq-Definitivo             { background: #FBEEF0; color: #8C2733; }
.etq-Desvirtuado,.etq-cambio{ background: #EAF3FB; color: #1D6FA5; }
.etq-SentenciaFavorable, .etq-baja{ background: #EDF7F0; color: #2E7D4F; }

/* --- paginación y plegables --------------------------------------------- */
.paginacion{ display: flex; gap: 8px; align-items: center; margin-top: 16px; font-size: 13.5px; }
.paginacion a{
  padding: 7px 13px; border: 1px solid var(--rule); border-radius: 6px;
  text-decoration: none; color: var(--acc); background: #fff;
}
.paginacion a:hover{ border-color: var(--acc); }
details.plegable, details.avanzado{ margin-top: 18px; }
details.plegable summary{ cursor: pointer; font-size: 13.5px; color: var(--acc); padding: 8px 0; }
details.avanzado summary{ cursor: pointer; font-size: 13px; color: var(--mut); }
details.avanzado summary:hover{ color: var(--acc); }

/* --- nota al pie de las pantallas --------------------------------------- */
.nota-legal{
  margin-top: 26px; padding: 14px 16px; background: var(--soft);
  border-radius: 8px; font-size: 12.5px; line-height: 1.6; color: var(--mut);
}
.nota-legal b{ color: var(--navy); }

/* --- salida de consola y comandos --------------------------------------- */
pre.salida{
  background: #0E1116; color: #D6DEE8; padding: 16px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap;
}
code.comando{
  display: block; margin-top: 10px; padding: 12px 14px; background: #0E1116;
  color: #D6DEE8; border-radius: 8px; font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px; overflow-x: auto; white-space: pre;
}

/* --- la barra de navegación de las herramientas ------------------------- */
.cabecera-contacto a[aria-current="page"]{
  color: #fff; font-weight: 600; border-bottom: 2px solid rgba(255,255,255,.55);
  padding-bottom: 2px;
}
