/* =====================================================================
   Aura by Alvea — sistema de diseño
   Claro por defecto (o el del navegador), oscuro con [data-theme=dark].
   Animaciones solo con transform/opacity (ligeras en equipos modestos);
   [data-motion=reduced|off] y prefers-reduced-motion las reducen.
   ===================================================================== */
:root {
  --bg: #f6f7fc; --bg-elev: #ffffff; --bg-soft: #eef0f8; --bg-sunk: #e8eaf4; --bg-glass: rgba(255,255,255,.72);
  --text: #0b1033; --text-2: #464f7a; --text-3: #7c829f; --line: #e2e5f1; --line-2: #d3d7e8;
  --navy: #000b41; --coral: #ff5050;
  --a1: #ff5050; --a2: #8b5cf6; --a3: #3b82f6;
  --accent: var(--a1); --accent-ink: #fff;
  --grad: linear-gradient(120deg, var(--a1), var(--a2) 55%, var(--a3));
  --grad-soft: linear-gradient(120deg, color-mix(in srgb, var(--a1) 14%, transparent), color-mix(in srgb, var(--a2) 12%, transparent) 55%, color-mix(in srgb, var(--a3) 12%, transparent));
  --ok: #16a34a; --warn: #d97706; --danger: #dc2626; --info: #2563eb;
  --mark: color-mix(in srgb, var(--a2) 22%, transparent);
  --shadow-1: 0 1px 2px rgba(11,16,51,.06), 0 1px 1px rgba(11,16,51,.04);
  --shadow-2: 0 6px 18px -6px rgba(11,16,51,.14), 0 2px 6px rgba(11,16,51,.05);
  --shadow-3: 0 24px 60px -18px rgba(11,16,51,.28), 0 8px 20px -10px rgba(11,16,51,.12);
  --r-xs: 8px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, "Liberation Mono", monospace;
  --fs: 15px; --gap: 12px; --side-w: 284px;
  --ease: cubic-bezier(.2,.8,.2,1); --ease-out: cubic-bezier(.16,1,.3,1); --spring: cubic-bezier(.34,1.56,.64,1);
  --t1: 140ms; --t2: 240ms; --t3: 420ms;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #070a1f; --bg-elev: #0e1330; --bg-soft: #141a3b; --bg-sunk: #0b0f28; --bg-glass: rgba(14,19,48,.72);
  --text: #eef0ff; --text-2: #aeb3d6; --text-3: #7b81a8; --line: #222951; --line-2: #2d3566;
  --mark: color-mix(in srgb, var(--a2) 34%, transparent);
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 22px -8px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.3);
  --shadow-3: 0 28px 70px -20px rgba(0,0,0,.75), 0 10px 24px -12px rgba(0,0,0,.5);
  color-scheme: dark;
}
[data-accent="alvea"] { --a1: #ff5050; --a2: #e0446e; --a3: #464f7a; }
[data-theme="dark"][data-accent="alvea"] { --a3: #7b84c4; }
[data-accent="ocean"] { --a1: #06b6d4; --a2: #3b82f6; --a3: #6366f1; --accent-ink: #fff; }
[data-accent="emerald"] { --a1: #10b981; --a2: #14b8a6; --a3: #3b82f6; }
[data-accent="sunset"] { --a1: #f59e0b; --a2: #f97316; --a3: #ec4899; }
[data-accent="mono"] { --a1: #334155; --a2: #475569; --a3: #64748b; }
[data-theme="dark"][data-accent="mono"] { --a1: #cbd5e1; --a2: #94a3b8; --a3: #64748b; --accent-ink: #0b1033; }
[data-density="compact"] { --gap: 8px; --fs: 14px; }
[data-density="comfy"] { --gap: 16px; }
[data-font="small"] { --fs: 14px; }
[data-font="large"] { --fs: 16.5px; }
[data-font="xl"] { --fs: 18px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color var(--t3) var(--ease), border-color var(--t3) var(--ease), color var(--t2) var(--ease), fill var(--t2) var(--ease) !important;
}
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs)/1.55 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--a2); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--a2) 30%, transparent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-3); }
.small { font-size: .86em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-3) 35%, transparent); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--text-3) 60%, transparent); }

/* ---------------- Logo Aura (orbe) ---------------- */
.aura-orb { --s: 28px; position: relative; display: inline-block; width: var(--s); height: var(--s); flex: none;
  background: url("/static/img/aura-mark.svg") center / contain no-repeat; animation: orb-glow 3.6s var(--ease) infinite; }
@keyframes orb-glow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
.aura-orb.lg { --s: 76px; }
.aura-orb.xl { --s: 132px; }
.aura-orb.busy { animation-duration: .6s; }

@keyframes orb-spin { to { transform: rotate(360deg); } }
@keyframes orb-breath { 0%, 100% { transform: scale(.82); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
.aura-word { font: 700 1.12em/1 var(--font-display); letter-spacing: -.02em; }
.aura-by { color: var(--text-3); font-weight: 500; font-size: .82em; margin-left: .35em; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
/* Logo: anillo de oro con «Aura» grabado */
.ring-logo { display: block; overflow: visible; }
.ring-logo .rg-ring { animation: rg-float 6s var(--ease) infinite; }
.ring-logo .rg-halo { transform-box: fill-box; transform-origin: center; animation: rg-halo 3.6s var(--ease) infinite; }
.ring-logo .rg-sheen { animation: rg-sheen 5s var(--ease) infinite 1s; }
.ring-logo .rg-glow { animation: rg-glow 2.4s var(--ease) infinite; }
.ring-logo .rg-fire { animation: rg-fire 2.4s var(--ease) infinite; }
.ring-logo .rg-spark { animation: rg-spark 4s var(--ease) infinite 1.5s; transform-box: fill-box; transform-origin: center; }
.ring-logo:hover .rg-sheen { animation-duration: 1.6s; animation-delay: 0s; }
.ring-logo.draw .rg-ring { animation: rg-in 1.2s var(--ease-out) both, rg-float 6s var(--ease) 1.2s infinite; }
.ring-logo.draw .rg-word { animation: rg-word 1s var(--ease-out) .7s both; }
@keyframes rg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes rg-halo { 0%, 100% { transform: scale(.94); opacity: .7; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes rg-sheen { 0% { transform: translateX(0) skewX(-22deg); } 50%, 100% { transform: translateX(330px) skewX(-22deg); } }
@keyframes rg-glow { 0%, 100% { stroke-opacity: .3; } 50% { stroke-opacity: .7; } }
@keyframes rg-fire { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }
@keyframes rg-spark { 0%, 70%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 80% { opacity: 1; transform: scale(1.2) rotate(45deg); } 90% { opacity: 0; transform: scale(.6) rotate(90deg); } }
@keyframes rg-in { 0% { opacity: 0; transform: translateY(-30px) scale(.7) rotate(-8deg); } 70% { opacity: 1; transform: translateY(3px) scale(1.02) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes rg-word { from { opacity: 0; filter: brightness(2); } to { opacity: 1; filter: none; } }
/* Logo: nube tormentosa con «aura» rotulada dentro (siempre viva) */
.cloud-logo { display: block; overflow: visible; }
.cloud-logo .cl-float { animation: cl-float 4.8s var(--ease) infinite; transform-box: fill-box; transform-origin: 50% 60%; }
.cloud-logo .cl-back { animation: cl-drift 6s var(--ease) infinite alternate; }
.cloud-logo .cl-glow { transform-box: fill-box; transform-origin: center; animation: cl-glow 3.2s var(--ease) infinite; }
.cloud-logo .cl-core { transform-box: fill-box; transform-origin: center; animation: cl-core 2.6s var(--ease) infinite; }
.cloud-logo .cl-drop { animation: cl-rain .9s linear infinite; }
.cloud-logo .cl-drop:nth-child(2) { animation-delay: .45s; } .cloud-logo .cl-drop:nth-child(3) { animation-delay: .2s; }
.cloud-logo .cl-drop:nth-child(4) { animation-delay: .65s; } .cloud-logo .cl-drop:nth-child(5) { animation-delay: .35s; } .cloud-logo .cl-drop:nth-child(6) { animation-delay: .8s; }
.cloud-logo .cl-bolt { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; animation: cl-bolt 3.6s linear infinite .8s; }
.cloud-logo .cl-flash { animation: cl-flash 3.6s linear infinite .8s; }
.cloud-logo .cl-word { animation: cl-word 3.6s linear infinite .8s; }
.cloud-logo .cl-glint { stroke-dashoffset: 434; animation: cl-glint 3.2s var(--ease) infinite 1.2s; opacity: .95; }
.cloud-logo .cl-star { transform-box: fill-box; transform-origin: center; animation: cl-star 2.4s var(--ease) infinite; }
.cloud-logo .cl-star.s2 { animation-delay: .8s; } .cloud-logo .cl-star.s3 { animation-delay: 1.6s; }
.cloud-logo .cl-dot { animation: cl-twinkle 1.8s var(--ease) infinite; }
.cloud-logo .cl-ink { stroke-dasharray: 420; stroke-dashoffset: 0; }
.cloud-logo:hover .cl-bolt, .cloud-logo:hover .cl-flash, .cloud-logo:hover .cl-word { animation-duration: 1.2s; animation-delay: 0s; }
.cloud-logo.draw .cl-float { animation: cl-in .9s var(--spring) both, cl-float 4.8s var(--ease) .9s infinite; }
.cloud-logo.draw .cl-ink { stroke-dashoffset: 420; animation: cl-write 1.6s var(--ease-out) .45s forwards; }
.cloud-logo.draw .cl-glint { animation-delay: 2.2s; }
@keyframes cl-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.025); } }
@keyframes cl-drift { from { transform: translate(-16px, -12px) scale(.92); } to { transform: translate(-2px, -16px) scale(.95); } }
@keyframes cl-glow { 0%, 100% { transform: scale(.92); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes cl-core { 0%, 100% { transform: scale(.85); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes cl-rain { 0% { transform: translateY(-6px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translate(-4px, 16px); opacity: 0; } }
@keyframes cl-bolt { 0%, 80% { opacity: 0; transform: scaleY(.3); } 81% { opacity: 1; transform: scaleY(1); } 84% { opacity: .15; } 86% { opacity: 1; } 92%, 100% { opacity: 0; transform: scaleY(1); } }
@keyframes cl-flash { 0%, 80% { opacity: 0; } 81% { opacity: .5; } 84% { opacity: .05; } 86% { opacity: .4; } 93%, 100% { opacity: 0; } }
@keyframes cl-word { 0%, 80% { filter: none; } 81%, 87% { filter: drop-shadow(0 0 7px rgba(255,255,255,.95)); } 93%, 100% { filter: none; } }
@keyframes cl-glint { 0% { stroke-dashoffset: 434; } 60%, 100% { stroke-dashoffset: -20; } }
@keyframes cl-star { 0%, 100% { transform: scale(.4) rotate(0deg); opacity: .2; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }
@keyframes cl-twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes cl-write { to { stroke-dashoffset: 0; } }
@keyframes cl-in { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
/* Logo de empresa animado */
.company-logo { height: 34px; width: auto; display: block; object-fit: contain; }
.company-logo.anim-float { animation: logo-float 5s var(--ease) infinite; }
.company-logo.anim-pulse { animation: logo-pulse 3s var(--ease) infinite; }
.company-logo.anim-shine { -webkit-mask-image: linear-gradient(100deg, #000 40%, rgba(0,0,0,.55) 50%, #000 60%); mask-image: linear-gradient(100deg, #000 40%, rgba(0,0,0,.55) 50%, #000 60%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%; animation: logo-shine 3.6s linear infinite; }
.company-logo.anim-aura { filter: drop-shadow(0 0 0 transparent); animation: logo-aura 4s var(--ease) infinite; }
@keyframes logo-float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
@keyframes logo-pulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.05) } }
@keyframes logo-shine { from { -webkit-mask-position: 150% 0; mask-position: 150% 0 } to { -webkit-mask-position: -50% 0; mask-position: -50% 0 } }
@keyframes logo-aura { 0%,100% { filter: drop-shadow(0 0 0 color-mix(in srgb, var(--a2) 0%, transparent)); } 50% { filter: drop-shadow(0 2px 10px color-mix(in srgb, var(--a2) 45%, transparent)); } }

/* ---------------- Botones y controles ---------------- */
.btn { --h: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-elev); color: var(--text); font-weight: 600; font-size: .94em;
  text-decoration: none; white-space: nowrap; transition: transform var(--t1) var(--ease), background var(--t1), border-color var(--t1), box-shadow var(--t2) var(--ease); }
.btn:hover { background: var(--bg-soft); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { border: 0; color: var(--accent-ink); background: var(--grad); background-size: 140% 140%; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--a2) 70%, transparent);
  transition: transform var(--t1) var(--ease), background-position var(--t3) var(--ease), box-shadow var(--t2) var(--ease); }
.btn.primary:hover { background-position: 100% 0; box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--a2) 85%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 86%, #000); }
.btn.block { width: 100%; }
.btn.sm { --h: 32px; padding: 0 12px; border-radius: 10px; font-size: .86em; }
.btn.lg { --h: 48px; border-radius: 14px; font-size: 1em; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: orb-spin .7s linear infinite; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); transition: background var(--t1), color var(--t1), transform var(--t1) var(--ease); position: relative; }
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 0 2px var(--bg-elev); }
/* Iconos con micro-animación al pasar el ratón */
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover .ico-spin, .btn:hover .ico-spin { animation: orb-spin 1.2s var(--ease); }
.icon-btn:hover .ico-wiggle, .btn:hover .ico-wiggle { animation: wiggle .5s var(--ease); }
.icon-btn:hover .ico-pop, .btn:hover .ico-pop { animation: pop .35s var(--spring); }
.icon-btn:hover .ico-bob, .btn:hover .ico-bob { animation: bob .6s var(--ease); }
@keyframes wiggle { 25% { transform: rotate(-12deg) } 75% { transform: rotate(10deg) } }
@keyframes pop { 50% { transform: scale(1.22) } }
@keyframes bob { 50% { transform: translateY(-3px) } }

/* Botón de tema: sol que se convierte en luna */
.theme-toggle { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text-2); transition: transform var(--t1) var(--ease), background var(--t1), color var(--t1); }
.theme-toggle:hover { color: var(--text); background: var(--bg-soft); }
.theme-toggle:active { transform: scale(.9) rotate(-8deg); }
.tt-svg .tt-core { transition: r var(--t3) var(--spring); transform-origin: center; }
.tt-svg .tt-bite { transition: cx var(--t3) var(--ease-out), cy var(--t3) var(--ease-out); }
.tt-svg .tt-rays { transform-origin: 12px 12px; transition: transform var(--t3) var(--ease-out), opacity var(--t2); }
[data-theme="dark"] .tt-svg .tt-core { r: 8.5px; }
[data-theme="dark"] .tt-svg .tt-bite { cx: 17px; cy: 7px; }
[data-theme="dark"] .tt-svg .tt-rays { transform: rotate(90deg) scale(.4); opacity: 0; }

.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field > span, .field-label { font-weight: 600; font-size: .9em; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.input, .select, .textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-elev); color: var(--text); outline: none; transition: border-color var(--t1), box-shadow var(--t2) var(--ease); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--a2) 35%, var(--line-2)); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--a2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 16%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%237c829f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.hint-text { font-size: .84em; color: var(--text-3); margin: -6px 0 12px; }
.error-text { color: var(--danger); font-size: .9em; min-height: 1.3em; margin: 4px 0 0; }
.ok-text { color: var(--ok); font-size: .9em; }
/* Interruptor */
.switch { position: relative; display: inline-flex; align-items: center; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); transition: background var(--t2) var(--ease); position: relative; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--t2) var(--spring); }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--a2); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }
/* Chips y segmentados */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--bg-elev); color: var(--text-2); font-size: .88em; font-weight: 600; transition: all var(--t1) var(--ease); }
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--a2) 40%, var(--line-2)); }
.chip[aria-pressed="true"], .chip.on { color: var(--text); border-color: transparent; background: var(--grad-soft); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--a2) 55%, transparent); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: .88em; }
.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-1); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: .78em; font-weight: 700; line-height: 1.6;
  background: var(--bg-soft); color: var(--text-2); white-space: nowrap; }
