/* =====================================================================
   Aurex — Tema visual (oscuro por defecto, claro opcional)
   Colores y tipografía del diseño original de Aurex.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=Figtree:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #071016; --surface: #0e1922; --surface-2: #14232e; --line: #21323f; --line-2: #2b4050;
  --fg: #eef5f8; --muted: #8ca2b1; --muted-2: #b4c4ce;
  --brand: #5eead4; --brand-2: #38bdf8; --brand-soft: rgba(94, 234, 212, .10); --brand-line: rgba(94, 234, 212, .35);
  --up: #2dd4bf; --down: #ff7f6e; --down-soft: rgba(255, 127, 110, .12); --ma: #fbbf24;
  --on-brand: #04161c; --info-bg: #102331; --info-line: #23405a;
  --shadow: 0 1px 0 hsla(0, 0%, 100%, .04) inset, 0 24px 48px -24px rgba(0, 0, 0, .7);
  --grad: linear-gradient(135deg, #5eead4, #38bdf8);
  --bot-camaleon: #c084fc; --bot-guardian: #86efac; --bot-equilibrio: #67e8f9; --bot-impulso: #fb7185;
  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}
html.light {
  color-scheme: light;
  --bg: #f3f7f8; --surface: #ffffff; --surface-2: #e9f0f3; --line: #d3dfe4; --line-2: #c3d2d9;
  --fg: #0a1a22; --muted: #4d6170; --muted-2: #3a4d5a;
  --brand: #0f766e; --brand-2: #0369a1; --brand-soft: rgba(15, 118, 110, .08); --brand-line: rgba(15, 118, 110, .35);
  --up: #09796f; --down: #cf3a26; --down-soft: rgba(207, 58, 38, .08); --ma: #b45309;
  --on-brand: #ffffff; --info-bg: #e6f1f8; --info-line: #b7d3e6;
  --shadow: 0 1px 2px rgba(10, 26, 34, .06), 0 18px 40px -18px rgba(10, 26, 34, .22);
  --grad: linear-gradient(135deg, #0f766e, #0369a1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .85; }
h1, h2, h3, .head { font-family: var(--font-head); letter-spacing: -0.02em; }
button { font-family: var(--font-body); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 12px; border: none; cursor: pointer; font: 650 15px var(--font-body); background: var(--grad); color: var(--on-brand); box-shadow: 0 10px 28px -12px rgba(56, 189, 248, .7); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--fg); font: 600 15px var(--font-body); cursor: pointer; }
.btn-ghost:hover { background: var(--surface-2); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--fg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Tarjetas */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 5px 11px; border-radius: 999px; }
.mute { color: var(--muted); }
.up { color: var(--up); } .dn { color: var(--down); }

/* Robot de cada bot */
.bot-ico { display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; }

/* ---------- Animaciones ---------- */
.bot-anim .bot-body { animation: botFloat 3.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.bot-anim .bot-eyes { transform-box: fill-box; transform-origin: center; animation: botBlink 5s infinite; animation-delay: var(--d, 0s); }
.bot-anim .bot-shadow { transform-box: fill-box; transform-origin: center; animation: botShadow 3.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes botFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes botBlink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } 96% { transform: scaleY(1); } }
@keyframes botShadow { 0%, 100% { transform: scaleX(1); opacity: .55; } 50% { transform: scaleX(.8); opacity: .35; } }
.typing::after { content: '▍'; margin-left: 2px; color: var(--brand); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.tilt { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tilt:hover { transform: perspective(900px) rotateX(2.5deg) rotateY(-2.5deg) translateY(-6px); border-color: var(--line-2); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand-line); animation: pulseDot 1.6s ease-out infinite; flex: none; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 var(--brand-line); } 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) {
  .bot-anim .bot-body, .bot-anim .bot-eyes, .bot-anim .bot-shadow, .typing::after, .pulse-dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tilt:hover { transform: none; }
}
.bot-anim { flex: none; }
.nav-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge.soft { background: var(--surface-2); color: var(--muted-2); border: 1px solid var(--line-2); }

[hidden]{display:none !important}

/* ---------- Celular: aprovechar todo el ancho ---------- */
@media (max-width: 640px) {
  main[style*="padding: 32px"], main[style*="padding:32px"] { padding: 12px !important; gap: 14px !important; }
  .card { padding: 14px !important; border-radius: 14px !important; }
  .spei { grid-template-columns: 1fr !important; gap: 2px 0 !important; padding: 12px !important; }
  .spei > .mute { margin-top: 8px; font-size: 12px; }
  .spei b { word-break: break-all; }
  table { font-size: 13px; }
  th, td { padding: 8px 5px !important; white-space: normal !important; }
  .grid2, .livegrid { grid-template-columns: 1fr !important; }
  h1 { font-size: 24px !important; }
}
