/* ============================================================
   MULTI SYSTEM — Design tokens
   Identidad: tecnológica, premium, empresarial, minimalista.
   Fondo casi negro con acento eléctrico configurable.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  /* Color */
  --bg: #0a0d12;
  --bg-elevated: #10141c;
  --surface: #141924;
  --surface-hover: #1a2130;
  --border: #232b3a;
  --border-strong: #2f3a4e;
  --text: #e9edf4;
  --text-muted: #8b94a7;
  --text-faint: #5a6579;
  --accent: #14C99A;           /* turquesa — acento principal, tomado del logo */
  --accent-2: #2E90FA;         /* azul — acento secundario, tomado del logo */
  --accent-3: #4ADE80;         /* verde — tercer tono del degradé del logo */
  --accent-soft: rgba(20, 201, 154, 0.12);
  --danger: #ff5c72;
  --warning: #ffb454;
  --success: #3ddc97;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;

  /* Layout */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(20, 201, 154, 0.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(20, 201, 154, 0.06), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(46, 144, 250, 0.07), transparent 40%);
  background-attachment: fixed;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; color: var(--text-muted); line-height: 1.55; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------------------- Layout shell -------------------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow-glow);
}

.auth-card.wide {
  max-width: 640px;
}

/* -------------------- Brand mark -------------------- */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.brand-logo {
  height: 64px;
  width: auto;
  display: block;
}

/* -------------------- Headings -------------------- */
.page-title { font-size: 24px; margin-bottom: 6px; }
.page-subtitle { font-size: 14px; margin-bottom: 28px; }

/* -------------------- Form elements -------------------- */
.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder { color: var(--text-faint); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-error {
  font-size: 12.5px;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}

.field.has-error input { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.password-wrap { position: relative; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-body);
}
.password-toggle:hover { color: var(--text-muted); }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.checkbox-row input { width: 15px; height: 15px; accent-color: var(--accent); }

.form-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 22px;
  font-size: 13.5px;
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-3), var(--accent), var(--accent-2));
  color: #05100e;
  box-shadow: 0 8px 24px -8px rgba(20, 201, 154, 0.45);
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  width: auto;
  padding: 10px 16px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.btn-spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(5, 16, 14, 0.35);
  border-top-color: #05100e;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-label { opacity: 0.75; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------- Divider -------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-faint);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* -------------------- Toast -------------------- */
.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text);
  min-width: 260px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.5);
  animation: toast-in 0.2s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* -------------------- Onboarding wizard -------------------- */
.wizard-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.wizard-steps .dot {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s ease;
}
.wizard-steps .dot.active,
.wizard-steps .dot.done {
  background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
}

.wizard-step-label {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.option-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
}
.option-card:hover { border-color: var(--border-strong); }
.option-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.wizard-nav .btn { width: auto; flex: 1; }

/* -------------------- Responsive -------------------- */
@media (max-width: 480px) {
  .auth-card { padding: 28px 22px; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .field-row { flex-direction: column; gap: 0; }
}

/* -------------------- Accessibility -------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation: none; }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* -------------------- Modo claro (básico) -------------------- */
html.theme-light {
  --bg: #f5f7fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #eef1f6;
  --border: #e2e6ed;
  --border-strong: #cbd2df;
  --text: #101521;
  --text-muted: #5b6478;
  --text-faint: #9aa2b2;
}
html.theme-light body {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(20, 201, 154, 0.05), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(46, 144, 250, 0.05), transparent 40%);
}
