/*
 * ╔══════════════════════════════════════════════════════════════╗
 * ║  NOTARÍA 67 — Sistema de diseño «app» (2026)                 ║
 * ╚══════════════════════════════════════════════════════════════╝
 *
 *  Claro (dirección A): fondo gris cálido, tarjetas blancas, azul.
 *  Oscuro (dirección B): azul profundo, superficies azuladas, verde.
 *  Tipografía: Geist (texto) y Geist Mono (radicados y valores).
 *  Sin cursivas. Iconos: Tabler (outline).
 *
 *  Estructura
 *    .app            grilla: riel lateral + contenido
 *    .app-rail       navegación lateral (≥ 1024 px)
 *    .app-top        barra superior: buscador, estado de la sede, CTA
 *    .app-tabbar     barra inferior (< 1024 px)
 *
 *  Componentes: .boton, .tile, .card, .lista/.item, .sec, .campo, .chip…
 */

/* ═══ Tokens ═══════════════════════════════════ */
:root {
  --azul: #2a475e;
  --azul-900: #13222e;
  --verde: #7abc59;
  --crema: #cebea4;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-xl: 28px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 13px;
  --rail: 248px;
  --top-h: 46px;
  --gutter: clamp(16px, 3vw, 40px);
  --contenido: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f2ee;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --line: #e3e5df;
  --text: #13222e;
  --text-2: #5b6871;
  --text-3: #8a949a;
  --primary: #2a475e;
  --primary-hover: #1f3a4f;
  --on-primary: #ffffff;
  --primary-soft: #e6edf2;
  --icono: #2a475e;
  --tile-hero: #2a475e;
  --tile-hero-text: #ffffff;
  --tile-hero-2: rgba(255, 255, 255, 0.74);
  --tile-cream: #e9e1d2;
  --accent: #2f7a3e;
  --accent-soft: #e5f1de;
  --danger: #b4321f;
  --danger-soft: #fbe9e5;
  --warn: #8a5a00;
  --warn-soft: #fff3dc;
  --rail-bg: #f1f2ee;
  --nav-bg: #13222e;
  --nav-text: #8ba0ae;
  --nav-on: #ffffff;
  --nav-on-bg: rgba(255, 255, 255, 0.12);
  --shadow: 0 1px 2px rgba(19, 34, 46, 0.04), 0 8px 24px -12px rgba(19, 34, 46, 0.12);
  --shadow-lg: 0 24px 60px -24px rgba(19, 34, 46, 0.35);
  --focus: 0 0 0 3px rgba(42, 71, 94, 0.22);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1a23;
  --surface: #152532;
  --surface-2: #1a2d3b;
  --line: #213847;
  --text: #e9eef1;
  --text-2: #9fb2bd;
  --text-3: #6d8392;
  --primary: #7abc59;
  --primary-hover: #8fcc6f;
  --on-primary: #0e1a23;
  --primary-soft: #1d3428;
  --icono: #7abc59;
  --tile-hero: #2a475e;
  --tile-hero-text: #ffffff;
  --tile-hero-2: rgba(255, 255, 255, 0.72);
  --tile-cream: #cebea4;
  --accent: #7abc59;
  --accent-soft: rgba(122, 188, 89, 0.14);
  --danger: #ff8a75;
  --danger-soft: rgba(255, 138, 117, 0.12);
  --warn: #f2c46b;
  --warn-soft: rgba(242, 196, 107, 0.12);
  --rail-bg: #0b151d;
  --nav-bg: #0b151d;
  --nav-text: #6d8392;
  --nav-on: #7abc59;
  --nav-on-bg: rgba(122, 188, 89, 0.12);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
  --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --focus: 0 0 0 3px rgba(122, 188, 89, 0.3);
}

/* Alias de variables antiguas que aún usan algunos estilos de página */
:root,
[data-theme="light"],
[data-theme="dark"] {
  --color-bg: var(--bg);
  --color-bg-alt: var(--surface-2);
  --color-surface: var(--surface);
  --color-surface-2: var(--surface-2);
  --color-border: var(--line);
  --color-border-light: var(--line);
  --color-text: var(--text);
  --color-text-muted: var(--text-2);
  --color-text-light: var(--text-3);
}

