/* ============================================================
   Healthymuscles · Acceso de afiliados (login + registro)
   Base: Bootstrap 5 + Bootstrap Icons.
   Marca tomada del logo: verde #5FB454 + tinta casi negra.
   Las imágenes (logo) van en el Blade con asset(), no aquí.
   ============================================================ */

/* ---- 1. Tokens ---- */
:root {
  --hm-green:        #5FB454;   /* verde del corazón del logo */
  --hm-green-strong: #2B7F37;   /* botones: 5:1 con texto blanco */
  --hm-green-deep:   #1F5E29;
  --hm-green-rgb:    95, 180, 84;
  --hm-forest:       #0F2416;   /* panel lateral */
  --hm-forest-2:     #163220;

  --hm-bg:       #F4F7F2;
  --hm-surface:  #FFFFFF;
  --hm-tint:     #EEF4EC;
  --hm-border:   #DCE5D9;
  --hm-border-2: #C7D4C3;

  --hm-ink-1: #141A15;
  --hm-ink-2: #3E4A40;
  --hm-ink-3: #66736A;
  --hm-ink-4: #9AA69C;
  --hm-on-dark:   #F4F8F2;
  --hm-on-dark-2: rgba(244, 248, 242, 0.72);

  --hm-font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --hm-font-body:    'Figtree', 'Segoe UI', system-ui, sans-serif;
  --hm-font-accent:  'Instrument Serif', Georgia, serif;

  --hm-ease: cubic-bezier(0.25, 1, 0.5, 1);
  --hm-r-md: 12px;
  --hm-r-lg: 18px;
  --hm-r-xl: 24px;
}

/* ---- 2. Base ---- */
body.hm-auth {
  min-height: 100vh;
  margin: 0;
  font-family: var(--hm-font-body);
  color: var(--hm-ink-1);
  background: var(--hm-bg);
  -webkit-font-smoothing: antialiased;
}
.hm-auth ::selection { background: rgba(var(--hm-green-rgb), 0.25); }
.hm-auth a { color: var(--hm-green-strong); }

/* ---- 3. Panel lateral (lg+) ---- */
.hm-aside {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--hm-on-dark);
  background:
    radial-gradient(ellipse 70% 55% at 10% 0%, rgba(var(--hm-green-rgb), 0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(var(--hm-green-rgb), 0.12), transparent 60%),
    linear-gradient(160deg, var(--hm-forest-2), var(--hm-forest));
}
.hm-aside__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: 100vh;
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) clamp(32px, 5vw, 72px);
}
.hm-aside__logo { width: 150px; height: auto; }

.hm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hm-green);
}
.hm-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--hm-green);
}

.hm-headline {
  font-family: var(--hm-font-display);
  font-weight: 700;
  font-size: clamp(2.3rem, 3.6vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  text-wrap: balance;
}
.hm-headline em {
  display: block;
  font-family: var(--hm-font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--hm-green);
}
.hm-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--hm-on-dark-2);
  max-width: 44ch;
  margin: 0;
}

/* Lo que encuentra el afiliado */
.hm-perks {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.hm-perks li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  font-weight: 500;
}
.hm-perks i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  font-size: 17px;
  color: var(--hm-green);
  background: rgba(var(--hm-green-rgb), 0.12);
  border: 1px solid rgba(var(--hm-green-rgb), 0.25);
}
.hm-perks small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--hm-on-dark-2);
}

/* Pasos (registro): la numeración es un orden real */
.hm-steps {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  counter-reset: paso;
}
.hm-steps li {
  counter-increment: paso;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
  font-weight: 600;
}
.hm-steps li::before {
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-family: var(--hm-font-display);
  font-weight: 700;
  color: var(--hm-forest);
  background: var(--hm-green);
}
.hm-steps small {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--hm-on-dark-2);
}

/* Manifiesto al pie */
.hm-manifesto {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 248, 242, 0.14);
  font-family: var(--hm-font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.hm-manifesto span { color: var(--hm-green); }

/* ---- 4. Zona del formulario ---- */
.hm-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 56px);
}
.hm-main__inner { width: 100%; max-width: 440px; }
.hm-main__inner--wide { max-width: 620px; }

.hm-logo-mobile { display: block; width: 150px; height: auto; margin: 0 auto 24px; }

