.admin-login-page,
.admin-login-page * { box-sizing: border-box; }

.admin-login-page {
  --admin-ink: #29352d;
  --admin-muted: #788178;
  --admin-olive: #64765f;
  --admin-line: #e5e9e4;
  --admin-paper: #f3f6f2;
  min-height: 100vh;
  padding: 72px 5vw 38px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--admin-ink);
  background:
    radial-gradient(ellipse at 12% 12%, #e2ece4 0, transparent 32%),
    radial-gradient(ellipse at 95% 92%, #e7eee3 0, transparent 30%),
    var(--admin-paper);
  font-family: "Nunito", sans-serif;
}

.admin-login-page::before,
.admin-login-page::after {
  content: "";
  position: absolute;
  width: 370px;
  height: 370px;
  border: 1px solid #d9e2d8;
  border-radius: 50%;
  pointer-events: none;
}
.admin-login-page::before { left: -245px; top: 12%; }
.admin-login-page::after { right: -245px; bottom: 3%; }

.admin-back-link {
  position: absolute;
  top: 28px;
  left: 5vw;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #647269;
  font-size: 13px;
  text-decoration: none;
  transition: color .2s ease;
}
.admin-back-link:hover { color: #29352d; }
.admin-back-link span { font-size: 18px; }

.admin-login-layout {
  width: min(1020px, 100%);
  min-height: 590px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid #e2e8e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 90px #2b3d3017;
}

.admin-login-story {
  min-width: 0;
  padding: 43px 48px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: #f7f8f2;
  background: linear-gradient(145deg, #455747, #293b31 78%);
}
.admin-login-story::before,
.admin-login-story::after {
  content: "";
  position: absolute;
  border: 1px solid #ffffff17;
  border-radius: 50%;
  pointer-events: none;
}
.admin-login-story::before { width: 390px; height: 390px; right: -240px; bottom: -95px; }
.admin-login-story::after { width: 300px; height: 300px; right: -195px; bottom: -50px; }
.admin-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
}
.admin-login-brand .ref-monogram {
  color: #e1e8d5;
  font: 48px/.8 "Nunito", sans-serif;
  letter-spacing: -6px;
}
.admin-login-brand .ref-monogram span { color: #b5c49f; }
.admin-login-brand > span:last-child { line-height: 1.2; }
.admin-login-brand small {
  display: block;
  margin-top: 6px;
  color: #c6d0c3;
  font: 8px "Nunito", sans-serif;
  letter-spacing: 1.45px;
}

.admin-story-copy { margin: auto 0; padding: 44px 0 55px; position: relative; z-index: 1; }
.admin-overline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--admin-olive);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
}
.admin-login-story .admin-overline { color: #d9e2d1; }
.admin-overline i { width: 7px; height: 7px; border-radius: 50%; background: #b9c99e; box-shadow: 0 0 0 4px #b9c99e20; }
.admin-story-copy h1 {
  margin: 23px 0 17px;
  color: #fff;
  font: 400 clamp(39px, 4.3vw, 54px)/1.08 "Nunito", sans-serif;
  letter-spacing: -1.7px;
}
.admin-story-copy h1 em,
.admin-login-card h2 em { color: #bdcda8; font-weight: 400; }
.admin-story-copy > p { max-width: 340px; margin: 0; color: #d3ddd2; font-size: 13px; line-height: 1.85; }
.admin-story-note { display: flex; align-items: center; gap: 14px; margin-top: 44px; padding-top: 20px; border-top: 1px solid #ffffff26; }
.admin-story-note > span { color: #c7d4b1; font-size: 26px; }
.admin-story-note b,
.admin-story-note small { display: block; }
.admin-story-note b { color: #f8f8f2; font-size: 12px; font-weight: 600; }
.admin-story-note small { margin-top: 5px; color: #c7d1c4; font-size: 10px; }
.admin-story-caption { position: relative; z-index: 1; color: #c5d0c2; font-size: 8px; letter-spacing: 1.5px; }

.admin-login-panel { min-width: 0; padding: 55px clamp(30px, 5vw, 66px) 24px; display: flex; flex-direction: column; justify-content: center; }
.admin-login-card { width: 100%; max-width: 365px; margin: auto; }
.admin-card-mark {
  width: 46px;
  height: 46px;
  margin-bottom: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e9dd;
  border-radius: 13px;
  color: #566c56;
  background: #f0f4ed;
}
.admin-login-card h2 { margin: 12px 0 10px; color: var(--admin-ink); font: 400 clamp(32px, 3.3vw, 41px)/1.12 "Nunito", sans-serif; letter-spacing: -1.15px; }
.admin-login-card h2 em { color: #687d65; }
.admin-login-intro { margin: 0 0 27px; color: var(--admin-muted); font-size: 12px; line-height: 1.7; }
.admin-login-form { display: flex; flex-direction: column; gap: 10px; }
.admin-login-form > label,
.admin-password-label label { color: #37443a; font-size: 15px; font-weight: 700; }
.admin-input-wrap {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  color: #839083;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.admin-input-wrap:focus-within { border-color: #7d957a; box-shadow: 0 0 0 3px #7d957a1c; }
.admin-input-wrap input { width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; color: var(--admin-ink); background: transparent; font: 15px "Nunito", sans-serif; }
.admin-input-wrap input::placeholder { color: #a6afa6; }
.admin-password-label { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
.admin-password-label a,
.admin-login-footer a { color: #637b5e; font-size: 10px; text-decoration: none; }
.admin-password-label a:hover,
.admin-login-footer a:hover { text-decoration: underline; }
.admin-password-toggle { flex: 0 0 auto; width: 31px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; color: #718072; background: transparent; cursor: pointer; }
.admin-remember { display: flex; align-items: center; gap: 9px; margin: 5px 0 8px; color: #69756b; font-size: 10px; cursor: pointer; }
.admin-remember input { width: 14px; height: 14px; margin: 0; accent-color: #526a52; }
.admin-submit {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid #344b39;
  border-radius: 6px;
  color: #fff;
  background: #344b39;
  font: 600 12px "Nunito", sans-serif;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.admin-submit:hover:not(:disabled) { transform: translateY(-1px); background: #263a2c; box-shadow: 0 7px 16px #344b3925; }
.admin-submit:disabled { opacity: .7; cursor: wait; }
.admin-login-status { margin: 0 0 3px; padding: 10px 12px; border: 1px solid #ead6ce; border-radius: 5px; color: #884f3e; background: #fbf3ef; font-size: 11px; line-height: 1.5; }
.admin-secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 23px; color: #89938a; font-size: 9px; }
.admin-login-footer { width: 100%; max-width: 365px; margin: 28px auto 0; padding-top: 15px; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #ebefea; color: #929b92; font-size: 9px; }
.admin-login-page :focus-visible { outline: 2px solid #728b6d; outline-offset: 3px; }

@media (max-width: 720px) {
  .admin-login-page { min-height: 100svh; padding: 74px 16px 24px; }
  .admin-back-link { top: 25px; left: 20px; }
  .admin-login-layout { width: min(480px, 100%); min-height: 0; grid-template-columns: 1fr; border-radius: 10px; }
  .admin-login-story { min-height: 0; padding: 25px 27px 21px; }
  .admin-login-brand .ref-monogram { font-size: 40px; }
  .admin-story-copy { margin: 31px 0 19px; padding: 0; }
  .admin-story-copy h1 { margin: 15px 0 10px; font-size: 36px; }
  .admin-story-copy > p { max-width: 390px; font-size: 12px; }
  .admin-story-note { margin-top: 19px; padding-top: 13px; }
  .admin-story-note > span { font-size: 21px; }
  .admin-story-caption { font-size: 7px; }
  .admin-login-panel { padding: 31px 27px 21px; }
  .admin-card-mark { margin-bottom: 20px; }
  .admin-login-card h2 { font-size: 35px; }
  .admin-login-footer { margin-top: 24px; }
}

/* Parent sign-in and registration share the admin sign-in visual system. */
.parent-auth-page {
  --admin-ink: #29352d;
  --admin-muted: #788178;
  --admin-olive: #64765f;
  --admin-line: #e5e9e4;
  position: relative;
  display: grid;
  place-items: center;
  padding: 48px 5vw 58px;
  overflow: hidden;
  color: var(--admin-ink);
  background: radial-gradient(ellipse at 12% 12%, #e2ece4 0, transparent 32%), radial-gradient(ellipse at 95% 92%, #e7eee3 0, transparent 30%), #f3f6f2;
  font-family: "Nunito", sans-serif;
}
.parent-auth-page::before,
.parent-auth-page::after {
  content: "";
  position: absolute;
  width: 370px;
  height: 370px;
  border: 1px solid #d9e2d8;
  border-radius: 50%;
  pointer-events: none;
}
.parent-auth-page::before { left: -245px; top: 12%; }
.parent-auth-page::after { right: -245px; bottom: 3%; }
.parent-auth-page .admin-login-layout { min-height: 590px; }
.parent-auth-page .admin-login-story,
.parent-auth-page .admin-login-panel { z-index: 1; }
.parent-auth-page .admin-login-story { background: linear-gradient(145deg, #66775f, #394b3d 78%); }
.parent-auth-page .admin-login-story .admin-overline { color: #d9e2d1; }
.parent-auth-page .admin-login-story .admin-story-copy h1 em { color: #c6d2ae; }
.parent-auth-page .admin-login-panel { background: #fffefa; }
.parent-login-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.parent-login-eyebrow .admin-card-mark { flex: 0 0 46px; margin: 0; }
.parent-login-eyebrow .admin-overline { line-height: 1.4; }
.parent-login-page .admin-login-card h2 { margin-top: 0; }
.parent-register-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.parent-register-eyebrow .admin-card-mark { flex: 0 0 46px; margin: 0; }
.parent-register-eyebrow .admin-overline { line-height: 1.4; }
.parent-register-page .admin-login-card h2.parent-register-title { margin: 0 0 10px; font-size: clamp(23px, 3vw, 34px); letter-spacing: -1.1px; white-space: nowrap; }
.parent-auth-page :focus-visible { outline: 2px solid #728b6d; outline-offset: 3px; }
/* The field wrapper provides the shared login focus indicator. */
:is(.admin-login-page, .parent-auth-page) .admin-input-wrap input:focus,
:is(.admin-login-page, .parent-auth-page) .admin-input-wrap input:focus-visible { outline:none; box-shadow:none; }
:is(.admin-login-page, .parent-auth-page) .admin-input-wrap input:-webkit-autofill {
  -webkit-box-shadow:0 0 0 1000px #fffefa inset;
  -webkit-text-fill-color:var(--admin-ink);
  caret-color:var(--admin-ink);
}
.parent-register-page .admin-login-layout { min-height: 0; align-items: stretch; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.parent-register-page .admin-login-story .admin-story-copy { margin: 0; padding: 48px 0 28px; }
.parent-register-page .admin-login-panel { padding-block: 42px; }
.parent-register-page .admin-login-card { max-width: 430px; }
.parent-register-form { display: flex; flex-direction: column; gap: 12px; }
.parent-register-form label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #37443a; font-size: 15px; font-weight: 700; }
.parent-register-form input,
.parent-register-form select,
.parent-register-form textarea { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--admin-line); border-radius: 6px; outline: 0; color: var(--admin-ink); background: #fff; font: 15px "Nunito", sans-serif; }
.parent-register-form textarea { resize: vertical; }
.parent-register-form input:focus,
.parent-register-form select:focus,
.parent-register-form textarea:focus { border-color: #7d957a; box-shadow: 0 0 0 3px #7d957a1c; }
.parent-register-consent { display: grid; gap: 8px; padding: 10px 10px 8px; border: 1px solid #e7ebdf; border-radius: 10px; background: #f7f9f1; }
.parent-register-consent h3 { margin: 0; color: #3d4f39; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.parent-register-check { display: flex; align-items: flex-start; gap: 8px; color: #37443a; font-size: 12px; font-weight: 600; line-height: 1.3; }
.parent-register-check input { width: 14px; min-width: 14px; height: 14px; margin-top: 2px; accent-color: #516a47; }
.parent-register-check span { flex: 1; display: block; }
.required-label::after,
.required-mark { margin-left: 4px; color: #c7473a; font-weight: 800; }
.required-label::after { content: "*"; }
.parent-auth-page .portal-auth-switch { position: relative; z-index: 1; }
.parent-auth-page .portal-auth-switch a { color: #506c4f; font-size: 15px; font-weight: 700; text-decoration: none; }
.parent-auth-page .portal-auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.app-toast {
  position: fixed;
  z-index: 10000;
  right: max(22px, env(safe-area-inset-right));
  top: max(22px, env(safe-area-inset-top));
  width: min(440px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 11px;
  padding: 14px 13px 14px 16px;
  border: 1px solid #cbd8c7;
  border-radius: 10px;
  color: #2d4734;
  background: #fbfdf9;
  box-shadow: 0 12px 34px #20282028;
  font: 600 14px/1.45 "Nunito", sans-serif;
  animation: toast-enter .2s ease-out both;
}
.app-toast.is-error { border-color: #e8c7bd; color: #803e31; background: #fffaf8; }
.app-toast > svg { color: #66825e; }
.app-toast.is-error > svg { color: #a94f3f; }
.app-toast > span { overflow-wrap: anywhere; }
.app-toast button { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #68756a; background: transparent; cursor: pointer; }
.app-toast button:hover { background: #eaf0e7; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) {
  .parent-auth-page { padding: 30px 16px 38px; }
  .parent-auth-page .admin-login-layout { min-height: 0; }
  .parent-auth-page .admin-login-story { min-height: 0; }
  .parent-register-page .admin-login-panel { padding-block: 30px; }
  .app-toast { top: max(12px, env(safe-area-inset-top)); right: 12px; width: calc(100vw - 24px); }
}

@media (max-width: 370px) {
  .admin-login-page { padding-inline: 11px; }
  .admin-login-story,
  .admin-login-panel { padding-inline: 20px; }
  .admin-login-brand { gap: 9px; font-size: 12px; }
  .admin-login-brand small { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-login-page *, .admin-login-page *::before, .admin-login-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
