.login-reference-page {
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(var(--brand-rgb), .075), transparent 28rem),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 52%, #f1f4f9 100%);
}

.login-reference-page .site-header {
  position: relative;
  top: auto;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.login-reference-page .site-nav {
  width: min(1180px, calc(100% - 64px));
  min-height: 66px;
}

.login-reference-page .nav-links a {
  padding: 8px 12px;
}

.login-reference-page .nav-login,
.login-reference-page .nav-cta,
.login-reference-page .theme-switcher {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 13px;
}

.login-ref-main {
  width: min(1180px, calc(100% - 64px));
  height: calc(100vh - 67px);
  min-height: 0;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(460px, 540px);
  justify-content: space-between;
  gap: 64px;
  align-items: center;
  padding: 16px 0 18px;
}

.login-ref-left {
  position: relative;
  min-height: 540px;
  padding: 34px 0;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-ref-left::before {
  content: "";
  position: absolute;
  left: -40px;
  right: -22px;
  bottom: -18px;
  height: 285px;
  z-index: -2;
  background: url("../img/loginScreen.png") left bottom / contain no-repeat;
  opacity: .18;
  filter: saturate(.9);
}

.login-ref-left::after {
  content: "";
  position: absolute;
  inset: auto -20px -20px -20px;
  height: 330px;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, .88) 78%),
    radial-gradient(circle at 72% 52%, rgba(var(--brand-rgb), .11), transparent 15rem);
  pointer-events: none;
}

.welcome-note {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--brand-700);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
}

.login-ref-left h1 {
  max-width: 490px;
  margin: 0 0 18px;
  color: var(--text);
  font-size: clamp(34px, 3vw, 42px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.035em;
}

.login-ref-left > p {
  max-width: 500px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.login-feature-list {
  display: grid;
  max-width: 500px;
  gap: 18px;
}

.login-feature-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.login-feature-list i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-700);
  background: rgba(var(--brand-rgb), .14);
  font-size: 16px;
}

.login-feature-list article:nth-child(2) i {
  color: var(--success);
  background: rgba(19, 184, 106, .13);
}

.login-feature-list article:nth-child(3) i {
  color: var(--warning);
  background: rgba(255, 159, 28, .13);
}

.login-feature-list article:nth-child(4) i {
  color: #4b67e8;
  background: rgba(75, 103, 232, .11);
}

.login-feature-list h3 {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 760;
}

.login-feature-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.login-ref-right {
  display: grid;
  align-self: center;
  gap: 12px;
  justify-items: center;
}

.login-ref-card {
  width: 100%;
  max-width: 540px;
  min-height: 540px;
  padding: 34px 38px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 22px 70px rgba(15, 23, 42, .085);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-ref-card h2 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.02em;
}

.login-ref-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.ref-field {
  margin-top: 15px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.field-row a,
.ref-field label {
  font-size: 12px;
  font-weight: 700;
}

.field-row a {
  color: var(--brand-700);
}

.ref-input {
  min-height: 46px;
  margin-top: 7px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ref-input i {
  color: var(--muted);
  font-size: 14px;
}

.ref-input input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.password-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 13px 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.remember-row input {
  width: 15px;
  height: 15px;
}

.login-ref-submit {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  font-size: 14px;
}

.login-ref-card .login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.login-ref-card .login-divider::before,
.login-ref-card .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-ref-card .social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.login-ref-card .social-grid button {
  min-height: 43px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.login-switch {
  margin: 14px 0 0 !important;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.login-switch a {
  color: var(--brand-700);
  font-weight: 600;
}

.secure-note {
  color: var(--muted);
  font-size: 12px;
}

.secure-note i {
  color: var(--brand-700);
}

.auth-token-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

[data-theme="dark"] .login-reference-page {
  background:
    radial-gradient(circle at 72% 18%, rgba(var(--brand-rgb), .12), transparent 28rem),
    linear-gradient(135deg, var(--bg) 0%, var(--surface-2) 100%);
}

[data-theme="dark"] .login-ref-card {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

[data-theme="dark"] .login-ref-left::after {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .9) 78%),
    radial-gradient(circle at 72% 52%, rgba(var(--brand-rgb), .15), transparent 15rem);
}

@media (min-width: 992px) and (max-height: 700px) {
  .login-reference-page .site-nav {
    min-height: 60px;
  }

  .login-ref-main {
    height: calc(100vh - 61px);
    padding: 10px 0 12px;
  }

  .login-ref-left {
    min-height: 470px;
    padding: 24px 0;
  }

  .login-ref-left h1 {
    margin-bottom: 10px;
    font-size: clamp(30px, 2.8vw, 38px);
  }

  .login-ref-left > p {
    margin-bottom: 12px;
    line-height: 1.5;
  }

  .login-feature-list {
    gap: 9px;
  }

  .login-feature-list article {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .login-feature-list i {
    width: 33px;
    height: 33px;
    font-size: 14px;
  }

  .login-ref-left::before {
    height: 220px;
    opacity: .14;
  }

  .login-ref-card {
    min-height: 470px;
    padding: 28px 36px;
  }

  .login-ref-card h2 {
    font-size: 26px;
  }

  .login-ref-card > p {
    margin-bottom: 18px;
  }
}

@media (max-width: 991.98px) {
  .login-reference-page {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .login-reference-page .site-nav,
  .login-ref-main {
    width: min(100% - 28px, 760px);
  }

  .login-ref-main {
    height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0;
  }

  .login-ref-left {
    min-height: auto;
    padding-bottom: 20px;
    display: block;
  }

  .login-ref-left::before,
  .login-ref-left::after {
    display: none;
  }

  .login-ref-left h1 {
    font-size: clamp(30px, 8vw, 40px);
  }

  .login-ref-card {
    min-height: auto;
    padding: 24px;
  }

  .login-ref-card .social-grid {
    grid-template-columns: 1fr;
  }
}
