:root {
  --auth-ink: #10251a;
  --auth-green: #1f5f3a;
  --auth-green-deep: #0a2b1d;
  --auth-green-soft: #eaf3ed;
  --auth-gold: #e8a317;
  --auth-gold-bright: #f4bd3d;
  --auth-muted: #65736b;
  --auth-line: rgba(16, 37, 26, .11);
  --auth-surface: #f5f8f6;
  --auth-white: #fff;
}

html,
body {
  min-height: 100%;
}

body.auth-page {
  margin: 0;
  overflow-x: hidden;
  background: var(--auth-surface);
  color: var(--auth-ink);
  font-family: 'Open Sans', system-ui, sans-serif;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
  box-sizing: border-box;
}

.auth-page a {
  color: inherit;
  text-decoration: none;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(460px, 1.08fr) minmax(500px, .92fr);
  min-height: 100vh;
}

.auth-story {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 68px);
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(5, 25, 16, .96), rgba(9, 48, 30, .88) 58%, rgba(20, 78, 47, .76)),
    url('../img/banner/banner.png') 58% center / cover no-repeat;
  color: #fff;
}

.auth-story::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 12% 86%, rgba(42, 164, 213, .17), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(232, 163, 23, .22), transparent 25%);
  pointer-events: none;
}

.auth-story::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -150px;
  bottom: -100px;
  width: 520px;
  height: 310px;
  background: url('../img/logo/zoorigen-logo-remaster-v1.png') center / contain no-repeat;
  opacity: .045;
  pointer-events: none;
}

.auth-back {
  position: absolute;
  top: 30px;
  left: clamp(28px, 4vw, 58px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(5, 25, 16, .22);
  color: rgba(255, 255, 255, .76);
  font-size: .8rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.auth-back:hover {
  transform: translateX(-3px);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.auth-story__content {
  width: min(100%, 690px);
  margin: auto;
  padding-top: 44px;
}

.auth-story__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(34px, 6vh, 66px);
}

.auth-story__brand img {
  width: clamp(148px, 18vw, 196px);
  height: auto;
}

.auth-story__brand span {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .75);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-story__eyebrow,
.auth-card__eyebrow {
  margin: 0 0 14px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.auth-story__eyebrow {
  color: #f3bd4b;
}

.auth-story h1 {
  max-width: 700px;
  margin: 0;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.65rem, 5.3vw, 4.9rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: .98;
}

.auth-story h1 span {
  color: var(--auth-gold-bright);
}

.auth-story__lead {
  max-width: 610px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, .73);
  font-size: clamp(.96rem, 1.4vw, 1.08rem);
  line-height: 1.75;
}

.auth-story__benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.auth-benefit {
  min-height: 116px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(12px);
}

.auth-benefit__icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 11px;
  background: rgba(232, 163, 23, .15);
  color: #f3bd4b;
}

.auth-benefit strong,
.auth-benefit small {
  display: block;
}

.auth-benefit strong {
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: .83rem;
  line-height: 1.3;
}

.auth-benefit small {
  margin-top: 4px;
  color: rgba(255, 255, 255, .5);
  font-size: .69rem;
  line-height: 1.45;
}

.auth-story__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.auth-proof {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-proof__faces {
  display: flex;
}

.auth-proof__faces img {
  width: 34px;
  height: 34px;
  margin-left: -9px;
  border: 2px solid #153d29;
  border-radius: 50%;
  object-fit: cover;
}

.auth-proof__faces img:first-child {
  margin-left: 0;
}

.auth-proof p {
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: .73rem;
  line-height: 1.4;
}

.auth-proof strong {
  display: block;
  color: #fff;
  font-size: .8rem;
}

.auth-story__course-stack {
  display: flex;
  align-items: center;
  padding-right: 16px;
}

.auth-story__course-stack img {
  width: 48px;
  height: 64px;
  margin-right: -15px;
  border: 2px solid rgba(255, 255, 255, .18);
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
  transform: rotate(-4deg);
}

.auth-story__course-stack img:nth-child(2) { transform: rotate(2deg) translateY(-3px); }
.auth-story__course-stack img:nth-child(3) { transform: rotate(6deg); }

.auth-access,
.auth-wrapper__form {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px);
  place-items: center;
  background:
    radial-gradient(circle at 90% 7%, rgba(42, 164, 213, .09), transparent 24%),
    radial-gradient(circle at 4% 92%, rgba(111, 191, 115, .12), transparent 26%),
    var(--auth-surface);
}

.auth-access::before {
  content: '';
  position: absolute;
  top: 30px;
  right: 34px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(31, 95, 58, .07);
  border-radius: 50%;
}

.auth-card {
  position: relative;
  width: min(100%, 560px);
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 32px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 34px 90px rgba(19, 60, 38, .14), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px);
}