.pill.on { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill.off { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.pill.pending { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill.admin { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a2) 35%, transparent); }
.pill.info { background: color-mix(in srgb, var(--info) 12%, transparent); color: var(--info); }
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.kbd-less { }

/* ---------------- Ayudas (tooltips para principiantes) ---------------- */
.help-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0;
  background: var(--bg-soft); color: var(--text-3); font: 700 11px/1 var(--font); transition: all var(--t1); }
.help-dot:hover, .help-dot:focus-visible { background: var(--grad); color: #fff; }
.tip { position: fixed; z-index: 1000; max-width: 300px; padding: 10px 12px; border-radius: 12px; background: var(--navy); color: #eef0ff;
  font-size: .86em; line-height: 1.45; box-shadow: var(--shadow-3); pointer-events: none; opacity: 0; transform: translateY(4px) scale(.98);
  transition: opacity var(--t1), transform var(--t2) var(--ease-out); }
[data-theme="dark"] .tip { background: #f2f3ff; color: #0b1033; }
.tip.show { opacity: 1; transform: none; }
.tip b { display: block; margin-bottom: 2px; }

/* ---------------- Toasts ---------------- */
.toasts { position: fixed; z-index: 1200; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-elev);
  border: 1px solid var(--line); box-shadow: var(--shadow-3); animation: toast-in var(--t3) var(--spring); font-size: .93em; }
.toast.out { animation: toast-out var(--t2) var(--ease) forwards; }
.toast .t-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: var(--grad); }
.toast.error .t-ico { background: var(--danger); }
.toast.ok .t-ico { background: var(--ok); }
.toast .t-x { margin-left: auto; border: 0; background: none; color: var(--text-3); padding: 0 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------------- Diálogos ---------------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--r-xl); background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-3);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow: visible; }
dialog.modal.wide { width: min(920px, calc(100vw - 24px)); }
dialog.modal.xwide { width: min(1080px, calc(100vw - 24px)); }
dialog.modal[open] { animation: dlg-in var(--t3) var(--ease-out); }
dialog.modal::backdrop { background: rgba(6,9,30,.55); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; }
.modal-head h2 { margin: 0; font: 700 1.2em/1.25 var(--font-display); letter-spacing: -.01em; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 10px 22px 8px; overflow: auto; max-height: calc(100vh - 190px); }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 22px 20px; flex-wrap: wrap; }
.modal-foot .spacer { margin-right: auto; }

/* ---------------- Fondo aurora (ligero) ---------------- */
.aurora-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora-bg::before, .aurora-bg::after { content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .32;
  filter: blur(60px); will-change: transform; }
.aurora-bg::before { background: radial-gradient(circle, var(--a1), transparent 62%); top: -35vmax; left: -20vmax; animation: drift-a 26s var(--ease) infinite alternate; }
.aurora-bg::after { background: radial-gradient(circle, var(--a3), transparent 62%); bottom: -40vmax; right: -25vmax; animation: drift-b 30s var(--ease) infinite alternate; }
[data-theme="dark"] .aurora-bg::before, [data-theme="dark"] .aurora-bg::after { opacity: .22; }
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-12vmax, -8vmax) scale(1.08); } }

/* =====================================================================
   INICIO DE SESIÓN
   ===================================================================== */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(380px, 1fr); }
.login-hero { position: relative; overflow: hidden; background: var(--navy); color: #eef0ff; padding: 36px clamp(28px, 5vw, 64px); display: flex; flex-direction: column; isolation: isolate; }
.login-hero .mesh { position: absolute; inset: -20%; z-index: -1; background:
  radial-gradient(40% 50% at 20% 25%, color-mix(in srgb, var(--a1) 75%, transparent), transparent 70%),
  radial-gradient(45% 55% at 85% 30%, color-mix(in srgb, var(--a2) 70%, transparent), transparent 70%),
  radial-gradient(55% 60% at 60% 95%, color-mix(in srgb, var(--a3) 75%, transparent), transparent 70%);
  animation: mesh 22s var(--ease) infinite alternate; will-change: transform; opacity: .85; }
.login-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(0,8,40,.55)); }
@keyframes mesh { 50% { transform: translate(3%, -2%) rotate(6deg) scale(1.06); } 100% { transform: translate(-3%, 2%) rotate(-4deg) scale(1.02); } }
.login-hero .hero-top { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-height: 40px; }
.login-hero .company { display: flex; align-items: center; gap: 10px; color: rgba(238,240,255,.86); font-size: .9em; }
.login-hero .company .company-logo { height: 44px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.login-hero .company .company-logo.raw { filter: none; background: #fff; border-radius: 10px; padding: 4px 6px; }
.hero-center { margin: clamp(0px, 2vh, 28px) 0 auto; max-width: 560px; }
.hero-title { font: 800 clamp(2.4rem, 4.6vw, 4rem)/1.02 var(--font-display); letter-spacing: -.035em; margin: 26px 0 14px; }
.hero-title .grad { background: linear-gradient(110deg, #fff, #ffd1d1 30%, #d9cbff 60%, #bcd6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.08em; color: rgba(238,240,255,.78); max-width: 470px; margin: 0 0 28px; }
.trust { display: grid; gap: 10px; max-width: 480px; }
.trust-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11); animation: rise .7s var(--ease-out) both; }
.trust-item:nth-child(2) { animation-delay: .08s } .trust-item:nth-child(3) { animation-delay: .16s } .trust-item:nth-child(4) { animation-delay: .24s }
.trust-item .ti-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.1); flex: none; }
.trust-item b { display: block; font-size: .95em; } .trust-item span { color: rgba(238,240,255,.7); font-size: .86em; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.hero-foot { margin-top: 28px; padding-top: 4px; color: rgba(238,240,255,.6); font-size: .82em; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hero-foot a { color: rgba(238,240,255,.82); }
.login-side { position: relative; display: flex; flex-direction: column; padding: 24px clamp(20px, 4vw, 56px); background: var(--bg); }
.login-side .side-top { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.login-card { width: min(420px, 100%); margin: auto; padding: 8px 0 24px; }
.login-card .lc-brand { display: none; }
.login-card h1 { font: 750 1.75em/1.15 var(--font-display); letter-spacing: -.025em; margin: 0 0 6px; }
.login-card .lead { color: var(--text-2); margin: 0 0 24px; }
.login-step { animation: step-in var(--t3) var(--ease-out); }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } }
.login-step.back { animation-name: step-back; }
@keyframes step-back { from { opacity: 0; transform: translateX(-14px); } }
.ms-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 48px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--bg-elev); font-weight: 600; transition: all var(--t1) var(--ease); text-decoration: none; color: var(--text); }
.ms-btn:hover { border-color: color-mix(in srgb, var(--a3) 45%, var(--line-2)); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.ms-btn svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: .84em; margin: 18px 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.login-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: .9em; }
.linkish { border: 0; background: none; padding: 0; color: var(--text-2); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text-3) 50%, transparent); text-underline-offset: 3px; }
.linkish:hover { color: var(--text); text-decoration-color: var(--a2); }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--line);
  width: fit-content; margin: -8px 0 18px; font-size: .92em; }
