body.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, rgba(214, 40, 40, 0.1), transparent 28%),
    radial-gradient(circle at bottom right, rgba(30, 90, 167, 0.12), transparent 26%),
    linear-gradient(180deg, #eef3fb 0%, #f8fafc 100%);
}

.auth-page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-page-shell__header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: calc(.85rem + env(safe-area-inset-top, 0px)) 0 .9rem;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(248,250,252,0.88), rgba(248,250,252,0.55));
}

.auth-page-shell__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-page-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  color: var(--brand-secondary);
}

.auth-page-shell__brand:hover {
  color: var(--brand-secondary);
}

.auth-page-shell__brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(240,244,251,0.98));
  border: 1px solid rgba(13,47,79,0.1);
  box-shadow: 0 18px 36px rgba(13,47,79,0.12);
}

.auth-page-shell__brand-mark img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.auth-page-shell__brand-copy {
  display: flex;
  align-items: center;
}

.auth-page-shell__brand-copy strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.02rem;
  letter-spacing: -.02em;
}

.auth-page-shell__actions {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.auth-page-shell__link {
  min-height: 42px;
  padding: 0 .95rem;
  border-radius: 999px;
  border: 1px solid rgba(13,47,79,0.1);
  background: rgba(255,255,255,0.82);
  color: var(--brand-secondary);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  box-shadow: 0 12px 28px rgba(13,47,79,0.08);
}

.auth-page-shell__main {
  flex: 1 1 auto;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.auth-scene {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px) clamp(18px, 4vw, 32px) calc(clamp(32px, 5vw, 52px) + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 470px);
  gap: clamp(22px, 4vw, 34px);
  align-items: stretch;
}

.auth-scene--register {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
}

.auth-visual {
  position: relative;
  min-height: 640px;
  border-radius: 34px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 34px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(7, 16, 30, 0.24), rgba(7, 16, 30, 0.84)),
    linear-gradient(135deg, rgba(8, 22, 42, 0.96), rgba(13, 47, 79, 0.88));
  box-shadow: 0 34px 72px rgba(13,47,79,0.22);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 31, 51, 0.12), rgba(11, 31, 51, 0.88)),
    var(--auth-visual-image, none) center/cover no-repeat;
  z-index: -2;
}

.auth-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(420px 220px at 82% 16%, rgba(255,255,255,0.16), transparent 72%),
    radial-gradient(360px 220px at 10% 100%, rgba(214,40,40,0.24), transparent 72%);
  z-index: -1;
}

.auth-visual--login {
  --auth-visual-image: url('/public/img/hero-healthtech.jpg');
}

.auth-visual--register {
  --auth-visual-image: url('/public/img/proceso.jpg');
}

.auth-visual__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.auth-visual__body {
  display: grid;
  gap: 1.2rem;
  max-width: 580px;
}

.auth-visual__title {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: .96;
  letter-spacing: -.05em;
}

.auth-visual__lead {
  margin: 0;
  max-width: 34rem;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

.auth-visual__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.auth-visual__chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.88);
  font-size: .82rem;
}

.auth-visual__footer {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(240px, .82fr);
  gap: 1rem;
  align-items: stretch;
}

.auth-visual-panel,
.auth-stat-card {
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
}

.auth-visual-panel {
  padding: 1.2rem 1.2rem 1.25rem;
  display: grid;
  gap: 1rem;
}

.auth-visual-panel__kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .38rem .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.78);
  font-size: .73rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
}

.auth-visual-panel__title {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.auth-visual-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .8rem;
}

.auth-visual-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: start;
  color: rgba(255,255,255,0.84);
}

.auth-visual-list li i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.auth-stat-stack {
  display: grid;
  gap: 1rem;
}

.auth-stat-card {
  padding: 1.1rem 1.05rem 1.15rem;
  display: grid;
  gap: .45rem;
}

.auth-stat-card strong {
  display: block;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.6rem;
  letter-spacing: -.03em;
}

