/* ═══════════════════════════════════════════════════════════════
   assets/css/registro.css
   Estilos de /registro/ — estética coherente con la landing.
   Layout split: panel verde oscuro izquierda + formulario derecha.
   Objetivo: caber en una sola pantalla sin scroll en desktop.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── Variables locales (override de base.css) ────────────────── */
:root {
  --rv:        #0F2E32;
  --rv-mid:    #1a4a4f;
  --esm:       #3DAA6E;
  --esm-pale:  #e8f7f0;
  --gold:      #c9a84c;
  --gold-dark: #a8863a;
  --crema:     #faf8f4;
  --borde:     #e8e4dc;
}

/* ── 1. Base ─────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

.reg-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--rv);
  height: 100vh;
  overflow: hidden;          /* sin scroll en desktop */
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── 2. Layout split ─────────────────────────────────────────── */
.reg-split {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
}

/* ── 3. Hero panel (izquierda) ───────────────────────────────── */
.reg-hero {
  width: 340px;
  flex-shrink: 0;
  background: var(--rv);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Decoración de fondo igual que la landing */
.reg-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.reg-hero::after {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61,170,110,.1) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  pointer-events: none;
}

.reg-hero__logo {
  height: 36px;
  width: auto;
  max-width: 220px;
  margin-bottom: 36px;
  position: relative; z-index: 1;
}

.reg-hero__tagline {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.reg-hero__tagline em {
  font-style: italic;
  color: var(--gold);
}

.reg-hero__sub {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  line-height: 1.65;
  margin-bottom: 28px;
  position: relative; z-index: 1;
}

.reg-hero__badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(61,170,110,.15);
  border: 1px solid rgba(61,170,110,.3);
  color: #7ee8a2;
  font-size: 11px; font-weight: 700;
  letter-spacing: .6px; text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 36px;
  position: relative; z-index: 1;
}
.reg-hero__badge::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--esm);
  border-radius: 50%;
}

/* Beneficios */
.reg-hero__benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative; z-index: 1;
}
.reg-hero__benefits li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  border-bottom: 1px solid rgba(255,255,255,.07);
  line-height: 1.5;
}
.reg-hero__benefits li:last-child { border-bottom: none; }
.benefit-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

/* ── 4. Formulario panel (derecha) ───────────────────────────── */
.reg-form-panel {
  flex: 1;
  background: var(--crema);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
  overflow-y: auto;   /* scroll interno si el contenido no cabe */
  overflow-x: hidden;
}

.reg-form-inner {
  width: 100%;
  max-width: 460px;
}

.reg-form-panel__title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--rv);
  margin-bottom: 4px;
  letter-spacing: -.3px;
}
.reg-form-panel__sub {
  font-size: 13px;
  color: #777;
  margin-bottom: 20px;
}

/* ── 5. Step indicator ───────────────────────────────────────── */
.reg-steps {
  display: flex; align-items: center;
  margin-bottom: 20px;
}
.reg-step {
  display: flex; align-items: center; gap: 7px;
  flex: 1;
}
.reg-step__circle {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--borde);
  background: #fff;
  color: #aaa;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.reg-step.is-active .reg-step__circle {
  background: var(--gold); border-color: var(--gold); color: var(--rv);
}
.reg-step.is-done .reg-step__circle {
  background: var(--esm); border-color: var(--esm); color: #fff;
}
.reg-step__label {
  font-size: 11px; font-weight: 500; color: #aaa;
  white-space: nowrap; transition: color .2s;
}
.reg-step.is-active .reg-step__label { color: var(--rv); font-weight: 700; }
.reg-step.is-done   .reg-step__label { color: var(--esm); }

.reg-step-line {
  flex: 1; height: 2px;
  background: var(--borde);
  margin: 0 8px;
  border-radius: 2px;
  transition: background .2s;
}
.reg-step-line.is-done { background: var(--esm); }

/* ── 6. Alerta global ────────────────────────────────────────── */
.reg-alert {
  background: rgba(244,67,54,.08);
  border: 1px solid rgba(244,67,54,.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px; color: #c62828;
  margin-bottom: 14px;
  display: none;
}
.reg-alert.visible { display: block; }

/* ── 7. Selector tipo de negocio ─────────────────────────────── */
.reg-field {
  margin-bottom: 14px;
}
.reg-field label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--rv);
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 6px;
}
.reg-field label .req { color: #e53935; margin-left: 2px; }

.type-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 4px;
}
.type-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1.5px solid var(--borde);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  min-height: 60px;
  user-select: none;
}
.type-card:active { transform: scale(.95); }
.type-card.is-selected {
  border-color: var(--gold);
  background: rgba(201,168,76,.08);
}
.type-card__icon { font-size: 18px; line-height: 1; }
.type-card__label {
  font-size: 10px; font-weight: 600;
  color: #888; text-align: center; line-height: 1.2;
}
.type-card.is-selected .type-card__label { color: var(--gold-dark); }
#inp-tipo { display: none; }

