/**
 * Minimal auth surfaces (login, password recovery) — flat tones, no gradients.
 */
.auth-body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1a1d21;
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: #e8eaed;
}

.auth-page__bg {
  position: absolute;
  inset: 0;
  background-color: #d8dce2;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  pointer-events: none;
}

.auth-page__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
}

.auth-card {
  background: #fff;
  border: 1px solid #d5d9df;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.auth-card__brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-card__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.75rem;
}

.auth-card__name {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
  color: #111418;
}

.auth-card__subtitle {
  font-size: 0.8125rem;
  margin: 0;
  color: #5c6470;
  line-height: 1.45;
}

.auth-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 1.125rem;
  padding-top: 1.125rem;
  border-top: 1px solid #eceef1;
  color: #252a31;
}

.auth-login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  margin: 0 0 0.9rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid #e3e8ef;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.auth-login-tab {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #475467;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  min-height: 2.35rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-login-tab:hover {
  background: #eef3f8;
  color: #344054;
}

.auth-login-tab:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #5a6472;
}

.auth-login-tab.is-active {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.24);
  transform: translateY(-1px);
}

.auth-login-help {
  margin: 0 0 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.auth-login-help__title {
  margin: 0 0 0.28rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #344054;
}

.auth-login-help__text {
  margin: 0;
  font-size: 0.8rem;
  color: #475467;
  line-height: 1.5;
}

.auth-login-help--hidden,
.auth-form--pane-hidden {
  display: none !important;
}

.auth-students-primary {
  flex-direction: column;
  gap: 0.75rem;
}

.auth-students-primary:not(.auth-form--pane-hidden) {
  display: flex;
}

.auth-student-direct {
  margin: 0;
  text-align: center;
}

.auth-student-direct__toggle {
  background: none;
  border: none;
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-student-direct__toggle:hover,
.auth-student-direct__toggle:focus {
  color: #1f2937;
  outline: none;
}

.auth-student-direct-form {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eceef1;
}

.auth-student-direct-form--hidden {
  display: none;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #3d444c;
  margin-bottom: 0.375rem;
}

.auth-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  border: 1px solid #c2c8cf;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  color: #1a1d21;
}

.auth-field input:focus {
  outline: none;
  border-color: #6b7280;
  box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

.auth-support {
  margin: 0.35rem 0 0.9rem;
  padding: 0.6rem 0.7rem 0.5rem;
  border: 1px solid #e6eaf0;
  border-radius: 10px;
  background: #fafbfd;
}

.auth-password-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e7ebf2;
}

.auth-password-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3d444c;
  cursor: pointer;
}

.auth-password-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 0.25rem;
}

.auth-actions--split {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.auth-btn--inline {
  width: auto;
  min-width: 7.5rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

a.auth-btn {
  text-decoration: none;
}

.auth-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6875rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  color: #fff;
  background: var(--sc-brand-primary, #2a3038);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.25;
}

.auth-btn:hover {
  background: var(--sc-brand-accent, #1f2329);
  color: #fff;
}

.auth-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sc-brand-primary, #2a3038);
}

.auth-btn--ghost {
  background: #fff;
  color: #2a3038;
  border: 1px solid #c2c8cf;
}

.auth-btn--ghost:hover {
  background: #f8f9fa;
  color: #111418;
}

.auth-btn--ghost:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6b7280;
}

.auth-link {
  font-size: 0.8125rem;
  color: #2c5282;
  text-decoration: none;
}

.auth-link--muted {
  color: #475467;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-alert {
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.auth-alert--error {
  background: #fef2f2;
  border: 1px solid #f5c2c7;
  color: #842029;
}

.auth-alert--success {
  background: #f0fdf4;
  border: 1px solid #b6e8c7;
  color: #0f5132;
}

.auth-muted-link {
  text-align: center;
  margin-top: 0.75rem;
}

.auth-muted-link .auth-link {
  font-size: 0.8125rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  color: #868e96;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dee2e6;
}

.auth-social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.auth-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #d5d9df;
  border-radius: 8px;
  background: #fff;
  color: #3d444c;
}

.auth-social a:hover {
  background: #f8f9fa;
}

.auth-social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.auth-credit {
  font-size: 0.6875rem;
  color: #868e96;
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.4;
}

.auth-credit a {
  color: #6c757d;
  text-decoration: none;
}

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

.auth-terms {
  text-align: center;
  margin: 0.5rem 0 0.1rem;
}

@media (max-width: 768px) {
  .auth-page {
    padding: 1rem 0.75rem;
  }

  .auth-page__inner {
    max-width: 100%;
  }

  .auth-card {
    padding: 1.35rem 1.15rem;
  }
}

@media (max-width: 480px) {
  .auth-login-tabs {
    grid-template-columns: 1fr;
  }

  .auth-support {
    padding: 0.55rem 0.6rem 0.45rem;
  }
  .auth-password-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
  }
}

/* Registration */
.auth-page--register {
  align-items: flex-start;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.auth-page__inner--register {
  max-width: 42rem;
}

.auth-card--register {
  padding: 1.5rem 1.35rem 1.75rem;
}

.auth-register-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin: 0 0 1.125rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid #e3e8ef;
  background: #f8fafc;
}

.auth-register-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.25rem;
  padding: 0.5rem 0.45rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #475467;
  text-decoration: none;
  text-align: center;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-register-tab__title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}

.auth-register-tab__hint {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.2;
}

.auth-register-tab:hover {
  background: #eef3f8;
  color: #344054;
}

.auth-register-tab.is-active {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.24);
  transform: translateY(-1px);
}

.auth-register-tab.is-active .auth-register-tab__hint {
  color: rgba(255, 255, 255, 0.72);
}

.auth-register-form {
  margin: 0;
}

.auth-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.auth-register-grid .auth-field--full {
  grid-column: 1 / -1;
}

.auth-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 2rem 0.625rem 0.75rem;
  border: 1px solid #c2c8cf;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  color: #1a1d21;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.auth-field select:focus {
  outline: none;
  border-color: #6b7280;
  box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.2);
}

.auth-field__hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
}

.auth-register-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1.125rem;
  border-top: 1px solid #eceef1;
}

.auth-register-actions .auth-btn {
  width: auto;
  min-width: 11rem;
}

@media (max-width: 640px) {
  .auth-register-grid {
    grid-template-columns: 1fr;
  }

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

  .auth-register-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-register-actions .auth-btn {
    width: 100%;
  }
}