/* ═══ Base ═════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}
body.app-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:where(.app-body) em,
:where(.app-body) i:not([class]),
:where(.app-body) cite {
  font-style: normal; /* sin cursivas en la plataforma */
}
:where(.app-body) a {
  color: inherit;
  text-decoration: none;
}
:where(.app-body) button {
  font: inherit;
  color: inherit;
}
:where(.app-body) img {
  max-width: 100%;
}
:where(.app-body) :is(h1, h2, h3, h4) {
  font-family: var(--font);
  color: inherit;
}
.mono {
  font-family: var(--mono);
}
.ti {
  line-height: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.saltar {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}
.saltar:focus {
  top: 12px;
}
.app-body :focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 10px;
}

/* ═══ Armazón ══════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}
.app-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 16px;
  background: var(--rail-bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.app-rail .marca {
  padding: 4px 10px 22px;
}
.marca-logo {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--azul);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  overflow: hidden;
}
.marca-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.marca b {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.marca small {
  display: block;
  font-size: 12px;
  color: var(--text-3);
}
.rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.rail-item i {
  font-size: 21px;
  flex: none;
}
.rail-item:hover {
  background: var(--surface);
  color: var(--text);
}
.rail-item.on {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow);
}
[data-theme="dark"] .rail-item.on {
  background: var(--nav-on-bg);
  color: var(--nav-on);
  box-shadow: none;
}
.rail-sep {
  height: 1px;
  margin: 10px 12px;
  background: var(--line);
}
.rail-pie {
  margin-top: auto;
  display: grid;
  gap: 2px;
}
.rail-pie .rail-item {
  height: 40px;
  font-size: 13.5px;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.app-top .marca,
.app-top .icono-btn {
  display: none;
}
.app-contenido {
  flex: 1;
  width: 100%;
  max-width: calc(var(--contenido) + 2 * var(--gutter));
  padding: 8px var(--gutter) 56px;
}
.app-contenido.ancho {
  max-width: none;
}

/* Buscador */
.buscar {
  position: relative;
  flex: 1;
  max-width: 520px;
}
.buscar label {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--top-h);
  padding: 0 14px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-3);
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.buscar label:focus-within {
  border-color: var(--primary);
  box-shadow: var(--focus);
}
.buscar i {
  font-size: 19px;
  flex: none;
}
.buscar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
}
.buscar input::placeholder {
  color: var(--text-3);
}
.buscar kbd {
  background: none;
  box-shadow: none;
  font-weight: 500;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text-3);
}
.buscar-res {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  padding: 6px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  max-height: min(60vh, 420px);
  overflow-y: auto;
}
.buscar-res[hidden] {
  display: none;
}
.buscar-res a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  font-size: 14.5px;
}
.buscar-res a[aria-selected="true"],
.buscar-res a:hover {
  background: var(--surface-2);
}
.buscar-res a small {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
}
.buscar-res .vacio {
  padding: 14px;
  font-size: 14px;
  color: var(--text-2);
}

/* Estado de la sede */
.estado-sede {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--top-h);
  padding: 0 14px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--accent-soft);
  color: var(--accent);
}
.estado-sede.cerrado {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.estado-sede i {
  font-size: 18px;
}

/* Barra inferior */
.app-tabbar {
  display: none;
}

/* Pie */
.app-pie {
  margin-top: auto;
  padding: 28px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-2);
}
.app-pie-fila {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  max-width: var(--contenido);
}
.app-pie-fila + .app-pie-fila {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 12.5px;
}
.app-pie a:hover {
  color: var(--text);
}
.app-pie i {
  margin-right: 4px;
}

/* WhatsApp */
.wa {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  background: #1f9d55;
  box-shadow: 0 14px 30px -10px rgba(31, 157, 85, 0.6);
  transition: transform 0.25s var(--ease);
}
.wa:hover {
  transform: translateY(-2px);
}