.auth-stat-card span {
  display: block;
  color: rgba(255,255,255,0.76);
  font-size: .86rem;
  line-height: 1.45;
}

.auth-panel-wrap {
  display: flex;
  align-items: center;
}

.auth-panel {
  width: 100%;
  border-radius: 32px;
  padding: clamp(24px, 4vw, 34px);
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(13,47,79,0.1);
  box-shadow: 0 32px 70px rgba(13,47,79,0.14);
}

.auth-panel__head {
  display: grid;
  gap: .95rem;
  margin-bottom: 1.45rem;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: fit-content;
  padding: .4rem .8rem;
  border-radius: 999px;
  background: rgba(13,47,79,0.05);
  color: var(--brand-secondary);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.auth-kicker i {
  color: var(--brand-primary);
}

.auth-panel__title {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  line-height: .98;
  letter-spacing: -.05em;
  color: var(--brand-secondary);
}

.auth-panel__lead {
  margin: 0;
  color: var(--brand-muted);
  font-size: .98rem;
  max-width: 34rem;
}

.auth-mobile-points {
  display: none;
}

.auth-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  padding: .95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(13,47,79,0.1);
  margin-bottom: 1rem;
}

.auth-notice i {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(13,47,79,0.08);
  color: var(--brand-secondary);
}

.auth-notice strong {
  display: block;
  margin-bottom: .18rem;
  color: var(--brand-secondary);
}

.auth-notice p {
  margin: 0;
  color: var(--brand-muted);
  font-size: .92rem;
}

.auth-notice.is-success {
  background: rgba(240, 253, 244, 0.94);
  border-color: rgba(22,163,74,0.16);
}

.auth-notice.is-success i {
  background: rgba(22,163,74,0.12);
  color: #15803d;
}

.auth-notice.is-warning {
  background: rgba(255, 251, 235, 0.96);
  border-color: rgba(245,158,11,0.2);
}

.auth-notice.is-warning i {
  background: rgba(245,158,11,0.12);
  color: #b45309;
}

.auth-notice.is-danger,
.auth-notice.is-error {
  background: rgba(254, 242, 242, 0.96);
  border-color: rgba(239,68,68,0.18);
}

.auth-notice.is-danger i,
.auth-notice.is-error i {
  background: rgba(239,68,68,0.1);
  color: #b91c1c;
}

.auth-return-note {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  width: fit-content;
  margin-bottom: 1rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: rgba(30,90,167,0.08);
  color: var(--brand-accent);
  font-size: .82rem;
  font-weight: 600;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-field {
  display: grid;
  gap: .45rem;
}

.auth-field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: var(--brand-secondary);
  font-size: .82rem;
  font-weight: 700;
}

.auth-inline-link {
  color: var(--brand-accent);
  font-size: .8rem;
  font-weight: 600;
}

.auth-control {
  position: relative;
}

.auth-control__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(13,47,79,0.42);
  pointer-events: none;
}

.auth-control__input {
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(13,47,79,0.12);
  background: rgba(248,250,252,0.92);
  padding: .95rem 1rem .95rem 2.9rem;
  color: var(--brand-secondary);
  font-size: 16px;
  transition: border-color var(--brand-transition), box-shadow var(--brand-transition), background var(--brand-transition);
}

.auth-control__input::placeholder {
  color: rgba(75,85,101,0.7);
}

.auth-control__input:focus {
  background: #fff;
  border-color: rgba(30,90,167,0.4);
  box-shadow: 0 0 0 4px rgba(30,90,167,0.12);
}

.auth-form .invalid-feedback {
  display: none;
  font-size: .82rem;
}

.auth-form.was-validated .auth-control__input:invalid {
  border-color: rgba(239,68,68,0.38);
  box-shadow: 0 0 0 4px rgba(239,68,68,0.1);
}

.auth-form.was-validated .auth-control__input:valid {
  border-color: rgba(22,163,74,0.28);
}

