/* ===== AUTH LAYOUT ===== */
.auth-body { background: var(--bg-light); min-height: 100vh; }

.auth-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* Panel izquierdo — azul marino */
.auth-brand {
  background: var(--navy);
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.auth-brand__logo svg { height: 44px; width: auto; }

.auth-brand__content { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.auth-brand__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: white;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.auth-brand__sub {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: 36px;
}

.auth-brand__perks { display: flex; flex-direction: column; gap: 14px; }
.auth-brand__perks li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: rgba(255,255,255,0.75);
}

/* Mini planes en registro */
.auth-brand__plans { display: flex; flex-direction: column; gap: 10px; }
.mini-plan {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.mini-plan--featured {
  background: rgba(16,82,212,0.35);
  border-color: rgba(147,197,253,0.3);
}
.mini-plan__badge {
  position: absolute;
  top: -9px; right: 12px;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}
.mini-plan__name { font-size: 14px; font-weight: 600; color: white; }
.mini-plan__price { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,0.55); }
.mini-plan--featured .mini-plan__price { color: #93C5FD; }

.auth-brand__footer {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* Panel derecho */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.auth-form-wrap { width: 100%; max-width: 480px; }

.auth-form-header { margin-bottom: 28px; }
.auth-form-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}
.auth-form-sub { font-size: 14px; color: var(--text-mid); }

/* Alert */
.auth-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-alert--error {
  background: rgba(232,41,58,0.07);
  border: 1px solid rgba(232,41,58,0.25);
  color: #C0142A;
}
.auth-alert svg { flex-shrink: 0; margin-top: 1px; }

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-label-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 7px;
}
.form-label-row label { margin-bottom: 0; }

/* Override style.css form-group for auth */
.auth-form .form-group { gap: 7px; }
.auth-form .form-group label {
  font-size: 13px; font-weight: 600; color: var(--text-dark);
}
.auth-form .form-group input {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px; color: var(--text-dark); outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.auth-form .form-group input::placeholder { color: var(--text-light); }
.auth-form .form-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(16,82,212,0.1);
  background: white;
}

.required { color: var(--red); font-weight: 700; }

/* Password input */
.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 42px; width: 100%; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-light); background: none; border: none;
  cursor: pointer; padding: 2px;
  transition: color var(--transition);
}
.toggle-pw:hover { color: var(--text-mid); }

/* Password strength */
.pw-strength {
  margin-top: 6px; font-size: 12px; height: 16px;
  display: flex; align-items: center; gap: 8px;
}
.pw-strength-bar {
  display: flex; gap: 4px; flex: 1;
}
.pw-strength-bar span {
  height: 3px; flex: 1; border-radius: 2px;
  background: var(--border); transition: background 0.3s;
}
.pw-strength-bar span.active-weak   { background: var(--red); }
.pw-strength-bar span.active-medium { background: #F59E0B; }
.pw-strength-bar span.active-strong { background: #16A34A; }
.pw-strength-label { font-weight: 600; }
.pw-strength-label.weak   { color: var(--red); }
.pw-strength-label.medium { color: #F59E0B; }
.pw-strength-label.strong { color: #16A34A; }

/* Remember / checkbox */
.form-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-mid);
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--blue);
  cursor: pointer; flex-shrink: 0;
}

.btn--lg { padding: 14px 24px; font-size: 16px; }

.auth-link {
  font-size: 13px; color: var(--blue); font-weight: 500;
  transition: color var(--transition);
}
.auth-link:hover { color: var(--blue-hover); }

.auth-terms {
  font-size: 12px; color: var(--text-light);
  text-align: center; line-height: 1.5;
  margin-top: -6px;
}

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-light); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-back {
  text-align: center; margin-top: 20px;
  font-size: 13px; color: var(--text-light);
}
.auth-back a { color: var(--text-mid); transition: color var(--transition); }
.auth-back a:hover { color: var(--blue); }