.who .initial { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: .85em; }
.who button { border: 0; background: none; color: var(--text-3); font-weight: 600; font-size: .9em; }
.who button:hover { color: var(--text); }
.otp { display: flex; gap: 8px; justify-content: space-between; margin: 4px 0 14px; }
.otp input { width: 100%; max-width: 56px; height: 60px; text-align: center; font: 700 1.5em var(--mono); border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--bg-elev); outline: none; transition: border-color var(--t1), box-shadow var(--t2), transform var(--t1) var(--spring); caret-color: var(--a2); }
.otp input:focus { border-color: var(--a2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 16%, transparent); transform: translateY(-2px); }
.otp input.filled { border-color: color-mix(in srgb, var(--a2) 50%, var(--line-2)); }
.otp.shake { animation: shake .42s var(--ease); }
.otp.ok input { border-color: var(--ok); }
@keyframes shake { 20%, 60% { transform: translateX(-6px) } 40%, 80% { transform: translateX(6px) } }
.remember { margin: 6px 0 18px; }
.remember .field-label { margin-bottom: 8px; }
.announce { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; margin: 0 0 18px;
  background: color-mix(in srgb, var(--warn) 12%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-size: .9em; }
.demo-banner { background: var(--grad-soft); border: 1px dashed color-mix(in srgb, var(--a2) 50%, transparent); }
.side-foot { text-align: center; color: var(--text-3); font-size: .82em; display: grid; gap: 6px; }
.side-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.side-foot a { color: var(--text-3); text-decoration: none; } .side-foot a:hover { color: var(--text); text-decoration: underline; }
.credits a { font-weight: 700; color: var(--text-2); text-decoration: none; background-image: var(--grad); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size var(--t2) var(--ease); }
.credits a:hover { background-size: 100% 2px; color: var(--text); }
@media (max-width: 920px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-card .lc-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
  .login-side { background: var(--bg); }
}

/* Intro animada */
.intro { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: var(--navy); color: #fff; cursor: pointer;
  animation: intro-out .6s var(--ease) 2.1s forwards; }
.intro .intro-inner { display: grid; justify-items: center; gap: 18px; }
.intro svg { width: 148px; height: 148px; overflow: visible; }
.intro .ring-draw { stroke-dasharray: 330; stroke-dashoffset: 330; animation: draw 1.15s var(--ease-out) .1s forwards; }
.intro .core-pop { transform-origin: 60px 60px; transform: scale(0); animation: core-pop .6s var(--spring) .75s forwards; }
.intro .glow { transform-origin: 60px 60px; opacity: 0; animation: glow 1.4s var(--ease) .8s forwards; }
.intro .word { font: 800 2.6rem/1 var(--font-display); letter-spacing: -.03em; display: flex; gap: 2px; }
.intro .word span { display: inline-block; opacity: 0; transform: translateY(14px); animation: letter .5s var(--ease-out) forwards; }
.intro .word span:nth-child(1) { animation-delay: .95s } .intro .word span:nth-child(2) { animation-delay: 1.02s }
.intro .word span:nth-child(3) { animation-delay: 1.09s } .intro .word span:nth-child(4) { animation-delay: 1.16s }
.intro .by { opacity: 0; animation: fade .5s var(--ease) 1.35s forwards; color: rgba(238,240,255,.7); letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; font-weight: 600; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes core-pop { to { transform: scale(1); } }
@keyframes glow { 40% { opacity: .9; transform: scale(1.6); } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes letter { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }

/* =====================================================================
   APLICACIÓN
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.app.side-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
/* Barra lateral */
.side { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg-sunk); border-right: 1px solid var(--line); overflow: hidden;
  transition: transform var(--t3) var(--ease-out); }
.side-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 8px 16px; }
.side-head .brand-lockup { font-size: 1.05em; }
.side-head .icon-btn { margin-left: auto; }
.side-company { padding: 0 16px 6px; min-height: 0; }
.side-company .company-logo { height: 26px; max-width: 150px; }
.new-chat { margin: 8px 12px 6px; justify-content: flex-start; gap: 10px; height: 44px; border-radius: 14px; }
.new-chat .plus { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--grad); color: #fff; transition: transform var(--t2) var(--spring); }
.new-chat:hover .plus { transform: rotate(90deg); }
.side-search { position: relative; margin: 4px 12px 8px; }
.side-search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.side-search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg-elev); outline: none; font-size: .9em; }
.side-search input:focus { border-color: var(--a2); }
.conv-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 12px; contain: strict; }
.conv-group { font-size: .74em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 14px 10px 6px; }
.conv { position: relative; display: flex; align-items: center; border-radius: 11px; transition: background var(--t1); }
.conv:hover { background: color-mix(in srgb, var(--bg-soft) 85%, transparent); }
.conv.active { background: var(--bg-elev); box-shadow: var(--shadow-1); }
.conv.active::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--grad); }
.conv .open { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 9px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92em; color: var(--text-2); }
.conv.active .open, .conv:hover .open { color: var(--text); }
.conv .exp { font-size: .7em; color: var(--warn); margin-right: 4px; white-space: nowrap; }
.conv .more { opacity: 0; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); display: grid; place-items: center; margin-right: 4px; flex: none; }
.conv:hover .more, .conv.active .more, .conv .more:focus-visible { opacity: 1; }
.conv .more:hover { background: var(--bg-sunk); color: var(--text); }
.conv.enter { animation: rise .35s var(--ease-out); }
.conv-empty { padding: 26px 16px; text-align: center; color: var(--text-3); font-size: .9em; }
.side-foot-area { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 6px; }
.user-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 14px; border: 0; background: transparent; text-align: left; transition: background var(--t1); }
.user-card:hover { background: var(--bg-soft); }
.user-card .uc-text { min-width: 0; flex: 1; }
.user-card b { display: block; font-size: .93em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card span { display: block; font-size: .78em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-credits { font-size: .72em; color: var(--text-3); text-align: center; padding: 2px 6px 4px; }
.side-credits a { color: var(--text-2); font-weight: 700; text-decoration: none; }
.side-credits a:hover { color: var(--text); text-decoration: underline; }

/* Principal */
.main { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; overflow: hidden; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 58px; border-bottom: 1px solid transparent; transition: border-color var(--t2), background var(--t2); z-index: 5; }
.topbar.scrolled { border-bottom-color: var(--line); background: var(--bg-glass); }
[data-motion="full"] .topbar.scrolled, :root:not([data-motion]) .topbar.scrolled { backdrop-filter: saturate(1.4) blur(10px); }
.topbar .conv-title { font-weight: 650; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 6px 8px; border-radius: 10px; border: 0; background: none; text-align: left; }
.topbar .conv-title:not(:empty):hover { background: var(--bg-soft); }
.topbar .grow { flex: 1; }
.residency { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: .8em; font-weight: 700;
  color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); cursor: help; white-space: nowrap; }
.residency .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2.4s infinite; }
.residency.demo { color: var(--a2); background: var(--grad-soft); border-color: color-mix(in srgb, var(--a2) 30%, transparent); }
.residency.demo .pulse { background: var(--a2); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.top-actions { display: flex; align-items: center; gap: 4px; }
.top-avatar { border: 0; background: none; padding: 2px; border-radius: 50%; transition: transform var(--t1) var(--spring); }
.top-avatar:hover { transform: scale(1.06); }
.banner { display: flex; align-items: center; gap: 10px; margin: 0 14px; padding: 9px 14px; border-radius: 12px; font-size: .9em;
  background: color-mix(in srgb, var(--warn) 12%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); animation: rise .4s var(--ease-out); }
.banner .icon-btn { margin-left: auto; width: 28px; height: 28px; }

/* Mensajes */
.thread { flex: 1; overflow-y: auto; overflow-anchor: auto; scroll-behavior: auto; }
.thread-inner { width: min(800px, 100%); margin: 0 auto; padding: 18px 20px 30px; }
.msg { display: flex; gap: 12px; margin: 0 0 22px; animation: msg-in var(--t3) var(--ease-out); content-visibility: auto; contain-intrinsic-size: auto 120px; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg.user { justify-content: flex-end; }
.msg.user .body { max-width: min(78%, 620px); display: grid; justify-items: end; gap: 6px; }
.msg.user .bubble { background: var(--bg-soft); border: 1px solid var(--line); padding: 10px 15px; border-radius: 18px 18px 6px 18px; white-space: pre-wrap; word-wrap: break-word; }
.msg.assistant .avatar-col { flex: none; padding-top: 2px; }
.msg.assistant .body { flex: 1; min-width: 0; }
.msg .meta-note { display: inline-flex; align-items: center; gap: 6px; font-size: .78em; color: var(--text-3); padding: 3px 9px; border-radius: 99px; background: var(--bg-soft); }
.msg .meta-note.shield { color: var(--a2); background: var(--grad-soft); }
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .75em; }
.md h1, .md h2, .md h3 { font-family: var(--font-display); letter-spacing: -.015em; line-height: 1.25; margin: 1.2em 0 .5em; }
.md h1 { font-size: 1.35em; } .md h2 { font-size: 1.18em; } .md h3 { font-size: 1.04em; }
.md ul, .md ol { padding-left: 1.4em; margin: 0 0 .8em; } .md li { margin: .25em 0; } .md li::marker { color: var(--a2); }
.md a { color: var(--a3); text-decoration: underline; text-underline-offset: 2px; }
.md code { font: .88em var(--mono); background: var(--bg-soft); border: 1px solid var(--line); padding: .1em .38em; border-radius: 6px; }
.md blockquote { margin: .8em 0; padding: .6em 1em; border-left: 3px solid; border-image: var(--grad) 1; background: var(--grad-soft); border-radius: 0 10px 10px 0; color: var(--text-2); }
.md hr { border: 0; height: 1px; background: var(--line); margin: 1.2em 0; }
.code-block { position: relative; margin: .8em 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #0d1230; }
.code-block .cb-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; font-size: .76em; color: #a9afd4; background: #141a3f; }
.code-block .cb-copy { border: 0; background: rgba(255,255,255,.06); color: #dfe2ff; height: 26px; padding: 0 10px; border-radius: 8px; font-size: .95em; font-weight: 600; }
.code-block .cb-copy:hover { background: rgba(255,255,255,.14); }
.code-block pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: #e6e8ff; font: .86em/1.6 var(--mono); }
.code-block pre code { background: none; border: 0; padding: 0; color: inherit; }
.table-wrap { overflow-x: auto; margin: .8em 0; border: 1px solid var(--line); border-radius: 12px; }
.md table { border-collapse: collapse; width: 100%; font-size: .93em; }
.md th, .md td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.md th { background: var(--bg-soft); font-weight: 700; }
.md tr:last-child td { border-bottom: 0; }
.cursor::after { content: ""; display: inline-block; width: .55em; height: 1.05em; vertical-align: -.15em; margin-left: 2px; border-radius: 3px; background: var(--grad); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--text-3); font-size: .92em; }
.thinking .dots { display: inline-flex; gap: 4px; }
.thinking .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--a2); animation: dot 1.2s var(--ease) infinite; }
.thinking .dots i:nth-child(2) { animation-delay: .15s; background: var(--a1); } .thinking .dots i:nth-child(3) { animation-delay: .3s; background: var(--a3); }
@keyframes dot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.steps { display: grid; gap: 4px; margin: 0 0 10px; }
.step { display: flex; align-items: center; gap: 8px; font-size: .84em; color: var(--text-3); animation: rise .3s var(--ease-out); min-width: 0; }
.step span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .ico { width: 15px; height: 15px; }
.step.warn { color: var(--warn); }
.msg-actions { display: flex; gap: 2px; margin-top: 8px; opacity: .0; transition: opacity var(--t2); }
.msg:hover .msg-actions, .msg:focus-within .msg-actions, .msg.last .msg-actions { opacity: 1; }
.msg-actions .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.msg-actions .icon-btn svg { width: 17px; height: 17px; }
.msg-actions .icon-btn[aria-pressed="true"] { color: var(--a2); background: var(--grad-soft); }
.fb-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; animation: rise .3s var(--ease-out); }
.fb-reasons .chip { height: 30px; font-size: .8em; }
.sources { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.source { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 5px 10px 5px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--bg-elev);
  font-size: .8em; text-decoration: none; color: var(--text-2); transition: all var(--t1); }
