:root {
  --teacher-bg: #0e2749;
  --teacher-panel: rgba(20, 44, 78, 0.82);
  --teacher-border: rgba(168, 207, 241, 0.28);
  --teacher-text: #e6f2ff;
  --teacher-muted: #c0d9f3;
}

html,
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior-y: contain;
}

a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}

body.teacher-sovereign {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #102a4e 0%, #153a69 60%, #1d4e87 100%);
  color: var(--teacher-text);
  font-family: "Sora", sans-serif;
}

body.teacher-sovereign.is-standalone {
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.login-shell {
  width: min(460px, calc(100% - 24px));
}

.login-stage {
  border: 1px solid var(--teacher-border);
  border-radius: 18px;
  background: var(--teacher-panel);
  backdrop-filter: blur(12px);
  padding: 24px;
}

.identity-block {
  text-align: center;
}

.identity-block .school-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.identity-block .kicker {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teacher-muted);
}

.identity-block h1 {
  margin: 8px 0 0;
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.auth-form label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teacher-muted);
}

.auth-form input {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--teacher-border);
  background: rgba(10, 27, 51, 0.56);
  color: var(--teacher-text);
  padding: 0 12px;
}

.status {
  min-height: 16px;
  margin: 2px 0;
  font-size: 12px;
}

.status.error {
  color: #ffd0d0;
}

.status.success {
  color: #cdeed9;
}

.sovereign-button {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid var(--teacher-border);
  background: linear-gradient(145deg, #2a6baa, #245b92);
  color: var(--teacher-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
}

.sovereign-button[disabled] {
  opacity: 0.66;
  cursor: wait;
}

.auth-form input {
  font-size: 16px;
}

@media (max-width: 680px) {
  body.teacher-sovereign {
    padding: 12px;
    min-height: 100dvh;
    place-items: stretch;
  }

  .login-shell {
    width: 100%;
  }

  .login-stage {
    border-radius: 16px;
    padding: 18px 14px;
  }

  .auth-form input,
  .sovereign-button {
    min-height: 46px;
    font-size: 16px;
  }
}

/* 2026-02 app accessibility layer (teacher login) */
.teacher-login-skip-link {
  position: fixed;
  left: 12px;
  top: -120px;
  z-index: 1400;
  border-radius: 10px;
  border: 1px solid rgba(170, 207, 239, 0.72);
  background: #ffffff;
  color: #1e3e61;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: top 180ms ease;
}

.teacher-login-skip-link:focus-visible {
  top: 12px;
  outline: 2px solid #90b8df;
  outline-offset: 2px;
}

.login-install-cta {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.login-install-btn {
  min-height: 44px;
}

.login-install-status {
  margin: 0;
  min-height: 16px;
  font-size: 0.78rem;
  color: #d2e6fb;
}

.login-install-status:empty {
  display: none;
}

/* 2026-02 cinematic parity override (super/viewer aligned) */
body.teacher-sovereign {
  background:
    radial-gradient(1180px 680px at 50% -18%, rgba(117, 175, 205, 0.14), transparent 64%),
    radial-gradient(920px 500px at 86% 8%, rgba(215, 180, 112, 0.12), transparent 66%),
    linear-gradient(152deg, var(--canvas-base, #070f1e) 0%, var(--surface-primary, #0d1729) 52%, var(--surface-elevated, #101d32) 100%);
  color: var(--text-primary, #e8effc);
}

body.teacher-sovereign .login-stage {
  border-color: rgba(200, 219, 255, 0.2);
  background: linear-gradient(152deg, rgba(18, 31, 52, 0.86), rgba(14, 25, 43, 0.7));
  box-shadow: 0 28px 56px rgba(2, 7, 20, 0.62), inset 0 1px 0 rgba(228, 236, 255, 0.2);
}

body.teacher-sovereign .identity-block .kicker,
body.teacher-sovereign .auth-form label,
body.teacher-sovereign .login-install-status {
  color: #9eb0cc;
}

body.teacher-sovereign .auth-form input {
  border-color: rgba(166, 188, 228, 0.24);
  background: linear-gradient(145deg, rgba(28, 46, 76, 0.78), rgba(16, 29, 50, 0.7));
  color: #e8effc;
}

body.teacher-sovereign .sovereign-button {
  border-color: rgba(200, 219, 255, 0.26);
  background: linear-gradient(145deg, rgba(34, 58, 91, 0.88), rgba(19, 34, 58, 0.74));
  color: #e8effc;
}
