/* Shared calm auth stage — school / parent / platform */

:root {
  --auth-ink: #091820;
  --auth-muted: #5b6b73;
  --auth-panel: #f7faf8;
  --auth-line: rgba(9, 24, 32, 0.12);
  --auth-brand: #0d7a75;
  --auth-brand-deep: #0a5f5b;
  --auth-brand-soft: rgba(13, 122, 117, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.auth-login {
  margin: 0;
  min-height: 100%;
}

body.auth-login {
  font-family: "Sora", "Avenir Next", sans-serif;
  color: var(--auth-ink);
  background: var(--auth-panel);
}

body.auth-login h1,
body.auth-login .auth-brand-mark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: #07151c;
}

.auth-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.03);
  animation: authDrift 22s ease-in-out infinite alternate;
}

.auth-visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 21, 28, 0.08) 0%, rgba(7, 21, 28, 0.28) 45%, rgba(7, 21, 28, 0.78) 100%),
    linear-gradient(90deg, rgba(7, 21, 28, 0.22) 0%, transparent 55%);
  z-index: 1;
}

.auth-visual-copy {
  position: absolute;
  left: clamp(1.4rem, 4vw, 2.6rem);
  right: clamp(1.4rem, 4vw, 2.6rem);
  bottom: clamp(1.4rem, 4vw, 2.6rem);
  z-index: 2;
  color: #f4f7f5;
}

.auth-brand-mark {
  margin: 0 0 0.55rem;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 0.95;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-brand-mark img {
  width: clamp(2rem, 4vw, 2.75rem);
  height: clamp(2rem, 4vw, 2.75rem);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.auth-visual-lead {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.25;
  color: rgba(244, 247, 245, 0.94);
}

.auth-visual-sub {
  margin: 0.7rem 0 0;
  max-width: 34ch;
  color: rgba(196, 214, 208, 0.9);
  font-size: 0.98rem;
}

.auth-panel {
  background: var(--auth-panel);
  display: flex;
  flex-direction: column;
  padding: 1.25rem clamp(1.25rem, 3vw, 2.4rem) 2rem;
}

.auth-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.4rem;
}

.auth-panel-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.auth-panel-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.auth-panel-brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.auth-panel-brand small {
  display: block;
  margin-top: 0.1rem;
  color: var(--auth-muted);
  font-size: 0.78rem;
}

.auth-panel-head .btn-secondary,
.auth-panel-head a.btn-secondary {
  border: 1px solid var(--auth-line);
  background: transparent;
  color: var(--auth-ink);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
  margin: auto 0;
}

.auth-form-wrap h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  line-height: 1.1;
}

.auth-lead,
.auth-form-wrap .muted {
  margin: 0 0 1.25rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

.auth-form label {
  display: block;
  margin: 0.95rem 0 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.auth-form .input,
.auth-form select.input {
  width: 100%;
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form .input:focus,
.auth-form select.input:focus {
  border-color: color-mix(in srgb, var(--auth-brand) 55%, #94a3b8);
  box-shadow: 0 0 0 3px var(--auth-brand-soft);
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 4.4rem;
}

.password-toggle,
.password-visibility-btn {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--auth-brand-deep);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.4rem 0.55rem;
}

.auth-hint {
  margin: 0.45rem 0 0;
  color: var(--auth-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.inline-error {
  min-height: 1.1rem;
  margin: 0.35rem 0 0;
  color: #b42318;
  font-size: 0.84rem;
  font-weight: 600;
}

.btn.auth-submit,
.parent-login-submit,
.platform-auth-form-pane .auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.25rem;
  border: 0;
  border-radius: 12px;
  background: var(--auth-brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1rem;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.btn.auth-submit:hover,
.parent-login-submit:hover,
.platform-auth-form-pane .auth-submit:hover {
  background: var(--auth-brand-deep);
}

.btn.auth-submit:active {
  transform: translateY(1px);
}

.auth-footnote,
.parent-login-footnote {
  margin-top: 1.4rem;
}

.app-store-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  background: #fff;
}

.app-store-cta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: var(--auth-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.app-store-cta-copy small {
  display: block;
  color: var(--auth-muted);
  font-size: 0.72rem;
}

.app-store-cta-copy strong {
  display: block;
  font-size: 0.92rem;
}

.otp-panel {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--auth-line);
  background: #fff;
}

.parent-login-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.parent-login-inline-actions .btn-secondary {
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.service-status-panel {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--auth-line);
  background: #fff;
}

.service-status-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.service-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: #eef2f1;
  color: var(--auth-muted);
}

.service-status-badge.is-online {
  background: rgba(13, 122, 117, 0.14);
  color: #0a5f5b;
}

.service-status-badge.is-offline {
  background: rgba(180, 35, 24, 0.12);
  color: #b42318;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: var(--auth-brand-soft);
  color: var(--auth-brand-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tiny {
  font-size: 0.8rem;
}

@keyframes authDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.2%, -0.8%, 0); }
}

@media (max-width: 900px) {
  .auth-stage {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 20vh;
  }

  .auth-visual-copy .auth-visual-lead,
  .auth-visual-copy .auth-visual-sub {
    display: none;
  }

  .auth-form-wrap {
    margin: 0.35rem 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-visual img {
    animation: none;
  }
}
