body.student-auth-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, rgba(214, 156, 70, 0.17), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(75, 108, 156, 0.12), transparent 34rem),
    linear-gradient(180deg, #f4eee3 0%, #ece4d7 100%);
  overflow: hidden;
}

body.student-auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.14), transparent 28%);
}

body.student-auth-page::after {
  content: "";
  position: fixed;
  right: -110px;
  bottom: -120px;
  width: 420px;
  height: 420px;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 59%, rgba(196, 122, 26, 0.08) 59.3% 59.9%, transparent 60.2%),
    radial-gradient(circle at center, transparent 0 73%, rgba(110, 155, 214, 0.08) 73.3% 73.9%, transparent 74.2%);
  transform: rotate(18deg);
  opacity: 0.85;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 30px;
}

.auth-stage {
  width: min(1280px, calc(100vw - 60px));
  height: min(820px, calc(100dvh - 60px));
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(400px, 0.82fr);
  border: 1px solid rgba(47, 35, 22, 0.08);
  border-radius: 36px;
  overflow: hidden;
  background: #f7f1e8;
  box-shadow:
    0 28px 80px rgba(52, 36, 17, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.auth-hero,
.auth-panel {
  min-width: 0;
  min-height: 0;
}

.auth-hero {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
  padding: 38px 42px 40px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.13), transparent 24rem),
    linear-gradient(145deg, #15110e 0%, #1c1713 50%, #241d18 100%);
  color: #f8f2ea;
}

.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-hero::before {
  right: -72px;
  bottom: -84px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 57%, rgba(244, 191, 79, 0.08) 57.3% 57.9%, transparent 58.2%),
    radial-gradient(circle at center, transparent 0 73%, rgba(155, 199, 255, 0.07) 73.3% 73.9%, transparent 74.2%);
  transform: rotate(26deg);
  opacity: 0.9;
}

.auth-hero::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01), transparent 34%);
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-hero-top {
  display: flex;
  align-items: center;
}

.auth-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.auth-brand-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #f8f2ea;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand-name {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.auth-hero-body {
  display: grid;
  align-content: space-between;
  gap: 42px;
  min-height: 0;
}

.auth-hero-copyblock {
  display: grid;
  gap: 16px;
  max-width: 31rem;
}

.auth-hero-kicker,
.auth-panel-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-hero-kicker {
  color: rgba(245, 219, 174, 0.9);
}

.auth-hero-title {
  margin: 0;
  max-width: 9.5ch;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.9rem, 4vw, 4.4rem);
  font-weight: 400;
  line-height: 0.91;
  letter-spacing: -0.05em;
}

.auth-hero-copy {
  margin: 0;
  max-width: 32ch;
  color: #c6baac;
  font-size: 0.98rem;
  line-height: 1.7;
}

.auth-hero-meta {
  margin: 0;
  color: rgba(247, 228, 190, 0.68);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-hero-visual {
  align-self: end;
  justify-self: end;
  width: min(100%, 560px);
  padding-left: 32px;
}

.auth-physics-graphic {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.18));
}

.auth-panel {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(253, 250, 244, 0.98) 0%, rgba(246, 239, 229, 0.98) 100%);
}

.auth-panel-inner {
  width: min(410px, 100%);
  display: grid;
  gap: 24px;
  padding: clamp(36px, 5vw, 72px) clamp(28px, 4vw, 48px);
}

.auth-panel-head {
  display: grid;
  gap: 10px;
}

.auth-panel-kicker {
  color: #8a765e;
}

.auth-panel-head h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.45rem, 3vw, 3.25rem);
  font-weight: 400;
  line-height: 0.97;
  letter-spacing: -0.04em;
  color: #181411;
}

.auth-panel-head p {
  margin: 0;
  color: #6c645a;
  font-size: 0.98rem;
  line-height: 1.68;
}

