:root {
  --ink: #102033;
  --muted: #52657b;
  --blue: #1d4ed8;
  --blue-deep: #123a8f;
  --green: #13b981;
  --green-deep: #08785d;
  --yellow: #f7c948;
  --line: rgba(16, 32, 51, 0.14);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(18, 58, 143, 0.96), rgba(29, 78, 216, 0.9) 45%, rgba(19, 185, 129, 0.84)),
    #123a8f;
}

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

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(22px, 5vw, 72px);
}

.login-hero {
  color: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(42px, 8vw, 92px);
}

.brand img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.brand img:nth-child(2) {
  width: 74px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 24px;
}

.brand small {
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-copy {
  max-width: 820px;
}

.login-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
}

.login-copy p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
  line-height: 1.55;
}

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

.login-stats article {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.login-stats span {
  color: var(--yellow);
  font-weight: 900;
}

.login-stats strong {
  font-size: 20px;
}

.login-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  padding: clamp(20px, 4vw, 32px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 28px 74px rgba(8, 30, 66, 0.28);
}

.panel-head h2 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.1;
}

.panel-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.role-options {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

.role-options legend {
  margin-bottom: 8px;
  color: #344966;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.role-options label {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  background: #ffffff;
}

.role-options label:has(input:checked) {
  border-color: rgba(29, 78, 216, 0.42);
  background: #eef6ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.role-options input {
  margin-top: 3px;
}

.role-options strong,
.role-options small {
  display: block;
}

.role-options small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form label > span {
  color: #344966;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  color: var(--ink);
  background: #f8fbff;
  font: inherit;
}

.school-only {
  display: none;
}

body.is-school-login .school-only {
  display: grid;
}

.login-note {
  margin: 0;
  border-left: 4px solid var(--green);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--green-deep);
  background: #ecfdf7;
  font-size: 13px;
  font-weight: 800;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.form-actions a {
  color: var(--blue);
  font-weight: 900;
}

.form-actions button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue));
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(29, 78, 216, 0.24);
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand {
    margin-bottom: 38px;
  }
}

@media (max-width: 620px) {
  .login-shell {
    padding: 16px;
  }

  .login-stats,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions button {
    width: 100%;
  }
}
