/* ─────────────────────────────────────────────
   CloudBusines Web — app.css
   Estilos del onboarding, stepper y componentes
   ───────────────────────────────────────────── */

:root {
  --blue: #3b82f6;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-mid: #dbeafe;
  --navy: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --white: #ffffff;
  --font: 'Plus Jakarta Sans', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(0,0,0,0.07);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--gray-50); color: var(--navy); line-height: 1.6; }

/* ── ONBOARDING WRAP ── */
.onboarding-wrap {
  min-height: calc(100vh - 68px);
  padding: 5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.onboarding-wide .ob-card { max-width: 900px; }

/* ── STEPPER ── */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 580px;
  width: 100%;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.step span {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.step-label {
  font-size: 0.68rem;
  color: var(--gray-400);
  font-weight: 500;
  white-space: nowrap;
}

/* Los textos debajo de los números vienen del HTML como texto de nodo */
.step { font-size: 0.68rem; color: var(--gray-400); font-weight: 500; }

.step.active span {
  background: var(--blue);
  color: white;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}
.step.active { color: var(--blue); }

.step.done span {
  background: var(--green);
  color: white;
}
.step.done { color: var(--green); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 0.25rem;
  margin-bottom: 0.85rem;
  transition: background 0.3s;
}
.step-line.active { background: var(--blue); }

/* ── OB CARD ── */
.ob-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
}

.ob-success-card { text-align: center; max-width: 560px; }

.ob-header { margin-bottom: 1.75rem; }
.ob-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.ob-header p  { font-size: 0.9rem; color: var(--gray-500); line-height: 1.6; }

/* ── FORMS ── */
.ob-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group.full { grid-column: 1 / -1; }

label { font-size: 0.8rem; font-weight: 600; color: var(--gray-700); }
.req  { color: var(--blue); }
.hint { font-size: 0.72rem; color: var(--gray-400); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  padding: 0.65rem 0.9rem;
  color: var(--navy);
  font-family: var(--font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  width: 100%;
}
input::placeholder { color: var(--gray-300); }
input:focus, select:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

.password-strength { font-size: 0.75rem; font-weight: 600; margin-top: 0.25rem; min-height: 1rem; }

/* ── BUTTONS ── */
.btn-submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
  transition: all 0.2s;
  margin-top: 0.5rem;
}
.btn-submit:hover:not(:disabled) { background: var(--blue-dark); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* ── ALERTS ── */
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 9px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.5rem;
}
.alert-error p { font-size: 0.83rem; color: #b91c1c; margin: 0.2rem 0; }

.info-box {
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: 9px;
  padding: 0.9rem 1rem;
  font-size: 0.83rem;
  color: #1e40af;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* ── SLUG PREVIEW ── */
.slug-preview {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
}
.slug-text   { font-weight: 700; color: var(--blue); font-family: 'JetBrains Mono', monospace; }
.slug-domain { color: var(--gray-400); }
.slug-status { margin-left: auto; font-size: 0.75rem; font-weight: 600; }

/* ── PLANS ONBOARDING ── */
.plans-ob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.plan-ob-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.plan-ob-card:hover   { border-color: var(--blue); }
.plan-ob-card.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.plan-ob-popular {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; font-weight: 700; color: white;
  background: var(--blue); padding: 0.2rem 0.7rem; border-radius: 99px;
  white-space: nowrap;
}
.plan-ob-type { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.4rem; }
.type-empresa  { color: var(--blue); }
.type-reseller { color: var(--amber); }
.plan-ob-name  { font-size: 0.88rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.plan-ob-price { margin-bottom: 0.75rem; }
.plan-ob-price .curr { font-size: 0.85rem; color: var(--gray-400); vertical-align: top; margin-top: 4px; display: inline-block; }
.plan-ob-price .amt  { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.04em; color: var(--navy); }
.plan-ob-price .per  { font-size: 0.75rem; color: var(--gray-400); }
.plan-ob-divider { border: none; border-top: 1px solid var(--gray-200); margin: 0.5rem 0; }
.plan-ob-feats  { display: flex; flex-direction: column; gap: 0.3rem; }
.plan-ob-feat   { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--gray-600); }
.feat-ck { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ── SUCCESS ── */
.success-animation { margin: 0 auto 1.5rem; }
.success-ring {
  width: 72px; height: 72px; border-radius: 50%;
  background: #dcfce7; border: 2px solid #86efac;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto;
  animation: popIn 0.5s ease;
}
@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.ob-success-card h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem; }
.success-sub { color: var(--gray-500); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }

.subdominio-box {
  background: var(--blue-light);
  border: 1px solid var(--blue-mid);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.subdominio-label { font-size: 0.72rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.subdominio-url {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.92rem; color: var(--blue-dark); margin-bottom: 0.75rem;
  word-break: break-all;
}
.copy-btn {
  font-size: 0.78rem; font-weight: 600; color: var(--blue);
  background: white; border: 1.5px solid var(--blue-mid);
  padding: 0.35rem 0.9rem; border-radius: 7px; cursor: pointer;
  transition: all 0.2s; font-family: var(--font);
}
.copy-btn:hover { background: var(--blue); color: white; }

.success-steps {
  text-align: left;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.success-steps h3 { font-size: 0.85rem; font-weight: 700; color: var(--gray-700); margin-bottom: 0.75rem; }
.success-steps ol { padding-left: 1.2rem; }
.success-steps li { font-size: 0.82rem; color: var(--gray-500); padding: 0.2rem 0; line-height: 1.5; }

.success-footer { margin-top: 1rem; }
.success-footer p { font-size: 0.82rem; color: var(--gray-400); margin-bottom: 0.5rem; }
.wa-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 600; color: #15803d;
  text-decoration: none; background: #dcfce7;
  padding: 0.5rem 1rem; border-radius: 8px;
  transition: background 0.2s;
}
.wa-link:hover { background: #bbf7d0; }

/* ── OB FOOTER ── */
.ob-footer { text-align: center; font-size: 0.82rem; color: var(--gray-400); margin-top: 1.25rem; }
.ob-footer a { color: var(--blue); text-decoration: none; }

/* ── FORM NOTE ── */
.form-note { font-size: 0.75rem; color: var(--gray-400); text-align: center; margin-top: 0.5rem; line-height: 1.5; }
.form-note a { color: var(--blue); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 68px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.15rem; font-weight: 800; letter-spacing: -0.03em;
  color: var(--navy); text-decoration: none;
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--gray-500); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--navy); }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }
.btn-ghost {
  font-size: 0.85rem; font-weight: 600; color: var(--gray-700);
  background: transparent; border: 1.5px solid var(--gray-200);
  padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer;
  font-family: var(--font); text-decoration: none; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary {
  font-size: 0.85rem; font-weight: 700; color: white;
  background: var(--blue); border: none;
  padding: 0.55rem 1.15rem; border-radius: 8px; cursor: pointer;
  font-family: var(--font); text-decoration: none; transition: all 0.2s;
}
.btn-primary:hover { background: var(--blue-dark); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .plans-ob-grid { grid-template-columns: 1fr; }
  .ob-card { padding: 1.75rem 1.25rem; }
  nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
}
