:root {
  --auth-navy-950: #051426;
  --auth-navy-900: #081b31;
  --auth-navy-850: #0b223d;
  --auth-navy-800: #102b49;
  --auth-cream: #f7f2e8;
  --auth-cream-soft: #ddd7cb;
  --auth-muted: #9caec3;
  --auth-line: rgba(205, 220, 237, .14);
  --auth-line-strong: rgba(205, 220, 237, .23);
  --auth-red: #e42b2f;
  --auth-red-dark: #bd171f;
  --auth-blue: #55a9ef;
  --auth-shadow: 0 30px 90px rgba(0, 6, 18, .52);
}

html {
  background: var(--auth-navy-950);
}

body.auth-network-page {
  min-height: 100vh;
  color: var(--auth-cream);
  background:
    radial-gradient(circle at 12% 8%, rgba(28, 91, 145, .25), transparent 30rem),
    radial-gradient(circle at 88% 14%, rgba(228, 43, 47, .16), transparent 27rem),
    linear-gradient(145deg, var(--auth-navy-950), var(--auth-navy-900) 54%, #0a1f38);
  background-attachment: fixed;
}

body.auth-network-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 1;
  background-image:
    linear-gradient(rgba(247, 242, 232, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 242, 232, .028) 1px, transparent 1px);
  background-size: 52px 52px;
  background-position: center;
}

body.auth-network-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(4, 15, 29, .18), rgba(4, 15, 29, .54)),
    radial-gradient(ellipse at 50% 110%, rgba(85, 169, 239, .10), transparent 42%);
}

.auth-network-page main {
  position: relative;
  z-index: 1;
}

.auth-network-page .login-page-shell::before,
.auth-network-page .login-page-shell::after {
  display: none;
}