/* ── 8. Inputs ───────────────────────────────────────────────── */
.reg-field input,
.reg-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--borde);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.reg-field input:focus,
.reg-field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.reg-field input.is-error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229,57,53,.1);
}
.reg-field input.is-valid { border-color: var(--esm); }

.field-error {
  font-size: 11px; color: #e53935;
  margin-top: 3px; min-height: 14px; display: block;
}

/* Select — flecha custom */
.reg-field select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.reg-field select:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Grid 2 columnas: departamento + ciudad */
.reg-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0; /* los .reg-field internos ya tienen su margin-bottom */
}
.reg-field-row .reg-field {
  margin-bottom: 14px;
}

/* ── 9. Slug preview ─────────────────────────────────────────── */
.slug-preview {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 7px 12px;
  margin-top: -10px; margin-bottom: 10px;
  font-size: 11px; color: #888;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.slug-preview__label { flex-shrink: 0; color: #bbb; }
.slug-preview__url {
  font-family: 'Courier New', monospace;
  font-size: 11px; color: var(--gold-dark); font-weight: 600;
  word-break: break-all;
}
.slug-preview__status { margin-left: auto; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.slug-preview__status.ok      { color: var(--esm); }
.slug-preview__status.error   { color: #e53935; }
.slug-preview__status.checking{ color: #aaa; }

/* ── 10. Contraseña ──────────────────────────────────────────── */
.pwd-wrap { position: relative; }
.pwd-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 0;
  color: #aaa; font-size: 16px; line-height: 1;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.pwd-toggle:hover { color: #666; }
#inp-password { padding-right: 44px; }

.pwd-strength {
  margin-top: 6px;
  display: flex; align-items: center; gap: 8px;
}
.pwd-strength__bar {
  flex: 1; height: 3px;
  border-radius: 999px; background: var(--borde); overflow: hidden;
}
.pwd-strength__fill {
  height: 100%; border-radius: 999px; width: 0%;
  transition: width .3s, background .3s;
}
.pwd-strength__fill.weak   { width: 33%;  background: #e53935; }
.pwd-strength__fill.medium { width: 66%;  background: #ff9800; }
.pwd-strength__fill.strong { width: 100%; background: var(--esm); }
.pwd-strength__label {
  font-size: 10px; font-weight: 700;
  min-width: 46px; text-align: right;
}
.pwd-strength__label.weak   { color: #e53935; }
.pwd-strength__label.medium { color: #ff9800; }
.pwd-strength__label.strong { color: var(--esm); }

/* ── 11. Botones ─────────────────────────────────────────────── */
.reg-actions {
  display: flex; gap: 8px;
  margin-top: 16px;
}
.btn-reg-back {
  flex: 0 0 auto; padding: 0 20px; height: 46px;
  border: 1.5px solid var(--borde); border-radius: 999px;
  background: transparent; color: #888;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: border-color .2s, color .2s;
}
.btn-reg-back:hover { border-color: #aaa; color: #333; }

.btn-reg-next,
.btn-reg-submit {
  flex: 1; height: 46px;
  border: none; border-radius: 999px;
  background: var(--rv);
  color: #fff;
  font-size: 14px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(15,46,50,.2);
  letter-spacing: -.1px;
}
.btn-reg-next:hover,
.btn-reg-submit:hover {
  background: var(--rv-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15,46,50,.25);
}
.btn-reg-next:disabled,
.btn-reg-submit:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn-reg-submit.is-loading .btn-spinner { display: block; }
.btn-reg-submit.is-loading .btn-text    { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 12. Login link ──────────────────────────────────────────── */
.reg-login-link {
  font-size: 12px; color: #999;
  margin-top: 14px; text-align: center;
}
.reg-login-link a {
  color: var(--gold-dark); font-weight: 700; text-decoration: none;
}
.reg-login-link a:hover { text-decoration: underline; }

/* ── 13. Pantalla de éxito ───────────────────────────────────── */
.reg-success {
  display: none; flex-direction: column;
  align-items: center; text-align: center;
}
.reg-success.visible { display: flex; }

.reg-success__check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--esm-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin-bottom: 16px;
  animation: popIn .4s cubic-bezier(.175,.885,.32,1.275) both;
}
@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.reg-success__title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px; font-weight: 400;
  color: var(--rv); margin-bottom: 8px;
}
.reg-success__sub {
  font-size: 13px; color: #666;
  margin-bottom: 20px; line-height: 1.6; max-width: 320px;
}

.reg-success__info {
  width: 100%; max-width: 360px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 12px; padding: 16px;
  margin-bottom: 20px; text-align: left;
}
.reg-success__info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; font-size: 12px;
  border-bottom: 1px solid var(--borde);
}
.reg-success__info-row:last-child { border-bottom: none; }
.reg-success__info-row span:first-child { color: #999; }
.reg-success__info-row span:last-child {
  font-weight: 700; color: var(--rv);
  word-break: break-all; text-align: right; max-width: 60%;
}

.btn-go-panel {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; max-width: 360px; height: 46px;
  background: var(--rv); color: #fff;
  border: none; border-radius: 999px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  text-decoration: none; font-family: inherit;
  transition: background .2s;
  box-shadow: 0 4px 14px rgba(15,46,50,.2);
}
.btn-go-panel:hover { background: var(--rv-mid); }

.reg-success__note {
  margin-top: 12px; font-size: 11px; color: #bbb;
  max-width: 300px; line-height: 1.5;
}
.reg-success__pricing {
  margin-top: 8px; font-size: 11px; color: #aaa;
  background: rgba(201,168,76,.08);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 8px; padding: 8px 14px;
  max-width: 360px; line-height: 1.5; text-align: center;
}
.reg-success__pricing strong { color: var(--gold-dark); }

/* ── 14. Mobile ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  .reg-page  { height: auto; overflow: auto; }
  .reg-split { flex-direction: column; height: auto; }

  .reg-hero {
    width: 100%;
    padding: 32px 24px 28px;
    text-align: center; align-items: center;
    justify-content: flex-start;
  }
  .reg-hero__logo { margin-bottom: 20px; }
  .reg-hero__tagline { font-size: 22px; }
  .reg-hero__badge { margin-bottom: 0; }
  .reg-hero__sub { display: none; }
  .reg-hero__benefits { display: none; }

  .reg-form-panel {
    padding: 28px 20px 40px;
    align-items: flex-start;
    overflow: auto;
  }
  .reg-form-inner { max-width: 100%; }

  .type-grid { grid-template-columns: repeat(3, 1fr); }
  .reg-field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (min-width: 1200px) {
  .reg-hero { width: 400px; padding: 48px 44px; }
  .reg-hero__tagline { font-size: 30px; }
}

/* ── Pantallas desktop con poca altura (laptops 768px–900px tall) */
@media (min-width: 768px) and (max-height: 820px) {
  .reg-form-panel        { padding: 20px 40px; align-items: flex-start; }
  .reg-form-panel__title { font-size: 22px; margin-bottom: 2px; }
  .reg-form-panel__sub   { margin-bottom: 12px; }
  .reg-steps             { margin-bottom: 12px; }
  .reg-field             { margin-bottom: 9px; }
  .reg-field-row .reg-field { margin-bottom: 9px; }
  .reg-actions           { margin-top: 10px; }
  .type-card             { min-height: 52px; padding: 6px 4px; }
  .type-card__icon       { font-size: 16px; }
  .slug-preview          { padding: 5px 12px; margin-top: -7px; margin-bottom: 7px; }
}

/* ── Checkbox Términos y Condiciones ─────────────────────────── */
.reg-field--tc {
  margin-top: 4px;
  margin-bottom: 8px;
}

.tc-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.4;
  user-select: none;
}

.tc-label input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-top: 3px;
  border: 1.5px solid #d1d5db;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
}

.tc-label input[type="checkbox"]::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  line-height: 1;
  color: transparent;
  transition: color 0.1s;
}

.tc-label input[type="checkbox"]:checked {
  background: #3DAA6E;
  border-color: #3DAA6E;
}

.tc-label input[type="checkbox"]:checked::after {
  color: #fff;
}

.tc-label input[type="checkbox"]:focus-visible {
  outline: 2px solid #3DAA6E;
  outline-offset: 2px;
}

.tc-label a {
  color: #3DAA6E;
  text-decoration: underline;
  font-weight: 500;
}

.tc-label a:hover {
  color: #0F2E32;
}
