/* El portal de clientes.
 *
 * Mismos colores y mismas tipografías del sitio, para que entrar al
 * portal no se sienta como salir de Herédalo.co. Las clases llevan el
 * prefijo hdl-portal- y ninguna se repite en el tema: ya nos mordió dos
 * veces que dos secciones usaran el mismo nombre de clase.
 */

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

.hdl-portal {
  --hdl-morado: #3B1E6E;
  --hdl-morado-claro: #6B45AA;
  --hdl-tinta: #1B1030;
  --hdl-gris: #6B6478;
  --hdl-linea: #E4DFF0;
  --hdl-fondo: #FAF8FD;
  --hdl-amarillo: #FFDE21;
  --hdl-verde: #1A7F5A;

  font-family: Manrope, system-ui, sans-serif;
  color: var(--hdl-tinta);
}

/* El título que pinta el tema sobra en esta página: la tarjeta ya dice
   dónde está uno, y leerlo dos veces en letras enormes no ayuda. */
.hdl-portal-pagina .wp-block-post-title,
.hdl-portal-pagina .entry-title,
.hdl-portal-pagina .page-title { display: none; }

/* ---- Entrar ---- */

.hdl-portal-entrada {
  display: flex;
  justify-content: center;
  padding: 40px 16px 80px;
}

/* La pantalla partida: la marca a un lado, lo que hay que hacer al otro. */
.hdl-portal-partida {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: center;
  width: 100%;
  max-width: 900px;
}

.hdl-portal-casa { padding-right: 10px; }

.hdl-portal-logo {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hdl-morado);
}

.hdl-portal-logo span { color: var(--hdl-amarillo); }

.hdl-portal-lema {
  margin: 0 0 14px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--hdl-tinta);
}

.hdl-portal-casa-nota {
  margin: 0;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--hdl-gris);
}

.hdl-portal-tarjeta {
  width: 100%;
  background: #fff;
  border: 1px solid var(--hdl-linea);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 18px 44px rgba(50, 30, 83, 0.1);
}

/* ---- Los campos ---- */

.hdl-portal-forma { margin: 0; }

.hdl-portal-campo { margin: 0 0 16px; }

.hdl-portal-conojo { position: relative; display: block; }

.hdl-portal-conojo input { padding-right: 52px !important; margin-bottom: 0 !important; }

.hdl-portal-ojo {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  /* 40 píxeles de lado: lo mínimo para tocarlo sin fallar en un celular. */
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--hdl-gris);
  cursor: pointer;
}

.hdl-portal-ojo:hover { background: #EFEBF8; color: var(--hdl-morado); }

.hdl-portal-ojo:focus-visible {
  outline: 2px solid var(--hdl-morado-claro);
  outline-offset: 1px;
}

/* Con la contraseña a la vista se muestra el ojo tachado, y se marca en
   morado: así se ve de un vistazo que ahí hay algo destapado. */
.hdl-portal-ojo[aria-pressed="true"] { color: var(--hdl-morado); }
.hdl-portal-ojo-cerrado { display: none; }
.hdl-portal-ojo[aria-pressed="true"] .hdl-portal-ojo-abierto { display: none; }
.hdl-portal-ojo[aria-pressed="true"] .hdl-portal-ojo-cerrado { display: block; }

/* Se lee con un lector de pantalla, pero no ocupa sitio. */
.hdl-portal-solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hdl-portal-pista {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #B32D2E;
}

.hdl-portal-campo-mal input { border-color: #E39A9A !important; }

.hdl-portal-recordar {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--hdl-gris);
}

.hdl-portal-recordar label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin: 0;
}

.hdl-portal-dicho {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #FDECEC;
  border: 1px solid #F3C9C9;
  color: #B32D2E;
  font-size: 14px;
  line-height: 1.5;
}

.hdl-portal-dicho-bien {
  background: #E8F6EF;
  border-color: #B6E0CE;
  color: #14694B;
}

.hdl-portal-listo {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #E8F6EF;
  border: 1px solid #B6E0CE;
  color: #14694B;
  font-size: 14px;
  line-height: 1.5;
}

.hdl-portal-boton[disabled] { opacity: .6; cursor: default; }

.hdl-portal-titulo {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--hdl-tinta);
}

.hdl-portal-bajada {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--hdl-gris);
}

.hdl-portal-error {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-radius: 9px;
  background: #FDECEC;
  border: 1px solid #F3C9C9;
  color: #B32D2E;
  font-size: 14px;
  line-height: 1.5;
}

.hdl-portal-tarjeta label {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
  font-weight: 700;
}

.hdl-portal-tarjeta input[type="text"],
.hdl-portal-tarjeta input[type="email"],
.hdl-portal-tarjeta input[type="tel"],
.hdl-portal-tarjeta input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
  padding: 12px 13px;
  border: 1px solid #D9D2EA;
  border-radius: 9px;
  font-family: inherit;
  font-size: 15px;
  color: var(--hdl-tinta);
  background: #fff;
}

.hdl-portal-tarjeta input:focus {
  outline: 2px solid var(--hdl-morado-claro);
  outline-offset: 1px;
}

.hdl-portal-tarjeta .login-remember label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--hdl-gris);
}

.hdl-portal-tarjeta .login-submit input[type="submit"],
.hdl-portal-boton {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--hdl-morado);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.hdl-portal-tarjeta .login-submit input[type="submit"]:hover,
.hdl-portal-boton:hover { background: #572C9E; color: #fff; }

.hdl-portal-ayuda {
  margin: 16px 0 0;
  font-size: 14px;
  text-align: center;
}

.hdl-portal-ayuda a { color: var(--hdl-morado-claro); }

.hdl-portal-nota {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--hdl-linea);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--hdl-gris);
}

