/* ============================================================
   Registro público SAS (Prueba gratis) — NETSOLIN-IA · Fase S2b
   Página SIN shell (no hay sesión aún). Mobile-first, estilo v3,
   theme-aware (claro/oscuro). Cero assets externos / CDN.
   ============================================================ */

:root {
  --primary: #1a56db;
  --primary-dark: #1e3a8a;
  --accent-purple: #7c3aed;
  --accent-magenta: #c026d3;
  --gradient-brand: linear-gradient(135deg, #1a56db 0%, #7c3aed 50%, #c026d3 100%);
  --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #1e3a5f 100%);
  --success: #059669;
  --success-light: #d1fae5;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;

  --card-bg: #ffffff;
  --text: #1f2937;
  --text-soft: #6b7280;
  --text-faint: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --field-bg: #f9fafb;
  --chip-bg: #f3f4f6;

  --radius: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 40px rgba(124, 58, 237, .15), 0 0 80px rgba(26, 86, 219, .1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #0f172a;
    --text: #e5e7eb;
    --text-soft: #9ca3af;
    --text-faint: #6b7280;
    --border: #1f2937;
    --border-strong: #334155;
    --field-bg: #111827;
    --chip-bg: #1e293b;
  }
}
:root[data-theme="dark"] {
  --card-bg: #0f172a; --text: #e5e7eb; --text-soft: #9ca3af; --text-faint: #6b7280;
  --border: #1f2937; --border-strong: #334155; --field-bg: #111827; --chip-bg: #1e293b;
}
:root[data-theme="light"] {
  --card-bg: #ffffff; --text: #1f2937; --text-soft: #6b7280; --text-faint: #9ca3af;
  --border: #e5e7eb; --border-strong: #d1d5db; --field-bg: #f9fafb; --chip-bg: #f3f4f6;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  min-height: 100vh;
  background: var(--gradient-bg);
  color: var(--text);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 14px 48px;
}
[v-cloak] { display: none; }

.reg-shell { width: min(560px, 96vw); }

.brand { text-align: center; margin-bottom: 18px; }
.brand-logo {
  width: 58px; height: 58px; background: var(--gradient-brand);
  border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(124, 58, 237, .4); margin-bottom: 10px; color: #fff;
  font-size: 26px; font-weight: 800;
}
.brand-name { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.brand-tagline {
  font-size: 11px; color: #c7d2fe; margin-top: 2px; letter-spacing: 2px;
  text-transform: uppercase;
}

.card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3), var(--shadow-glow);
  padding: 26px 24px; animation: slideIn .4s ease-out;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.card h1 { font-size: 20px; margin: 0 0 4px; color: var(--text); }
.card .sub { font-size: 13px; color: var(--text-soft); margin: 0 0 18px; }

/* Barra de progreso de pasos */
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps .dot {
  flex: 1; height: 5px; border-radius: 3px; background: var(--border);
  transition: background .3s ease;
}
.steps .dot.on { background: var(--gradient-brand); }

/* Campos */
.fg { margin-bottom: 14px; }
.fg label {
  display: block; font-size: 12px; font-weight: 700; color: var(--text-soft);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px;
}
.fg .req { color: var(--danger); }
.field {
  width: 100%; padding: 11px 13px; font-size: 15px; color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--field-bg); transition: border-color .15s ease, box-shadow .15s ease;
}
.field:focus {
  outline: none; border-color: var(--primary); background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}
