/* money-lab · acabado «cristal» (versión 1.6.0)
   Sistema visual de Project Cybersecurity (suite T-Systems × AZIRU): superficies de cristal con luz superior,
   fondo con halos, cifras de exhibición, anillos y barras con brillo, menús y avisos de cristal, y movimiento con la
   curva de la suite. Colores adaptados a la paleta de money-lab: verde (acento/series), rojo (alertas), blanco, negro
   y grises. Va después de estilos.css; con «reducir movimiento» o «reducir transparencia» todo queda quieto y opaco. */

:root {
  --cr-curva: cubic-bezier(.22, 1, .36, 1);
  --cr-curva-vista: cubic-bezier(.32, .72, 0, 1);
  --font-display: "Oswald", "Avenir Next Condensed", "DIN Condensed", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;

  /* Superficie «cristal» (claro) */
  --sup-fondo: rgb(255 255 255 / .80);
  --sup-fondo-2: rgb(255 255 255 / .64);
  --sup-filo: rgb(255 255 255 / .88);
  --sup-luz: rgb(255 255 255 / .95);
  --sup-acento: rgb(20 168 60 / .30);
  --pr-contorno: rgb(0 0 0 / .07);
  --sup-sombra: 0 1px 2px rgb(0 0 0 / .05), 0 22px 44px -28px rgb(0 0 0 / .30);
  --sup-sombra-elevada: 0 1px 2px rgb(0 0 0 / .06), 0 26px 50px -24px rgb(0 0 0 / .38);
  --pr-desenfoque: blur(14px) saturate(150%);

  --vt-lavado: color-mix(in oklab, var(--card) 96.5%, var(--foreground));
  --emergente-fondo: rgb(255 255 255 / .94);
  --emergente-filo: rgb(0 0 0 / .08);
  --emergente-sombra: 0 1px 2px rgb(0 0 0 / .05), 0 24px 60px -22px rgb(0 0 0 / .32);
  --emergente-acento: rgb(20 168 60 / .55);

  /* Barra lateral: verde sólido con texto blanco (en la suite, el color de marca). */
  --lateral-fondo: #0B6E27;
  --lateral-texto: #FFFFFF;
  --lateral-atenuado: rgb(255 255 255 / .78);
  --lateral-hover: rgb(0 0 0 / .12);
  --lateral-activo: rgb(0 0 0 / .24);
  --lateral-marca-activa: #FFFFFF;
  --lateral-icono-activo: #FFFFFF;
  --lateral-borde: rgb(255 255 255 / .22);
}

:root.dark {
  --sup-fondo: rgb(32 32 36 / .66);
  --sup-fondo-2: rgb(20 20 23 / .58);
  --sup-filo: rgb(255 255 255 / .09);
  --sup-luz: rgb(255 255 255 / .08);
  --sup-acento: rgb(59 227 107 / .28);
  --pr-contorno: rgb(0 0 0 / .35);
  --sup-sombra: 0 1px 2px rgb(0 0 0 / .4), 0 22px 44px -26px rgb(0 0 0 / .85);
  --sup-sombra-elevada: 0 1px 2px rgb(0 0 0 / .5), 0 26px 50px -22px rgb(0 0 0 / .95);
  --vt-lavado: color-mix(in oklab, var(--card) 89%, var(--foreground));
  --emergente-fondo: rgb(20 20 22 / .94);
  --emergente-filo: rgb(255 255 255 / .1);
  --emergente-sombra: 0 1px 2px rgb(0 0 0 / .5), 0 26px 64px -20px rgb(0 0 0 / .85);
  --emergente-acento: rgb(59 227 107 / .55);

  --lateral-fondo: #000000;
  --lateral-texto: #F5F5F5;
  --lateral-atenuado: #A3A3A3;
  --lateral-hover: rgb(255 255 255 / .06);
  --lateral-activo: rgb(59 227 107 / .14);
  --lateral-marca-activa: #3BE36B;
  --lateral-icono-activo: #5CF08A;
  --lateral-borde: rgb(255 255 255 / .08);
}