.source:hover { color: var(--text); border-color: color-mix(in srgb, var(--a3) 45%, var(--line)); transform: translateY(-1px); }
.source .n { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); font-weight: 700; font-size: .9em; flex: none; }
.source span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.gen-file { display: grid; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-elev); overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform var(--t2) var(--ease-out), box-shadow var(--t2), border-color var(--t2); animation: pop-in .45s var(--spring); }
.gen-file:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--a2) 40%, var(--line)); }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } }
.gen-file img { width: 100%; max-height: 220px; object-fit: contain; background: #fff; border-bottom: 1px solid var(--line); }
.gen-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ext { width: 38px; height: 44px; border-radius: 9px; display: grid; place-items: center; font: 800 .66em var(--font); text-transform: uppercase; color: #fff; flex: none; background: var(--text-3); letter-spacing: .02em; }
.ext-docx { background: #2b579a; } .ext-xlsx, .ext-xlsm, .ext-csv { background: #217346; } .ext-pptx { background: #c43e1c; } .ext-pdf { background: #d93025; }
.ext-png, .ext-svg, .ext-jpg, .ext-jpeg, .ext-webp { background: var(--a2); } .ext-md, .ext-txt { background: #475569; }
.gen-row .info { min-width: 0; flex: 1; display: grid; }
.gen-row .name { font-weight: 650; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-row .sub { font-size: .76em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-row .dl { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-soft); color: var(--text-2); }
.gen-file:hover .dl { background: var(--grad); color: #fff; }
.msg.error .md { color: var(--danger); }
.err-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--danger) 8%, var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); color: var(--text); font-size: .93em; margin-top: 6px; }

/* Estado vacío */
.empty { flex: 1; display: grid; place-items: safe center; padding: 20px; overflow: auto; min-height: 0; }
.empty-inner { width: min(760px, 100%); display: grid; justify-items: center; text-align: center; gap: 8px; }
.empty h1 { font: 760 clamp(1.7rem, 3.4vw, 2.5rem)/1.12 var(--font-display); letter-spacing: -.03em; margin: 18px 0 2px; }
.empty .sub { color: var(--text-2); margin: 0 0 18px; }
.suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 4px; }
.sugg { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-elev);
  transition: transform var(--t2) var(--ease-out), box-shadow var(--t2), border-color var(--t2); animation: rise .6s var(--ease-out) both; }
.sugg:nth-child(2) { animation-delay: .05s } .sugg:nth-child(3) { animation-delay: .1s } .sugg:nth-child(4) { animation-delay: .15s }
.sugg:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--a2) 35%, var(--line)); }
.sugg .s-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad-soft); color: var(--a2); flex: none; }
.sugg b { display: block; font-size: .95em; } .sugg span { color: var(--text-3); font-size: .85em; }

/* Compositor */
.composer-wrap { padding: 6px 20px 10px; }
.composer { position: relative; width: min(800px, 100%); margin: 0 auto; border-radius: 22px; background: var(--bg-elev); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2); transition: border-color var(--t2), box-shadow var(--t2); }
.composer:focus-within { border-color: color-mix(in srgb, var(--a2) 55%, var(--line-2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 12%, transparent), var(--shadow-2); }
.composer.blocked { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent), var(--shadow-2); }
.composer.drag { border-style: dashed; border-color: var(--a2); }
.composer .glow-line { position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); opacity: 0; transition: opacity var(--t2); }
.composer:focus-within .glow-line { opacity: 1; }
.editor { position: relative; padding: 14px 16px 2px; }
.editor .backdrop, .editor textarea { font: inherit; line-height: 1.5; letter-spacing: normal; padding: 0; margin: 0; border: 0; width: 100%; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; }
.editor .backdrop { position: absolute; inset: 14px 16px 2px; color: transparent; pointer-events: none; overflow: hidden; }
.editor .backdrop mark { color: transparent; background: var(--mark); border-radius: 4px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--a2) 30%, transparent); }
.editor .backdrop mark.blk { background: color-mix(in srgb, var(--danger) 25%, transparent); box-shadow: 0 0 0 1px var(--danger); }
.editor textarea { position: relative; display: block; resize: none; outline: none; background: transparent; min-height: 26px; max-height: 40vh; overflow-y: auto; color: var(--text); }
.editor textarea::placeholder { color: var(--text-3); }
.atts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px 0; }
.att { position: relative; display: flex; align-items: center; gap: 9px; max-width: 240px; padding: 7px 30px 7px 7px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line);
  animation: pop-in .3s var(--spring); font-size: .86em; }
.att.image { padding: 0; width: 64px; height: 64px; overflow: hidden; }
.att.image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att .ext { width: 32px; height: 36px; font-size: .58em; }
.att .info { min-width: 0; display: grid; }
.att .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.att .sub { font-size: .82em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att .remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--bg-elev); color: var(--text-2); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.att .remove:hover { background: var(--danger); color: #fff; }
.att.loading::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%; background: var(--grad); border-radius: 3px; animation: load 1.1s var(--ease) infinite; }
.att .ocr-tag { position: absolute; bottom: 3px; left: 3px; font-size: .6em; font-weight: 800; padding: 1px 5px; border-radius: 5px; background: var(--grad); color: #fff; }
@keyframes load { 0% { transform: translateX(-100%) } 100% { transform: translateX(250%) } }
.cbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; }
.cbar .grow { flex: 1; min-width: 0; }
.tool { height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); font-size: .86em; font-weight: 600; transition: all var(--t1) var(--ease); }
.tool:hover { background: var(--bg-soft); color: var(--text); }
.tool[aria-pressed="true"] { color: var(--a3); background: color-mix(in srgb, var(--a3) 10%, transparent); border-color: color-mix(in srgb, var(--a3) 25%, transparent); }
.tool .ico { width: 18px; height: 18px; }
.model-pick { height: 36px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-elev); padding: 0 30px 0 12px; font-size: .86em; font-weight: 600; color: var(--text-2); max-width: 210px; }
.shield-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 8px; border-radius: 99px; border: 1px solid transparent; background: transparent;
  font-size: .8em; font-weight: 700; color: var(--text-3); transition: all var(--t2) var(--ease); white-space: nowrap; }
.shield-pill .ico { width: 17px; height: 17px; }
.shield-pill.active { color: var(--a2); background: var(--grad-soft); border-color: color-mix(in srgb, var(--a2) 30%, transparent); animation: pop .35s var(--spring); }
.shield-pill.blocked { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.send { width: 40px; height: 40px; border-radius: 13px; border: 0; display: grid; place-items: center; color: #fff; background: var(--grad); background-size: 150% 150%;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--a2) 70%, transparent); transition: transform var(--t1) var(--spring), opacity var(--t1), background-position var(--t3); flex: none; }
.send:hover { background-position: 100% 0; transform: translateY(-1px); }
.send:active { transform: scale(.92); }
.send:disabled { opacity: .45; transform: none; box-shadow: none; cursor: not-allowed; }
.send.stop { background: var(--text); color: var(--bg); }
.send svg { width: 19px; height: 19px; }
.composer-note { width: min(800px, 100%); margin: 8px auto 0; text-align: center; font-size: .76em; color: var(--text-3); }
.menu { position: absolute; z-index: 60; min-width: 250px; padding: 6px; border-radius: 16px; background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-3);
  animation: menu-in var(--t2) var(--ease-out); transform-origin: bottom left; }
.menu.floating { position: fixed; transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: .92em; color: var(--text); text-decoration: none; }
.menu button:hover, .menu a:hover, .menu button:focus-visible { background: var(--bg-soft); outline: none; }
.menu button:disabled { opacity: .5; cursor: not-allowed; }
.menu .danger-item { color: var(--danger); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu .m-note { font-size: .76em; color: var(--text-3); padding: 6px 10px 4px; line-height: 1.45; }
.menu .m-sub { margin-left: auto; color: var(--text-3); font-size: .82em; }
.menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 10px; }
.menu-head b { display: block; } .menu-head span { color: var(--text-3); font-size: .82em; }
.shield-pop { position: absolute; bottom: calc(100% + 10px); left: 0; right: 0; z-index: 40; padding: 14px 16px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--line);
  box-shadow: var(--shadow-3); animation: menu-in var(--t2) var(--ease-out); max-height: 46vh; overflow: auto; }
.shield-pop h4 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.shield-pop .preview { font-size: .92em; white-space: pre-wrap; word-break: break-word; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); margin: 10px 0 0; max-height: 26vh; overflow: auto; }
.shield-pop .tok { font: 600 .85em var(--mono); padding: 0 .3em; border-radius: 5px; background: var(--mark); color: var(--text); }
.shield-pop .legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.drop-overlay { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 82%, transparent); animation: fade .2s forwards; pointer-events: none; }
.drop-overlay .drop-card { display: grid; justify-items: center; gap: 10px; padding: 28px 36px; border-radius: 26px; border: 2px dashed var(--a2); background: var(--bg-elev); box-shadow: var(--shadow-3); font-weight: 650; }
.drop-overlay .drop-card .ico { width: 34px; height: 34px; color: var(--a2); animation: bob 1.2s var(--ease) infinite; }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse-red 1.4s infinite; flex: none; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.rec-time { font: 600 .9em var(--mono); min-width: 42px; }
.rec-wave { flex: 1; height: 36px; min-width: 0; }
.rec-bar.busy .rec-wave { opacity: .3; }