/* ---- El portal ---- */

.hdl-portal-reja {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

.hdl-portal-lado {
  position: sticky;
  top: 24px;
  background: #fff;
  border: 1px solid var(--hdl-linea);
  border-radius: 14px;
  padding: 20px;
}

.hdl-portal-quien {
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--hdl-linea);
}

.hdl-portal-nombre {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.hdl-portal-ref {
  margin: 4px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--hdl-gris);
}

.hdl-portal-menu { display: flex; flex-direction: column; gap: 2px; }

.hdl-portal-paso {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--hdl-morado);
  text-decoration: none;
}

.hdl-portal-paso:hover { background: var(--hdl-fondo); color: var(--hdl-morado); }

.hdl-portal-paso-hoy {
  background: var(--hdl-morado);
  color: #fff;
}

.hdl-portal-paso-hoy:hover { background: var(--hdl-morado); color: #fff; }

.hdl-portal-salir {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--hdl-linea);
  font-size: 13.5px;
}

.hdl-portal-salir a { color: var(--hdl-gris); }

/* ---- El centro ---- */

.hdl-portal-centro {
  background: #fff;
  border: 1px solid var(--hdl-linea);
  border-radius: 14px;
  padding: 28px;
}

.hdl-portal-cabeza h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hdl-portal-cabeza p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--hdl-gris);
}

.hdl-portal-recado {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--hdl-fondo);
  border: 1px solid var(--hdl-linea);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---- Los cuatro indicadores ---- */

.hdl-portal-fichas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.hdl-portal-ficha {
  padding: 15px;
  border: 1px solid var(--hdl-linea);
  border-radius: 11px;
  background: #fff;
}

.hdl-portal-dato {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--hdl-morado);
}

.hdl-portal-rotulo {
  margin: 5px 0 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9A93A8;
}

.hdl-portal-ficha-al_dia .hdl-portal-dato { color: var(--hdl-verde); }
.hdl-portal-ficha-pendiente .hdl-portal-dato { color: #B5701A; }
.hdl-portal-ficha-vencido .hdl-portal-dato { color: #B32D2E; }

.hdl-portal-barra {
  height: 6px;
  margin-top: 18px;
  border-radius: 3px;
  background: #EFEBF8;
  overflow: hidden;
}

.hdl-portal-barra span {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--hdl-morado), var(--hdl-amarillo));
}

/* ---- La línea de tiempo ---- */

.hdl-portal-linea {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.hdl-portal-fase + .hdl-portal-fase { margin-top: 26px; }

.hdl-portal-fase h2 {
  margin: 0 0 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hdl-morado-claro);
}

.hdl-portal-pasos { margin: 0; padding: 0; list-style: none; }

.hdl-portal-hito {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 0 0 20px 0;
}

/* El hilo que une los hitos. El último no lo lleva. */
.hdl-portal-hito::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: var(--hdl-linea);
}

.hdl-portal-hito:last-child::before { display: none; }

.hdl-portal-marca {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--hdl-linea);
  background: #fff;
}

.hdl-portal-hito-hecha .hdl-portal-marca {
  border-color: var(--hdl-morado);
  background: var(--hdl-morado);
}

.hdl-portal-hito-hoy .hdl-portal-marca {
  border-color: var(--hdl-morado);
  background: var(--hdl-amarillo);
  box-shadow: 0 0 0 4px rgba(59, 30, 110, 0.12);
}

.hdl-portal-texto { min-width: 0; }

.hdl-portal-hito-nombre {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.hdl-portal-hito-detalle {
  margin: 3px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hdl-gris);
}

.hdl-portal-hito-falta .hdl-portal-hito-nombre,
.hdl-portal-hito-falta .hdl-portal-hito-detalle { color: #9A93A8; }

.hdl-portal-aqui {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--hdl-amarillo);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #241541;
  vertical-align: 2px;
}

/* ---- El asesor ---- */

.hdl-portal-asesor {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--hdl-linea);
}

.hdl-portal-asesor-titulo {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.hdl-portal-asesor .hdl-portal-boton {
  max-width: 280px;
  margin: 0;
}

/* ---- Celular ---- */

@media (max-width: 860px) {
  .hdl-portal-partida {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    max-width: 440px;
  }

  .hdl-portal-casa { padding-right: 0; text-align: center; }
  .hdl-portal-logo { margin-bottom: 10px; font-size: 26px; }
  .hdl-portal-lema { font-size: 21px; }
  .hdl-portal-casa-nota { max-width: none; font-size: 14px; }
  .hdl-portal-tarjeta { padding: 24px 20px; }

  .hdl-portal-reja {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px 14px 56px;
  }

  .hdl-portal-lado { position: static; }

  .hdl-portal-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .hdl-portal-paso {
    flex: 1 1 auto;
    text-align: center;
    border: 1px solid var(--hdl-linea);
    font-size: 13.5px;
  }

  .hdl-portal-centro { padding: 20px 16px; }

  .hdl-portal-fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hdl-portal-asesor .hdl-portal-boton { max-width: none; }
}

/* =========================================================================
 * El escritorio del asesor
 *
 * Pensado para usarse de pie, con una mano, en el pasillo de una
 * notaría: botones grandes, poco que leer, y lo urgente primero. En
 * computador se ensancha, pero el diseño nace del celular.
 * ====================================================================== */

.hdl-mesa {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 72px;
}

.hdl-mesa-cabeza {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--hdl-linea);
}