/* ── Fondo con halos detrás del cristal ───────────────────────────────── */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 44vw at 6% -6%, rgb(20 168 60 / .10), transparent 62%),
    radial-gradient(48vw 40vw at 100% 4%, rgb(0 0 0 / .045), transparent 60%),
    radial-gradient(56vw 46vw at 70% 108%, rgb(20 168 60 / .07), transparent 62%);
}
:root.dark body::before {
  background:
    radial-gradient(60vw 44vw at 6% -6%, rgb(59 227 107 / .12), transparent 62%),
    radial-gradient(48vw 40vw at 100% 4%, rgb(255 255 255 / .04), transparent 60%),
    radial-gradient(56vw 46vw at 70% 108%, rgb(59 227 107 / .07), transparent 62%);
}
body { background: var(--background); }

/* ── Superficies de cristal ───────────────────────────────────────────── */
.panel, .kpi, .tarjeta, .bloque, .pasos-portada li, .login-tarjeta {
  position: relative; isolation: isolate;
  background: linear-gradient(165deg, var(--sup-fondo) 0%, var(--sup-fondo-2) 100%);
  border: 1px solid var(--sup-filo);
  box-shadow: inset 0 1px 0 var(--sup-luz), 0 0 0 1px var(--pr-contorno), var(--sup-sombra);
  transition: box-shadow .2s var(--cr-curva), border-color .2s var(--cr-curva), transform .35s var(--cr-curva);
}
.panel { border-radius: 16px; -webkit-backdrop-filter: var(--pr-desenfoque); backdrop-filter: var(--pr-desenfoque); }
.panel-sutil { background: linear-gradient(165deg, var(--vt-lavado), color-mix(in oklab, var(--vt-lavado) 92%, transparent)); }
.kpi { border-radius: 14px; background: linear-gradient(165deg, rgb(255 255 255 / .92), rgb(255 255 255 / .78)); }
:root.dark .kpi { background: linear-gradient(165deg, rgb(32 32 36 / .9), rgb(20 20 23 / .85)); }
.tarjeta, .bloque { border-radius: 16px; }
/* Sin líneas de color en los paneles (decisión del usuario, 16-oct-2026): como el estilo minimalista de la suite
   (components/comun/minimalista.css), tarjeta clara con filo fino neutro y sombra suave; grafito en oscuro.
   El estado se lee en la cifra de apoyo o en su etiqueta, no en una franja. */
:root:not(.dark) :is(.panel, .kpi, .tarjeta, .bloque, .pasos-portada li, .login-tarjeta) {
  border-color: rgb(0 0 0 / .08);
  box-shadow: inset 0 1px 0 var(--sup-luz), 0 1px 2px rgb(0 0 0 / .04), 0 18px 40px -28px rgb(0 0 0 / .22);
}

