/* ─────────────────────────────────────────────
   EmpresasCloud — EC Connect v1.0
   Estilos del onboarding, stepper y componentes
   ───────────────────────────────────────────── */

:root {
  --blue: #245cf6;
  --blue-dark: #081f37;
  --blue-light: #e8f4ff;
  --blue-mid: #dbe5f0;
  --navy: #081f37;
  --ink: #101d33;
  --gray-50: #f6f9fd;
  --gray-100: #e8f4ff;
  --gray-200: #dbe5f0;
  --gray-300: #dbe5f0;
  --gray-400: #6b7c93;
  --gray-500: #52647e;
  --gray-700: #101d33;
  --green: #16d9ad;
  --success: #0a826c;
  --amber: #f59e0b;
  --red: #be3d54;
  --white: #ffffff;
  --font: 'Inter', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 20px rgba(8,31,55,0.08);
  --shadow-lg: 0 18px 50px rgba(8,31,55,0.14);
}

*, *::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(--ink); line-height: 1.6; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }

/* Identidad visual principal */
.brand-hero {
  position: relative;
  background:
    radial-gradient(circle at 78% 14%, rgba(22,217,173,.20), transparent 24rem),
    radial-gradient(circle at 12% 90%, rgba(36,92,246,.20), transparent 22rem),
    linear-gradient(135deg, #081f37 0%, #101d33 52%, #245cf6 135%);
}
.brand-hero::before,
.brand-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .85rem;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: #e8f4ff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.brand-kicker::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #16d9ad; box-shadow: 0 0 0 4px rgba(22,217,173,.15); }
.brand-product-preview {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 1.5rem;
  background: rgba(255,255,255,.98);
  box-shadow: 0 28px 70px rgba(8,31,55,.38);
  transform: rotate(1.4deg);
}
.brand-metric { padding: 1rem; border: 1px solid #e7eef5; border-radius: .9rem; background: white; }
.brand-metric span, .brand-metric small { display: block; color: #64748b; font-size: .68rem; }
.brand-metric strong { display: block; margin: .2rem 0; color: #081f37; font-size: 1.25rem; }
.brand-metric small { color: #0a826c; font-weight: 700; }
.brand-solution-card { position: relative; min-height: 220px; padding: 1.75rem; border: 1px solid #dbe5f0; border-radius: 1rem; background: #fff; box-shadow: 0 8px 28px rgba(8,31,55,.06); }
.brand-solution-card h3 { margin: 1.4rem 0 .65rem; color: #081f37; font-size: 1.15rem; font-weight: 800; }
.brand-solution-card p { color: #52647e; font-size: .88rem; line-height: 1.65; }
.brand-solution-card a { display: inline-block; margin-top: 1rem; color: #245cf6; font-size: .84rem; font-weight: 800; text-decoration: none; }
.brand-solution-active { border-color: #245cf6; background: linear-gradient(145deg, #fff, #e8f4ff); box-shadow: 0 14px 38px rgba(36,92,246,.12); }
.brand-product-label { display: inline-flex; padding: .3rem .65rem; border-radius: 999px; background: #ccfbf1; color: #0f766e; font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.brand-product-next { background: #f6f9fd; color: #52647e; }
.brand-cta { position: relative; overflow: hidden; background: linear-gradient(125deg, #081f37, #245cf6 72%, #0a826c); }
.brand-cta > * { position: relative; z-index: 1; }

@media (max-width: 1023px) {
  .brand-product-preview { max-width: 620px; margin: 0 auto; transform: none; }
}

/* ── 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(36,92,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(36,92,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(36,92,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(36,92,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; }
}