.hdl-mesa-cabeza h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.hdl-mesa-volver {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hdl-morado-claro);
  text-decoration: none;
}

.hdl-mesa-quien {
  margin: 0;
  font-size: 13px;
  color: var(--hdl-gris);
}

.hdl-mesa-quien a { margin-left: 10px; color: var(--hdl-morado-claro); }

/* ---- Lo que toca hoy ---- */

.hdl-mesa-hoy { margin-bottom: 26px; }

.hdl-mesa-hoy h2 {
  margin: 0 0 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hdl-morado-claro);
}

.hdl-mesa-trabados { margin: 0; padding: 0; list-style: none; }

.hdl-mesa-trabado + .hdl-mesa-trabado { margin-top: 8px; }

.hdl-mesa-trabado a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--hdl-linea);
  border-left: 4px solid #D8CFEC;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.hdl-mesa-trabado a:hover { background: var(--hdl-fondo); }

.hdl-mesa-peso-alto a { border-left-color: #D16A6A; }
.hdl-mesa-peso-medio a { border-left-color: #E3B65C; }

.hdl-mesa-trabado-nombre {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.hdl-mesa-trabado-por {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hdl-gris);
}

.hdl-mesa-aldia,
.hdl-mesa-vacio {
  margin: 0 0 22px;
  padding: 16px;
  border-radius: 10px;
  background: var(--hdl-fondo);
  border: 1px solid var(--hdl-linea);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--hdl-gris);
}

/* ---- Buscar ---- */

.hdl-mesa-buscar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.hdl-mesa-buscar-campo { margin: 0; flex: 1 1 200px; }

.hdl-mesa-buscar input[type="search"],
.hdl-mesa-buscar select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #D9D2EA;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--hdl-tinta);
  background: #fff;
}

.hdl-mesa-limpiar { font-size: 13.5px; color: var(--hdl-gris); }

.hdl-mesa-boton {
  display: inline-block;
  padding: 12px 18px;
  border: none;
  border-radius: 9px;
  background: var(--hdl-morado);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.hdl-mesa-boton:hover { background: #572C9E; color: #fff; }

.hdl-mesa-boton-grande { display: block; width: 100%; padding: 15px; font-size: 15.5px; }

.hdl-mesa-boton-suave {
  background: #fff;
  color: var(--hdl-morado);
  border: 1px solid #D9D2EA;
}

.hdl-mesa-boton-suave:hover { background: var(--hdl-fondo); color: var(--hdl-morado); }

/* ---- La lista ---- */

.hdl-mesa-casos { margin: 0; padding: 0; list-style: none; }

.hdl-mesa-caso + .hdl-mesa-caso { margin-top: 6px; }

/* Tres columnas y tres hijos: el nombre y el cliente van juntos en el
   primero. Con cuatro hijos y tres columnas, el cuarto se iba a una
   segunda fila y la lista quedaba descuadrada. */
.hdl-mesa-caso a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 64px;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid var(--hdl-linea);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.hdl-mesa-caso a:hover { background: var(--hdl-fondo); }

.hdl-mesa-caso-texto { min-width: 0; }

.hdl-mesa-caso-nombre { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.35; }

.hdl-mesa-caso-quien {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--hdl-gris);
}

.hdl-mesa-caso-etapa { font-size: 13.5px; color: var(--hdl-gris); }

.hdl-mesa-caso-avance {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--hdl-morado);
  text-align: right;
}

/* ---- La ficha ---- */

.hdl-mesa-alertas {
  margin: 0 0 20px;
  padding: 14px 16px 14px 34px;
  border-radius: 10px;
  background: #FDF4EC;
  border: 1px solid #F0D7BE;
  font-size: 14.5px;
  line-height: 1.6;
  color: #8A4B12;
}

.hdl-mesa-datos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
}

.hdl-mesa-datos dt {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9A93A8;
}

.hdl-mesa-datos dd {
  margin: 3px 0 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
}

.hdl-mesa-forma {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid var(--hdl-linea);
  border-radius: 12px;
  background: #fff;
}

.hdl-mesa-campo { margin: 0 0 16px; }

.hdl-mesa-campo label {
  display: block;
  margin-bottom: 5px;
  font-size: 13.5px;
  font-weight: 700;
}

/* Los de texto entran aquí también: antes solo estaban el selector y
   el área de texto, así que los campos nuevos —el valor del trámite, el
   monto del pago— salían angostos y descuadrados al lado de los otros. */
.hdl-mesa-campo select,
.hdl-mesa-campo textarea,
.hdl-mesa-campo input[type="text"],
.hdl-mesa-campo input[type="date"],
.hdl-mesa-campo input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 12px 13px;
  border: 1px solid #D9D2EA;
  border-radius: 9px;
  font-family: inherit;
  font-size: 15px;
  color: var(--hdl-tinta);
  background: #fff;
}

.hdl-mesa-pista {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--hdl-gris);
}

.hdl-mesa-contacto {
  padding-top: 22px;
  border-top: 1px solid var(--hdl-linea);
}

.hdl-mesa-contacto h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.hdl-mesa-contacto-dato {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--hdl-gris);
}

.hdl-mesa-contacto .hdl-mesa-boton { margin-right: 8px; margin-bottom: 8px; }

/* ---- Celular ---- */