.field.err { border-color: var(--danger); }
.hint { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.err-msg { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* NIT + DV en vivo */
.nit-row { display: flex; gap: 10px; align-items: flex-end; }
.nit-row .nit-main { flex: 1; }
.dv-box {
  width: 70px; text-align: center; padding: 11px 6px; border-radius: var(--radius);
  border: 2px solid var(--border); background: var(--chip-bg);
}
.dv-box .dv-lbl { font-size: 9px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }
.dv-box .dv-val { font-size: 20px; font-weight: 800; color: var(--accent-purple); line-height: 1.1; }

/* Cards de nicho */
.nicho-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 420px) { .nicho-grid { grid-template-columns: 1fr; } }
.nicho {
  text-align: left; border: 2px solid var(--border); background: var(--field-bg);
  border-radius: var(--radius); padding: 12px; cursor: pointer; display: flex; gap: 10px;
  align-items: flex-start; transition: all .15s ease; color: var(--text);
}
.nicho:hover { border-color: var(--border-strong); }
.nicho.sel { border-color: var(--primary); background: rgba(26, 86, 219, .06); box-shadow: 0 0 0 3px rgba(26, 86, 219, .1); }
.nicho .ico { font-size: 24px; line-height: 1; }
.nicho .nm { font-weight: 700; font-size: 14px; }
.nicho .ds { font-size: 11px; color: var(--text-soft); margin-top: 2px; line-height: 1.35; }

/* Tamaño (chips) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--border); background: var(--field-bg); color: var(--text);
  border-radius: 20px; padding: 8px 14px; font-size: 13px; cursor: pointer; transition: all .15s ease;
}
.chip.sel { border-color: var(--primary); background: rgba(26, 86, 219, .08); color: var(--primary); font-weight: 700; }

/* Botones */
.btn {
  width: 100%; padding: 13px; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--gradient-brand); border: none; border-radius: var(--radius);
  cursor: pointer; transition: transform .15s ease, opacity .15s ease; margin-top: 6px;
  box-shadow: 0 6px 20px rgba(124, 58, 237, .3);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost {
  background: transparent; color: var(--text-soft); box-shadow: none; font-weight: 600;
  border: 1px solid var(--border);
}
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Código de verificación */
.code-input {
  width: 100%; text-align: center; letter-spacing: 12px; font-size: 30px; font-weight: 800;
  padding: 14px; border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--field-bg); color: var(--text);
}
.code-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.resend { text-align: center; margin-top: 14px; font-size: 13px; color: var(--text-soft); }
.resend a { color: var(--primary); cursor: pointer; font-weight: 600; }
.resend a.off { color: var(--text-faint); cursor: default; text-decoration: none; }

/* Checklist "creando tu empresa" */
.creando-hero { text-align: center; margin-bottom: 20px; }
.creando-ring {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px;
  border: 4px solid var(--border); border-top-color: var(--accent-purple);
  animation: rot 1s linear infinite;
}
.creando-ring.done { border: 4px solid var(--success); animation: none; display: flex; align-items: center; justify-content: center; color: var(--success); font-size: 30px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); margin-bottom: 8px; background: var(--field-bg);
  transition: all .3s ease;
}
.checklist li .st { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.checklist li .st.pendiente { background: var(--chip-bg); color: var(--text-faint); }
.checklist li .st.en_proceso { background: rgba(124,58,237,.15); color: var(--accent-purple); }
.checklist li .st.en_proceso .mini { width: 11px; height: 11px; border: 2px solid var(--accent-purple); border-top-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; }
.checklist li .st.listo { background: var(--success-light); color: var(--success); }
.checklist li .st.error { background: var(--danger-light); color: var(--danger); }
.checklist li .tx { font-size: 14px; color: var(--text); }
.checklist li.done .tx { color: var(--text-soft); }

/* Aviso genérico */
.aviso { border-radius: 10px; padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.aviso.err { background: var(--danger-light); color: var(--danger); border: 1px solid #fca5a5; }
.aviso.ok { background: var(--success-light); color: var(--success); border: 1px solid #86efac; }
.aviso .sop { font-size: 11px; opacity: .8; margin-top: 3px; }

/* Turnstile */
.captcha-wrap { margin: 8px 0 4px; min-height: 0; display: flex; justify-content: center; }

/* Pie */
.foot { text-align: center; font-size: 11px; color: #c7d2fe; margin-top: 16px; }
.foot a { color: #e0e7ff; }

/* Toasts propios (nunca alert nativo) */
.toast-stack { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px;
  background: #111827; color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.3);
  animation: slideIn .2s ease-out; max-width: 320px;
}
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }
.toast.warn { background: #92400e; }
.toast.info { background: #1e3a8a; }