.auth-form.was-validated .auth-control__input:invalid ~ .invalid-feedback {
  display: block;
}

.auth-control__input.has-toggle {
  padding-right: 3.2rem;
}

.auth-control__toggle {
  position: absolute;
  right: .65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(13,47,79,0.56);
  cursor: pointer;
}

.auth-control__toggle:hover {
  background: rgba(13,47,79,0.06);
  color: var(--brand-secondary);
}

.auth-input-hint {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--brand-muted);
  font-size: .82rem;
}

.auth-input-hint.is-warning {
  color: #b45309;
}

.auth-password-meter {
  display: grid;
  gap: .55rem;
}

.auth-password-meter[hidden] {
  display: none;
}

.auth-password-meter__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
  overflow: hidden;
}

.auth-password-meter__fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #d62828);
  transition: width 180ms ease, background 180ms ease;
}

.auth-password-meter__copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: var(--brand-muted);
  font-size: .8rem;
}

.auth-checklist {
  display: grid;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-checklist li {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--brand-muted);
  font-size: .84rem;
}

.auth-checklist li.is-done {
  color: var(--brand-secondary);
}

.auth-checklist li i {
  color: rgba(13,47,79,0.34);
}

.auth-checklist li.is-done i {
  color: #15803d;
}

.auth-agree {
  display: grid;
  gap: .55rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(13,47,79,0.04);
  border: 1px solid rgba(13,47,79,0.08);
}

.auth-agree__row {
  display: flex;
  align-items: start;
  gap: .75rem;
}

.auth-agree__row input {
  margin-top: .25rem;
}

.auth-agree__row label {
  color: var(--brand-muted);
  font-size: .9rem;
}

.auth-form.was-validated .auth-agree:has(input:invalid) {
  border-color: rgba(239,68,68,0.22);
  background: rgba(254,242,242,0.9);
}

.auth-form.was-validated .auth-agree:has(input:invalid) .invalid-feedback {
  display: block;
}

.auth-form__actions {
  display: grid;
  gap: .55rem;
}

.auth-form__meta {
  text-align: center;
  color: var(--brand-muted);
  font-size: .82rem;
}

.auth-submit {
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 20px 42px rgba(13,47,79,0.2);
  transition: transform var(--brand-transition), box-shadow var(--brand-transition), filter var(--brand-transition);
  cursor: pointer;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 26px 56px rgba(13,47,79,0.24);
  filter: brightness(1.02);
}

.auth-form.is-submitting .auth-submit {
  opacity: .92;
  pointer-events: none;
}