@media (max-width: 700px) {
  .hdl-mesa { padding: 18px 14px 56px; }

  .hdl-mesa-caso a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }

  .hdl-mesa-caso-texto { grid-column: 1 / -1; }
  .hdl-mesa-caso-etapa { grid-column: 1; font-size: 13px; }
  .hdl-mesa-caso-avance { grid-column: 2; }

  .hdl-mesa-datos { grid-template-columns: minmax(0, 1fr); }

  .hdl-mesa-buscar-campo { flex: 1 1 100%; }
  .hdl-mesa-buscar .hdl-mesa-boton { width: 100%; }

  .hdl-mesa-contacto .hdl-mesa-boton { display: block; margin-right: 0; }
}

/* =========================================================================
 * Cargue de documentos
 *
 * Pensado para el celular primero: quien sube una cédula la está
 * fotografiando con el teléfono, de pie, probablemente en la fila de una
 * notaría. Los botones son grandes y cada documento es una tarjeta
 * entera, no una fila de una tabla.
 * ====================================================================== */

.hdl-doc-avance {
  margin: 1.5rem 0 1.75rem;
}

.hdl-doc-avance-texto {
  margin: 0 0 .5rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--hdl-gris);
}

.hdl-doc-barra {
  height: 8px;
  border-radius: 99px;
  background: var(--hdl-linea);
  overflow: hidden;
}

.hdl-doc-barra span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--hdl-morado);
}

.hdl-doc-lista {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .9rem;
}

.hdl-doc {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--hdl-linea);
  border-left: 4px solid var(--hdl-linea);
  border-radius: 14px;
  background: #fff;
}

/* El color del borde dice en qué va sin tener que leer la etiqueta. */
.hdl-doc-listo    { border-left-color: var(--hdl-verde); }
.hdl-doc-revisando { border-left-color: var(--hdl-amarillo); }
.hdl-doc-devuelto { border-left-color: #C62828; }

.hdl-doc-cabeza {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}

.hdl-doc-nombre {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--hdl-tinta);
}

.hdl-doc-estado {
  flex: 0 0 auto;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hdl-gris);
}

.hdl-doc-listo .hdl-doc-estado    { color: var(--hdl-verde); }
.hdl-doc-devuelto .hdl-doc-estado { color: #C62828; }

.hdl-doc-ayuda {
  margin: 0 0 .75rem;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--hdl-gris);
}

/* El motivo va antes del botón: si se lee después de subir otra vez,
   no sirvió de nada. */
.hdl-doc-porque {
  margin: 0 0 .75rem;
  padding: .7rem .85rem;
  border-radius: 10px;
  background: #FDECEC;
  font-size: .88rem;
  line-height: 1.5;
  color: #7A1B1B;
}

.hdl-doc-subidos {
  margin: 0 0 .75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .3rem;
  font-size: .88rem;
}

.hdl-doc-subidos a {
  color: var(--hdl-morado);
  font-weight: 700;
  word-break: break-word;
}

.hdl-doc-peso {
  margin-left: .4rem;
  color: var(--hdl-gris);
  font-size: .8rem;
}

.hdl-doc-forma { margin: 0; }

/* El input de archivo de verdad está escondido y esto es su etiqueta:
   el nativo es feo, distinto en cada navegador y, en algunos, muy
   pequeño para tocarlo con el pulgar. */
.hdl-doc-elegir {
  display: inline-block;
  min-height: 44px;
  padding: .7rem 1.4rem;
  border-radius: 99px;
  background: var(--hdl-morado);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
}

.hdl-doc-elegir:hover { background: var(--hdl-morado-claro); }

/* Que se vea el foco del teclado, ya que el input está escondido. */
.hdl-doc-forma input:focus-visible + .hdl-doc-elegir,
.hdl-doc-forma input[data-hdl-archivo]:focus + .hdl-doc-elegir,
.hdl-doc-elegir:focus-visible {
  outline: 3px solid var(--hdl-morado-claro);
  outline-offset: 2px;
}

/* «No aplica» en un documento suelto ------------------------------ */

.hdl-doc-aplica {
  margin: .6rem 0 0;
}

.hdl-doc-aplica-no,
.hdl-doc-aplica-volver {
  padding: .4rem .7rem;
  min-height: 36px;
  border: 1px solid var(--hdl-linea);
  border-radius: 9px;
  background: transparent;
  color: var(--hdl-gris);
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
}

.hdl-doc-aplica-no:hover,
.hdl-doc-aplica-volver:hover {
  border-color: var(--hdl-morado);
  color: var(--hdl-morado);
}

/* «Si aplica» no es una deuda: rótulo gris y sin barra de color. Con el
   mismo aspecto que «Falta», quien no estaba casado se quedaba buscando
   un registro de matrimonio que no existe. */
.hdl-doc-siaplica { border-left-color: var(--hdl-linea); }
.hdl-doc-siaplica .hdl-doc-estado { color: var(--hdl-gris); font-weight: 700; }

/* Y una ya descartada se apaga del todo. */
.hdl-doc-noaplica { border-left-color: var(--hdl-linea); opacity: .72; }
.hdl-doc-noaplica .hdl-doc-nombre { color: var(--hdl-gris); }
.hdl-doc-noaplica .hdl-doc-estado { color: var(--hdl-gris); }

/* Lo que el cliente descartó, plegado al final de su sección.
   Una tarjeta apagada por cada papel que no aplica es ruido; esconderlo
   del todo le quita la vuelta atrás. Plegado cumple las dos cosas. */
.hdl-doc-descartados {
  margin-top: .9rem;
}

.hdl-doc-descartados > summary {
  padding: .5rem 0;
  min-height: 36px;
  color: var(--hdl-gris);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
}

.hdl-doc-descartados > summary:hover {
  color: var(--hdl-morado);
}

.hdl-doc-descartados .hdl-doc-lista {
  margin-top: .4rem;
}