/* ── Mobile top navbar (shown only on small screens) ── */
.auth-mobile-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
.auth-mobile-nav__logo svg { height: 32px; width: auto; }
.auth-mobile-nav__back {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.auth-mobile-nav__back:hover { color: white; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  .auth-brand { display: none; }
  .auth-mobile-nav { display: flex; }
  .auth-form-panel {
    flex: 1;
    padding: 36px 20px 48px;
  }
}
@media (max-width: 500px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .auth-form-panel { padding: 28px 16px 40px; }
}

/* ── Mensajes de estado ── */
.auth-error {
  background: #FEF2F2; border: 1px solid #FECACA;
  color: #B91C1C; border-radius: 8px;
  padding: 12px 16px; font-size: 14px; margin-bottom: 18px;
}

/* ── Pantalla de confirmación enviado ── */
.auth-sent { text-align: center; }
.auth-sent__icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
}
.auth-sent__icon svg { width: 64px; height: 64px; }
.auth-sent h2 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--text-dark); margin-bottom: 10px;
}
.auth-sent p { font-size: 14px; color: var(--text-mid); margin-bottom: 4px; }
.auth-sent__spam { font-size: 13px; color: var(--text-light); font-style: italic; }

/* ── Campo subdominio ── */
.subdominio-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: 8px;
  overflow: hidden; background: var(--bg-light);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.subdominio-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(16,82,212,0.1);
  background: white;
}
.subdominio-prefix, .subdominio-suffix {
  padding: 11px 10px;
  font-size: 13px; color: var(--text-light);
  background: var(--bg-subtle); white-space: nowrap; user-select: none;
  border-right: 1px solid var(--border);
}
.subdominio-suffix { border-right: none; border-left: 1px solid var(--border); }
.subdominio-wrap input {
  flex: 1; padding: 11px 10px;
  border: none; outline: none; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--text-dark);
  font-family: var(--font-mono);
  min-width: 0;
}
.subdominio-status {
  display: block; font-size: 12px; margin-top: 5px; min-height: 16px;
}
.subdominio-status.ok      { color: #16A34A; }
.subdominio-status.err     { color: var(--red); }
.subdominio-status.checking{ color: var(--text-light); }
.subdominio-options {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px;
  font-size: 12px; color: var(--text-mid);
}
.subdominio-options label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.subdominio-options input { accent-color: var(--blue); }

/* ── Sección empresa/plan opcional ── */
.registro-plan-section {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: var(--bg-light);
}
.registro-plan-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.registro-plan-title { font-size: 13px; font-weight: 600; color: var(--text-dark); }
.registro-omitir {
  font-size: 12px; color: var(--blue); font-weight: 500;
  background: none; border: none; cursor: pointer;
  padding: 0; transition: color 0.15s;
}
.registro-omitir:hover { color: var(--navy); }
.plan-omitido-msg {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-light);
  padding: 4px 0;
}

/* ── Plan picker en registro ── */
.plan-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.plan-option { cursor: pointer; }
.plan-option input[type="radio"] { display: none; }

.plan-option__card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-light);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
  cursor: pointer;
}
.plan-option__card--featured {
  background: #F5F8FF;
}
.plan-option input:checked + .plan-option__card {
  border-color: var(--blue);
  background: #EEF3FC;
  box-shadow: 0 0 0 3px rgba(16,82,212,0.1);
}
/* featured sin seleccionar: borde suave, no azul fuerte */
.plan-option input:not(:checked) + .plan-option__card--featured {
  border-color: #C7D7F5;
}
.plan-option__badge {
  position: absolute; top: -9px; left: 12px;
  background: var(--blue); color: white;
  font-size: 9px; font-weight: 700;
  padding: 2px 8px; border-radius: 100px;
  letter-spacing: 0.5px;
}
.plan-option__name {
  font-size: 13px; font-weight: 700; color: var(--text-dark);
}
.plan-option__price {
  font-size: 15px; font-weight: 800;
  color: var(--navy); font-family: var(--font-display);
}
.plan-option__price small {
  font-size: 11px; font-weight: 500; color: var(--text-light);
}
.plan-option__detail {
  font-size: 11px; color: var(--text-light); margin-top: 2px;
}

@media (max-width: 500px) {
  .plan-picker { grid-template-columns: 1fr; }
}