.auth-divider {
  position: relative;
  display: grid;
  place-items: center;
  margin: .2rem 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(13,47,79,0.1);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 .85rem;
  background: rgba(255,255,255,0.94);
  color: var(--brand-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.auth-social {
  width: 100%;
  min-height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(13,47,79,0.12);
  background: #fff;
  color: var(--brand-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(13,47,79,0.08);
}

.auth-social:hover {
  color: var(--brand-secondary);
  background: rgba(248,250,252,0.94);
}

.auth-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  color: var(--brand-muted);
  font-size: .9rem;
}

.auth-panel__footer a {
  font-weight: 700;
}

@media (max-width: 991.98px) {
  .auth-page-shell__header {
    position: static;
  }

  .auth-scene,
  .auth-scene--register {
    grid-template-columns: 1fr;
  }

  .auth-panel-wrap {
    order: 1;
    align-items: stretch;
  }

  .auth-visual {
    order: 2;
    min-height: 360px;
  }

  .auth-visual__grid {
    grid-template-columns: 1fr 1fr;
  }

  .auth-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .auth-page-shell__header {
    padding-bottom: .7rem;
  }

  .auth-page-shell__nav {
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .auth-page-shell__actions {
    width: auto;
    justify-content: flex-end;
    gap: .55rem;
  }

  .auth-page-shell__brand {
    gap: .7rem;
  }

  .auth-page-shell__brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .auth-page-shell__brand-copy strong {
    font-size: .96rem;
  }

  .auth-page-shell__link {
    justify-content: center;
    padding-inline: .85rem;
  }

  .auth-panel {
    border-radius: 26px;
    padding: 1.2rem 1rem 1rem;
  }

  .auth-scene,
  .auth-scene--register {
    gap: 14px;
    padding: 12px 12px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .auth-visual {
    min-height: auto;
    border-radius: 24px;
    padding: 1.05rem 1rem;
    gap: 1rem;
  }

  .auth-visual__body {
    gap: .95rem;
  }

  .auth-visual__title {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
    line-height: 1;
  }

  .auth-visual__lead {
    font-size: .92rem;
    max-width: none;
  }

  .auth-visual__chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -.1rem;
    padding-inline: .1rem;
    padding-bottom: .2rem;
    scrollbar-width: none;
  }

  .auth-visual__chips::-webkit-scrollbar {
    display: none;
  }

  .auth-visual__chip {
    flex: 0 0 auto;
  }

  .auth-visual__footer {
    grid-template-columns: 1fr;
  }

  .auth-visual-panel,
  .auth-stat-card {
    border-radius: 20px;
  }

  .auth-visual-panel {
    padding: 1rem;
  }

  .auth-visual-panel__title {
    font-size: 1.18rem;
  }

  .auth-stat-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
  }

  .auth-stat-card {
    padding: .9rem;
  }

  .auth-stat-card strong {
    font-size: 1.25rem;
  }

  .auth-stat-card span {
    font-size: .78rem;
  }

  .auth-panel__head {
    gap: .8rem;
    margin-bottom: 1rem;
  }

  .auth-panel__title {
    font-size: clamp(1.72rem, 8vw, 2.2rem);
  }

  .auth-panel__lead {
    font-size: .92rem;
  }

  .auth-mobile-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-bottom: 1rem;
  }

  .auth-mobile-points__item {
    display: grid;
    gap: .28rem;
    padding: .8rem .75rem;
    border-radius: 18px;
    background: rgba(13,47,79,0.04);
    border: 1px solid rgba(13,47,79,0.08);
    text-align: left;
  }

  .auth-mobile-points__item i {
    color: var(--brand-primary);
  }

  .auth-mobile-points__item strong {
    color: var(--brand-secondary);
    font-size: .8rem;
    line-height: 1.1;
  }

  .auth-mobile-points__item span {
    color: var(--brand-muted);
    font-size: .72rem;
    line-height: 1.25;
  }

  .auth-notice,
  .auth-agree {
    border-radius: 18px;
  }

  .auth-return-note {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .auth-control__input {
    min-height: 58px;
    padding-left: 2.8rem;
    border-radius: 16px;
  }

  .auth-control__toggle {
    width: 44px;
    height: 44px;
    right: .45rem;
    border-radius: 14px;
  }

  .auth-form__actions {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 3;
    padding-top: .85rem;
    margin-top: .2rem;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,0.92) 26%, rgba(255,255,255,0.98));
  }

  .auth-submit {
    min-height: 58px;
    box-shadow: 0 18px 34px rgba(13,47,79,0.18);
  }

  .auth-divider {
    margin-top: .55rem;
  }

  .auth-social {
    min-height: 56px;
  }

  .auth-panel__footer {
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
  }

  .auth-panel__footer span,
  .auth-panel__footer a {
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .auth-page-shell__actions {
    width: 100%;
    display: flex;
  }

  .auth-mobile-points {
    grid-template-columns: 1fr;
  }

  .auth-visual__eyebrow,
  .auth-kicker {
    font-size: .7rem;
    letter-spacing: .1em;
  }

  .auth-notice {
    padding: .85rem .9rem;
    gap: .65rem;
  }

  .auth-notice i {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit,
  .auth-control__input,
  .auth-control__toggle,
  .auth-social {
    transition: none;
  }
}