.auth-page--register .auth-card {
  width: min(100%, 590px);
}

.auth-card__header {
  margin-bottom: 26px;
}

.auth-card__eyebrow {
  color: var(--auth-green);
}

.auth-card h2 {
  margin: 0;
  color: var(--auth-ink);
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.auth-card .lead {
  margin: 12px 0 0;
  color: var(--auth-muted);
  font-size: .94rem;
  line-height: 1.6;
}

.auth-form {
  max-width: none;
  margin: 0;
}

.auth-google,
.auth-submit,
.auth-secondary {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 15px;
  font-family: 'Poppins', sans-serif;
  font-size: .91rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.auth-google {
  border: 1px solid var(--auth-line);
  background: #fff;
  color: #26312b;
  box-shadow: 0 8px 22px rgba(15, 47, 29, .06);
}

.auth-google:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 95, 58, .22);
  box-shadow: 0 12px 30px rgba(15, 47, 29, .1);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: #89938d;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--auth-line);
}

.auth-fields {
  display: grid;
  gap: 17px;
}

.auth-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-page .field {
  margin: 0;
}

.auth-page .field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #32443a;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  display: grid;
  color: #819087;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-page .field input {
  width: 100%;
  height: 54px;
  padding: 0 46px 0 46px;
  border: 1px solid rgba(16, 37, 26, .12);
  border-radius: 14px;
  outline: none;
  background: #f8faf9;
  color: var(--auth-ink);
  font-family: 'Open Sans', sans-serif;
  font-size: .91rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-page .field input::placeholder {
  color: #9aa49e;
}

.auth-page .field input:focus {
  border-color: rgba(31, 95, 58, .5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 95, 58, .09);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #7c8a82;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--auth-green-soft);
  color: var(--auth-green);
}

.auth-form__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 9px;
}

.auth-form__meta a {
  color: var(--auth-green);
  font-size: .77rem;
  font-weight: 700;
}

.auth-form__meta a:hover {
  text-decoration: underline;
}

.auth-submit {
  margin-top: 22px;
  border: 0;
  background: linear-gradient(135deg, #1f5f3a, #2f7a4f);
  color: #fff;
  box-shadow: 0 16px 32px rgba(31, 95, 58, .23);
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(31, 95, 58, .3);
}

.auth-submit:disabled,
.auth-google:disabled {
  cursor: wait;
  opacity: .62;
  transform: none;
}

.auth-secondary {
  margin-top: 11px;
  border: 1px solid var(--auth-line);
  background: transparent;
  color: var(--auth-ink);
}

.auth-secondary:hover {
  border-color: rgba(31, 95, 58, .3);
  background: var(--auth-green-soft);
}

.auth-switch {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: .82rem;
  text-align: center;
}

.auth-switch a {
  color: var(--auth-green);
  font-weight: 800;
}

.auth-trust {
  display: flex;
  justify-content: center;
  gap: 12px 20px;
  margin-top: 20px;
  flex-wrap: wrap;
  color: #748077;
  font-size: .69rem;
  font-weight: 700;
}

.auth-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-trust svg {
  color: var(--auth-green);
}

.auth-legal {
  margin: 18px 0 0;
  color: #8b958f;
  font-size: .67rem;
  line-height: 1.55;
  text-align: center;
}

.auth-legal a {
  color: #56655c;
  text-decoration: underline;
}

.auth-page .error-msg,
.auth-page .success-msg {
  display: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.5;
}

.auth-page .error-msg.show {
  display: block;
  border: 1px solid rgba(201, 69, 53, .2);
  background: #fff1ef;
  color: #a63b2d;
}

.auth-page .success-msg.show {
  display: block;
  border: 1px solid rgba(31, 95, 58, .18);
  background: #eaf6ee;
  color: #23643e;
}

.referral-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -6px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 163, 23, .28);
  border-radius: 13px;
  background: rgba(232, 163, 23, .09);
  color: #79550d;
  font-size: .78rem;
}