/* Avatares */
.av { --size: 36px; width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; position: relative; background: var(--bg-soft); }
.av svg { width: 100%; height: 100%; display: block; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.ring { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px color-mix(in srgb, var(--a2) 55%, transparent); }
.av .initials { font-weight: 800; color: #fff; font-size: calc(var(--size) * .38); }
.av.online::after { content: ""; position: absolute; right: 2%; bottom: 2%; width: 26%; height: 26%; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--bg-elev); }
.av-aura { background: var(--grad); }
.av-aura .aura-orb { --s: 78%; }
/* Animaciones del avatar SVG */
.avatar-svg .breathe { transform-origin: 60px 120px; animation: breathe 4s var(--ease) infinite; }
.avatar-svg .head { transform-origin: 60px 70px; animation: sway 7s var(--ease) infinite; }
.avatar-svg .eye { transform-origin: center; transform-box: fill-box; animation: av-blink 5.2s infinite; }
.avatar-svg .eye.r { animation-delay: .02s; }
.avatar-svg .hand { opacity: 0; transform-origin: 92px 112px; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.03); } }
@keyframes sway { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(1.6deg); } 70% { transform: rotate(-1.4deg); } }
@keyframes av-blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }
.avatar-svg.g-wave .hand { opacity: 1; animation: wave 1.1s var(--ease) 2; }
.avatar-svg.g-nod .head { animation: nod .55s var(--ease) 3; }
.avatar-svg.g-wink .eye.r { animation: wink 1.2s var(--ease) 1; }
.avatar-svg.g-jump .breathe { animation: jump .7s var(--spring) 2; }
.avatar-svg.g-tilt .head { animation: tilt 1.6s var(--ease) 1; }
.avatar-svg.g-heart .heart { animation: heart-up 1.8s var(--ease-out) 1 forwards; }
.avatar-svg .heart { opacity: 0; transform-origin: 90px 40px; }
.avatar-svg.g-laugh .mouth { transform-origin: 60px 84px; transform-box: view-box; animation: laugh .3s var(--ease) 5; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-22deg); } 75% { transform: rotate(16deg); } }
@keyframes nod { 50% { transform: translateY(4px) rotate(-1deg); } }
@keyframes wink { 0%, 30%, 70%, 100% { transform: scaleY(1); } 40%, 60% { transform: scaleY(.08); } }
@keyframes jump { 50% { transform: translateY(-8px) scale(1.02, .98); } }
@keyframes tilt { 30%, 70% { transform: rotate(-9deg); } }
@keyframes heart-up { 0% { opacity: 0; transform: translate(0, 10px) scale(.4); } 30% { opacity: 1; transform: translate(0, 0) scale(1.1); } 100% { opacity: 0; transform: translate(6px, -26px) scale(.9); } }
@keyframes laugh { 50% { transform: scaleY(1.35); } }
/* Foto «viva» */
.photo-live { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; position: relative; transform-style: preserve-3d; }
.photo-live img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 60%; animation: photo-breathe 6s var(--ease) infinite; }
.photo-live::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.28) 50%, transparent 60%); transform: translateX(-60%); animation: sheen 6.5s var(--ease) infinite; }
@keyframes photo-breathe { 0%, 100% { transform: scale(1.04) translate(0, 0); } 50% { transform: scale(1.09) translate(0, -1.5%); } }
@keyframes sheen { 0%, 60% { transform: translateX(-60%); } 85%, 100% { transform: translateX(60%); } }
.photo-live.g-wave img { animation: photo-wave 1s var(--ease) 2; } .photo-live.g-nod img { animation: photo-nod .5s var(--ease) 3; }
.photo-live.g-jump img { animation: photo-jump .7s var(--spring) 2; } .photo-live.g-tilt img { animation: photo-tilt 1.6s var(--ease); }
@keyframes photo-wave { 25% { transform: scale(1.08) rotate(-5deg); } 75% { transform: scale(1.08) rotate(5deg); } }
@keyframes photo-nod { 50% { transform: scale(1.07) translateY(4%); } }
@keyframes photo-jump { 50% { transform: scale(1.12) translateY(-6%); } }
@keyframes photo-tilt { 40%, 60% { transform: scale(1.08) rotate(-8deg); } }

/* Bienvenida */
.welcome { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); cursor: pointer;
  animation: fade .35s var(--ease) both; }
.welcome.out { animation: intro-out .45s var(--ease) forwards; }
.welcome-card { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 28px 36px 26px; border-radius: 32px; background: var(--bg-elev); border: 1px solid var(--line);
  box-shadow: var(--shadow-3); animation: dlg-in .6s var(--spring); min-width: min(380px, 92vw); position: relative; overflow: hidden; }
.welcome-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 120px; background: var(--grad-soft); z-index: 0; }
.welcome-card > * { position: relative; }
.welcome-card .av { --size: 132px; box-shadow: 0 0 0 5px var(--bg-elev), 0 14px 34px -12px color-mix(in srgb, var(--a2) 60%, transparent); }
.welcome-card h2 { margin: 6px 0 0; font: 780 1.6em/1.15 var(--font-display); letter-spacing: -.025em; }
.welcome-card p { margin: 0; color: var(--text-2); }
.welcome-card .bar { width: 120px; height: 4px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; margin-top: 8px; }
.welcome-card .bar i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; animation: bar 2.8s linear forwards; }
@keyframes bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.confetti i { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: confetti 1.6s var(--ease-out) forwards; }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), 340px) rotate(var(--rot)); } }

/* Recorrido guiado */
.tour-spot { position: fixed; z-index: 1600; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(6,9,30,.58), 0 0 0 3px var(--a2); pointer-events: none;
  transition: all var(--t3) var(--ease-out); }
.tour-card { position: fixed; z-index: 1601; width: min(380px, calc(100vw - 24px)); border-radius: 24px; background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-3);
  overflow: hidden; transition: top var(--t3) var(--ease-out), left var(--t3) var(--ease-out); animation: dlg-in .4s var(--ease-out); }
.tour-card .illus { height: 150px; background: var(--grad-soft); display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.tour-card .illus svg { width: 100%; height: 100%; }
.tour-card .tc-body { padding: 16px 18px 6px; }
.tour-card h3 { margin: 0 0 6px; font: 740 1.12em/1.25 var(--font-display); }
.tour-card p { margin: 0; color: var(--text-2); font-size: .93em; }
.tour-card .tc-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px 16px; }
.tour-card .dots { display: flex; gap: 5px; margin-right: auto; }
.tour-card .dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line-2); transition: all var(--t2) var(--ease); }
.tour-card .dots i.on { width: 20px; background: var(--grad); }
.tour-blocker { position: fixed; inset: 0; z-index: 1599; }

/* Paneles laterales (ayuda) */
.drawer { position: fixed; z-index: 900; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--bg-elev); border-left: 1px solid var(--line); box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; animation: drawer-in var(--t3) var(--ease-out); }
.drawer.out { animation: drawer-out var(--t2) var(--ease) forwards; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 10px; }
.drawer-head h2 { margin: 0; font: 740 1.15em var(--font-display); }
.drawer-head .icon-btn { margin-left: auto; }
.drawer-body { flex: 1; overflow: auto; padding: 6px 18px 20px; }
.drawer-scrim { position: fixed; inset: 0; z-index: 899; background: rgba(6,9,30,.3); animation: fade .2s forwards; }
.guide-list { display: grid; gap: 8px; }
.guide { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-elev); text-decoration: none; color: var(--text);
  transition: all var(--t2) var(--ease-out); }