/* ═══ Componentes ══════════════════════════════ */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--top-h);
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.boton i {
  font-size: 18px;
}
.boton-pri {
  background: var(--primary);
  color: var(--on-primary);
}
.boton-pri:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}
.boton-sec {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.boton-sec:hover {
  border-color: var(--text-3);
}
.boton-claro {
  background: #fff;
  color: var(--azul-900);
}
[data-theme="dark"] .boton-claro {
  background: var(--verde);
  color: #0e1a23;
}
.boton-sm {
  height: 38px;
  padding: 0 14px;
  font-size: 13.5px;
  border-radius: 12px;
}
.boton-bloque {
  width: 100%;
}
.boton[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.icono-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 19px;
  cursor: pointer;
  flex: none;
}

/* Encabezado de página */
.pag-hd {
  margin: 8px 0 26px;
}
.pag-hd .antes {
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: 15px;
}
.pag-hd h1 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.pag-hd p.lead {
  max-width: 62ch;
  margin: 12px 0 0;
  font-size: 16.5px;
  color: var(--text-2);
}
.migas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13.5px;
  color: var(--text-3);
}
.migas a:hover {
  color: var(--text);
}

/* Secciones */
.sec {
  margin-top: 40px;
}
.sec-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.sec-hd h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.sec-hd a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
}
.sec-hd a:hover {
  color: var(--text);
}

/* Tarjetas y mosaico */
.card,
.tile {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card {
  padding: clamp(18px, 2.4vw, 24px);
}
.card h2,
.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 14.5px;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 22px;
  min-height: 178px;
  overflow: hidden;
  transition: transform 0.25s var(--ease);
}
a.tile:hover {
  transform: translateY(-2px);
}
.tile h3 {
  margin: auto 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.tile p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}
.tile .flecha {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 20px;
  color: var(--text-3);
  transition: transform 0.25s, color 0.25s;
}
a.tile:hover .flecha {
  transform: translate(2px, -2px);
  color: var(--text);
}
.ico {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--primary-soft);
  color: var(--icono);
}
.ico-sm {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
}
.tile-hero {
  background: var(--tile-hero);
  color: var(--tile-hero-text);
}
.tile-hero p {
  color: var(--tile-hero-2);
}
.tile-cream {
  background: var(--tile-cream);
  color: #13222e;
}
.tile-cream p {
  color: #4d4a42;
}
.tile-cream .ico {
  background: rgba(19, 34, 46, 0.08);
  color: #13222e;
}
.tile-cream .flecha {
  color: #6b6458;
}

/* Listas de enlaces */
.lista {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: background-color 0.2s;
}
.item:hover {
  background: var(--surface-2);
}
.item b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.item small {
  display: block;
  font-size: 13px;
  color: var(--text-2);
}
.item > .ti-chevron-right {
  margin-left: auto;
  color: var(--text-3);
  font-size: 18px;
}

/* Etiquetas */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
}
.chip-ok {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.chip-aviso {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: transparent;
}
.chip-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}