/* Cabecera compacta para móvil (las frases también se ven en móvil) */
.hm-mobile-pitch { text-align: center; margin-bottom: 24px; }
.hm-mobile-pitch .hm-eyebrow { margin-bottom: 10px; color: var(--hm-green-strong); }
.hm-mobile-pitch .hm-eyebrow::before { background: var(--hm-green-strong); }
.hm-mobile-pitch h2 {
  font-family: var(--hm-font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.hm-mobile-pitch h2 em {
  font-family: var(--hm-font-accent);
  font-weight: 400;
  color: var(--hm-green-strong);
}

/* ---- 5. Tarjeta ---- */
.hm-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: var(--hm-r-xl);
  padding: 40px 36px 32px;
  box-shadow:
    0 1px 2px rgba(20, 40, 25, 0.04),
    0 10px 30px -10px rgba(20, 40, 25, 0.10),
    0 32px 64px -28px rgba(20, 40, 25, 0.14);
}
.hm-card__title {
  font-family: var(--hm-font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.hm-card__sub { font-size: 0.92rem; color: var(--hm-ink-3); margin: 0 0 28px; }

/* ---- 6. Campos (sobre .form-control de Bootstrap) ---- */
.hm-auth .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hm-ink-2);
  margin-bottom: 6px;
}
.hm-auth .input-group-text {
  background: var(--hm-tint);
  border-color: var(--hm-border);
  color: var(--hm-ink-3);
  border-radius: var(--hm-r-md);
}
.hm-auth .form-control,
.hm-auth .form-select {
  height: 50px;
  border-color: var(--hm-border);
  border-radius: var(--hm-r-md);
  font-size: 0.95rem;
  color: var(--hm-ink-1);
  transition: border-color .2s var(--hm-ease), box-shadow .2s var(--hm-ease);
}
/* Mantener las esquinas rectas donde se unen las piezas del input-group */
.hm-auth .input-group > .input-group-text:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.hm-auth .input-group-text + .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.hm-auth .form-control.border-end-0 { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.hm-auth .form-control::placeholder { color: var(--hm-ink-4); }
.hm-auth .form-control:hover,
.hm-auth .form-select:hover { border-color: var(--hm-border-2); }
.hm-auth .form-control:focus,
.hm-auth .form-select:focus {
  border-color: var(--hm-green);
  box-shadow: 0 0 0 4px rgba(var(--hm-green-rgb), 0.18);
}
.hm-auth .input-group:focus-within .input-group-text { border-color: var(--hm-green); color: var(--hm-green-strong); }
.hm-auth .form-control[readonly] { background: var(--hm-tint); }
.hm-auth .form-control.is-invalid { border-color: #C2412D; }

.hm-toggle-pass {
  border: 1px solid var(--hm-border);
  border-left: 0;
  background: var(--hm-surface);
  color: var(--hm-ink-3);
  border-radius: 0 var(--hm-r-md) var(--hm-r-md) 0;
  padding: 0 14px;
}
.hm-toggle-pass:hover { color: var(--hm-ink-1); background: var(--hm-tint); }
.hm-auth .input-group:focus-within .hm-toggle-pass { border-color: var(--hm-green); }

.hm-link-soft {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.hm-link-soft:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Checkbox de Bootstrap en verde de marca */
.hm-auth .form-check-input {
  width: 1.15em;
  height: 1.15em;
  border-color: var(--hm-border-2);
}
.hm-auth .form-check-input:checked {
  background-color: var(--hm-green-strong);
  border-color: var(--hm-green-strong);
}
.hm-auth .form-check-input:focus { box-shadow: 0 0 0 4px rgba(var(--hm-green-rgb), 0.18); border-color: var(--hm-green); }
.hm-auth .form-check-label { font-size: 0.88rem; color: var(--hm-ink-2); }

/* Separador de secciones del registro */
.hm-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hm-ink-3);
}
.hm-section-label::after { content: ''; flex: 1; height: 1px; background: var(--hm-border); }

/* ---- 7. Botón principal ---- */
.btn-hm {
  height: 52px;
  border: 0;
  border-radius: var(--hm-r-md);
  font-weight: 700;
  font-size: 0.98rem;
  color: #fff;
  background: var(--hm-green-strong);
  box-shadow: 0 10px 22px -10px rgba(43, 127, 55, 0.6);
  transition: transform .3s var(--hm-ease), background .3s var(--hm-ease), box-shadow .3s var(--hm-ease);
}
.btn-hm:hover, .btn-hm:focus-visible {
  color: #fff;
  background: var(--hm-green-deep);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(43, 127, 55, 0.7);
}
.btn-hm:active { transform: translateY(0); }
.btn-hm i { transition: transform .3s var(--hm-ease); }
.btn-hm:hover i { transform: translateX(3px); }

/* ---- 8. Pie de tarjeta ---- */
.hm-switch {
  margin: 22px 0 0;
  padding: 14px 18px;
  border-radius: var(--hm-r-lg);
  background: var(--hm-tint);
  border: 1px solid var(--hm-border);
  font-size: 0.9rem;
  color: var(--hm-ink-2);
  text-align: center;
}
.hm-switch a { font-weight: 700; text-decoration: none; }
.hm-switch a:hover { text-decoration: underline; }

.hm-legal { margin: 20px 0 0; font-size: 0.75rem; color: var(--hm-ink-3); text-align: center; }

/* ---- 9. Entrada ---- */
.hm-rise { animation: hm-rise .8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hm-rise--2 { animation-delay: .12s; }
@keyframes hm-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- 10. Responsivo ---- */
@media (max-width: 575.98px) {
  .hm-card { padding: 30px 22px 26px; border-radius: var(--hm-r-lg); }
  .hm-card__title { font-size: 1.4rem; }
}

/* ---- 11. Accesibilidad ---- */
.hm-auth :focus-visible { outline: 2px solid var(--hm-green-strong); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .hm-rise, .btn-hm, .btn-hm i { animation: none !important; transition: none !important; }
}