/* iaosX — Sistema de diseño (tokens + base). Tema oscuro por defecto. */
:root {
  --accent: #5b8cff;
  --accent-2: #8a5bff;
  --accent-soft: rgba(91, 140, 255, 0.16);
  --bg: #080c18;
  --surface: #121a2e;
  --surface-2: #1a2440;
  --surface-3: #232f50;
  --surface-glass: rgba(16, 22, 42, 0.7);
  --text: #eef2ff;
  --text-dim: #9aa6c7;
  --text-mute: #6b7799;
  --border: #2a3656;
  --border-soft: rgba(255, 255, 255, 0.07);
  --danger: #ff5c6c;
  --ok: #34d399;
  --warn: #f5b942;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 36px rgba(0, 0, 0, 0.46);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.36), 0 34px 80px rgba(0, 0, 0, 0.56);
  --ring: 0 0 0 3px var(--accent-soft);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}
[data-theme='light'] {
  --bg: #e9edf8;
  --surface: #ffffff;
  --surface-2: #f3f6fc;
  --surface-3: #e8eef9;
  --surface-glass: rgba(255, 255, 255, 0.74);
  --text: #14203a;
  --text-dim: #56627c;
  --text-mute: #8590a6;
  --border: #d8e0ef;
  --border-soft: rgba(20, 40, 90, 0.06);
  --accent-soft: rgba(91, 140, 255, 0.14);
  --shadow: 0 1px 2px rgba(40, 60, 120, 0.1), 0 14px 36px rgba(40, 60, 120, 0.16);
  --shadow-lg: 0 2px 8px rgba(40, 60, 120, 0.12), 0 34px 80px rgba(40, 60, 120, 0.22);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

.btn {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(91, 140, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: filter 0.18s var(--ease), transform 0.08s var(--ease), box-shadow 0.18s var(--ease);
}
/* Iconos dentro de botones: siempre a la izquierda del texto, alineados y sin solaparse */
.btn svg { flex: 0 0 auto; }
.btn:hover { filter: brightness(1.07); box-shadow: 0 6px 20px rgba(91, 140, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-3); filter: none; }
.btn-danger { background: var(--danger); box-shadow: 0 4px 14px rgba(255, 92, 108, 0.3); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 0.9rem; color: var(--text-dim); }
.input {
  width: 100%;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus { border-color: var(--accent); box-shadow: var(--ring); }

/* Logo animado de marca */
.logo-anim { display: inline-block; line-height: 0; }
.logo-anim svg { width: 100%; height: 100%; display: block; }
.logo-anim .orbit { transform-origin: 24px 24px; animation: logo-spin 6s linear infinite; }
.logo-anim .spark { transform-origin: 24px 24px; animation: logo-pulse 2.6s ease-in-out infinite; }
.logo-anim .ring { transform-origin: 24px 24px; animation: logo-ring 6s ease-in-out infinite; }
@keyframes logo-spin { to { transform: rotate(360deg); } }
@keyframes logo-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.14); opacity: 0.85; } }
@keyframes logo-ring { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .logo-anim .orbit, .logo-anim .spark, .logo-anim .ring { animation: none; } }

.error { color: var(--danger); min-height: 1.2em; margin: 4px 0 10px; font-size: 0.9rem; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--text-mute); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