/* Tarjeta accionable: se eleva y aparece la sombra. */
a.tarjeta { transform: translateY(0); }
a.tarjeta::after {
  content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; box-shadow: var(--sup-sombra-elevada);
  opacity: 0; transition: opacity .35s var(--cr-curva);
}
a.tarjeta:hover { transform: translateY(-1.5px); border-color: color-mix(in srgb, var(--foreground) 22%, transparent); background: linear-gradient(165deg, var(--sup-fondo), var(--sup-fondo-2)); }
a.tarjeta:hover::after { opacity: 1; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel, .kpi, .tarjeta, .bloque { background: var(--card); }
}
@media (prefers-reduced-transparency: reduce) {
  .panel, .kpi, .tarjeta, .bloque, .login-tarjeta { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
  body::before { display: none; }
}

/* ── Tipografía de cifras ─────────────────────────────────────────────── */
.cifra-display, .kpi-valor, .pe-cifra, .anillo-centro b {
  font-family: var(--font-display); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .005em;
}
.kpi-valor { font-size: clamp(1.5rem, 1.25rem + .9vw, 2rem); line-height: 1.05; font-weight: 600; }
.kpi-valor small { font-family: var(--fuente); font-size: max(.36em, 11px); font-weight: 600; letter-spacing: .06em; }
.kpi-etiqueta, .rotulo { font-size: .6875rem; letter-spacing: .05em; text-transform: uppercase; }
.cifra-protagonista { font-family: var(--font-display); font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem); font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums lining-nums; }
/* Tinta de cristal para cifras grandes. */
.cifra-cristal {
  background: linear-gradient(172deg, #0A0A0A 0%, #1F1F1F 46%, #0B4A1D 82%, #0B6E27 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgb(255 255 255 / .85));
}
:root.dark .cifra-cristal { background: linear-gradient(180deg, #FFF 0%, #F0F0F0 50%, #CDCDCD 100%); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 16px rgb(59 227 107 / .12)) drop-shadow(0 1px 0 rgb(0 0 0 / .5)); }
.titulo-pagina { font-size: clamp(1.375rem, 1.05rem + 1.4vw, 2rem); font-weight: 750; letter-spacing: -.024em; }
.titulo-seccion { font-size: clamp(1rem, .95rem + .2vw, 1.0625rem); font-weight: 700; }

/* ── Barra superior, menús y avisos de cristal ────────────────────────── */
.barra-superior { border-radius: 16px; }
.menu-flotante, .resultados-busqueda, .tooltip-g, .toast {
  background: var(--emergente-fondo); border: 1px solid var(--emergente-filo); box-shadow: var(--emergente-sombra);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border-radius: 16px;
}
.menu-flotante::before, .resultados-busqueda::before {
  content: ''; position: absolute; top: 0; left: 14%; right: 14%; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--emergente-acento) 50%, transparent);
}
.menu-flotante button, .menu-flotante a { border-radius: 10px; font-weight: 500; }
.menu-flotante [aria-current="true"] { box-shadow: inset 3px 0 0 var(--verde); background: var(--ok-suave); }
.tooltip-g { border-radius: 12px; max-width: 240px; }

/* ── Barra lateral de la suite ────────────────────────────────────────── */
.barra-lateral { box-shadow: inset -1px 0 0 rgb(0 0 0 / .08); }
.lateral-item { font-weight: 600; transition: background-color .15s; }
.lateral-item svg { color: var(--lateral-atenuado); }
.lateral-item[aria-current="page"] { box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 6px 16px -10px rgb(0 0 0 / .45); }
.lateral-item .insignia { background: rgb(255 255 255 / .18); color: var(--lateral-texto); border-color: rgb(255 255 255 / .28); }
:root.dark .lateral-item .insignia { background: var(--ok-suave); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.lateral-pie, .lateral-marca small { color: var(--lateral-atenuado); }

/* ── Botones ──────────────────────────────────────────────────────────── */
.boton { transition: background-color .15s, transform .2s var(--cr-curva), box-shadow .2s var(--cr-curva); }
.boton:not(.sec):not(.fantasma):not(.peligro) { box-shadow: 0 6px 16px -8px rgb(0 0 0 / .45); }
.boton:not(.sec):not(.fantasma):not(.peligro):hover { transform: translateY(-1px); }
.boton.verde { background: linear-gradient(100deg, #0B7D2B, #14A83C); color: #fff; box-shadow: 0 0 0 1px rgb(20 168 60 / .35), 0 12px 30px -10px rgb(20 168 60 / .7); }
.segmentado { border-radius: 12px; }
.segmento { transition: color .15s, background-color .2s var(--cr-curva-vista), box-shadow .2s var(--cr-curva-vista); }
.segmento[aria-pressed="true"] { box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--border); color: var(--foreground); }

/* ── Barras de cristal (medidores HTML) ───────────────────────────────── */
.medidor { height: 12px; background: var(--barra-riel, var(--grafica-rejilla)); box-shadow: inset 0 1px 1px rgb(0 0 0 / .07); }
.medidor > i {
  --tinte: var(--sem-base, var(--verde));
  overflow: hidden;
  background: linear-gradient(180deg, rgb(255 255 255 / .38) 0, rgb(255 255 255 / .06) 45%, transparent 60%),
              linear-gradient(90deg, color-mix(in srgb, var(--tinte) 55%, #FFF) 0%, var(--tinte) 55%, color-mix(in srgb, var(--tinte) 88%, #000) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 0 14px -2px color-mix(in srgb, var(--tinte) 70%, transparent);
  transition: width .9s var(--cr-curva);
}
.medidor > i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 32%, rgb(255 255 255 / .3) 50%, transparent 66%);
  transform: translateX(-110%); animation: cr-barrido-html 14s cubic-bezier(.45, 0, .25, 1) 2.4s infinite;
}
:root.dark .medidor > i { box-shadow: inset 0 1px 0 rgb(255 255 255 / .26); }
@keyframes cr-barrido-html { 0% { transform: translateX(-110%); } 12%, 100% { transform: translateX(110%); } }

/* ── Anillo (indicador circular de cristal) ───────────────────────────── */
@property --anillo-pct { syntax: '<number>'; inherits: true; initial-value: 0; }
.anillo {
  --g: 11px; --tamano: 100px; --tinte: var(--sem-base, var(--verde));
  position: relative; display: inline-grid; place-items: center; flex: none; width: var(--tamano); height: var(--tamano);
  --anillo-pct: 0; transition: --anillo-pct .9s var(--cr-curva);
}
.anillo[data-listo] { --anillo-pct: var(--pct); }
.anillo > span { position: absolute; inset: 0; border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--g) - .5px), #000 calc(100% - var(--g)));
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--g) - .5px), #000 calc(100% - var(--g))); }
.anillo .riel { background: var(--barra-riel, var(--grafica-rejilla)); }
.anillo .arco { background: conic-gradient(color-mix(in srgb, var(--tinte) 78%, #FFF) 0deg, var(--tinte) calc(var(--anillo-pct) * 1.8deg),
  color-mix(in srgb, var(--tinte) 84%, #000) calc(var(--anillo-pct) * 3.6deg), transparent 0);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tinte) 45%, transparent)); }
.anillo .brillo { background: conic-gradient(from 300deg, transparent 0, rgb(255 255 255 / .28) 16deg, transparent 38deg, transparent 150deg,
  rgb(255 255 255 / .14) 176deg, transparent 204deg); }
.anillo .punta { -webkit-mask: none; mask: none; transform: rotate(calc(var(--anillo-pct) * 3.6deg)); }
.anillo .punta::before { content: ''; position: absolute; top: 0; left: 50%; width: var(--g); height: var(--g); margin-left: calc(var(--g) / -2); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF 0 16%, var(--tinte) 60%); box-shadow: 0 0 0 1px rgb(255 255 255 / .6), 0 1px 3px rgb(0 0 0 / .2); }
.anillo[data-pct="0"] .punta { display: none; }
.anillo-centro { position: relative; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.anillo-centro b { font-size: calc(var(--tamano) * .24); font-weight: 600; color: var(--sem-texto, var(--foreground)); }
.anillo-centro small { font-size: 10.5px; font-weight: 600; color: var(--muted-foreground); max-width: calc(var(--tamano) - 2 * var(--g) - 10px); }
.con-anillo { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.con-anillo > div:last-child { min-width: 0; }

/* ── Franja de estado (panel de estados de la suite) ──────────────────── */
.pe { container: pe / inline-size; overflow: hidden; border-radius: 18px; padding: 0 !important; }
.pe-estante { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 -1px -1px 0; }
.pe-celda { position: relative; display: flex; flex-direction: column; gap: .625rem; min-width: 0; padding: 1.125rem 1.25rem 1.5rem;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: inherit; text-decoration: none;
  animation: pe-entra .55s var(--cr-curva) both; }
.pe-celda:nth-child(2) { animation-delay: 60ms; } .pe-celda:nth-child(3) { animation-delay: 120ms; }
.pe-celda:nth-child(4) { animation-delay: 180ms; } .pe-celda:nth-child(5) { animation-delay: 240ms; }
.pe-celda.pe-total { grid-column: 1 / -1; }
@container pe (min-width: 34rem) {
  .pe-estante { grid-template-columns: 1.2fr 1fr 1fr; }
  .pe-celda.pe-total { grid-column: auto; grid-row: span 2; }
}
@container pe (min-width: 58rem) {
  .pe-estante { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); }
  .pe-celda.pe-total { grid-row: auto; }
}
.pe-celda::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--vt-lavado); opacity: 0; transition: opacity .3s; }
a.pe-celda:hover::after { opacity: 1; }
.pe-rotulo { display: flex; align-items: center; gap: .5rem; font-size: .9375rem; font-weight: 600; letter-spacing: -.012em; color: var(--muted-foreground); }
.pe-luz { width: .5rem; height: .5rem; flex: none; border-radius: 999px; background: var(--pe-tinte, var(--verde));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pe-tinte, var(--verde)) 14%, transparent); }
/* La cifra se mide contra el ancho de la franja (cqi), como en la suite: nunca se corta. */
.pe-cifra { font-size: clamp(1.625rem, 7.5cqi, 2.6rem); line-height: .92; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.pe-total .pe-cifra { font-size: clamp(2.5rem, 12cqi, 4.25rem); }
@container pe (min-width: 34rem) { .pe-cifra { font-size: clamp(1.625rem, 5cqi, 2.6rem); } .pe-total .pe-cifra { font-size: clamp(2.5rem, 8cqi, 4.25rem); } }
@container pe (min-width: 58rem) { .pe-cifra { font-size: clamp(1.625rem, 3.4cqi, 2.75rem); } .pe-total .pe-cifra { font-size: clamp(2.5rem, 5.2cqi, 4.25rem); } }
.pe-cifra small { font-family: var(--fuente); font-size: max(.32em, 11px); font-weight: 600; letter-spacing: .04em; color: var(--muted-foreground); margin-left: .25rem; }
.pe-apoyo { font-size: .8125rem; color: var(--muted-foreground); }
.pe-apoyo[data-semaforo] { color: var(--sem-texto); font-weight: 600; }
.pe-flecha { position: absolute; top: 1rem; right: 1rem; opacity: 0; transform: translate(-3px, 3px); transition: opacity .25s, transform .25s var(--cr-curva); color: var(--muted-foreground); }
a.pe-celda:hover .pe-flecha { opacity: 1; transform: none; }
@keyframes pe-entra { from { opacity: 0; transform: translateY(4px); } }

/* ── Cifra viva: destello al cambiar ──────────────────────────────────── */
.cifra-viva-destello { animation: cr-destello .9s var(--cr-curva); border-radius: 8px; }
@keyframes cr-destello { 0% { background: radial-gradient(70% 80% at 40% 55%, rgb(20 168 60 / .24), transparent 72%); } 100% { background: transparent; } }

/* ── Cambio de vista y entradas ───────────────────────────────────────── */
.aparecer { animation: cr-vista .22s var(--cr-curva-vista); }
@keyframes cr-vista { from { opacity: 0; transform: translateY(8px); } }

/* ── Portada (bienvenida) ─────────────────────────────────────────────── */
body.portada::before {
  background: radial-gradient(60% 45% at 85% 10%, rgb(20 168 60 / .10), transparent 70%), radial-gradient(45% 40% at 5% 95%, rgb(20 168 60 / .07), transparent 70%);
}
:root.dark body.portada::before {
  background: radial-gradient(60% 45% at 85% 10%, rgb(59 227 107 / .12), transparent 70%), radial-gradient(45% 40% at 5% 95%, rgb(59 227 107 / .07), transparent 70%);
}
.portada-barra { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--background) 78%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--border); max-width: none;
  padding-left: max(16px, calc((100vw - 1320px) / 2 + 24px)); padding-right: max(16px, calc((100vw - 1320px) / 2 + 24px)); }