/* Las cinco secciones del cargue --------------------------------- */

.hdl-doc-seccion {
  margin-top: 2rem;
}

.hdl-doc-seccion-cabeza {
  margin-bottom: .9rem;
}

.hdl-doc-seccion-cabeza h2 {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
}

/* El número va en un círculo porque en la guía en PDF también, y el
   cliente está mirando las dos cosas a la vez. */
.hdl-doc-seccion-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hdl-morado);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
}

.hdl-doc-seccion-resumen {
  margin: .35rem 0 0 2.2rem;
  font-size: .88rem;
  color: var(--hdl-gris);
}

.hdl-doc-seccion-forma {
  margin: .8rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}

.hdl-doc-seccion-no,
.hdl-doc-seccion-volver {
  padding: .5rem .9rem;
  min-height: 40px;
  border: 1px solid var(--hdl-linea);
  border-radius: 10px;
  background: #fff;
  color: var(--hdl-morado);
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}

.hdl-doc-seccion-no:hover,
.hdl-doc-seccion-volver:hover {
  border-color: var(--hdl-morado);
}

.hdl-doc-seccion-ojo {
  font-size: .82rem;
  color: var(--hdl-gris);
}

/* Una sección saltada se apaga, pero no se esconde: si desapareciera,
   el cliente no entendería por qué su lista no se parece a la guía. */
.hdl-doc-seccion-fuera .hdl-doc-seccion-num {
  background: var(--hdl-linea);
  color: var(--hdl-gris);
}

.hdl-doc-seccion-fuera .hdl-doc-seccion-cabeza h2 {
  color: var(--hdl-gris);
}

.hdl-doc-seccion-fuera-dice {
  margin: .5rem 0 0 2.2rem;
  font-size: .88rem;
  color: var(--hdl-gris);
}

.hdl-doc-seccion-fuera .hdl-doc-seccion-forma {
  margin-left: 2.2rem;
}

@media (max-width: 480px) {
  .hdl-doc-seccion-resumen,
  .hdl-doc-seccion-fuera-dice,
  .hdl-doc-seccion-fuera .hdl-doc-seccion-forma {
    margin-left: 0;
  }
}

.hdl-doc-pie {
  margin-top: 1.5rem;
  font-size: .85rem;
  color: var(--hdl-gris);
}

.hdl-doc-caido {
  padding: 1.2rem;
  border: 1px solid #F3C7C7;
  border-radius: 14px;
  background: #FDECEC;
}

.hdl-doc-caido-texto {
  margin: 0 0 .5rem;
  font-weight: 800;
  color: #7A1B1B;
}

.hdl-doc-caido p { font-size: .9rem; line-height: 1.55; }

.hdl-doc-caido-detalle code {
  display: block;
  margin-top: .5rem;
  padding: .6rem;
  border-radius: 8px;
  background: #fff;
  font-size: .78rem;
  word-break: break-word;
}

@media (max-width: 640px) {
  .hdl-doc-cabeza { flex-direction: column; gap: .2rem; }
  .hdl-doc-elegir { display: block; text-align: center; }
}

/* El que falta no lleva color: no es un problema, es lo normal al
   empezar. Marcarlo en rojo haría sentir en falta a quien acaba de
   entrar. */
.hdl-doc-falta { border-left-color: var(--hdl-linea); }

/* Visible sin JavaScript, escondido por el guion cuando lo hay. */
.hdl-doc-enviar {
  min-height: 44px;
  margin-left: .5rem;
  padding: .7rem 1.4rem;
  border: 1px solid var(--hdl-morado);
  border-radius: 99px;
  background: #fff;
  color: var(--hdl-morado);
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
}

.hdl-doc-elegir-yendo {
  background: var(--hdl-gris);
  cursor: progress;
}

.hdl-doc-elegir[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}

/* =========================================================================
 * Los documentos en la ficha del asesor
 * ====================================================================== */

.hdl-mesa-docs {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hdl-linea);
}

