/* AUTH */
.auth-page {
  min-height: 100vh;
  padding: 140px 24px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-page__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.auth-page__orb {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 40px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  animation: authCardIn 0.6s var(--ease);
}

.auth-card--wide { max-width: 560px; }

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.auth-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
  text-align: center;
}

.auth-card__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-align: center;
}

.auth-card__lead {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 32px;
  text-align: center;
}

.role-screen,
.form-screen {
  animation: screenIn 0.5s var(--ease);
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.form-screen__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
  transition: color 0.25s var(--ease);
  font-family: var(--font-mono);
}

.form-screen__back:hover { color: var(--accent); }

.form-screen__back span { transition: transform 0.25s var(--ease); }
.form-screen__back:hover span { transform: translateX(-3px); }

.form-screen__role {
  color: var(--accent);
  font-weight: 600;
}

.role-picker--big {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-card-big {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  overflow: hidden;
}

.role-card-big::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at 0% 50%, var(--accent-dim), transparent 50%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.role-card-big--teacher::before {
  background: radial-gradient(400px circle at 0% 50%, var(--magenta-dim), transparent 50%);
}

.role-card-big:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.role-card-big--teacher:hover {
  border-color: var(--magenta);
}

.role-card-big:hover::before { opacity: 1; }

.role-card-big__icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.35s var(--ease);
}

.role-card-big--teacher .role-card-big__icon { color: var(--magenta); }

.role-card-big:hover .role-card-big__icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #08080A;
}

.role-card-big--teacher:hover .role-card-big__icon {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #08080A;
}

.role-card-big__body {
  flex: 1;
  position: relative;
  z-index: 1;
}

.role-card-big__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.role-card-big__desc {
  font-size: 13px;
  color: var(--text-dim);
}

.role-card-big__arrow {
  font-size: 20px;
  color: var(--text-dim);
  transition: all 0.35s var(--ease);
  position: relative;
  z-index: 1;
}

.role-card-big:hover .role-card-big__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.role-card-big--teacher:hover .role-card-big__arrow { color: var(--magenta); }

.auth-form .field { margin-bottom: 16px; }

.auth-form__error {
  min-height: 20px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 8px;
  font-weight: 500;
}

.auth-form__submit {
  width: 100%;
  margin-top: 8px;
}

.auth-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.auth-card__footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

.auth-card__footer a {
  color: var(--accent);
  font-weight: 500;
  transition: opacity 0.25s var(--ease);
}

.auth-card__footer a:hover { opacity: 0.8; }

.auth-form__agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.auth-form__agree input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  transition: all 0.2s var(--ease);
}

.auth-form__agree input[type="checkbox"]:hover {
  border-color: var(--text-dim);
}

.auth-form__agree input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.auth-form__agree input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 5px;
  height: 10px;
  border: solid #08080A;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-form__agree input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.auth-form__agree span {
  display: block;
  padding-top: 1px;
}

.auth-form__agree a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(78, 232, 232, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s var(--ease), opacity 0.25s var(--ease);
}

.auth-form__agree a:hover {
  text-decoration-color: var(--accent);
  opacity: 0.9;
}

@media (max-width: 480px) {
  .auth-card { padding: 28px 22px; }
  .auth-card__title { font-size: 24px; }
  .role-card-big { padding: 18px 20px; gap: 14px; }
  .role-card-big__icon { width: 44px; height: 44px; }
  .role-card-big__title { font-size: 16px; }
}