/* Responsive school sign-in and its animated success scene */
html { color-scheme: light; }
body {
  min-height: 100svh;
  padding: clamp(16px, 3vw, 44px);
  background: radial-gradient(ellipse at 12% 15%, #fce7ed 0, transparent 45%),
              radial-gradient(ellipse at 90% 90%, #dce8fb 0, transparent 42%), #f3f5f9;
  overflow-x: clip;
}
.login-container {
  max-width: 1120px;
  border-color: #fff;
  box-shadow: 0 28px 80px -32px #26344b50;
  will-change: transform;
}
.auth-side, .showcase-side { padding: clamp(28px, 4vw, 52px); min-width: 0; }
.auth-title { font-size: clamp(1.75rem, 3vw, 2.3rem); }
.showcase-headline { font-size: clamp(1.8rem, 3vw, 2.55rem); text-wrap: balance; }
.showcase-desc { line-height: 1.85; }
.showcase-brand-logo { object-fit: contain; }
.form-input { min-height: 54px; font-size: 16px; background: #f8fafc; border-radius: 14px; }
.login-btn { min-height: 54px; border-radius: 14px; transition: transform .3s, background .3s; }
.login-btn:active { transform: scale(.985); }
.login-btn:disabled { cursor: wait; opacity: .85; }
.password-toggle-btn { min-width: 44px; min-height: 44px; }
:is(a, button, input):focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }
.login-error { line-height: 1.7; }
.auth-footer { gap: 14px; }
.support-link { min-height: 44px; }
.school-pill { overflow-wrap: anywhere; }

/* Student Character (Stands outside the card and pushes it) */
.login-student {
  position: fixed;
  z-index: 99999;
  aspect-ratio: 160 / 220;
  filter: drop-shadow(-6px 14px 14px rgba(15, 23, 42, 0.28));
  pointer-events: none;
  display: none;
  will-change: transform, left, top;
}
.login-student svg { display: block; width: 100%; height: 100%; }
.student-leg {
  transform-box: fill-box;
  transform-origin: top center;
}
.login-student.is-pushing .student-leg {
  animation: student-push-step 0.16s ease-in-out infinite alternate !important;
}
.login-student.is-pushing .student-leg.back {
  animation-delay: -0.16s !important;
}
@keyframes student-push-step {
  from { transform: rotate(-16deg); }
  to { transform: rotate(16deg); }
}

/* Success Scene (Fades in after card is pushed away) */
.login-success-scene {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  place-items: center;
  background: rgba(243, 245, 249, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.success-message {
  text-align: center;
  max-width: 440px;
  animation: welcome-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.success-check {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 28px;
  box-shadow: 0 10px 25px -5px rgba(22, 163, 74, 0.3);
}
.success-check svg { width: 42px; height: 42px; }
.success-message h2 { color: #0f172a; font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 10px; font-weight: 800; }
.success-message p { color: #475569; font-size: 1.05rem; line-height: 1.8; }

@keyframes welcome-pop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 900px) {
  body { align-items: flex-start; padding: 20px; }
  .login-container { grid-template-columns: 1fr; max-width: 520px; min-height: 0; }
  .showcase-side { padding: 24px 28px; }
  .showcase-brand { margin-bottom: 20px; }
  .showcase-headline { font-size: 1.5rem; margin-bottom: 0; }
  .showcase-desc, .features-list, .showcase-footer { display: none; }
  .auth-side { padding: 28px; gap: 24px; }
}

@media (max-width: 480px) {
  body { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .login-container { border-radius: 22px; }
  .showcase-side { padding: 20px 22px; }
  .showcase-brand { margin-bottom: 0; gap: 12px; }
  .showcase-brand-logo { width: 46px; height: 46px; }
  .showcase-brand-title { font-size: 1.25rem; }
  .showcase-brand-subtitle { font-size: .7rem; }
  .showcase-headline { display: none; }
  .auth-side { padding: 24px 22px; }
  .auth-header { margin-bottom: 24px; }
  .auth-subtitle { font-size: .85rem; line-height: 1.8; }
  .auth-footer { flex-direction: column; align-items: flex-start; margin-top: 24px; }
  .copyright-text { font-size: .72rem; }
}

@media (min-width: 901px) and (max-width: 1024px) {
  .login-container { grid-template-columns: 1fr 1fr; max-width: 960px; }
  .features-list { display: flex; }
}