.guide:hover { transform: translateX(2px); border-color: color-mix(in srgb, var(--a2) 35%, var(--line)); box-shadow: var(--shadow-2); }
.guide .g-ico { width: 40px; height: 46px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 800 .62em var(--font); flex: none; background: #d93025; }
.guide .g-ico.pptx { background: #c43e1c; }
.guide.disabled { opacity: .55; pointer-events: none; }
.guide b { display: block; font-size: .93em; } .guide span { color: var(--text-3); font-size: .82em; }
.guide .g-actions { margin-left: auto; display: flex; gap: 2px; }
.section-title { font-size: .76em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.help-search { position: relative; margin-bottom: 4px; }
.help-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.help-card { padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-elev); text-align: left; display: grid; gap: 4px; transition: all var(--t2) var(--ease-out); }
.help-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.help-card .ico { color: var(--a2); }
.help-card b { font-size: .9em; } .help-card span { font-size: .8em; color: var(--text-3); }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 2px; }
.faq summary { cursor: pointer; font-weight: 650; font-size: .93em; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 700; transition: transform var(--t2) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 8px 0 2px; color: var(--text-2); font-size: .9em; }

/* Ajustes */
/* Altura fija: al cambiar de pestaña (o cuando una carga en dos tiempos, como «API y conexiones») la ventana no salta */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); height: min(680px, calc(100vh - 190px)); }
.settings nav { border-right: 1px solid var(--line); padding: 14px 10px; display: grid; align-content: start; gap: 2px; }
.settings nav button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 11px; background: none; text-align: left; font-weight: 600; font-size: .92em; color: var(--text-2); }
.settings nav button:hover { background: var(--bg-soft); color: var(--text); }
.settings nav button[aria-selected="true"] { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a2) 25%, transparent); }
.settings .pane { padding: 6px 24px 20px; overflow: auto; min-height: 0; overscroll-behavior: contain; }
.settings .pane h3 { font: 740 1.08em var(--font-display); margin: 18px 0 4px; display: flex; align-items: center; gap: 8px; }
.settings .pane h3:first-child { margin-top: 10px; }
.settings .pane > p.desc { margin: 0 0 14px; color: var(--text-3); font-size: .9em; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .r-text { flex: 1; min-width: 0; }
.row .r-text b { display: flex; align-items: center; gap: 6px; font-size: .94em; font-weight: 650; }
.row .r-text span { display: block; color: var(--text-3); font-size: .84em; margin-top: 1px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 0; position: relative; transition: transform var(--t2) var(--spring); }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; box-shadow: 0 0 0 2px var(--text); }
.sw-aura { background: linear-gradient(135deg, #ff5050, #8b5cf6, #3b82f6); } .sw-alvea { background: linear-gradient(135deg, #ff5050, #000b41); }
.sw-ocean { background: linear-gradient(135deg, #06b6d4, #6366f1); } .sw-emerald { background: linear-gradient(135deg, #10b981, #3b82f6); }
.sw-sunset { background: linear-gradient(135deg, #f59e0b, #ec4899); } .sw-mono { background: linear-gradient(135deg, #94a3b8, #334155); }
.avatar-studio { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.studio-preview { position: sticky; top: 0; display: grid; justify-items: center; gap: 12px; padding: 18px; border-radius: 22px; background: var(--grad-soft); border: 1px solid var(--line); }
.studio-preview .av { --size: 150px; box-shadow: 0 0 0 5px var(--bg-elev), var(--shadow-2); }
.studio-preview .gest { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.opt-group { margin: 0 0 14px; }
.opt-group > .field-label { margin-bottom: 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-elev); display: grid; place-items: center; padding: 0; transition: all var(--t1) var(--ease); overflow: hidden; }
.opt:hover { border-color: var(--a2); }
.opt[aria-pressed="true"] { border-color: transparent; box-shadow: 0 0 0 2px var(--a2); }
.opt svg { width: 100%; height: 100%; }
.color-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--bg-elev); box-shadow: 0 0 0 1px var(--line-2); padding: 0; transition: transform var(--t1) var(--spring); }
.color-dot:hover { transform: scale(1.1); }
.color-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--a2); }
.crop-stage { position: relative; width: min(360px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #111; touch-action: none; cursor: grab; }
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas, .crop-stage video { width: 100%; height: 100%; display: block; }
.crop-stage .mask { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, transparent 45%, rgba(0,0,0,.55) 45.5%); }
.crop-stage .mask::after { content: ""; position: absolute; inset: 5%; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
.crop-stage .scan { position: absolute; left: 5%; right: 5%; height: 3px; top: 5%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--a1), var(--a2), var(--a3), transparent);
  box-shadow: 0 0 18px var(--a2); animation: scan 1.6s var(--ease) infinite alternate; }
@keyframes scan { to { top: 94%; } }
.crop-tools { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; width: min(360px, 100%); }
.crop-tools input[type=range] { flex: 1; accent-color: var(--a2); }
.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.mode-card { padding: 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-elev); text-align: left; display: grid; gap: 4px; transition: all var(--t2) var(--ease); }
.mode-card:hover { border-color: color-mix(in srgb, var(--a2) 45%, var(--line-2)); }
.mode-card[aria-pressed="true"] { border-color: transparent; box-shadow: 0 0 0 2px var(--a2); background: var(--grad-soft); }
.mode-card b { font-size: .9em; } .mode-card span { font-size: .78em; color: var(--text-3); }
.privacy-note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg-soft); font-size: .84em; color: var(--text-2); margin: 12px 0; }
.privacy-note .ico { color: var(--ok); flex: none; }
.token-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft); border: 1px dashed var(--line-2); font: .85em var(--mono); word-break: break-all; }
.code-snippet { font: .82em/1.55 var(--mono); background: #0d1230; color: #e6e8ff; padding: 12px 14px; border-radius: 12px; overflow-x: auto; white-space: pre; }

/* Administración */
.admin-view { flex: 1; overflow-y: auto; }
.admin-inner { width: min(1180px, 100%); margin: 0 auto; padding: 8px 22px 40px; }
.admin-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 10px 0 14px; }
.admin-head h1 { margin: 0; font: 780 1.7em/1.1 var(--font-display); letter-spacing: -.025em; }
.admin-head p { margin: 4px 0 0; color: var(--text-3); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; }
.tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 12px; border: 0; background: none; font-weight: 650; font-size: .93em; color: var(--text-3); white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--grad); animation: grow .3s var(--ease-out); }
@keyframes grow { from { transform: scaleX(.2); opacity: 0; } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0 0 18px; }
.stat { padding: 14px 16px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--line); animation: rise .5s var(--ease-out) both; }
.stat .s-label { font-size: .8em; color: var(--text-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .s-val { font: 800 1.7em/1.2 var(--font-display); letter-spacing: -.02em; margin-top: 4px; }
.stat .s-sub { font-size: .78em; color: var(--text-3); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input { max-width: 320px; min-height: 40px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92em; }
.data-table th { text-align: left; font-size: .78em; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr { transition: background var(--t1); }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--bg-soft) 60%, transparent); }
.data-table tr.is-disabled td { opacity: .55; }
.data-table .right { text-align: right; white-space: nowrap; }
.u-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.u-cell b { display: block; } .u-cell span { display: block; color: var(--text-3); font-size: .86em; }
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: .86em; color: var(--text-3); white-space: nowrap; }
.presence i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.presence.on { color: var(--ok); } .presence.on i { background: var(--ok); animation: pulse 2.4s infinite; }
.table-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 20px; overflow-x: auto; }
.checks { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-elev); animation: rise .45s var(--ease-out) both; }
.check .c-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; background: var(--ok); }
.check.bad .c-dot { background: var(--warn); }
.check b { display: block; font-size: .93em; } .check span { color: var(--text-3); font-size: .84em; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 40px; align-items: center; gap: 10px; font-size: .86em; }
.bar-row .track { height: 9px; border-radius: 9px; background: var(--bg-soft); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 9px; background: var(--grad); transform-origin: left; animation: bar .8s var(--ease-out); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 16px 18px; border-radius: 20px; background: var(--bg-elev); border: 1px solid var(--line); }
.panel h3 { margin: 0 0 4px; font: 740 1.02em var(--font-display); display: flex; align-items: center; gap: 8px; }
.panel > p { margin: 0 0 12px; color: var(--text-3); font-size: .88em; }
.logo-drop { display: grid; place-items: center; gap: 8px; min-height: 130px; padding: 16px; border-radius: 18px; border: 2px dashed var(--line-2); background: var(--bg-soft); text-align: center; transition: all var(--t2); cursor: pointer; }
.logo-drop:hover, .logo-drop.drag { border-color: var(--a2); background: var(--grad-soft); }
.logo-drop .company-logo { height: 56px; max-width: 220px; }

/* Acerca de */
.about { text-align: center; padding: 6px 4px 4px; }
.about .aura-logo-svg { width: 120px; height: 120px; }
.about h2 { margin: 6px 0 0; font: 800 2em/1 var(--font-display); letter-spacing: -.03em; }
.about .ver { color: var(--text-3); font-size: .86em; margin: 6px 0 14px; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--line); font-size: .8em; font-weight: 700; color: var(--text-2); }
.badge .ico { width: 15px; height: 15px; color: var(--ok); }
.made-by { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .92em; color: var(--text-2); }

/* Páginas de error (la nube de Aura cambia de humor según el error) */
.err-body { background: var(--bg); }
.err-page { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 24px 16px; text-align: center; }
.err-card { max-width: 520px; }
.err-sky { position: relative; width: 220px; height: 170px; margin: 0 auto 4px; }
.err-cloud { width: 200px; height: auto; animation: err-float 6s var(--ease) infinite; filter: drop-shadow(0 14px 28px color-mix(in srgb, var(--a2) 28%, transparent)); }
.err-star { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 10px var(--a1); animation: err-twinkle 2.8s var(--ease) infinite; }
.err-star.s1 { top: 8px; left: 14px; } .err-star.s2 { top: 30px; right: 6px; animation-delay: -.9s; background: var(--a3); box-shadow: 0 0 10px var(--a3); }
.err-star.s3 { bottom: 26px; left: 0; width: 4px; height: 4px; animation-delay: -1.7s; }
.err-code { font: 900 clamp(4.2rem, 14vw, 7.5rem)/1 var(--font-display); letter-spacing: -.06em; }
.err-kicker { margin: 6px 0 0; font-size: .74em; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--a2); }
.err-page h1 { margin: 6px 0 8px; font: 760 1.6em var(--font-display); }
.err-text { color: var(--text-2); max-width: 440px; margin: 0 auto 22px; }
.err-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.err-foot { margin: 20px 0 0; font-size: .82em; color: var(--text-3); }
.err-brand { display: flex; align-items: center; gap: 6px; padding-top: 24px; font-size: .86em; color: var(--text-2); }
.err-brand .aura-by { margin-left: 0; }
/* Humores: perdida (se ladea), tormenta (tiembla), ocupada (late), acceso (quieta y atenta) */
.err-lost .err-cloud { animation: err-lost 7s var(--ease) infinite; }
.err-storm .err-cloud { animation: err-float 6s var(--ease) infinite, err-shiver 2.6s steps(2, end) infinite; }
.err-busy .err-cloud { animation: err-pulse 1.8s var(--ease) infinite; }
@keyframes err-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes err-lost { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(10px, -8px) rotate(5deg); } }
@keyframes err-shiver { 0%, 92% { translate: 0 0; } 94% { translate: -2px 0; } 96% { translate: 2px 0; } 98% { translate: -1px 0; } }
@keyframes err-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes err-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
[data-motion="reduced"] .err-cloud, [data-motion="reduced"] .err-star { animation: none; }
@media (prefers-reduced-motion: reduce) { .err-cloud, .err-star { animation: none !important; } }

/* Páginas legales */
.legal-body { background: var(--bg); }
.legal-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 12px clamp(14px, 4vw, 40px); background: var(--bg-glass); border-bottom: 1px solid var(--line); }
[data-motion="full"] .legal-top, :root:not([data-motion]) .legal-top { backdrop-filter: blur(10px); }
.legal-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex: none; }
.legal-brand .aura-orb { --s: 24px; }
.legal-brand b { font-family: var(--font-display); font-size: 1.05em; } .legal-brand span:last-child { color: var(--text-3); font-size: .85em; }
.legal-nav { display: flex; gap: 2px; overflow-x: auto; margin: 0 auto; scrollbar-width: none; }
.legal-nav a { padding: 7px 11px; border-radius: 10px; text-decoration: none; color: var(--text-2); font-size: .87em; font-weight: 600; white-space: nowrap; }
.legal-nav a:hover { background: var(--bg-soft); color: var(--text); }
.legal-nav a[aria-current="page"] { background: var(--grad-soft); color: var(--text); }
.legal-doc { width: min(820px, 100%); margin: 0 auto; padding: 34px 22px 60px; }
.legal-kicker { font-size: .78em; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.legal-doc h1 { font: 800 clamp(1.9rem, 4vw, 2.6rem)/1.1 var(--font-display); letter-spacing: -.03em; margin: 8px 0 8px; }
.legal-meta { color: var(--text-3); font-size: .88em; margin: 0 0 22px; }
.legal-toc { padding: 14px 18px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--line); margin: 0 0 26px; }
.legal-toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 28px; font-size: .9em; }
.legal-toc a { color: var(--text-2); text-decoration: none; } .legal-toc a:hover { color: var(--text); text-decoration: underline; }
.legal-doc section { scroll-margin-top: 80px; }
.legal-doc h2 { font: 750 1.3em/1.25 var(--font-display); letter-spacing: -.015em; margin: 32px 0 10px; }
.legal-doc h3 { font: 700 1.05em var(--font-display); margin: 22px 0 8px; }
.legal-doc p, .legal-doc li { color: var(--text-2); }
.legal-doc a { color: var(--a3); }
.legal-table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .9em; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-table th { background: var(--bg-soft); font-weight: 700; color: var(--text); }
.legal-note, .legal-pending { margin: 14px 0; padding: 12px 16px; border-radius: 14px; font-size: .92em; }
.legal-note { background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--a2) 25%, transparent); }
.legal-pending { background: color-mix(in srgb, var(--warn) 10%, var(--bg-elev)); border: 1px dashed color-mix(in srgb, var(--warn) 50%, transparent); }
.legal-foot { text-align: center; padding: 22px; color: var(--text-3); font-size: .86em; border-top: 1px solid var(--line); }
.legal-foot a { color: var(--text-2); font-weight: 700; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 800; inset: 0 auto 0 0; width: min(310px, 86vw); transform: translateX(-100%); box-shadow: var(--shadow-3); }
  .app.side-open .side { transform: none; }
  .app.side-open .side-scrim { display: block; }
  .residency .txt { display: none; }
  .suggestions { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .settings nav { grid-auto-flow: column; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .avatar-studio { grid-template-columns: 1fr; }
  .studio-preview { position: static; }
  .grid-2 { grid-template-columns: 1fr; }
  .help-cards { grid-template-columns: 1fr; }
  .legal-toc ol { columns: 1; }
  .model-pick { max-width: 130px; }
  .mode-cards { grid-template-columns: 1fr; }
  .thread-inner { padding: 14px 14px 24px; }
  .composer-wrap { padding: 4px 10px 8px; }
}
.side-scrim { display: none; position: fixed; inset: 0; z-index: 799; background: rgba(6,9,30,.4); }
@media (min-width: 861px) { .app.side-collapsed .side { transform: translateX(-100%); } }

/* ---------------- Movimiento reducido / desactivado ---------------- */
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation: none !important; transition: none !important; }
[data-motion="off"] .intro, [data-motion="off"] .welcome { display: none !important; }
[data-motion="reduced"] *:not(.cloud-logo *):not(.ring-logo *), [data-motion="reduced"] *::before, [data-motion="reduced"] *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
[data-motion="reduced"] .aurora-bg, [data-motion="off"] .aurora-bg { display: none; }
[data-motion="reduced"] .intro { display: none !important; }
html.paused *, html.paused *::before, html.paused *::after { animation-play-state: paused !important; }
@media print { .side, .topbar, .composer-wrap, .cat, .aurora-bg { display: none !important; } .app { display: block; height: auto; } .thread { overflow: visible; } }