.auth-product-bridge {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  margin: 0 0 1.15rem;
  padding: .48rem .72rem;
  border: 1px solid var(--auth-line-strong);
  border-radius: 999px;
  background: rgba(5, 20, 38, .66);
  color: var(--auth-muted);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.auth-product-bridge > i {
  color: rgba(247, 242, 232, .36);
  font-size: .62rem;
}

.auth-product-bridge span i {
  color: #39d98a;
}

.auth-product-bridge strong {
  color: var(--auth-cream);
}

.auth-product-bridge strong i {
  color: var(--auth-red);
}

.auth-quiniela-lockup {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.auth-quiniela-logo, .auth-quiniela-isotipo { display: grid; place-items: center; width: 68px; height: 68px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.auth-quiniela-lockup img { display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; object-fit: contain; }
.auth-quiniela-divider { width: 1px; height: 48px; background: rgba(247,242,232,.2); }

/* Login: una sola acción, con identidad compartida entre Network y Quiniela. */
.auth-network-page .login-page-shell {
  min-height: calc(100vh - 72px);
  padding: clamp(1rem, 4vw, 3.2rem);
  background: transparent;
}

.auth-network-page .login-stage {
  width: min(520px, 100%);
}

.auth-network-page .login-card {
  position: relative;
  border: 1px solid var(--auth-line-strong);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(16, 43, 73, .98), rgba(7, 26, 47, .985));
  box-shadow: var(--auth-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-network-page .login-card::before,
.auth-network-page .register-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: clamp(1.3rem, 7%, 2.5rem);
  right: clamp(1.3rem, 7%, 2.5rem);
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--auth-red), transparent);
  pointer-events: none;
}

.auth-network-page .login-card-inner {
  padding: clamp(1.55rem, 5vw, 2.65rem);
}

.auth-network-page .mobile-brand-mark {
  display: flex !important;
  justify-content: flex-start;
  margin: .15rem 0 1rem;
}

.auth-network-page .mobile-brand-mark .auth-quiniela-lockup { margin: 0; }

.auth-network-page .mobile-brand-mark img {
  width: min(285px, 82%);
  height: auto;
  max-height: 84px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  object-position: left center;
}

.auth-network-page .mobile-brand-mark .auth-quiniela-lockup img { width: 100%; height: 100%; max-height: none; object-position: center; }

.auth-network-page .login-network-return,
.auth-network-page .register-network-return {
  color: var(--auth-muted);
}

.auth-network-page .login-network-return:hover,
.auth-network-page .register-network-return:hover {
  color: var(--auth-cream);
}

.auth-network-page .login-heading {
  max-width: 430px;
  margin: .45rem 0 .8rem;
  color: var(--auth-cream);
  font-size: clamp(2.15rem, 8vw, 3.15rem);
  line-height: .98;
  letter-spacing: -.06em;
}

.auth-network-page .login-description {
  margin-bottom: 1.6rem;
  color: var(--auth-muted);
  line-height: 1.58;
}

.auth-network-page .form-label,
.auth-network-page .register-title-wrap h1,
.auth-network-page .form-section-title {
  color: var(--auth-cream);
}

.auth-network-page .form-label i {
  color: #ff575d;
}

.auth-network-page .form-control,
.auth-network-page .password-group {
  border-color: var(--auth-line);
  background: rgba(4, 17, 32, .72);
  color: var(--auth-cream);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.auth-network-page .form-control::placeholder {
  color: #657a91;
}

.auth-network-page .form-control:focus,
.auth-network-page .password-group:focus-within {
  border-color: rgba(85, 169, 239, .72);
  background: rgba(5, 22, 41, .96);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(85, 169, 239, .12);
}

.auth-network-page input[type="date"] {
  color-scheme: dark;
}

.auth-network-page .password-toggle {
  border-left-color: var(--auth-line);
  color: var(--auth-muted);
}

.auth-network-page .password-toggle:hover {
  color: var(--auth-cream);
  background: rgba(255, 255, 255, .04);
}

.auth-network-page .forgot-password a {
  color: #ff777b;
}

.auth-network-page .forgot-password a:hover {
  color: #fff;
}

.auth-network-page .btn-login,
.auth-network-page .btn-create {
  border-radius: 16px;
  background: linear-gradient(135deg, #f13a3e, var(--auth-red-dark));
  box-shadow: 0 16px 34px rgba(228, 43, 47, .24);
}

.auth-network-page .btn-login:hover,
.auth-network-page .btn-create:hover {
  box-shadow: 0 20px 42px rgba(228, 43, 47, .32);
  filter: brightness(1.06);
}

.auth-network-page .login-divider {
  color: #72859b;
}

.auth-network-page .login-divider::before,
.auth-network-page .login-divider::after {
  background: linear-gradient(90deg, transparent, var(--auth-line-strong), transparent);
}

.auth-network-page .register-section,
.auth-network-page .login-switch {
  border-color: var(--auth-line);
  background: rgba(255, 255, 255, .035);
}

.auth-network-page .register-section p,
.auth-network-page .login-switch p {
  color: var(--auth-muted);
}

.auth-network-page .btn-register,
.auth-network-page .btn-login-alt {
  border-color: rgba(247, 242, 232, .24);
  background: rgba(247, 242, 232, .06);
  color: var(--auth-cream);
  box-shadow: none;
}

.auth-network-page .btn-register:hover,
.auth-network-page .btn-login-alt:hover {
  border-color: var(--auth-red);
  background: var(--auth-red);
  color: #fff;
}

.auth-network-page .security-note {
  border: 1px solid rgba(85, 169, 239, .18);
  background: rgba(85, 169, 239, .07);
  color: #b8cce2;
}

/* Registro: la misma superficie, con más espacio para completar datos. */
.auth-network-page .register-shell {
  min-height: calc(100vh - 72px);
  padding: clamp(1rem, 3vw, 2.75rem) 0;
  background: transparent;
}

.auth-network-page .register-frame {
  max-width: 840px;
}

.auth-network-page .register-card {
  position: relative;
  border-color: var(--auth-line-strong);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(16, 43, 73, .985), rgba(7, 26, 47, .985));
  box-shadow: var(--auth-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-network-page .register-header {
  padding: clamp(1.45rem, 4vw, 2.15rem);
  border-bottom-color: var(--auth-line);
  background:
    radial-gradient(circle at 92% 12%, rgba(228, 43, 47, .13), transparent 19rem),
    rgba(9, 33, 58, .72);
}

.auth-network-page .register-header-top {
  align-items: center;
}

.auth-network-page .register-title-wrap h1 {
  max-width: 480px;
  font-size: clamp(1.8rem, 5vw, 2.55rem);
  line-height: 1.02;
}

.auth-network-page .register-title-wrap p {
  max-width: 520px;
  color: var(--auth-muted);
  line-height: 1.5;
}

.auth-network-page .mini-logo {
  width: 235px;
  height: 68px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: right center;
}

.auth-network-page .register-header-top .auth-quiniela-lockup { flex: 0 0 auto; }
.auth-network-page .forgot-card-head .auth-quiniela-lockup { margin: 0 auto .9rem; }
.auth-network-page .forgot-card-head .auth-quiniela-lockup img { width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }

.auth-network-page .register-header .auth-product-bridge {
  margin: 1.25rem 0 0;
}

.auth-network-page .register-body {
  padding: clamp(1.45rem, 4vw, 2.25rem);
}

.auth-network-page .form-section-title i {
  background: var(--auth-red);
  box-shadow: 0 12px 25px rgba(228, 43, 47, .18);
}

.auth-network-page .form-text,
.auth-network-page .password-hint {
  color: #8194aa;
}

.auth-network-page .field-error {
  color: #ff9ca0;
}

.auth-network-page .password-meter {
  background: rgba(255, 255, 255, .08);
}

.auth-network-page .collaboration-card,
.auth-network-page .terms-card {
  border-color: var(--auth-line);
  background: rgba(3, 15, 29, .46);
}

.auth-network-page .collaboration-card.is-applied {
  border-color: rgba(57, 217, 138, .4);
  background: rgba(57, 217, 138, .07);
}

.auth-network-page .collaboration-heading {
  color: var(--auth-cream);
}

.auth-network-page .collaboration-heading > i:first-child {
  background: rgba(228, 43, 47, .9);
}

.auth-network-page .collaboration-heading strong,
.auth-network-page .form-check-label {
  color: var(--auth-cream-soft);
}

.auth-network-page .collaboration-heading small {
  color: var(--auth-muted);
}

.auth-network-page .collaboration-heading .collaboration-chevron {
  color: #8fc5f4;
}

.auth-network-page .collaboration-fields {
  border-top-color: var(--auth-line);
}

.auth-network-page .form-check-input {
  border-color: rgba(247, 242, 232, .34);
  background-color: rgba(4, 17, 32, .78);
}

.auth-network-page .form-check-input:checked {
  border-color: var(--auth-red);
  background-color: var(--auth-red);
}

.auth-network-page .form-check-label a {
  color: #ff777b;
  text-decoration: underline;
  text-decoration-color: rgba(255, 119, 123, .42);
  text-underline-offset: 3px;
}

.auth-network-page .form-check-label a:hover {
  color: #fff;
}

.auth-network-page .register-footnote {
  color: #7e91a7;
}

.auth-network-page .sf-legal-footer {
  border-top-color: rgba(205, 220, 237, .10);
  background: rgba(4, 15, 29, .76);
  color: #7e91a7;
}

.auth-network-page .sf-legal-footer a {
  color: var(--auth-cream-soft);
}

.auth-network-page .alert {
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
}

/* Recuperación: continúa el mismo recorrido visual Network → Quiniela. */
.auth-network-page .forgot-pro-page {
  min-height: calc(100vh - 72px);
  padding: clamp(1rem, 4vw, 3.2rem) 0;
  background: transparent;
}

.auth-network-page .forgot-pro-bg {
  display: none;
}

.auth-network-page .forgot-pro-page::before {
  display: none;
}

.auth-network-page .forgot-pro-container,
.auth-network-page .forgot-pro-container.narrow {
  width: min(540px, calc(100% - 1.5rem));
  max-width: 540px;
  padding: 0;
}

.auth-network-page .forgot-card,
.auth-network-page .reset-card {
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  overflow: hidden;
  border: 1px solid var(--auth-line-strong);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(16, 43, 73, .985), rgba(7, 26, 47, .985));
  color: var(--auth-cream);
  box-shadow: var(--auth-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.auth-network-page .forgot-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: clamp(1.3rem, 7%, 2.5rem);
  right: clamp(1.3rem, 7%, 2.5rem);
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, var(--auth-red), transparent);
  pointer-events: none;
}

.auth-network-page .forgot-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.55rem, 5vw, 2.45rem) clamp(1.45rem, 5vw, 2.35rem) 1.35rem;
  text-align: left;
  border-bottom: 1px solid var(--auth-line);
  background:
    radial-gradient(circle at 92% 10%, rgba(228, 43, 47, .13), transparent 16rem),
    rgba(9, 33, 58, .54);
}

.auth-network-page .forgot-network-return {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1.15rem;
  color: var(--auth-muted);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}

.auth-network-page .forgot-network-return:hover {
  color: var(--auth-cream);
}

.auth-network-page .forgot-card-head > img {
  width: min(285px, 82%);
  height: auto;
  max-height: 84px;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  object-position: left center;
}

.auth-network-page .forgot-card-head .auth-product-bridge {
  margin-bottom: 1.05rem;
}

.auth-network-page .forgot-card-head h2 {
  margin: 0;
  color: var(--auth-cream);
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 950;
  line-height: .99;
  letter-spacing: -.06em;
}

.auth-network-page .forgot-card-head p {
  max-width: 455px;
  margin: .75rem 0 0;
  color: var(--auth-muted);
  font-weight: 680;
  line-height: 1.55;
}

.auth-network-page .forgot-card-body {
  padding: clamp(1.4rem, 5vw, 2.25rem);
}

.auth-network-page .forgot-form-label {
  color: var(--auth-cream);
  font-weight: 850;
}

.auth-network-page .forgot-form-label i {
  color: #ff575d;
}

.auth-network-page .forgot-input {
  min-height: 54px;
  padding-inline: 1rem;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background: rgba(4, 17, 32, .72);
  color: var(--auth-cream);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.auth-network-page .forgot-input::placeholder {
  color: #657a91;
}

.auth-network-page .forgot-input:focus {
  border-color: rgba(85, 169, 239, .72);
  background: rgba(5, 22, 41, .96);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(85, 169, 239, .12);
}

.auth-network-page .forgot-submit {
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f13a3e, var(--auth-red-dark));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(228, 43, 47, .24);
}

.auth-network-page .forgot-submit:hover,
.auth-network-page .forgot-submit:focus {
  color: #fff;
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 20px 42px rgba(228, 43, 47, .32);
}

.auth-network-page .forgot-security-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: 1rem;
}