.hdl-mesa-docs h2 {
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.hdl-mesa-docs-hay {
  margin: 0 0 1rem;
  padding: .7rem .9rem;
  border-radius: 10px;
  background: #FFF8DC;
  font-size: .9rem;
  font-weight: 700;
}

.hdl-mesa-docs-caido {
  padding: .9rem;
  border-radius: 10px;
  background: #FDECEC;
  font-size: .9rem;
  color: #7A1B1B;
}

.hdl-mesa-docs-caido code { font-size: .78rem; word-break: break-word; }

.hdl-mesa-docs-lista {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .75rem;
}

.hdl-mesa-doc {
  padding: .9rem 1rem;
  border: 1px solid var(--hdl-linea);
  border-left: 4px solid var(--hdl-linea);
  border-radius: 12px;
  background: #fff;
}

/* Lo que está esperando al asesor se ve distinto: es su trabajo de hoy. */
.hdl-mesa-doc-revisando { border-left-color: var(--hdl-amarillo); background: #FFFDF5; }
.hdl-mesa-doc-listo     { border-left-color: var(--hdl-verde); }
.hdl-mesa-doc-devuelto  { border-left-color: #C62828; }

.hdl-mesa-doc-cabeza {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .4rem;
}

.hdl-mesa-doc-nombre { font-weight: 800; font-size: .95rem; }

.hdl-mesa-doc-estado {
  flex: 0 0 auto;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hdl-gris);
}

.hdl-mesa-doc-listo .hdl-mesa-doc-estado    { color: var(--hdl-verde); }
.hdl-mesa-doc-devuelto .hdl-mesa-doc-estado { color: #C62828; }

.hdl-mesa-doc-archivos {
  margin: 0 0 .65rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .25rem;
  font-size: .88rem;
}

.hdl-mesa-doc-archivos a { color: var(--hdl-morado); font-weight: 700; word-break: break-word; }
.hdl-mesa-doc-peso { margin-left: .4rem; color: var(--hdl-gris); font-size: .78rem; }

.hdl-mesa-doc-dicho {
  margin: 0 0 .65rem;
  padding: .55rem .75rem;
  border-radius: 8px;
  background: #FDECEC;
  font-size: .85rem;
  color: #7A1B1B;
}

.hdl-mesa-doc-forma { display: grid; gap: .5rem; margin: 0; }

.hdl-mesa-doc-porque {
  width: 100%;
  min-height: 42px;
  padding: .55rem .75rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 10px;
  font-size: .88rem;
  font-family: inherit;
}

.hdl-mesa-doc-porque-falta { border-color: #C62828; background: #FDECEC; }

.hdl-mesa-doc-reclamo { font-size: .82rem; font-weight: 700; color: #C62828; }

.hdl-mesa-doc-botones { display: flex; gap: .5rem; flex-wrap: wrap; }

.hdl-mesa-doc-ok,
.hdl-mesa-doc-no {
  min-height: 44px;
  flex: 1 1 auto;
}

.hdl-mesa-doc-no {
  background: #fff;
  border: 1px solid #C62828;
  color: #C62828;
}

.hdl-mesa-doc-no:hover { background: #FDECEC; }

/* Las secciones que el cliente saltó, en la mesa del asesor.
   Se ven siempre, no plegadas: que el cliente diga «no hay inmuebles»
   es información del caso, no ruido. */
.hdl-mesa-saltadas {
  margin: 1rem 0 .4rem;
  display: grid;
  gap: .5rem;
}

.hdl-mesa-saltada {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .6rem .8rem;
  border: 1px dashed var(--hdl-linea);
  border-radius: 10px;
  background: var(--hdl-fondo);
}

.hdl-mesa-saltada-dice {
  font-size: .86rem;
  color: var(--hdl-gris);
}

.hdl-mesa-saltada-abrir {
  padding: .35rem .7rem;
  min-height: 34px;
  border: 1px solid var(--hdl-linea);
  border-radius: 8px;
  background: #fff;
  color: var(--hdl-morado);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.hdl-mesa-saltada-abrir:hover {
  border-color: var(--hdl-morado);
}

/* El panel donde el asesor decide los opcionales del caso. */
.hdl-mesa-pide {
  margin: 1rem 0 .4rem;
  padding: .8rem 1rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 12px;
  background: var(--hdl-fondo);
}

.hdl-mesa-pide > summary {
  min-height: 34px;
  color: var(--hdl-morado);
  font-weight: 800;
  cursor: pointer;
}

.hdl-mesa-pide-seccion {
  margin: 1.4rem 0 .5rem;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--hdl-morado, #311D52);
}

.hdl-mesa-pide-nota {
  margin: .5rem 0 .9rem;
  font-size: .84rem;
  color: var(--hdl-gris);
}

.hdl-mesa-pide-uno {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem 0;
  border-top: 1px solid var(--hdl-linea);
}

.hdl-mesa-pide-nombre {
  font-size: .88rem;
}

.hdl-mesa-pide-quien {
  display: block;
  font-size: .78rem;
  color: var(--hdl-gris);
  font-style: normal;
}

.hdl-mesa-pide-botones {
  display: flex;
  gap: .35rem;
}

.hdl-mesa-pide-boton {
  padding: .3rem .6rem;
  min-height: 34px;
  border: 1px solid var(--hdl-linea);
  border-radius: 8px;
  background: #fff;
  color: var(--hdl-morado);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.hdl-mesa-pide-boton:hover {
  border-color: var(--hdl-morado);
}

/* El que está puesto va marcado y deshabilitado: así el asesor ve en
   cuál está sin que la fila se mueva de sitio. */
.hdl-mesa-pide-puesto {
  background: var(--hdl-morado);
  border-color: var(--hdl-morado);
  color: #fff;
  cursor: default;
}

.hdl-mesa-docs-faltan {
  margin-top: .9rem;
  padding: .75rem 1rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 12px;
  background: var(--hdl-fondo);
}

.hdl-mesa-docs-faltan > summary {
  font-size: .88rem;
  font-weight: 700;
  color: var(--hdl-gris);
  cursor: pointer;
  min-height: 32px;
}

.hdl-mesa-docs-nombres {
  margin: .6rem 0 0;
  padding-left: 1.2rem;
  font-size: .86rem;
  color: var(--hdl-gris);
  display: grid;
  gap: .2rem;
}

/* =========================================================================
 * La cuenta, como la ve el cliente
 *
 * Una sola pregunta manda esta pantalla: ¿cuánto debo? El saldo va
 * grande y primero; el detalle, después.
 * ====================================================================== */

.hdl-plata-resumen {
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.hdl-plata-rotulo {
  margin: 0;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hdl-gris);
}

.hdl-plata-cifra {
  margin: .3rem 0 0;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--hdl-morado);
}

.hdl-plata-cifra-aldia { color: var(--hdl-verde); }

.hdl-plata-afavor {
  margin: .5rem 0 0;
  font-size: .88rem;
  color: var(--hdl-gris);
}

.hdl-plata-dos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hdl-linea);
  text-align: left;
}

.hdl-plata-dos dt {
  font-size: .78rem;
  font-weight: 700;
  color: var(--hdl-gris);
}

.hdl-plata-dos dd {
  margin: .15rem 0 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.hdl-plata-barra {
  height: 8px;
  border-radius: 99px;
  background: var(--hdl-linea);
  overflow: hidden;
}

.hdl-plata-barra span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--hdl-morado);
}

.hdl-plata-detalle h2,
.hdl-soporte-grupo h2 {
  margin: 0 0 .75rem;
  font-size: 1rem;
  font-weight: 800;
}

.hdl-plata-pagos {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .6rem;
}

.hdl-plata-pagos li {
  display: grid;
  gap: .1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 12px;
  background: #fff;
}

.hdl-plata-pago-monto { font-weight: 800; font-size: 1.05rem; }
.hdl-plata-pago-cuando { font-size: .85rem; color: var(--hdl-gris); }
.hdl-plata-pago-nota { font-size: .85rem; }

.hdl-plata-sincifra,
.hdl-plata-sinpagos {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 14px;
  background: var(--hdl-fondo);
  font-size: .92rem;
  line-height: 1.55;
  color: var(--hdl-gris);
}

.hdl-plata-pie {
  margin-top: 1.5rem;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--hdl-gris);
}

/* ---- Soportes ---- */

.hdl-soporte-grupo { margin: 1.5rem 0; }

.hdl-soporte-lista {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .5rem;
}

.hdl-soporte-lista li {
  padding: .8rem 1rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 12px;
  background: #fff;
}

.hdl-soporte-lista a {
  color: var(--hdl-morado);
  font-weight: 700;
  word-break: break-word;
}

.hdl-soporte-peso { margin-left: .4rem; font-size: .8rem; color: var(--hdl-gris); }

/* =========================================================================
 * La cuenta en la ficha del asesor
 * ====================================================================== */

.hdl-mesa-plata,
.hdl-mesa-cot,
.hdl-mesa-soportes {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hdl-linea);
}

.hdl-mesa-plata h2,
.hdl-mesa-cot h2,
.hdl-mesa-soportes h2 {
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.hdl-mesa-plata h3 {
  margin: 1.25rem 0 .6rem;
  font-size: .9rem;
  font-weight: 800;
}

.hdl-mesa-plata-mal {
  padding: .7rem .9rem;
  border-radius: 10px;
  background: #FDECEC;
  font-size: .88rem;
  font-weight: 700;
  color: #7A1B1B;
}

.hdl-mesa-plata-sin {
  padding: .8rem 1rem;
  border-radius: 10px;
  background: var(--hdl-fondo);
  font-size: .88rem;
  line-height: 1.5;
  color: var(--hdl-gris);
}

.hdl-mesa-plata-tres {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.hdl-mesa-plata-tres li {
  padding: .75rem .9rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 12px;
  background: #fff;
}

.hdl-mesa-plata-rotulo {
  display: block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hdl-gris);
}

.hdl-mesa-plata-tres strong { font-size: 1rem; }
.hdl-mesa-plata-debe { color: #C62828; }
.hdl-mesa-plata-ok { color: var(--hdl-verde); }

.hdl-mesa-pagos {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .4rem;
}

.hdl-mesa-pagos li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .6rem .85rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 10px;
  background: #fff;
  font-size: .88rem;
}

.hdl-mesa-pago-texto em { color: var(--hdl-gris); font-style: normal; }
.hdl-mesa-pago-quitar { margin: 0; flex: 0 0 auto; }

.hdl-mesa-quitar {
  min-height: 32px;
  padding: .3rem .7rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 99px;
  background: #fff;
  font-size: .78rem;
  font-weight: 700;
  color: var(--hdl-gris);
  cursor: pointer;
}

.hdl-mesa-quitar:hover { border-color: #C62828; color: #C62828; }

.hdl-mesa-plata-forma { margin: 0; }

.hdl-mesa-plata-campos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.hdl-mesa-soportes-lista {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .4rem;
  font-size: .88rem;
}

.hdl-mesa-soportes-lista li {
  padding: .6rem .85rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 10px;
  background: #fff;
}

.hdl-mesa-soporte-tipo {
  display: inline-block;
  margin-right: .5rem;
  padding: .1rem .5rem;
  border-radius: 99px;
  background: var(--hdl-fondo);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--hdl-gris);
}

.hdl-mesa-soportes-lista a { color: var(--hdl-morado); font-weight: 700; word-break: break-word; }

.hdl-mesa-soporte-forma input[type="file"] { font-size: .88rem; }

@media (max-width: 640px) {
  .hdl-plata-dos,
  .hdl-mesa-plata-tres,
  .hdl-mesa-plata-campos { grid-template-columns: 1fr; }

  .hdl-plata-cifra { font-size: 2rem; }

  .hdl-mesa-pagos li { flex-direction: column; align-items: flex-start; }
}

/* ---- La factura de cada pago ---- */

.hdl-plata-pagos li { position: relative; padding-right: 7.5rem; }

/* A la derecha de su pago: ahí es donde se busca «la factura de lo que
   pagué en octubre». */
.hdl-plata-factura,
.hdl-plata-sinfactura {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  font-size: .82rem;
  font-weight: 700;
}

.hdl-plata-factura {
  padding: .5rem .85rem;
  border: 1px solid var(--hdl-morado);
  border-radius: 99px;
  color: var(--hdl-morado);
  white-space: nowrap;
}

.hdl-plata-factura:hover { background: var(--hdl-morado); color: #fff; }

.hdl-plata-sinfactura { color: var(--hdl-gris); font-weight: 400; }

@media (max-width: 560px) {
  .hdl-plata-pagos li { padding-right: 1rem; }

  .hdl-plata-factura,
  .hdl-plata-sinfactura {
    position: static;
    transform: none;
    margin-top: .6rem;
    align-self: flex-start;
  }

  .hdl-plata-factura { display: inline-block; }
}

/* ---- Y en la ficha del asesor ---- */

.hdl-mesa-pago-acciones {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.hdl-mesa-factura-ver {
  font-size: .78rem;
  font-weight: 700;
  color: var(--hdl-morado);
  white-space: nowrap;
}

.hdl-mesa-factura-forma { display: flex; margin: 0; }

/* El campo de archivo nativo es feo y distinto en cada navegador; esta
   es su etiqueta. El botón de enviar nace visible y lo esconde el
   guion, para que sin JavaScript se pueda subir igual. */
.hdl-mesa-factura-elegir {
  min-height: 32px;
  padding: .3rem .7rem;
  border: 1px solid var(--hdl-morado);
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--hdl-morado);
  cursor: pointer;
  white-space: nowrap;
}

.hdl-mesa-factura-elegir:hover { background: var(--hdl-morado); color: #fff; }

.hdl-mesa-factura-forma input:focus-visible + .hdl-mesa-factura-elegir,
.hdl-mesa-factura-elegir:focus-visible {
  outline: 3px solid var(--hdl-morado-claro);
  outline-offset: 2px;
}

.hdl-mesa-factura-enviar {
  min-height: 32px;
  margin-left: .3rem;
  padding: .3rem .7rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 99px;
  background: #fff;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}

/* La autorización de datos, al crear la contraseña. */

.hdl-portal-habeas {
  margin: 0 0 1.25rem;
}

.hdl-portal-habeas label {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  /* Normal, no en negrita: las etiquetas del formulario sí lo son, pero
     esto es un texto que hay que leer, no el rótulo de un campo. */
  font-weight: 400;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--hdl-gris);
  cursor: pointer;
}

/* Grande de verdad: una casilla de 13px en un celular se falla tres
   veces antes de acertar. */
.hdl-portal-habeas input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: .1rem;
  accent-color: var(--hdl-morado);
}

.hdl-portal-habeas a {
  color: var(--hdl-morado);
  font-weight: 700;
  text-decoration: underline;
}

/* «Guardar sin avisar»: corregir un error propio no debería
   notificarle nada a nadie. */
.hdl-mesa-callado {
  margin: 0 0 1rem;
  font-size: .86rem;
}

.hdl-mesa-callado label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  cursor: pointer;
}

.hdl-mesa-callado input { width: 18px; height: 18px; accent-color: var(--hdl-morado); }

.hdl-mesa-callado-nota {
  display: block;
  margin-top: .2rem;
  padding-left: 1.6rem;
  font-size: .8rem;
  color: var(--hdl-gris);
}

/* =========================================================================
 * La guía, en un visor sobre el portal
 * ====================================================================== */

.hdl-guia-llamada {
  margin: 1.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hdl-linea);
}

.hdl-guia-abrir {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .7rem .9rem;
  border: 1px solid var(--hdl-linea);
  border-radius: 12px;
  background: var(--hdl-fondo);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hdl-morado);
}

.hdl-guia-abrir:hover {
  border-color: var(--hdl-morado);
  background: #fff;
}

.hdl-guia-icono { flex: 0 0 auto; display: flex; }


/* =========================================================================
 * La calculadora del asesor
 *
 * Dos tablas con la misma pinta y un significado muy distinto: la de
 * arriba es lo que ve el cliente, la de abajo es interna. Se separan a
 * propósito con un borde y un rótulo, porque están una debajo de la otra
 * y el asesor puede tener la pantalla compartida.
 * ====================================================================== */

.hdl-cot-campos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.hdl-cot-forma label {
  display: block;
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: .3rem;
}

.hdl-cot-forma input[type="text"],
.hdl-cot-forma input[type="number"] {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid #cfc9dd;
  border-radius: .5rem;
  font-size: 1rem;
}

.hdl-cot-casilla {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: .9rem 0 .2rem;
}

.hdl-cot-casilla label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 500;
  margin: 0;
}