/* Formularios */
.campo {
  display: grid;
  gap: 6px;
}
.campo > label,
.campo > .etq {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.campo small {
  font-size: 12.5px;
  color: var(--text-2);
}
.entrada,
.app-body select.entrada,
.app-body textarea.entrada {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.app-body textarea.entrada {
  padding: 12px 14px;
  min-height: 120px;
  resize: vertical;
}
.entrada:focus {
  border-color: var(--primary);
  box-shadow: var(--focus);
}
.entrada.mono {
  font-family: var(--mono);
}
.aviso {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14.5px;
  background: var(--surface-2);
  color: var(--text-2);
}
.aviso i {
  font-size: 20px;
  flex: none;
}
.aviso-ok {
  background: var(--accent-soft);
  color: var(--accent);
}
.aviso-error {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Prosa (textos legales, artículos) */
.prosa {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.prosa h2 {
  margin: 2em 0 0.5em;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.prosa h3 {
  margin: 1.6em 0 0.4em;
  font-size: 18px;
  font-weight: 600;
}
.prosa p,
.prosa ul,
.prosa ol {
  margin: 0 0 1em;
  color: var(--text-2);
}
.prosa a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Aparición suave al cargar */
@media (prefers-reduced-motion: no-preference) {
  .app-contenido > * {
    animation: app-aparece 0.5s var(--ease) both;
  }
  .app-contenido > :nth-child(2) { animation-delay: 0.04s; }
  .app-contenido > :nth-child(3) { animation-delay: 0.08s; }
  .app-contenido > :nth-child(4) { animation-delay: 0.12s; }
}
@keyframes app-aparece {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ═══ Pantallas medianas ═══════════════════════ */
@media (max-width: 1279px) {
  .lista {
    grid-template-columns: 1fr 1fr;
  }
}

/* ═══ Celular y tableta: barra inferior ════════ */
@media (max-width: 1023px) {
  .app {
    grid-template-columns: 1fr;
  }
  .app-rail {
    display: none;
  }
  .app-top {
    flex-wrap: wrap;
    padding: 12px var(--gutter) 10px;
  }
  .app-top .marca {
    display: flex;
    margin-right: auto;
  }
  .app-top .icono-btn {
    display: grid;
  }
  .app-top .boton-cta,
  .buscar kbd {
    display: none;
  }
  /* En celular el buscador se despliega con su botón */
  .buscar,
  .app-top .estado-sede {
    display: none;
  }
  .app-top.buscando .buscar {
    display: block;
    order: 5;
    flex-basis: 100%;
    max-width: none;
  }
  .app-top.buscando [data-abrir-buscar] {
    background: var(--primary-soft);
    color: var(--icono);
  }
  .app-contenido {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }
  .app-pie {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }
  .app-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    height: 66px;
    padding: 0 6px;
    border-radius: 22px;
    background: var(--nav-bg);
    box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.45);
  }
  .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 7px 0;
    border-radius: 16px;
    color: var(--nav-text);
    font-size: 11px;
    font-weight: 500;
  }
  .tab i {
    font-size: 22px;
  }
  .tab.on {
    color: var(--nav-on);
    background: var(--nav-on-bg);
    font-weight: 600;
  }
  .app-body .tab:hover {
    color: var(--nav-on);
  }
  .wa {
    right: 16px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 24px;
  }
  .lista {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .app-tabbar {
    left: 50%;
    right: auto;
    width: min(560px, calc(100% - 24px));
    transform: translateX(-50%);
  }
}
@media (max-width: 640px) {
  .lista {
    grid-template-columns: 1fr;
  }
  .pag-hd h1 {
    font-size: 30px;
  }
  .tile {
    padding: 16px;
    min-height: 150px;
    border-radius: 20px;
  }
  .tile .flecha {
    top: 16px;
    right: 16px;
  }
  .tile h3 {
    font-size: 16px;
  }
  .tile p {
    font-size: 13px;
  }
}

@media print {
  .app-rail,
  .app-top,
  .app-tabbar,
  .app-pie,
  .wa {
    display: none !important;
  }
  .app {
    display: block;
  }
}

/* ═══ Grupos tipo «ajustes» (Más, panel) ════════ */
.grupos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
  align-items: start;
}
.grupo h2 {
  margin: 0 0 8px 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3);
}
.grupo-caja {
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.fila {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 10px 16px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.fila + .fila {
  border-top: 1px solid var(--line);
}
a.fila:hover,
button.fila:hover {
  background: var(--surface-2);
}
.fila > span:not(.ico) {
  flex: 1;
  min-width: 0;
}
.fila b {
  display: block;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.fila small {
  display: block;
  font-size: 13px;
  color: var(--text-2);
}
.fila > .ti-chevron-right,
.fila > .ti-external-link {
  color: var(--text-3);
  font-size: 18px;
}
.segmentos {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
}
.segmentos button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.segmentos button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
[data-theme="dark"] .segmentos button[aria-pressed="true"] {
  background: var(--line);
}
@media (max-width: 900px) {
  .grupos {
    grid-template-columns: 1fr;
  }
}