.auth-network-page .forgot-security-list.single {
  grid-template-columns: 1fr;
}

.auth-network-page .forgot-security-list span {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .72rem .78rem;
  border: 1px solid rgba(85, 169, 239, .16);
  border-radius: 14px;
  background: rgba(85, 169, 239, .06);
  color: #9fb5cb;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.4;
}

.auth-network-page .forgot-security-list i {
  margin-top: .1rem;
  color: var(--auth-blue);
}

.auth-network-page .forgot-back {
  margin-top: 1rem;
  border: 1px solid rgba(247, 242, 232, .18);
  border-radius: 16px;
  background: rgba(247, 242, 232, .045);
  color: var(--auth-cream-soft);
}

.auth-network-page .forgot-back:hover {
  border-color: var(--auth-red);
  background: rgba(228, 43, 47, .09);
  color: #fff;
}

.auth-network-page .reset-invalid-state {
  border-color: rgba(255, 119, 123, .28);
  background: rgba(228, 43, 47, .09);
  color: var(--auth-cream-soft);
}

.auth-network-page .reset-invalid-state > i {
  background: rgba(228, 43, 47, .18);
  color: #ff777b;
}

.auth-network-page .reset-invalid-state strong {
  color: #ff9ca0;
}

.auth-network-page .reset-invalid-state p {
  color: var(--auth-muted);
}