.referral-banner strong {
  display: block;
  margin-bottom: 2px;
  color: #5f4309;
  font-size: .83rem;
}

.password-modal {
  position: fixed;
  z-index: 99998;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(5, 20, 13, .74);
  backdrop-filter: blur(8px);
}

.password-modal__card {
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .3);
}

.password-modal__icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 16px;
  background: var(--auth-green-soft);
  color: var(--auth-green);
}

.password-modal h2 {
  margin: 0;
  color: var(--auth-ink);
  font-family: 'Poppins', sans-serif;
  font-size: 1.55rem;
  text-align: center;
}

.password-modal p {
  margin: 10px 0 20px;
  color: var(--auth-muted);
  font-size: .86rem;
  line-height: 1.6;
  text-align: center;
}

.password-modal label {
  display: block;
  margin-bottom: 7px;
  color: #394b40;
  font-size: .75rem;
  font-weight: 800;
}

.password-modal input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--auth-line);
  border-radius: 13px;
  outline: none;
  background: #f8faf9;
  color: var(--auth-ink);
  font: inherit;
}

.password-modal input:focus {
  border-color: rgba(31, 95, 58, .5);
  box-shadow: 0 0 0 4px rgba(31, 95, 58, .09);
}

.password-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.password-modal__actions button {
  min-height: 48px;
  border-radius: 13px;
  font: 700 .82rem 'Poppins', sans-serif;
  cursor: pointer;
}

.password-modal__cancel {
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-muted);
}

.password-modal__send {
  border: 0;
  background: var(--auth-green);
  color: #fff;
}

.password-modal__message {
  margin-top: 12px;
  font-size: .77rem;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .auth-shell {
    grid-template-columns: minmax(390px, .92fr) minmax(470px, 1.08fr);
  }

  .auth-story {
    padding-inline: 38px;
  }

  .auth-story__benefits {
    grid-template-columns: 1fr;
  }

  .auth-benefit {
    display: grid;
    min-height: 0;
    grid-template-columns: 34px 1fr;
    gap: 0 12px;
  }

  .auth-benefit__icon {
    grid-row: span 2;
    margin: 0;
  }

  .auth-story__course-stack {
    display: none;
  }
}

@media (max-width: 860px) {
  .auth-shell {
    display: block;
  }

  .auth-story {
    min-height: auto;
    padding: 82px 28px 42px;
  }

  .auth-story__content {
    width: min(100%, 700px);
    padding: 0;
  }

  .auth-story__brand {
    margin-bottom: 28px;
  }

  .auth-story h1 {
    max-width: 620px;
    font-size: clamp(2.35rem, 9vw, 3.8rem);
  }

  .auth-story__benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-story__footer {
    margin-top: 28px;
  }

  .auth-access,
  .auth-wrapper__form {
    min-height: auto;
    padding: 42px 22px 58px;
  }

  .auth-card {
    width: min(100%, 620px);
  }
}

@media (max-width: 620px) {
  .auth-back {
    top: 18px;
    left: 18px;
  }

  .auth-story {
    padding: 68px 18px 24px;
  }

  .auth-story__brand {
    margin-bottom: 17px;
  }

  .auth-story__brand img {
    width: 118px;
  }

  .auth-story__brand span {
    font-size: .6rem;
  }

  .auth-story h1 {
    max-width: 340px;
    font-size: clamp(2rem, 10.5vw, 2.75rem);
  }

  .auth-story__lead {
    max-width: 350px;
    margin-top: 13px;
    font-size: .9rem;
    line-height: 1.55;
  }

  .auth-story__benefits,
  .auth-story__footer {
    display: none;
  }

  .auth-access,
  .auth-wrapper__form {
    padding: 28px 12px 42px;
  }

  .auth-card {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .auth-card__header {
    margin-bottom: 22px;
  }

  .auth-card h2 {
    font-size: 2rem;
  }

  .auth-field-row {
    grid-template-columns: 1fr;
  }

  .auth-trust {
    gap: 9px 13px;
  }
}

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