*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2D62C8;
  --blue-dark: #1e4a9e;
  --green: #22c55e;
  --gray-100: #f9fafb;
  --gray-200: #f1f3f5;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-900: #111827;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* Tema oscuro: se redefinen los neutros; los acentos (azul/verde) se mantienen */
[data-theme="dark"] {
  --gray-100: #0f141b;   /* fondo de página */
  --gray-200: #2a3340;   /* bordes e inputs */
  --gray-400: #9aa3b2;   /* texto tenue */
  --gray-600: #b6bdc9;   /* texto secundario (más claro para legibilidad) */
  --gray-900: #e6e9ee;   /* texto principal */
  --white: #1a2129;      /* fondo de tarjetas y barra */
  --shadow: 0 2px 16px rgba(0,0,0,0.45);
}

/* Los campos de formulario siguen el color de texto del tema */
input, select, textarea { color: var(--gray-900); }

/* En móvil, el botón de tema sube para no chocar con la barra inferior */
@media (max-width: 600px) {
  #themeToggle { bottom: 78px !important; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-900);
  background: var(--gray-100);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ── */
.container { max-width: 480px; margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
}
nav .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-weight: 700; font-size: 18px; color: var(--blue); letter-spacing: -0.5px; }
.nav-link { color: var(--gray-600); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--blue); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn--outline:hover { background: var(--blue); color: var(--white); }
.btn--full { width: 100%; }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Card ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}

/* ── Form ── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--gray-600); }
.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color 0.15s;
  outline: none;
  background: var(--white);
}
.form-group input:focus { border-color: var(--blue); }

/* ── Alert ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.alert--error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert.show { display: block; }

/* ── Hero ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--gray-900);
}
.hero h1 span { color: var(--blue); }
.hero p {
  font-size: 18px;
  color: var(--gray-600);
  max-width: 520px;
  margin: 0 auto 36px;
}
.price-badge {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ── Features ── */
.features {
  padding: 80px 0;
  background: var(--white);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
.feature-item { text-align: center; }
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--gray-100);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
}
.feature-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-item p { font-size: 14px; color: var(--gray-600); }

/* ── Section title ── */
.section-title { text-align: center; }
.section-title h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.section-title p { color: var(--gray-600); margin-top: 8px; }

/* ── Page centrada (login/register) ── */
.page-centered {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.page-centered .logo { margin-bottom: 32px; font-size: 22px; }
.page-centered .card { width: 100%; max-width: 420px; }
.page-centered h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.page-centered .subtitle { font-size: 14px; color: var(--gray-600); margin-bottom: 28px; }

/* ── Onboarding steps ── */
.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}
.step {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--gray-200);
  transition: background 0.3s;
}
.step.active { background: var(--blue); }
.step.done { background: var(--green); }

/* ── Dashboard ── */
.dashboard { padding: 48px 0; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.status-badge--active { background: #f0fdf4; color: #16a34a; }
.status-badge--inactive { background: #fef2f2; color: #dc2626; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.sheet-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-900);
  margin-top: 20px;
  transition: background 0.15s;
}
.sheet-link:hover { background: var(--gray-200); }
.sheet-link span { font-weight: 500; font-size: 15px; }
.sheet-link small { color: var(--gray-400); font-size: 13px; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--gray-600); }
.info-row .value { font-weight: 500; }

/* ── Spinner ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider { text-align: center; margin: 20px 0; font-size: 13px; color: var(--gray-400); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px;
  font-size: 13px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}