.portada-barra .lateral-marca b { font-size: 16px; }
.portada-barra .lateral-marca small { color: var(--muted-foreground); }
.heroe { max-width: 64rem; padding-top: clamp(2.5rem, 8vw, 6rem); container: heroe / inline-size; }
.heroe h1 { font-size: clamp(2.4rem, 1rem + 6.2vw, 5.75rem); line-height: .96; letter-spacing: -.04em; font-weight: 900; }
.heroe h1 .fino { font-weight: 200; font-style: italic; letter-spacing: -.02em; }
.heroe h1 .brillo {
  background: linear-gradient(100deg, var(--foreground) 0%, var(--foreground) 38%, #14A83C 62%, var(--foreground) 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: bv-brillo-titulo 10s ease-in-out infinite;
}
@keyframes bv-brillo-titulo { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.heroe-rotulo { font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ok); }
.heroe .boton { min-height: 52px; padding: 0 28px; font-size: 15px; letter-spacing: .02em; }
.heroe .boton:not(.sec) { background: linear-gradient(100deg, #0B7D2B, #14A83C); color: #fff; box-shadow: 0 0 0 1px rgb(20 168 60 / .4), 0 12px 36px -8px rgb(20 168 60 / .65); }
.heroe .boton:not(.sec):hover { transform: translateY(-2px); }
.heroe .boton.sec { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--foreground) 45%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.portada-seccion > .titulo-seccion { font-size: clamp(1.6rem, 1rem + 2.4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; }
.holo { position: relative; overflow: hidden; border-radius: 24px !important; padding: 22px; min-height: 100%; }
.holo::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgb(20 168 60 / .10), transparent 60%); opacity: 0; transition: opacity .3s; }
.holo:hover::after { opacity: 1; }
.holo .ilustracion { display: block; width: 100%; height: auto; margin: -4px 0 6px; border-radius: 16px; background: #0B0B0B; }
.pasos-portada li { border-radius: 16px; padding: 18px; }
.pasos-portada li::before { background: linear-gradient(135deg, #14A83C, #0B6E27); color: #fff; box-shadow: 0 0 0 4px rgb(20 168 60 / .14), 0 6px 16px -6px rgb(20 168 60 / .6); }
.login-tarjeta { border-radius: 24px; }
.login-fondo { background: transparent; }

/* ── Movimiento reducido ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .medidor > i::after, .heroe h1 .brillo, .ilustracion * { animation: none !important; }
  .anillo { transition: none; }
  a.tarjeta:hover, .boton:hover { transform: none !important; }
}

/* ── Gráficas de cristal ──────────────────────────────────────────────── */
.grafica .rejilla-g line { stroke-opacity: .7; shape-rendering: crispEdges; }
.grafica .eje-g text { font-size: 10px; }
.grafica .valor-g { font-size: 10.5px; font-weight: 700; fill: var(--foreground); font-variant-numeric: tabular-nums; }
.grafica .g-aparece { animation: g-aparece .7s var(--cr-curva) both; }
.cr-barrido { animation: cr-barrido-svg 14s cubic-bezier(.45, 0, .25, 1) 2.2s infinite; }
@keyframes cr-barrido-svg { 0% { transform: translateX(0); } 14%, 100% { transform: translateX(var(--recorrido, 600px)); } }
@keyframes g-aparece { from { opacity: 0; } }
.leyenda i { height: 4px; border-radius: 3px; }
.leyenda i.cuadro { width: 10px; height: 10px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .cr-barrido, .grafica .g-aparece { animation: none !important; } }

/* Ilustraciones de la portada */
.ilustracion .il-crece { transform-box: fill-box; transform-origin: 50% 100%; animation: il-crece 3.2s ease-in-out infinite alternate; }
.ilustracion .il-traza { stroke-dasharray: 260; stroke-dashoffset: 260; animation: il-traza 2.4s var(--cr-curva) .3s forwards; }
.ilustracion .il-pulso { stroke-dasharray: 26 400; animation: il-pulso 4s linear infinite; }
.ilustracion .il-gira { transform-box: fill-box; transform-origin: center; animation: il-gira 18s linear infinite; }
.ilustracion .il-aguja { transform-box: view-box; transform-origin: 120px 110px; animation: il-aguja 3.6s ease-in-out infinite alternate; }
@keyframes il-crece { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
@keyframes il-traza { to { stroke-dashoffset: 0; } }
@keyframes il-pulso { to { stroke-dashoffset: -426; } }
@keyframes il-gira { to { transform: rotate(360deg); } }
@keyframes il-aguja { from { transform: rotate(-38deg); } to { transform: rotate(18deg); } }
@media (prefers-reduced-motion: reduce) { .ilustracion .il-traza { stroke-dashoffset: 0; } }

/* Las pilas no reparten el alto sobrante entre sus filas (los campos no se estiran). */
.pila { align-content: start; }
.rejilla { align-items: start; }

/* Selector de idioma (portada e inicio de sesión), como el de la suite: ES · EN · DE */
.selector-idioma { flex: none; flex-wrap: nowrap; }
.selector-idioma .segmento { min-height: 30px; padding: 0 .55rem; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.login-idioma { justify-self: center; }
@media (max-width: 520px) {
  .portada-barra { gap: .5rem; }
  .portada-barra .lateral-marca small, .portada-barra .acciones > a.boton { display: none; }
}

/* Entrada con registro (como la de UNIVERSE · INGO): una tarjeta, tres vistas */
.login-marca { display: grid; justify-items: center; gap: 6px; }
.login-marca .titulo-pagina { letter-spacing: .02em; }
.vista-entrada, .pila-entrada { display: grid; gap: 12px; }
.vista-entrada[hidden], .pila-entrada[hidden] { display: none !important; }
.boton.ancho { width: 100%; min-height: 46px; }
.enlace-entrada { background: none; border: 0; padding: 10px 0; color: var(--muted-foreground); font: inherit; font-size: 13.5px; cursor: pointer; text-align: center; }
.enlace-entrada:hover, .enlace-entrada:focus-visible { color: var(--foreground); }
.volver-entrada { justify-self: start; padding: 4px 0; font-weight: 600; }
.titulo-entrada { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; outline: none; }
.separador-entrada { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted-foreground); }
.separador-entrada::before, .separador-entrada::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.separador-entrada[hidden] { display: none; }
.rotulo-entrada { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-foreground); }
.cuentas-guardadas { display: grid; gap: 8px; }
.cuentas-guardadas[hidden] { display: none; }
.cuenta-guardada { display: flex; align-items: center; gap: 6px; }
.cuenta-elegir { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--foreground); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s; }
.cuenta-elegir:hover, .cuenta-elegir:focus-visible { border-color: var(--foreground); }
.cuenta-elegir > span:last-child { display: grid; min-width: 0; }
.cuenta-elegir b, .cuenta-elegir small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuenta-elegir small { color: var(--muted-foreground); font-size: 12px; }
.cuenta-elegir .inicial { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; background: #14A83C; color: #fff; font-weight: 800; }
.campo > small.nota { font-size: 12px; }
/* Las etiquetas de estado nunca se estiran a todo el ancho de su tarjeta (se verían como una franja de color). */
.tarjeta > .chip, .panel > .chip, .kpi > .chip { justify-self: start; align-self: start; width: auto; }

/* ── INGO, el asistente: orbe junto al buscador y panel lateral (como el de la suite, en verde) ───────────── */
.ingo-orbe-boton { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 999px; }
.ingo-orbe-boton .ingo-orbe { --o: 34px; }
.ingo-orbe-boton:hover .ingo-orbe, .ingo-orbe-boton[aria-expanded="true"] .ingo-orbe { box-shadow: inset 0 0 0 1px var(--ingo-borde-orbe), 0 4px 16px -4px var(--ingo-halo); }
.ingo-orbe-boton:hover .ingo-orbe__velo--a, .ingo-orbe-boton[aria-expanded="true"] .ingo-orbe__velo--a { transform: rotate(-6deg) translate(-4%, -6%); }
.ingo-orbe-boton:hover .ingo-orbe__velo--b, .ingo-orbe-boton[aria-expanded="true"] .ingo-orbe__velo--b { transform: rotate(4deg) translate(5%, -2%); opacity: .95; }
/* Quieto en reposo; la aurora solo deriva mientras INGO responde. */
.ingo-orbe.pensando .ingo-orbe__velo--a { animation: ingo-deriva 3.2s ease-in-out infinite alternate; }
.ingo-orbe.pensando .ingo-orbe__velo--b { animation: ingo-deriva 2.6s ease-in-out infinite alternate-reverse; }
@keyframes ingo-deriva { from { transform: rotate(-14deg) translate(-4%, 2%); } to { transform: rotate(12deg) translate(5%, -6%); } }
.ingo-flotante { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60; }
.ingo-flotante .ingo-orbe { --o: 56px; box-shadow: inset 0 0 0 1px var(--ingo-borde-orbe), 0 12px 32px -8px rgb(0 0 0 / .45); }

.ingo-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(440px, 100vw); display: grid; grid-template-rows: auto 1fr auto;
  background: var(--card); color: var(--foreground); border-left: 1px solid var(--border);
  box-shadow: 0 24px 64px -24px rgb(0 0 0 / .35), 0 2px 10px -2px rgb(0 0 0 / .1); animation: ingo-entra .32s var(--cr-curva, ease) both; }
.ingo-panel[hidden] { display: none !important; }
@keyframes ingo-entra { from { transform: translateX(24px); opacity: 0; } }
.ingo-cabecera { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--border); }
.ingo-cabecera > div:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.ingo-cabecera small { color: var(--muted-foreground); font-size: 12px; }
.ingo-nombre { font-size: 17px; letter-spacing: .14em; }
.ingo-orbe--panel { --o: 40px; }
.ingo-cabecera .acciones { flex-wrap: nowrap; gap: 2px; }
.ingo-cabecera .boton-icono { width: 36px; height: 36px; font-size: 18px; }
.ingo-cabecera .boton-icono .ico { width: 18px; height: 18px; }
.ingo-cuerpo { overflow-y: auto; padding: 16px; display: grid; align-content: start; gap: 12px; overscroll-behavior: contain; }
.ingo-hola { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.ingo-sugerencias { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ingo-sugerencias .boton { width: 100%; justify-content: flex-start; text-align: left; white-space: normal; height: auto; min-height: 36px; padding: 8px 12px; }
.ingo-mensajes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ingo-msg { display: flex; }
.ingo-msg--yo { justify-content: flex-end; }
.ingo-burbuja { position: relative; max-width: 92%; padding: 10px 12px; border-radius: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; display: grid; gap: 8px; }
.ingo-msg--yo .ingo-burbuja { background: #0B7D2B; color: #fff; border-bottom-right-radius: 6px; }
.ingo-msg--ingo .ingo-burbuja { background: var(--muted); border-bottom-left-radius: 6px; width: 92%; }
.ingo-msg--error .ingo-burbuja { background: var(--mal-suave, rgb(224 27 27 / .1)); color: var(--mal, #E01B1B); }
.ingo-burbuja p, .ingo-burbuja ul, .ingo-burbuja ol { margin: 0; }
.ingo-burbuja ul, .ingo-burbuja ol { padding-left: 1.2rem; display: grid; gap: 2px; }
.ingo-burbuja .ingo-enlace { justify-self: start; }
.ingo-burbuja .ingo-tabla { background: var(--card); border-radius: 10px; }
.ingo-grafica { margin: 0; background: var(--card); border-radius: 12px; padding: 8px; display: grid; gap: 4px; min-width: 0; }
.ingo-leer { position: absolute; right: 4px; bottom: 4px; width: 28px; height: 28px; opacity: .6; }
.ingo-leer:hover { opacity: 1; }
.ingo-leer .ico { width: 15px; height: 15px; }
.ingo-msg--ingo .ingo-burbuja:has(.ingo-leer) { padding-right: 34px; }
.ingo-funciones { display: flex; flex-wrap: wrap; gap: 6px; }
.ingo-funciones .chip { text-decoration: none; color: var(--foreground); }
.ingo-pensando { display: flex; gap: 5px; width: auto !important; }
.ingo-pensando span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-foreground); animation: ingo-punto 1s ease-in-out infinite; }
.ingo-pensando span:nth-child(2) { animation-delay: .15s; }
.ingo-pensando span:nth-child(3) { animation-delay: .3s; }
@keyframes ingo-punto { 50% { opacity: .25; transform: translateY(-2px); } }
.ingo-pie { border-top: 1px solid var(--border); padding: 10px 14px 12px; display: grid; gap: 8px; }
.ingo-form { display: flex; gap: 8px; align-items: flex-end; }
.ingo-form textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; field-sizing: content; }
.ingo-form .boton { width: 44px; min-height: 44px; padding: 0; font-size: 18px; flex: none; }
.ingo-pie .nota { font-size: 11px; }

@media (max-width: 639px) {
  #boton-ingo { display: none; }
  .ingo-flotante { display: inline-block; }
  .ingo-panel { width: 100vw; border-left: 0; }
  body.ingo-abierto .ingo-flotante { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ingo-orbe.pensando .ingo-orbe__velo, .ingo-pensando span, .ingo-panel { animation: none !important; }
}