.auth-config-banner,
.auth-status {
  padding: 12px 15px;
  border-radius: 18px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.auth-config-banner {
  border: 1px solid rgba(192, 57, 43, 0.18);
  background: rgba(252, 232, 230, 0.86);
  color: var(--color-error, #c0392b);
}

.auth-status {
  border: 1px solid rgba(28, 25, 23, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: #665f57;
}

.auth-status.is-error {
  border-color: rgba(192, 57, 43, 0.16);
  background: rgba(252, 232, 230, 0.92);
  color: var(--color-error, #c0392b);
}

.auth-status.is-success {
  border-color: rgba(61, 122, 61, 0.16);
  background: rgba(230, 242, 230, 0.92);
  color: var(--color-success, #3d7a3d);
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: #e9dfd1;
}

.auth-mode-btn {
  min-height: 48px;
  border-radius: 14px;
  color: #6d6358;
  font-size: 0.96rem;
  font-weight: 700;
}

.auth-mode-btn:hover {
  color: #211b16;
}

.auth-mode-btn.is-active {
  background: #ffffff;
  color: #181411;
  box-shadow: 0 10px 22px rgba(47, 35, 22, 0.08);
}

.auth-form {
  display: none;
  gap: 18px;
}

.auth-form.is-active {
  display: grid;
  animation: auth-fade 180ms ease;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1d1a17;
}

.auth-field input {
  width: 100%;
  min-height: 58px;
  padding: 16px 17px;
  border: 1px solid rgba(47, 35, 22, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #181411;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.auth-field input:hover {
  border-color: rgba(47, 35, 22, 0.18);
}

.auth-field input:focus-visible {
  outline: none;
  border-color: #c47a1a;
  box-shadow:
    0 0 0 4px rgba(196, 122, 26, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  background: #ffffff;
}

.auth-submit,
.auth-ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.auth-submit {
  min-height: 56px;
  margin-top: 4px;
  padding: 14px 18px;
  border-radius: 18px;
  background: #191511;
  color: #fffaf3;
  box-shadow: 0 14px 28px rgba(25, 21, 17, 0.12);
}

.auth-submit:hover {
  background: #110e0b;
  box-shadow: 0 18px 34px rgba(25, 21, 17, 0.16);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-inline-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #8d7f6f;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-inline-divider::before,
.auth-inline-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(47, 35, 22, 0.12);
}

.auth-ghost-action {
  width: fit-content;
  padding: 0;
  justify-content: flex-start;
  color: #8b5817;
  font-size: 0.92rem;
  background: none;
}

.auth-ghost-action:hover {
  color: #6d430f;
}

.auth-submit:disabled,
.auth-ghost-action:disabled {
  opacity: 0.55;
  cursor: wait;
}

.hidden {
  display: none !important;
}

@keyframes auth-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 1060px) {
  body.student-auth-page {
    overflow: auto;
  }

  body.student-auth-page::after {
    display: none;
  }

  .auth-shell {
    display: block;
    padding: 20px 14px;
  }

  .auth-stage {
    width: min(760px, 100%);
    height: auto;
    grid-template-columns: 1fr;
  }

  .auth-hero {
    padding: 30px 24px;
  }

  .auth-panel-inner {
    width: min(460px, 100%);
    padding: 30px 24px 34px;
  }

  .auth-hero-title {
    max-width: 10ch;
  }

  .auth-hero-body {
    gap: 28px;
  }

  .auth-hero-visual {
    justify-self: stretch;
    width: min(100%, 620px);
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 0;
  }

  .auth-stage {
    border-radius: 0;
    min-height: 100dvh;
    width: 100%;
  }

  .auth-hero {
    padding: 24px 18px;
  }

  .auth-panel-inner {
    padding: 28px 18px 30px;
  }

  .auth-hero {
    gap: 24px;
  }

  .auth-hero-body {
    gap: 22px;
  }

  .auth-hero-title {
    max-width: none;
    font-size: clamp(2.6rem, 12vw, 4rem);
  }

  .auth-hero-visual {
    width: calc(100% + 6px);
    margin-left: -3px;
  }

  .auth-hero-meta {
    font-size: 0.7rem;
    letter-spacing: 0.13em;
  }

  .auth-panel-head h2 {
    font-size: clamp(2.1rem, 11vw, 2.8rem);
  }
}
