/* Shared authentication layout for Operations, Student and Parent. */
.auth-screen,
.login-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(440px, .96fr);
  background: #f7f5ee;
}

.auth-brand-panel,
.login-brand {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  padding: 46px clamp(32px, 4.5vw, 72px);
  color: #fff;
  background: #11133d;
  isolation: isolate;
}

.login-screen {
  align-content: normal;
  gap: 0;
  overflow: hidden;
  padding: 0;
  color: #171821;
}

.login-screen::before {
  display: none;
}

.login-brand {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  align-content: center;
  gap: clamp(24px, 4vh, 42px);
  place-items: center;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.login-brand::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -220px;
  top: -210px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(214,185,30,.18);
}

.login-brand img {
  display: block;
  width: 196px;
  height: auto;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
}

.login-brand > span,
.login-copy,
.login-form-wrap > .eyebrow,
.login-form-wrap > .login-intro {
  display: none;
}

.institution-login-story {
  width: min(100%, 620px);
  color: #fff;
}

.institution-story-kicker {
  margin: 0 0 13px;
  color: #ead34f;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.institution-login-story h1,
.institution-login-story h2 {
  max-width: 590px;
  margin: 0;
  color: inherit;
  font: 800 clamp(2rem, 3.8vw, 3.65rem)/1.04 "Manrope", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.055em;
}

.institution-story-copy {
  max-width: 570px;
  margin: 17px 0 0;
  color: rgba(255,255,255,.7);
  font-size: .92rem;
  line-height: 1.65;
}

.institution-directors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.institution-directors > span {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  background: rgba(255,255,255,.06);
}

.institution-directors strong {
  color: #fff;
  font-size: .78rem;
  line-height: 1.35;
}

.institution-directors small {
  color: rgba(255,255,255,.56);
  font-size: .65rem;
  line-height: 1.45;
}

.institution-login-story > a {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  color: #fff;
  font-size: .74rem;
  font-weight: 800;
  text-decoration-color: rgba(255,255,255,.38);
  text-underline-offset: 5px;
}

.institution-login-story > a:hover,
.institution-login-story > a:focus-visible {
  color: #ead34f;
  text-decoration-color: currentColor;
}

.institution-login-story-mobile {
  display: none;
}

.auth-form-panel,
.login-card {
  display: grid;
  place-items: center;
  padding: 42px clamp(28px, 5vw, 76px);
  color: #171821;
  background:
    radial-gradient(circle at 92% 8%, rgba(228,199,42,.12), transparent 26%),
    #f7f5ee;
}

.login-card {
  grid-column: 2;
  grid-row: 1;
  width: auto;
  max-width: none;
  min-height: 100dvh;
  align-self: stretch;
  justify-self: stretch;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-form-wrap {
  width: min(100%, 500px);
  margin-right: auto;
  margin-left: auto;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid #e4dfd3;
  border-radius: 26px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 24px 70px rgba(17,19,61,.10);
}

.technology-credit {
  margin: 24px 0 0;
  color: #777985;
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.technology-credit a {
  color: #303578;
  font-weight: 850;
  text-decoration: none;
  text-underline-offset: 3px;
}

.technology-credit a:hover,
.technology-credit a:focus-visible {
  color: #9f2338;
  text-decoration: underline;
}

.connection-banner {
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px);
  padding: 10px 15px;
  border-radius: 999px;
  color: #fff;
  background: #171a4b;
  box-shadow: 0 12px 34px rgba(10, 12, 38, .24);
  font-size: .78rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s ease;
}

.connection-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.is-offline .connection-banner {
  background: #9f2338;
}

.startup-error {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 20px;
  color: #171821;
  border: 1px solid rgba(159, 35, 56, .18);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(10, 12, 38, .14);
  text-align: center;
}

.startup-error p {
  margin: 0;
  color: #686b78;
  font-size: .84rem;
  line-height: 1.55;
}

.startup-error button {
  min-width: 112px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #252a65;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.login-card h1 {
  margin-top: 0;
  margin-bottom: 0;
  font: 800 clamp(1.9rem, 3vw, 2.5rem)/1.15 "Manrope", "DM Sans", sans-serif;
  letter-spacing: -.04em;
}

.login-card form {
  display: grid;
  gap: 20px;
  margin-top: 34px;
}

.login-card label {
  display: grid;
  gap: 8px;
}

.login-card label > span:first-child {
  font-size: .875rem;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid #d9d4c8;
  border-radius: 12px;
  color: #171821;
  background: #fff;
  font-size: 16px;
}

.login-card input:hover {
  border-color: #303578;
}

.login-card input:focus {
  border-color: #303578;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(48,53,120,.12);
}

.login-card .password-field {
  display: grid;
  grid-template-columns: minmax(0,1fr) 48px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d9d4c8;
  border-radius: 12px;
  background: #fff;
}

.login-card .password-field:hover,
.login-card .password-field:focus-within {
  border-color: #303578;
}

.login-card .password-field:focus-within {
  box-shadow: 0 0 0 4px rgba(48,53,120,.12);
}

.login-card .password-field input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-card .password-field button {
  width: 48px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 0;
  color: #171821;
  background: transparent;
}

.login-card .field-help {
  display: block;
  min-height: 16px;
  margin-top: 7px;
  color: #73747e;
  font-size: .75rem;
  font-weight: 500;
}

.login-consent {
  display: grid;
  gap: 9px;
  padding-top: 2px;
  color: #454650;
}

.login-consent h2 {
  margin: 0;
  color: #25262d;
  font: 700 .78rem/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-consent-copy {
  max-height: 126px;
  overflow: auto;
  padding: 10px 11px;
  border: 1px solid #d9d7d0;
  border-radius: 3px;
  color: #5f6067;
  background: #fafafa;
  font: 400 .69rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scrollbar-width: thin;
}

.login-consent-copy:focus-visible {
  outline: 2px solid #303578;
  outline-offset: 2px;
}

.login-consent-copy p {
  margin: 0 0 8px;
}

.login-consent-copy p:last-child {
  margin-bottom: 0;
}

.login-consent-details {
  overflow: hidden;
  border: 1px solid #d9d7d0;
  border-radius: 10px;
  background: #fafafa;
}

.login-consent-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  color: #454650;
  font: 650 .72rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  list-style: none;
}

.login-consent-details summary::-webkit-details-marker { display: none; }

.login-consent-details summary::after {
  content: "+";
  color: #303578;
  font-size: 1rem;
  font-weight: 800;
}

.login-consent-details[open] summary::after { content: "−"; }

.login-consent-details .login-consent-copy {
  max-height: 118px;
  margin: 0 8px 8px;
  border-radius: 4px;
}

.login-card .login-consent-check {
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: #34353d;
  font: 500 .74rem/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-card .login-consent-check input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  padding: 0;
  border-radius: 2px;
  accent-color: #242961;
}

.login-card .login-consent-check span {
  font: inherit;
}

.login-consent-check a {
  color: #242961;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-card .primary-button {
  min-height: 52px;
  border-radius: 13px;
  color: #fff;
  background: #242961;
  box-shadow: 0 8px 18px rgba(17,19,61,.16);
}

.login-card .primary-button:hover {
  background: #303578;
  box-shadow: 0 10px 24px rgba(17,19,61,.24);
}

@media (max-width: 920px) {
  .auth-screen {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-form-panel {
    min-height: 100dvh;
  }

  .login-screen {
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f7f5ee;
  }

  .login-brand {
    width: 100%;
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: auto;
    align-content: start;
    align-items: center;
    justify-items: start;
    gap: 10px 12px;
    padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
    background: transparent;
  }

  .login-brand::before,
  .login-brand::after {
    display: none;
  }

  .login-brand img {
    width: 118px;
    border-color: #e7e2d7;
    box-shadow: 0 4px 16px rgba(17,19,61,.08);
  }

  .login-brand > span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-top: 0;
    padding: 0 10px;
    border: 1px solid #ded9cd;
    border-radius: 999px;
    color: #303578;
    background: rgba(255,255,255,.86);
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .login-card {
    width: 100%;
    min-width: 0;
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    align-content: start;
    padding: 16px max(16px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: transparent;
  }

  .login-form-wrap,
  .login-brand .institution-login-story {
    width: 100%;
    max-width: 540px;
    min-width: 0;
  }

  .login-brand .institution-login-story {
    grid-column: 1 / -1;
    overflow: visible;
  }

  .institution-login-story h1,
  .institution-login-story h2,
  .login-consent-check span {
    overflow-wrap: anywhere;
  }

  .login-brand .institution-login-story,
  .institution-login-story-mobile {
    color: #171821;
  }

  .login-brand .institution-login-story {
    padding: 12px 14px;
    border: 1px solid #e7e2d7;
    border-radius: 16px;
    background: #fbfaf6;
  }

  .institution-story-kicker {
    margin-bottom: 6px;
    color: #9f2338;
    font-size: .61rem;
  }

  .institution-login-story h1,
  .institution-login-story h2 {
    font-size: 1.04rem;
    line-height: 1.22;
    letter-spacing: -.035em;
  }

  .institution-story-copy {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: #686b78;
    font-size: .7rem;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .institution-directors {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
  }

  .institution-directors > span {
    padding: 7px 9px;
    border-color: #e3dfd5;
    background: #fff;
  }

  .institution-directors strong { color: #171821; font-size: .64rem; line-height: 1.3; overflow-wrap: anywhere; }
  .institution-directors small { display: none; }
  .institution-login-story > a { margin-top: 9px; color: #303578; font-size: .66rem; }

  .institution-login-story-mobile {
    display: block;
    margin-top: 28px;
    padding: 16px 17px;
    border: 1px solid #e7e2d7;
    border-radius: 15px;
    background: #fbfaf6;
  }

  .login-form-wrap {
    padding: 25px 22px;
    border-radius: 22px;
    box-shadow: 0 16px 44px rgba(17,19,61,.09);
  }

  .login-card form {
    gap: 17px;
    margin-top: 26px;
  }
}

@media (max-width: 420px) {
  .login-brand img { width: min(112px, 36vw); }
  .login-form-wrap { padding: 22px 18px; border-radius: 20px; }
  .login-card h1 { font-size: 1.85rem; }
  .login-card form { gap: 15px; margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .connection-banner,
  .login-card .primary-button { transition: none; }
}

@media (max-height: 620px) and (min-width: 921px) {
  .auth-brand-panel,
  .login-brand,
  .login-card { min-height: 620px; }
  .auth-screen,
  .login-screen { overflow: auto; }
}