@media (max-width: 680px) {
  body.auth-network-page::before {
    background-size: 38px 38px;
  }

  .auth-network-page .login-page-shell {
    justify-content: flex-start;
    padding: .7rem;
  }

  .auth-network-page .login-card,
  .auth-network-page .register-card {
    border-radius: 24px;
  }

  .auth-network-page .mobile-brand-mark {
    justify-content: center;
  }

  .auth-network-page .mobile-brand-mark img {
    width: min(250px, 86%);
    object-position: center;
  }

  .auth-network-page .auth-product-bridge {
    margin-left: auto;
    margin-right: auto;
  }

  .auth-network-page .register-header-top {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .auth-network-page .mini-logo {
    width: min(230px, 86%);
    height: 62px;
    margin-bottom: .65rem;
    object-position: left center;
  }

  .auth-network-page .register-header-top .auth-quiniela-lockup { align-self: center; }
  .auth-quiniela-logo, .auth-quiniela-isotipo { width: 58px; height: 58px; border-radius: 15px; }
  .auth-quiniela-divider { height: 42px; }

  .auth-network-page .register-title-wrap h1 {
    font-size: 1.8rem;
  }

  .auth-network-page .register-header,
  .auth-network-page .register-body {
    padding: 1.2rem;
  }

  .auth-network-page .forgot-pro-page {
    align-items: flex-start;
    padding: .7rem 0;
  }

  .auth-network-page .forgot-pro-container,
  .auth-network-page .forgot-pro-container.narrow {
    width: calc(100% - 1rem);
  }

  .auth-network-page .forgot-card,
  .auth-network-page .reset-card {
    border-radius: 24px;
  }

  .auth-network-page .forgot-card-head {
    align-items: center;
    padding: 1.35rem 1.2rem 1.15rem;
    text-align: center;
  }

  .auth-network-page .forgot-network-return {
    align-self: flex-start;
    text-align: left;
  }

  .auth-network-page .forgot-card-head > img {
    width: min(250px, 86%);
    object-position: center;
  }

  .auth-network-page .forgot-card-head h2 {
    font-size: 2rem;
  }

  .auth-network-page .forgot-card-head p {
    margin-left: auto;
    margin-right: auto;
  }

  .auth-network-page .forgot-card-body {
    padding: 1.2rem;
  }

  .auth-network-page .forgot-security-list {
    grid-template-columns: 1fr;
  }

  .auth-network-page .sf-legal-footer {
    padding: 16px 12px;
    font-size: .76rem;
    line-height: 1.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-network-page *,
  .auth-network-page *::before,
  .auth-network-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* La marca de Quiniela siempre descansa directamente sobre el fondo oscuro. */
.auth-network-page .auth-quiniela-logo,
.auth-network-page .auth-quiniela-isotipo,
.auth-network-page .mobile-brand-mark .auth-quiniela-logo,
.auth-network-page .mobile-brand-mark .auth-quiniela-isotipo,
.auth-network-page .register-header-top .auth-quiniela-logo,
.auth-network-page .register-header-top .auth-quiniela-isotipo,
.auth-network-page .forgot-card-head .auth-quiniela-logo,
.auth-network-page .forgot-card-head .auth-quiniela-isotipo {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.auth-network-page .auth-quiniela-lockup img {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