.hdl-cot-cuenta {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2rem;
  font-size: .94rem;
}

.hdl-cot-cuenta th,
.hdl-cot-cuenta td {
  text-align: left;
  padding: .5rem .6rem;
  border-bottom: 1px solid #ece9f3;
}

.hdl-cot-cifra {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hdl-cot-total th,
.hdl-cot-total td {
  background: #f1eef8;
  font-weight: 700;
}

.hdl-cot-interno {
  border: 1px solid #e2d9b8;
  background: #fdfbf0;
  border-radius: .5rem;
}

.hdl-cot-interno caption {
  caption-side: top;
  text-align: left;
  padding: .55rem .6rem 0;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a6d1f;
}

.hdl-cot-interno .hdl-cot-total th,
.hdl-cot-interno .hdl-cot-total td { background: #f6efd8; }

.hdl-mesa-atajos { margin: 0 0 1rem; }

.hdl-mesa-atajos a {
  display: inline-block;
  padding: .45rem .9rem;
  border: 1px solid #cfc9dd;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
}

/* El celular del cliente, en «Hablar con el cliente». */

.hdl-mesa-contacto-cel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: .6rem 0 1rem;
}

.hdl-mesa-contacto-cel label {
  font-size: .85rem;
  font-weight: 700;
}

.hdl-mesa-contacto-cel input {
  padding: .5rem .6rem;
  border: 1px solid #cfc9dd;
  border-radius: .5rem;
  font-size: .95rem;
  max-width: 12rem;
}