/* Mostrar/ocultar contraseña */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text-3); display: grid; place-items: center; }
.pw-eye:hover { background: var(--bg-soft); color: var(--text); }
.drawer-search { padding: 0 18px 8px; }
#view-chat { flex: 1; min-height: 0; position: relative; }
.help-card.on { box-shadow: 0 0 0 2px var(--a2); background: var(--grad-soft); }
.credits-link { font-weight: 700; color: var(--text); }
.tool[aria-pressed="true"]#skill-btn { color: var(--a2); background: var(--grad-soft); border-color: color-mix(in srgb, var(--a2) 30%, transparent); }
.acc-brand { display: flex !important; align-items: center; gap: 10px; margin-bottom: 26px; }
body > .login-side { min-height: 100vh; min-height: 100dvh; background: transparent; }
.totp-panel { margin: 0 0 14px; text-align: center; }
.qr-img { background: #fff; border-radius: 14px; padding: 8px; margin: 8px auto; display: block; }
.tour-card .tc-foot { flex-wrap: wrap; }
.tour-card .tc-foot .dots { flex-basis: 100%; margin: 0 0 6px; }
.tour-card .tc-foot > .btn.ghost { margin-right: auto; padding-left: 0; }
.tour-card .tc-foot > .btn:first-of-type:not(.ghost) { margin-left: auto; }
.settings nav button { white-space: nowrap; }
@media (max-width: 860px) { .settings .pane { max-height: none; padding: 6px 16px 18px; } dialog.modal .modal-body { max-height: calc(100dvh - 150px); } }
.grow { flex: 1; }
/* Un único botón de panel: dentro del panel cuando está abierto; en la barra superior cuando está cerrado o en móvil */
@media (min-width: 861px) { .app:not(.side-collapsed) #btn-side { display: none; } }
@media (max-width: 860px) { #btn-collapse { display: none; } }
.intro #intro-logo svg { width: min(340px, 80vw); height: auto; }
#hero-logo { margin: 0 0 -10px -18px; }
.hero-brand { display: flex; align-items: flex-end; gap: 2px; margin-top: -24px; }
.hero-brand .hero-by { font-size: .9rem; margin: 0 0 82px -14px; white-space: nowrap; }
.hero-brand + .hero-title { margin-top: 6px; }
.about-logo { display: grid; place-items: center; margin: 4px 0 6px; } .about h2 { font-size: 1.1em; margin-top: -6px; }
/* Logo de marca (nube) arriba a la izquierda */
.side-logo { display: inline-block; width: 96px; margin: -10px -4px -12px -8px; }
.side-logo svg { width: 100%; height: auto; }
.aura-brand { display: block; width: 92px; height: auto; margin: -8px -4px -10px -8px; }
.aura-brand.sm { width: 70px; margin: -6px -2px -8px -6px; }
.aura-by.on-dark { color: rgba(238,240,255,.7); }
.brand-lockup { gap: 4px; align-items: center; }

/* Selector de modelo con iconos animados */
.model-btn { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 9px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--text); font-weight: 650; font-size: .88em; transition: border-color var(--t1), background var(--t1); }
.model-btn:hover { border-color: color-mix(in srgb, var(--a2) 40%, var(--line)); background: var(--bg-soft); }
.model-btn .chev .ico { width: 14px; height: 14px; color: var(--text-3); }
.model-btn:disabled { opacity: .6; }
.m-ico { position: relative; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.m-ico.sonnet { gap: 2px; }
.m-ico.sonnet i { width: 3px; height: 14px; border-radius: 3px; background: var(--grad); transform-origin: center; animation: eq .9s var(--ease) infinite; }
.m-ico.sonnet i:nth-child(2) { animation-delay: -.3s; } .m-ico.sonnet i:nth-child(3) { animation-delay: -.6s; }
.m-ico.opus .core { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 6px color-mix(in srgb, var(--a2) 60%, transparent); animation: orb-breath 3.4s var(--ease) infinite; }
.m-ico.opus .orbit { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--a2) 35%, transparent); animation: orb-spin 4.5s linear infinite; }
.m-ico.opus .orbit b { position: absolute; top: -2.5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 5px var(--a1); }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.m-ico.sol .core { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 6px color-mix(in srgb, var(--a1) 55%, transparent); animation: orb-breath 2.6s var(--ease) infinite; }
.m-ico.sol .rays { position: absolute; inset: 0; border-radius: 50%; border: 2px dotted var(--a1); animation: orb-spin 6s linear infinite; }
.m-ico.luna .moon { position: absolute; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset -4px -1px 0 0 var(--a2); transform-origin: 60% 60%; animation: luna-rock 3.6s var(--ease) infinite; }
.m-ico.luna b { position: absolute; top: 1px; right: 1px; width: 3px; height: 3px; border-radius: 50%; background: var(--a1); animation: orb-breath 2.2s var(--ease) infinite; }
@keyframes luna-rock { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
.menu .m-ico { margin-right: 2px; }

/* Indicador de residencia: candado + «Solo UE» */
.residency { gap: 6px; height: 30px; padding: 0 11px 0 9px; font-size: .78em; letter-spacing: .01em; }
.residency .lock { width: 14px; height: 14px; display: grid; place-items: center; }
.residency .lock svg { width: 14px; height: 14px; overflow: visible; }
.residency .lock .shackle { transform-origin: 11px 7px; transition: transform var(--t2) var(--spring); animation: lock-click 6s var(--ease) infinite 2s; }
.residency:hover .lock .shackle { transform: translateY(-1.6px) rotate(18deg); animation: none; }
@keyframes lock-click { 0%, 90%, 100% { transform: none; } 93% { transform: translateY(-1.4px); } 96% { transform: translateY(.3px); } }
@media (max-width: 860px) { .residency .txt { display: inline; } .residency { padding: 0 9px 0 8px; } }
/* Barra del mensaje en pantallas estrechas: iconos sin texto, nada se solapa */
.cbar > * { flex-shrink: 0; }
.cbar > .grow { flex-shrink: 1; min-width: 0; }
@media (max-width: 560px) {
  #skill-label, #shield-txt, #web-chip span:last-child { display: none; }
  .cbar { gap: 2px; padding: 6px 6px 8px; }
  .model-btn { padding: 0 8px; gap: 6px; }
  .model-btn .chev { display: none; }
}

/* ===================== Rendimiento ===================== */
/* Reposo: pausa toda animación decorativa infinita; lo útil (respuesta en curso, cargas, grabación) sigue */
html.idle *, html.idle *::before, html.idle *::after { animation-play-state: paused !important; }
html.idle .cursor::after, html.idle .thinking i, html.idle .spinner, html.idle .att.loading::after, html.idle .rec-dot,
html.idle .toast, html.idle dialog.modal[open], html.idle .welcome, html.idle .intro { animation-play-state: running !important; }
/* El logo flota como capa de composición (GPU), no repintando el SVG */
.cloud-logo { will-change: transform; animation: cl-float-root 4.8s var(--ease) infinite; }
.cloud-logo .cl-float { animation: none; }
.cloud-logo.draw { animation: cl-in .9s var(--spring) both, cl-float-root 4.8s var(--ease) .9s infinite; }
.cloud-logo.draw .cl-float { animation: none; }
@keyframes cl-float-root { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.cloud-logo .cl-glow { animation: none; }
/* Logo pequeño de la barra lateral: solo el rayo; el resto, al pasar el ratón */
.side-logo .cloud-logo { animation: none; will-change: auto; }
.side-logo .cl-drop, .side-logo .cl-glint, .side-logo .cl-core, .side-logo .cl-star, .side-logo .cl-back, .side-logo .cl-dot { animation: none; }
.side-logo .cl-drop { opacity: .6; }
.brand-lockup:hover .side-logo .cl-drop { animation: cl-rain .9s linear infinite; }
/* Avatares pequeños estáticos (los animados están en la bienvenida y en el estudio) */
.av:not(.big) .avatar-svg *, .av:not(.big) .photo-live img, .av:not(.big) .photo-live::after { animation: none !important; }
.welcome-card .av, .studio-preview .av { }
.welcome-card .av .avatar-svg *, .studio-preview .av .avatar-svg * { animation: revert-layer; }
/* Icono del modelo: se anima al pasar el ratón y en el menú */
.model-btn .m-ico * { animation-play-state: paused; }
.model-btn:hover .m-ico *, .model-btn:focus-visible .m-ico *, .menu .m-ico * { animation-play-state: running; }
/* Fondos: degradados sin desenfoque en tiempo real */
.aurora-bg::before, .aurora-bg::after { filter: none; opacity: .22; }
/* Aislar repintados de zonas animadas */
.composer, .side, .topbar, .empty-inner > div:first-child { contain: layout paint; }
.msg { contain: layout style; }
/* Menos animaciones simultáneas mientras se usa (mismo efecto visual) */
.cloud-logo .cl-back, .cloud-logo .cl-core { animation: none; }
.login-hero .mesh { animation-duration: 30s; }

/* Cabecera de la documentación (Aura × Alvea) */
.doc-banner { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 18px 16px; margin: 4px 0 14px; border-radius: 20px;
  background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--a2) 22%, var(--line)); overflow: hidden; }
.doc-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--a1) 0 33.3%, var(--a2) 33.3% 66.6%, var(--a3) 66.6%); }
.doc-banner .db-aura { width: 112px; flex: none; margin: -10px -6px -10px -8px; }
.doc-banner .db-aura svg { width: 100%; height: auto; }
.doc-banner .db-sep { width: 1px; align-self: stretch; margin: 6px 0; background: var(--line-2); flex: none; }
.doc-banner .db-alvea { width: 38px; height: auto; flex: none; }

.doc-banner .db-text { min-width: 0; display: grid; }
.doc-banner .db-text b { font: 750 1em var(--font-display); }
.doc-banner .db-text span { color: var(--text-3); font-size: .84em; }
.guide .g-ico { background: linear-gradient(135deg, var(--a1), var(--a2)); }
.guide .g-ico.pptx { background: linear-gradient(135deg, var(--a2), var(--a3)); }

