/* Lexdicta v5.0 — «Institucional cálido».
   Se carga después de estilos.css e inicio.css y solo cambia lo visual: fondo piedra, tarjetas blancas
   redondeadas, azul marino del sello para lo importante, dorado solo en detalles y el amarillo del
   marcatextos para lo que salió publicado. Títulos en Libre Caslon, textos en Plus Jakarta Sans. */

@font-face { font-family: "Libre Caslon"; src: url("/fuentes/caslon-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon"; src: url("/fuentes/caslon-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon"; src: url("/fuentes/caslon-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plus Jakarta"; src: url("/fuentes/jakarta.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --serif: "Libre Caslon", "Lora", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta", "Lato", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --negro: #0f1b3d;
  --azul: #0f1b3d;
  --azul-2: #1e2d57;
  --oro: #c9a45c;
  --oro-texto: #7a5c22;
  --oro-claro: #fbf6ea;
  --oro-borde: #ecdcb5;
  --mt-amarillo: #ffe58a;
  --r: 14px;
  --r-tarjeta: 22px;
  --sombra-suave: 0 1px 2px rgba(15, 27, 61, .04), 0 8px 24px -12px rgba(15, 27, 61, .12);
  --fondo: #f1efe9;
  --papel: #ffffff;
  --papel-2: #f4f2ec;
  --papel-boletin: #fbfaf6;
  --texto: #16181d;
  --suave: #464c5c;
  --tenue: #5f6574;
  --borde: #e3e0d7;
  --borde-fuerte: #0f1b3d;
  --boton: #0f1b3d;
  --boton-texto: #ffffff;
  --boton-hover: #1e2d57;
  --verde: #1f7a4a;
  --rojo: #a3361f;
  --ambar: #8a5a00;
  --rojo-claro: #fdeee8;
  --verde-claro: #e6f3ea;
  --ambar-claro: #fbf1dc;
  --info-fondo: #eef2fa;
  --sombra-alta: 0 30px 70px -24px rgba(15, 27, 61, .35);
}
:root[data-tema="oscuro"] {
  --fondo: #0b1226;
  --papel: #121a33;
  --papel-2: #19223f;
  --papel-boletin: #141d38;
  --texto: #eef1f8;
  --suave: #bcc4d8;
  --tenue: #98a2bb;
  --borde: rgba(255, 255, 255, .11);
  --borde-fuerte: #eef1f8;
  --boton: #e5c98f;
  --boton-texto: #0f1b3d;
  --boton-hover: #f0d8a6;
  --oro-texto: #e5c98f;
  --oro-claro: rgba(201, 164, 92, .12);
  --oro-borde: rgba(201, 164, 92, .35);
  --verde: #8be3a8;
  --rojo: #ff9f88;
  --rojo-claro: rgba(255, 159, 136, .13);
  --info-fondo: #19223f;
  --sombra-suave: none;
}

body { font-family: var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--mt-amarillo); color: #16181d; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }

/* ---------- botones y campos: esquinas suaves ---------- */
.btn { border-radius: 12px; border-width: 1px; padding: 11px 18px; }
.btn:hover { border-color: var(--borde-fuerte); }
.btn-primario { box-shadow: 0 6px 16px -10px rgba(15, 27, 61, .6); }
.btn-chico { border-radius: 10px; }
.btn-texto { border-radius: 8px; }
.tema-btn { border-width: 1px; background: var(--papel); width: 42px; height: 42px; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea { border-radius: 12px; border-width: 1px; background: var(--papel); }
.campo-clave input { border-radius: 12px; }
.segmento, .segmento span { border-radius: 12px; }
.selector-btn, .selector-panel { border-radius: 12px; }
.mensaje { border-radius: 12px; }
.n-chip { font-size: .78rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--papel-2); color: var(--suave); }
.etiqueta { border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.etiqueta.urgente { background: var(--rojo-claro); color: var(--rojo); }
.etiqueta.ok { background: var(--verde-claro); color: var(--verde); }
.etiqueta.duda { background: var(--ambar-claro); color: var(--ambar); }

/* ---------- barra superior ---------- */
.barra { background: color-mix(in srgb, var(--papel) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--borde); }
.barra-in { height: 72px; gap: 22px; max-width: 1320px; }
.nav { gap: 4px; align-items: center; }
.nav a { padding: 9px 14px; border-radius: 999px; color: var(--suave); font-weight: 600; font-size: .92rem; transition: background .2s, color .2s; }
.nav a:hover { background: var(--papel-2); color: var(--texto); }
.nav a.activa { background: var(--azul); color: #fff; }
:root[data-tema="oscuro"] .nav a.activa { background: #e5c98f; color: #0f1b3d; }
.nav a.activa::after { display: none; }
.nav a svg { flex: none; }
.nav .contador { border-radius: 999px; }
.nav a.activa .contador { background: rgba(255, 255, 255, .2); color: inherit; }
.nav-despacho { border: 1px solid var(--oro-borde); background: var(--oro-claro); color: var(--oro-texto) !important; }
.nav-despacho .pronto { font-size: .68rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--oro); color: #0f1b3d; }
.inicial { border-radius: 50%; background: #e3e8f4; color: #0f1b3d; }
.menu-usuario, .menu3-lista { border-radius: 16px; border: 1px solid var(--borde); box-shadow: var(--sombra-alta); overflow: hidden; }
.contenido { max-width: 1320px; }
.pie-app { max-width: 1320px; border-top: 0; }

/* ---------- tarjetas ---------- */
.panel { border-radius: var(--r-tarjeta); box-shadow: var(--sombra-suave); overflow: hidden; }
.panel + .panel { margin-top: 18px; }
.tabla-caja { border-radius: 18px; }
.vacio .ico { border-radius: 50%; }
.velo { background: rgba(11, 18, 38, .38); }
.ventana { border: 1px solid var(--borde); border-radius: 24px; }
.aviso-terminos { border-radius: 18px; border-width: 1px; }
.aviso-flot { border-radius: 14px; }
.pasos { border-radius: var(--r-tarjeta); }

/* ---------- Boletín de hoy ---------- */
.hoy5 { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-bottom: 22px; }
.hoy5-txt { display: grid; gap: 8px; min-width: 0; }
.hoy5-sobre { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--oro-texto); }
.punto-vivo, .punto-oro { width: 8px; height: 8px; border-radius: 50%; background: #2f9e5e; box-shadow: 0 0 0 0 rgba(47, 158, 94, .5); animation: late 2.4s infinite; }
.punto-oro { background: var(--oro); animation: none; }
@keyframes late { 0% { box-shadow: 0 0 0 0 rgba(47, 158, 94, .45); } 70% { box-shadow: 0 0 0 8px rgba(47, 158, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 94, 0); } }
.hoy5 h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.08; color: var(--azul); }
:root[data-tema="oscuro"] .hoy5 h1 { color: var(--texto); }
.hoy5-sub { margin: 0; color: var(--suave); font-size: 1rem; }
.hoy5-sub b { color: var(--texto); }
.hoy5-acc { display: flex; flex-wrap: wrap; gap: 10px; }

.banda5 { width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; margin: -6px 0 18px; border-radius: 16px; background: var(--info-fondo); border: 1px solid var(--borde); color: var(--texto); font: inherit; text-align: left; }
.banda5-pend { cursor: pointer; justify-content: flex-start; background: var(--oro-claro); border-color: var(--oro-borde); color: var(--texto); transition: transform .2s; }
.banda5-pend:hover { transform: translateY(-1px); }
.banda5-pend svg { color: var(--oro-texto); }
.banda5-ver { margin-left: auto; font-weight: 800; color: var(--oro-texto); }

.resumen5 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.r5 { display: grid; align-content: start; gap: 6px; padding: 18px 20px; border-radius: 20px; background: var(--papel); border: 1px solid var(--borde); box-shadow: var(--sombra-suave); text-decoration: none; color: var(--texto); font: inherit; text-align: left; cursor: default; transition: transform .25s var(--suave-salida), box-shadow .25s; animation: sube .5s var(--suave-salida) both; }
.r5:nth-child(2) { animation-delay: .06s; } .r5:nth-child(3) { animation-delay: .12s; } .r5:nth-child(4) { animation-delay: .18s; }
a.r5, button.r5 { cursor: pointer; }
a.r5:hover, button.r5:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(15, 27, 61, .35); }
.r5-t { font-size: .84rem; font-weight: 700; color: var(--suave); }
.r5 b { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; line-height: 1; color: var(--azul); font-variant-numeric: lining-nums tabular-nums; }
:root[data-tema="oscuro"] .r5 b { color: var(--texto); }
.r5 b small { font-family: var(--sans); font-size: 1rem; color: var(--tenue); }
.r5 b.r5-rojo { color: var(--rojo); }
.r5-s { font-size: .82rem; color: var(--suave); }
.r5-tinta { background: var(--azul); border-color: var(--azul); color: #fff; }
.r5-tinta .r5-t { color: #c9d2e8; }
.r5-tinta b { color: #fff !important; }
.r5-tinta .r5-s { color: #e5c98f; }
:root[data-tema="oscuro"] .r5-tinta { background: #1b2a55; border-color: #1b2a55; }
.r5 .avance { height: 6px; border-radius: 999px; background: var(--papel-2); overflow: hidden; margin-top: 6px; }
.r5 .avance > div { height: 100%; border-radius: 999px; background: #2f9e5e; transition: width .9s var(--suave-salida); }
@keyframes sube { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.fila5 { border-bottom: 0; align-items: center; padding: 0 0 4px; }
.pestanas-vista { gap: 6px; border-bottom: 0; padding: 4px; border-radius: 16px; background: var(--papel-2); }
.fila-filtros .pestanas-vista { border-bottom: 0; }
.pestanas-vista button { padding: 9px 14px; border-radius: 12px; color: var(--suave); transition: background .2s, color .2s; }
.pestanas-vista button:hover { background: var(--papel); }
.pestanas-vista button.activa { background: var(--papel); color: var(--texto); box-shadow: 0 1px 3px rgba(15, 27, 61, .12); }
.pestanas-vista button.activa::after { display: none; }
.pestanas-vista .n { border-radius: 999px; }
.pestanas-vista button.activa .n { background: var(--azul); color: #fff; }
.buscador { border-width: 1px; border-radius: 14px; background: var(--papel); min-width: 280px; }
.bandeja-herr .menu3-btn { border-radius: 14px; background: var(--papel); }
.mios-btn { border-radius: 12px; }

.bandeja { border-radius: 24px; overflow: hidden; box-shadow: var(--sombra-suave); height: calc(100vh - 120px); min-height: 560px; }
.lista-coin { background: var(--papel); }
.lista-fecha { background: color-mix(in srgb, var(--papel) 92%, transparent); backdrop-filter: blur(6px); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 800; color: var(--oro-texto); padding: 14px 20px 8px; border-bottom: 0; }
.fila { margin: 0 10px 6px; border: 1px solid transparent; border-radius: 16px; padding: 13px 14px; transition: background .2s, border-color .2s; }
.fila:hover { background: var(--papel-2); }
.fila.sel { background: #f0f4fb; border-color: #cdd7ee; }
:root[data-tema="oscuro"] .fila.sel { background: #1b2a55; border-color: #2b3c6e; }
.fila.sel::before { display: none; }
.por-juz .fila-juz { display: none; }
.fila-exp { font-family: var(--serif); font-weight: 400; color: var(--azul); }
:root[data-tema="oscuro"] .fila-exp { color: var(--texto); }
.lista-coin.animar .fila { animation: sube .45s var(--suave-salida) both; animation-delay: calc(var(--i, 0) * 35ms); }
.detalle { background: var(--papel); border-left: 1px solid var(--borde); }
.det-cab h2 { font-weight: 400; color: var(--azul); }
:root[data-tema="oscuro"] .det-cab h2 { color: var(--texto); }
.det-acuerdo { border-radius: 16px; background: var(--papel-boletin); }
.det-acuerdo mark, .recorte mark { background: var(--mt-amarillo); color: #16181d; border-radius: 3px; }
.det-acciones .btn-grande { border-radius: 14px; }

/* boletines anteriores */
.bol5-lista { display: grid; gap: 10px; margin: 16px 0 10px; }
.bol5 { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--borde); background: var(--papel); color: var(--texto); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.bol5:hover { border-color: var(--borde-fuerte); transform: translateX(2px); }
.bol5.activo { border-color: var(--azul); box-shadow: 0 0 0 1px var(--azul) inset; }
.bol5-dia { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--papel-2); display: grid; place-items: center; align-content: center; color: var(--azul); }
:root[data-tema="oscuro"] .bol5-dia { color: var(--texto); }
.bol5-dia small { font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.bol5-dia b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.bol5-txt { flex: 1; display: grid; gap: 3px; min-width: 0; }
.bol5-txt span { font-size: .86rem; color: var(--suave); }

/* Lexdicta Despacho (próximamente) */
.despacho5 { display: grid; gap: 16px; max-width: 980px; }
.despacho5 h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); color: var(--azul); }
:root[data-tema="oscuro"] .despacho5 h1 { color: var(--texto); }
.despacho5-lema { margin: 0; font-size: 1.1rem; color: var(--suave); max-width: 640px; }
.despacho5-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
.despacho5-col { display: grid; gap: 6px; align-content: start; padding: 18px; min-height: 130px; border-radius: 20px; background: var(--papel); border: 1px solid var(--borde); }
.despacho5-col.oro { background: var(--oro-claro); border-color: var(--oro-borde); }
.despacho5-col span { font-size: .88rem; color: var(--suave); }
.despacho5-lista { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--suave); }

/* ---------- inicio de sesión ---------- */
.acceso { background: var(--fondo); padding: 16px; gap: 16px; min-height: 100vh; }
.acceso-lado { background: var(--azul); border-radius: 28px; color: #fff; }
.acceso-lado h1 { font-weight: 400; }
.tarjeta-acceso { border-radius: 26px; border: 1px solid var(--borde); background: var(--papel); box-shadow: var(--sombra-suave); }
.acceso-form { background: transparent; }
.pestanas-acceso { border-radius: 14px; background: var(--papel-2); padding: 4px; border: 0; }
.pestanas-acceso::after { display: none; }
.pestanas-acceso button { border-radius: 11px; }
.pestanas-acceso button.activa { background: var(--papel); box-shadow: 0 1px 3px rgba(15, 27, 61, .14); }
.hoja-boletin, .aviso-escena { border-radius: 16px; }

/* ---------- portada pública ---------- */
.inicio { background: #f7f6f2; }
:root[data-tema="oscuro"] .inicio { background: var(--fondo); }
.inicio h1, .inicio h2, .inicio h3 { font-weight: 400; }
.inicio h1, .inicio h2 { color: var(--azul); }
:root[data-tema="oscuro"] .inicio h1, :root[data-tema="oscuro"] .inicio h2 { color: var(--texto); }
.i-barra { border-bottom: 0; }
.i-marca img { border-radius: 50%; width: 36px; height: 36px; }
.i-btn { border-radius: 14px; }
.h h1 { font-weight: 400; }
.h-campo { border: 1px solid var(--borde); border-radius: 16px; overflow: hidden; box-shadow: var(--sombra-suave); }
.h-campo button { border-radius: 0; }
.h-chip { border-radius: 999px; }
.recorte { border-left: 0; border-radius: 14px; }
.dia, .fx, .pl, .pr, .fin, .prod5 { scroll-margin-top: 20px; }
.prod5 { padding: clamp(48px, 7vw, 90px) 0 10px; display: grid; gap: 26px; }
.prod5-cab p { margin: 10px 0 0; color: var(--suave); font-size: 1.05rem; }
.prod5-fila { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.prod5-t { display: grid; gap: 12px; align-content: start; padding: 30px; border-radius: 26px; background: var(--papel); border: 1px solid var(--borde); }
.prod5-t h3 { font-size: 1.9rem; color: var(--azul); }
.prod5-t p { margin: 0; color: var(--suave); }
.prod5-et { justify-self: start; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #2f5fb8; }
.prod5-tinta { background: var(--azul); border-color: var(--azul); }
.prod5-tinta h3 { color: #fff; }
.prod5-tinta p { color: #dfe5f2; }
.prod5-tinta .prod5-et { color: #e5c98f; }
.pl-lista > *, .plan-tarjeta { border-radius: 24px; }
.inicio details { border-radius: 18px; }
.i-pie { border-top: 0; }

/* ---------- celular ---------- */
@media (max-width: 1020px) {
  .resumen5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .despacho5-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .bandeja { border-radius: 0; height: auto; min-height: 0; box-shadow: none; }
  .fila { margin: 0 6px 6px; }
  .buscador { min-width: 0; }
  .prod5-fila { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  /* menú abajo, como una app */
  .barra { backdrop-filter: none; background: var(--papel); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; order: 0; width: auto; margin: 0; height: auto; padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); gap: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--papel); border-top: 1px solid var(--borde); overflow: visible; }
  .nav a { flex-direction: column; gap: 3px; padding: 6px 2px; border-radius: 14px; font-size: .7rem; justify-content: center; position: relative; }
  .nav a.activa { background: transparent; color: var(--azul); }
  :root[data-tema="oscuro"] .nav a.activa { background: transparent; color: #e5c98f; }
  .nav a.activa svg { background: #e3e8f4; border-radius: 999px; padding: 4px 14px; box-sizing: content-box; }
  :root[data-tema="oscuro"] .nav a.activa svg { background: rgba(229, 201, 143, .16); }
  .nav .contador { position: absolute; top: 0; right: calc(50% - 26px); font-size: .62rem; padding: 0 5px; }
  .nav-despacho { border: 0; background: transparent; }
  .nav-despacho .pronto { display: none; }
  .barra-in { height: 60px; padding: 0 16px; flex-wrap: nowrap; }
  .contenido { padding-bottom: 110px; }
  .contenido:has(.bandeja) { padding-bottom: 110px; }
  .avisos { bottom: 96px; }
  .hoy5 h1 { font-size: 1.9rem; }
  .hoy5-acc { width: 100%; }
  .hoy5-acc .btn { flex: 1 1 auto; }
  .resumen5 { gap: 10px; }
  .r5 { padding: 14px; border-radius: 18px; }
  .r5 b { font-size: 2rem; }
  .pestanas-vista { width: 100%; overflow-x: auto; }
  .despacho5-cols { grid-template-columns: minmax(0, 1fr); }
  .acceso { padding: 0; gap: 0; }
  .acceso-lado { border-radius: 0 0 28px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .r5, .lista-coin.animar .fila { animation: none; }
  .punto-vivo { animation: none; }
  .r5, .bol5, .banda5-pend { transition: none; }
}
.tarjeta-acceso { padding: 34px 34px 30px; max-width: 480px; width: 100%; }
@media (max-width: 720px) { .tarjeta-acceso { padding: 26px 20px; border-radius: 22px; } }
