@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&display=swap");

:root {
  --student-bg-1: #e8edf9;
  --student-bg-2: #f6f7fc;
  --student-bg-3: #ebe8dd;
  --student-text: #1f2536;
  --student-muted: #5b657f;
  --student-line: rgba(255, 255, 255, 0.54);
  --student-line-soft: rgba(194, 203, 228, 0.46);
  --student-gold: rgba(186, 162, 115, 0.5);
  --student-shadow-1: 0 24px 58px rgba(43, 54, 86, 0.18);
  --student-shadow-2: 0 36px 76px rgba(33, 41, 66, 0.23);
}

body.student-sovereign {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", sans-serif;
  color: var(--student-text);
  background:
    radial-gradient(1060px 700px at 50% -8%, rgba(213, 224, 251, 0.86), transparent 64%),
    radial-gradient(860px 470px at 86% 11%, rgba(233, 225, 204, 0.78), transparent 68%),
    linear-gradient(145deg, var(--student-bg-1) 0%, var(--student-bg-2) 48%, var(--student-bg-3) 100%);
}

.sovereign-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(122deg, rgba(255, 255, 255, 0.32), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 1px, transparent 1px, transparent 40px);
  opacity: 0.3;
}

.glass {
  background: linear-gradient(152deg, rgba(255, 255, 255, 0.82), rgba(246, 250, 255, 0.68));
  border: 1px solid var(--student-line);
  box-shadow: var(--student-shadow-1), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(26px) saturate(130%);
  -webkit-backdrop-filter: blur(26px) saturate(130%);
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-stage {
  width: min(560px, 100%);
  border-radius: 24px;
  padding: 34px 30px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--student-shadow-2), inset 0 -22px 44px rgba(173, 183, 215, 0.16);
}

.login-stage::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.royal-crest {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(152deg, rgba(251, 255, 255, 0.88), rgba(240, 245, 255, 0.78));
  border: 1px solid rgba(204, 213, 236, 0.72);
  box-shadow: 0 14px 30px rgba(57, 70, 107, 0.2);
}

.school-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

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

.micro-label {
  margin: 0;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #687493;
}

.identity-block h1 {
  margin: 10px 0 0;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 500;
  color: #2d3551;
}

.location-line {
  margin: 8px 0 0;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--student-muted);
}

.authority-panel {
  margin-top: 18px;
  border-radius: 24px;
  padding: 22px 20px;
  border: 1px solid var(--student-line-soft);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.64), rgba(246, 248, 255, 0.56));
  box-shadow: 0 12px 28px rgba(57, 68, 101, 0.13);
}

.panel-kicker {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #6c7995;
}

.authority-panel h2 {
  margin: 8px 0 0;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #2b334d;
}

.panel-note {
  margin: 10px 0 0;
  font-size: 0.69rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: #576482;
}

.auth-form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.auth-form label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5b6785;
}

.auth-form input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(195, 204, 229, 0.76);
  background: linear-gradient(145deg, rgba(253, 255, 255, 0.92), rgba(246, 249, 255, 0.78));
  padding: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #303d5a;
}

.auth-form input::placeholder {
  color: #77849f;
  letter-spacing: 0.08em;
}

.status {
  min-height: 16px;
  margin: 2px 0;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.status.error {
  color: #ffd4d4;
}

.status.success {
  color: #d2f0de;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--student-gold);
  box-shadow: 0 0 0 1px rgba(186, 162, 115, 0.25), 0 0 18px rgba(165, 180, 224, 0.28);
}

.sovereign-button {
  margin-top: 6px;
  border: 1px solid rgba(192, 201, 226, 0.86);
  background: linear-gradient(145deg, rgba(252, 255, 255, 0.92), rgba(240, 245, 255, 0.84));
  color: #2c3551;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 380ms cubic-bezier(0.4, 0, 0.2, 1), border-color 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.sovereign-button:hover {
  transform: translateY(-1px);
  border-color: var(--student-gold);
  box-shadow: 0 18px 30px rgba(41, 54, 84, 0.18), 0 0 0 1px rgba(186, 162, 115, 0.2);
}

.chamber-note {
  margin-top: 14px;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #63708e;
}

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

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

  .login-stage::before {
    inset: 8px;
    border-radius: 18px;
  }

  .royal-crest {
    width: 76px;
    height: 76px;
  }

  .school-logo {
    width: 58px;
    height: 58px;
  }

  .authority-panel {
    border-radius: 16px;
    padding: 14px 12px;
  }
}

/* MASTER DESIGN DNA COMPLIANCE OVERRIDE */
body.student-sovereign {
  background:
    radial-gradient(980px 620px at 50% -10%, rgba(78, 133, 120, 0.2), transparent 66%),
    linear-gradient(148deg, #183129 0%, #22473d 52%, #1a362e 100%);
  color: #e7eadf;
}

.glass,
.login-stage,
.authority-panel {
  border-radius: 22px;
  border: 1px solid rgba(223, 221, 206, 0.24);
  background: linear-gradient(152deg, rgba(31, 59, 50, 0.76), rgba(21, 43, 37, 0.66));
  backdrop-filter: blur(22px) saturate(122%);
  -webkit-backdrop-filter: blur(22px) saturate(122%);
  box-shadow: 0 16px 34px rgba(7, 15, 13, 0.36), inset 0 1px 0 rgba(235, 233, 220, 0.14);
}

.identity-block h1,
.authority-panel h2,
.panel-note,
.panel-kicker,
.location-line,
.micro-label,
.chamber-note {
  color: #d7dfd2;
}

.auth-form input {
  background: linear-gradient(145deg, rgba(25, 48, 41, 0.84), rgba(18, 35, 30, 0.74));
  border: 1px solid rgba(214, 219, 203, 0.24);
  color: #e9efe2;
}

.sovereign-button {
  border: 1px solid rgba(180, 154, 103, 0.34);
  background: linear-gradient(145deg, rgba(37, 68, 59, 0.88), rgba(24, 46, 40, 0.8));
  color: #ece7d7;
}

/* Mobile APK Readiness */
body.student-sovereign.is-standalone {
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 680px) {
  .login-shell {
    min-height: 100dvh;
  }

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

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

.student-login-skip-link:focus-visible {
  top: 12px;
  outline: 2px solid #9fbad8;
  outline-offset: 2px;
}

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

.login-install-btn {
  min-height: 44px;
  letter-spacing: 0.08em;
}

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

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

/* 2026-02 cinematic parity override (super/viewer aligned) */
body.student-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.student-sovereign .sovereign-atmosphere {
  background:
    linear-gradient(120deg, rgba(233, 242, 255, 0.08), transparent 40%),
    repeating-linear-gradient(90deg, rgba(243, 249, 255, 0.035) 0, rgba(243, 249, 255, 0.035) 1px, transparent 1px, transparent 42px);
  opacity: 0.58;
}

body.student-sovereign .glass,
body.student-sovereign .login-stage,
body.student-sovereign .authority-panel {
  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.student-sovereign .identity-block h1,
body.student-sovereign .authority-panel h2 {
  color: #e8effc;
}

body.student-sovereign .micro-label,
body.student-sovereign .panel-kicker,
body.student-sovereign .location-line,
body.student-sovereign .panel-note,
body.student-sovereign .chamber-note {
  color: #9eb0cc;
}

body.student-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.student-sovereign .auth-form input::placeholder {
  color: #8ea1c0;
}

body.student-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;
}

body.student-sovereign .status.error {
  color: #ffb7bc;
}

body.student-sovereign .status.success {
  color: #a9e2be;
}