/* ================= Mini gato de la barra de mensaje ================= */
.mcat { position: relative; width: 46px; height: 43px; flex: none; padding: 0; margin: 0 -2px 0 2px; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mcat:focus-visible { outline: 2px solid var(--a2); border-radius: 12px; }
.mcat svg { width: 100%; height: 100%; overflow: visible; }
.mcat svg * { transform-box: fill-box; }
.mcat .mc-all { transform-origin: 50% 100%; }
.mcat .mc-head { transform-origin: 50% 85%; }
.mcat .mc-tail { transform-origin: 0% 100%; animation: mc-tail 3.4s var(--ease) infinite; }
.mcat .mc-body { transform-origin: 50% 100%; }
.mcat .mc-paw-l, .mcat .mc-paw-r { transform-origin: 50% 100%; }
.mcat .mc-ear-l { transform-origin: 70% 100%; } .mcat .mc-ear-r { transform-origin: 30% 100%; }
.mcat .mc-lid { transform-origin: 50% 0%; transform: scaleY(0); transition: transform .14s var(--ease); }
.mcat .mc-happy, .mcat .mc-mouth-o, .mcat .mc-heart, .mcat .mc-zzz, .mcat .mc-alarm, .mcat .mc-yarn { opacity: 0; }
.mcat .mc-mouth-o { transform-origin: 50% 0%; }
/* Burbuja de diálogo */
.mc-bubble { position: absolute; right: 4px; bottom: calc(100% + 8px); max-width: 220px; padding: 7px 11px; border-radius: 14px 14px 4px 14px; white-space: nowrap;
  background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-2); color: var(--text); font: 650 12.5px/1.3 var(--font);
  opacity: 0; transform: translateY(6px) scale(.9); transform-origin: bottom right; transition: opacity var(--t2), transform var(--t2) var(--spring); pointer-events: none; z-index: 5; }
.mcat.talk-on .mc-bubble { opacity: 1; transform: none; }
.mcat.talk-on .mc-mouth-o { animation: mc-talk .22s steps(2) 6; }
/* Parpadeo */
.mcat.blink .mc-lid { transform: scaleY(1); }
/* Escribiendo: tamborilea con las patitas y mueve la cabeza */
.mcat.typing .mc-paw-l { animation: mc-tap .28s var(--ease) infinite; }
.mcat.typing .mc-paw-r { animation: mc-tap .28s var(--ease) infinite .14s; }
.mcat.typing .mc-head { animation: mc-bob .56s var(--ease) infinite; }
/* Escribiendo rápido: ¡a jugar con el ovillo! */
.mcat.play .mc-yarn { opacity: 1; }
.mcat.play .mc-ball { animation: mc-roll .9s var(--ease) infinite alternate; transform-origin: center; }
.mcat.play .mc-paw-l { animation: mc-swipe .45s var(--ease) infinite; }
.mcat.play .mc-head { transform: rotate(-10deg); }
/* Enviar: salto */
.mcat.jump .mc-all { animation: mc-jump .8s var(--spring); }
/* Esperando la respuesta: mira hacia arriba, la cola se mueve */
.mcat.watch .mc-head { transform: rotate(-8deg) translateY(-1px); transition: transform .3s var(--ease); }
.mcat.watch .mc-tail { animation-duration: 1.2s; }
/* Dormido */
.mcat.sleep .mc-lid { transform: scaleY(1); transition-duration: .8s; }
.mcat.sleep .mc-zzz { opacity: 1; }
.mcat.sleep .mc-zzz .z { animation: mc-zzz 3s var(--ease) infinite; opacity: 0; }
.mcat.sleep .mc-zzz .z2 { animation-delay: 1s; } .mcat.sleep .mc-zzz .z3 { animation-delay: 2s; }
.mcat.sleep .mc-head { transform: rotate(6deg) translateY(2px); transition: transform .8s var(--ease); }
/* Susto */
.mcat.scared .mc-all { animation: mc-scared .5s var(--spring); }
.mcat.scared .mc-alarm { opacity: 1; animation: mc-pop .5s var(--spring); }
.mcat.scared .mc-ear-l { transform: rotate(-26deg); } .mcat.scared .mc-ear-r { transform: rotate(26deg); }
.mcat.scared .mc-mouth { opacity: 0; } .mcat.scared .mc-mouth-o { opacity: 1; }
.mcat.scared .mc-pupil ellipse { transform: scale(.6, .5); transform-origin: center; }
/* Contento */
.mcat.happy .mc-eyes { opacity: 0; } .mcat.happy .mc-happy { opacity: 1; }
.mcat.happy .mc-heart { opacity: 1; animation: mc-heart 1.4s var(--ease-out) forwards; }
.mcat.happy .mc-tail { animation: mc-wag .3s var(--ease) infinite; }
/* No / alerta */
.mcat.shake .mc-head { animation: mc-shake .3s var(--ease) 4; }
.mcat.shake .mc-mouth { opacity: 0; } .mcat.shake .mc-mouth-o { opacity: 1; transform: scaleY(.6); }
.mcat.alert .mc-ear-l, .mcat.alert .mc-ear-r { animation: mc-ears .4s var(--spring); }
.mcat.alert .mc-all { animation: mc-hop .4s var(--spring); }
/* Trucos cuando no haces nada */
.mcat.t-stretch .mc-all { animation: mc-stretch 2.2s var(--ease); }
.mcat.t-stretch .mc-lid { transform: scaleY(.85); }
.mcat.t-wash .mc-paw-l { animation: mc-wash 2.4s var(--ease); }
.mcat.t-wash .mc-head { animation: mc-washhead 2.4s var(--ease); }
.mcat.t-wash .mc-lid { transform: scaleY(1); }
.mcat.t-spin .mc-all { animation: mc-spin 1.6s var(--ease); }
.mcat.t-yawn .mc-mouth { opacity: 0; } .mcat.t-yawn .mc-mouth-o { opacity: 1; animation: mc-yawn 2s var(--ease); }
.mcat.t-yawn .mc-lid { transform: scaleY(.9); } .mcat.t-yawn .mc-head { animation: mc-bob 2s var(--ease); }
.mcat.t-play .mc-yarn { opacity: 1; } .mcat.t-play .mc-ball { animation: mc-roll .65s var(--ease) 4 alternate; transform-origin: center; }
.mcat.t-play .mc-paw-l { animation: mc-swipe .65s var(--ease) 4; }
.mcat.t-wave .mc-paw-l { animation: mc-wave 1.8s var(--ease); }
.mcat.t-wave .mc-eyes { opacity: 0; } .mcat.t-wave .mc-happy { opacity: 1; }
.mcat.t-flip .mc-all { animation: mc-flip 1.3s var(--ease); }
.mcat.t-look .mc-head { animation: mc-look 2.2s var(--ease); }
@keyframes mc-tail { 0%, 60%, 100% { transform: rotate(0); } 75% { transform: rotate(-14deg); } 88% { transform: rotate(6deg); } }
@keyframes mc-wag { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(12deg); } }
@keyframes mc-tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes mc-bob { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(5deg) translateY(1px); } }
@keyframes mc-swipe { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-6px, -5px) rotate(-30deg); } }
@keyframes mc-roll { from { transform: translateX(0) rotate(0); } to { transform: translateX(-6px) rotate(-200deg); } }
@keyframes mc-jump { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(0) scale(1.1, .85); } 50% { transform: translateY(-14px) scale(.95, 1.08); } 80% { transform: translateY(0) scale(1.06, .92); } 100% { transform: none; } }
@keyframes mc-zzz { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -8px); } }
@keyframes mc-scared { 0% { transform: none; } 40% { transform: translateY(-12px) scale(1.12, 1.18); } 100% { transform: none; } }
@keyframes mc-pop { from { transform: scale(.2); } to { transform: scale(1); } }
@keyframes mc-heart { 0% { transform: translate(0, 6px) scale(.4); opacity: 0; } 30% { opacity: 1; transform: translate(0, 0) scale(1.1); } 100% { opacity: 0; transform: translate(4px, -12px) scale(.9); } }
@keyframes mc-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes mc-ears { 50% { transform: scale(1.15) translateY(-1.5px); } }
@keyframes mc-hop { 50% { transform: translateY(-5px); } }
@keyframes mc-talk { 50% { transform: scaleY(.5); } }
@keyframes mc-stretch { 0%, 100% { transform: none; } 30%, 70% { transform: scale(1.18, .82) translateX(-2px); } }
@keyframes mc-wash { 0%, 100% { transform: none; } 15%, 85% { transform: translate(-2px, -20px) rotate(-30deg); } 30%, 50%, 70% { transform: translate(-1px, -22px) rotate(-10deg); } 40%, 60% { transform: translate(-3px, -18px) rotate(-40deg); } }
@keyframes mc-washhead { 0%, 100% { transform: none; } 20%, 80% { transform: rotate(-12deg); } }
@keyframes mc-spin { 0% { transform: rotate(0); } 100% { transform: rotate(-360deg); } }
@keyframes mc-yawn { 0% { transform: scale(1, .3); } 40%, 70% { transform: scale(1.4, 1.8); } 100% { transform: scale(1, .3); } }
@keyframes mc-wave { 0%, 100% { transform: none; } 20% { transform: translate(-2px, -16px) rotate(-20deg); } 35% { transform: translate(-2px, -17px) rotate(-45deg); } 50% { transform: translate(-2px, -16px) rotate(-15deg); } 65% { transform: translate(-2px, -17px) rotate(-45deg); } 80% { transform: translate(-2px, -16px) rotate(-20deg); } }
@keyframes mc-flip { 0% { transform: none; } 25% { transform: translateY(2px) scale(1.06, .9); } 60% { transform: translateY(-18px) rotate(-300deg); } 85% { transform: translateY(0) rotate(-360deg) scale(1.05, .92); } 100% { transform: rotate(-360deg); } }
@keyframes mc-look { 0%, 100% { transform: rotate(0); } 25%, 40% { transform: rotate(-14deg); } 60%, 80% { transform: rotate(12deg); } }
@media (max-width: 420px) { .mcat { display: none; } }
html.idle .mcat.t-stretch *, html.idle .mcat[class*="t-"] * { animation-play-state: running !important; }
.mcat.t-spin .mc-all, .mcat.t-flip .mc-all { transform-origin: 50% 55%; }
.login-hero .company { margin-right: calc(-1 * clamp(6px, 1.6vw, 24px)); }

.tour-card .illus.illus-logo svg { width: 190px; height: auto; }

.ext-card .ext-status { display: flex; gap: 6px; align-items: center; margin: 4px 0 10px; }
.ext-steps { margin: 10px 0 0; padding-left: 1.2em; color: var(--text-2); font-size: .9em; display: grid; gap: 4px; }

/* Logo de Alvea junto a «EMEA · UE»: enlace a alvea.es */
.alvea-link { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; margin-left: 2px;
  transition: transform var(--t2) var(--spring), background var(--t1); }
.alvea-link img { width: 24px; height: 24px; object-fit: contain; animation: alvea-float 4.5s var(--ease) infinite; filter: drop-shadow(0 2px 4px rgba(27,120,200,.25)); }
.alvea-link::after { content: ""; position: absolute; inset: 4px; border-radius: 9px; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.75) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; opacity: 0; }
.alvea-link:hover { background: var(--bg-soft); transform: translateY(-2px) scale(1.06); }
.alvea-link:hover::after { opacity: 1; animation: alvea-shine .8s var(--ease) 1; }
.alvea-link:hover img { animation: alvea-hop .5s var(--spring) 1; }
.alvea-link:active { transform: scale(.94); }
@keyframes alvea-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes alvea-hop { 40% { transform: translateY(-4px) rotate(-6deg); } }
@keyframes alvea-shine { from { background-position: 120% 0; } to { background-position: -40% 0; } }
