/* ═══════════════════════════════════════════════════════════════
 * REGISTRO — Identidad Institucional NEM
 * Usa tokens de /static/css/nem/tokens.css
 * ═══════════════════════════════════════════════════════════════ */

.nem-registro {
  background: linear-gradient(170deg, #faf5e4 0%, #f5f5f5 40%, #fff 100%);
  min-height: calc(100vh - 64px);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}

.nem-registro-topbar {
  height: 4px;
  background: linear-gradient(90deg, #9b2247 0%, #611232 50%, #1e5b4f 100%);
}

/* Card principal */
.nem-registro-card {
  max-width: 780px;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(22, 26, 29, 0.12);
  padding: 2.5rem 2rem;
  border-top: 4px solid #9b2247;
}

@media (max-width: 575.98px) {
  .nem-registro-card { padding: 1.5rem 1rem; }
}

/* Encabezado */
.nem-registro-header {
  margin-bottom: 2rem;
}

.nem-registro-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.nem-registro-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #161a1d;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.nem-registro-subtitle {
  color: #98989a;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0;
}

/* Secciones del formulario */
.nem-registro-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid #e8e8e9;
}

.nem-registro-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.nem-registro-section--center {
  text-align: center;
}

.nem-registro-section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9b2247;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.nem-registro-section-label i {
  margin-right: 0.35rem;
}

/* Grid de perfiles */
.nem-perfil-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.625rem;
}

@media (max-width: 767.98px) {
  .nem-perfil-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 479.98px) {
  .nem-perfil-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nem-perfil-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  border: 2px solid #e8e8e9;
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nem-perfil-btn:hover {
  border-color: #d9899f;
  background: #f2d4dd;
}

.nem-perfil-btn.active {
  border-color: #9b2247;
  background: linear-gradient(135deg, #f2d4dd 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(155, 34, 71, 0.15);
}

.nem-perfil-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: #f5f5f5;
  color: #98989a;
  transition: all 0.2s ease;
}

.nem-perfil-btn.active .nem-perfil-icon {
  background: #9b2247;
  color: #fff;
}

.nem-perfil-btn:hover .nem-perfil-icon {
  background: #d9899f;
  color: #fff;
}

.nem-perfil-btn.active:hover .nem-perfil-icon {
  background: #611232;
  color: #fff;
}

.nem-perfil-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #8b8d8e;
  text-align: center;
  line-height: 1.2;
}

.nem-perfil-btn.active .nem-perfil-label {
  color: #9b2247;
}

/* Password hints */
.nem-password-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.nem-password-hints span {
  font-size: 0.78rem;
  color: #98989a;
}

.nem-password-hints i {
  color: #d4ece7;
  margin-right: 0.25rem;
  font-size: 0.7rem;
}

/* Captcha */
.nem-captcha-wrapper {
  display: inline-block;
  text-align: center;
}

.nem-captcha-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.nem-captcha-field img {
  border-radius: 0.375rem;
  border: 1px solid #e8e8e9;
}

.nem-captcha-field input[type="text"] {
  max-width: 220px;
  text-align: center;
  border: 1px solid #e8e8e9;
  border-radius: 0.375rem;
  padding: 0.5rem;
  font-family: inherit;
}

.nem-captcha-field input[type="text"]:focus {
  border-color: #9b2247;
  outline: none;
  box-shadow: 0 0 0 3px rgba(155, 34, 71, 0.25);
}

/* Términos */
.nem-terminos {
  display: inline-block;
  text-align: left;
}

.nem-terminos label {
  font-size: 0.85rem;
  color: #5c6166;
}

.nem-terminos a {
  color: #9b2247;
  text-decoration: underline;
}

/* Botón submit */
.nem-registro-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.nem-registro-submit {
  background: linear-gradient(135deg, #9b2247 0%, #611232 100%);
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.75rem 2.5rem;
  font-size: 1rem;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.nem-registro-submit:hover {
  background: linear-gradient(135deg, #611232 0%, #3d0b20 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(22, 26, 29, 0.16);
}

.nem-registro-submit:active {
  transform: translateY(0);
}

.nem-registro-submit:focus {
  box-shadow: 0 0 0 3px rgba(155, 34, 71, 0.25);
}

.nem-registro-login-link {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #8b8d8e;
}

.nem-registro-login-link a {
  color: #9b2247;
  font-weight: 600;
  text-decoration: none;
}

.nem-registro-login-link a:hover {
  text-decoration: underline;
}

/* Overrides Bootstrap form controls dentro del registro */
.nem-registro-card .form-control:focus,
.nem-registro-card .form-select:focus {
  border-color: #9b2247;
  box-shadow: 0 0 0 3px rgba(155, 34, 71, 0.15);
}

.nem-registro-card .form-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: #2d3136;
}

.nem-registro-card .form-check-input:checked {
  background-color: #9b2247;
  border-color: #9b2247;
}
