:root {
  --ink: #17212b;
  --muted: #667486;
  --line: rgba(23, 33, 43, 0.12);
  --blue: #159eef;
  --green: #48cbb9;
  --orange: #ff8a3d;
  --paper: rgba(255, 255, 255, 0.86);
  --shadow: 0 24px 70px rgba(22, 42, 70, 0.12);
}

* {
  box-sizing: border-box;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(72, 203, 185, 0.2), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(255, 138, 61, 0.15), transparent 24%),
    linear-gradient(135deg, #f9fff8 0%, #eef8ff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 32px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0;
}

.auth-shell--single {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
  font-weight: 900;
}

.auth-brand img {
  width: 54px;
  height: 42px;
  object-fit: contain;
}

.auth-copy h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

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

.auth-points span {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 38px rgba(22, 42, 70, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-points strong {
  color: var(--ink);
  font-size: 20px;
}

.auth-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-result-card {
  text-align: center;
}

.auth-result-card .auth-brand {
  margin-bottom: 26px;
  justify-content: center;
}

.auth-result-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.auth-result-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  padding: 0 20px;
}

.auth-success-popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 33, 43, 0.32);
  backdrop-filter: blur(8px);
}

.auth-success-popup__card {
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.auth-success-popup__card strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.auth-success-popup__card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

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

.auth-card__head span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 8px 0 0;
  font-size: 34px;
  line-height: 1.05;
}

.auth-google,
.auth-submit {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}

.auth-google {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.auth-google b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  color: #fff;
  font-size: 13px;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 22px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-form .auth-segment label {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

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

.auth-teacher-fields[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.auth-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.auth-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(21, 158, 239, 0.12);
}

.auth-form .auth-segment input[type="radio"] {
  width: 10px;
  height: 10px;
  min-width: 10px;
  max-width: 10px;
  min-height: 0;
  max-height: 10px;
  margin: 0;
  padding: 0;
  flex: 0 0 10px;
  accent-color: var(--blue);
}

.auth-form .auth-segment input[type="radio"]:focus {
  box-shadow: none;
}

.auth-message {
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.auth-message[data-state="error"],
.auth-message[data-state="success"],
.auth-message[data-state="info"] {
  display: block;
}

.auth-message[data-state="error"] {
  border: 1px solid rgba(207, 52, 52, 0.2);
  background: rgba(207, 52, 52, 0.08);
  color: #9d2525;
}

.auth-message[data-state="success"] {
  border: 1px solid rgba(72, 203, 185, 0.25);
  background: rgba(72, 203, 185, 0.12);
  color: #16766b;
}

.auth-message[data-state="info"] {
  border: 1px solid rgba(21, 158, 239, 0.22);
  background: rgba(21, 158, 239, 0.1);
  color: #126d9f;
}

.auth-error {
  min-height: 16px;
  color: #9d2525;
  font-size: 12px;
  line-height: 1.3;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.auth-form .auth-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 0;
  padding: 0;
  flex: 0 0 14px;
  border-radius: 4px;
  accent-color: var(--blue);
}

.auth-form .auth-row input[type="checkbox"]:focus {
  box-shadow: none;
}

.auth-row a,
.auth-switch a {
  color: var(--blue);
  font-weight: 900;
}

.auth-submit {
  margin-top: 6px;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 14px 30px rgba(255, 138, 61, 0.25);
}

.auth-terms,
.auth-switch {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-switch {
  text-align: center;
  font-weight: 800;
}

@media (max-width: 920px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(640px, calc(100% - 28px));
  }

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

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

@media (max-width: 560px) {
  .auth-copy h1 {
    font-size: 40px;
  }

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

  .auth-row {
    display: grid;
  }
}
