/* Shared visual language for the platform and school entry points. */
.login-scene {
  --scene-ink: #151436;
  --scene-muted: rgba(29, 25, 76, .68);
  --scene-purple: #5a4be7;
  --scene-blue: #3d65ea;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100dvh;
  padding: clamp(22px, 4vw, 64px);
  background:
    radial-gradient(circle at 10% 16%, rgba(153, 180, 255, .42), transparent 27%),
    radial-gradient(circle at 72% 8%, rgba(237, 213, 255, .84), transparent 31%),
    linear-gradient(118deg, #3f48d7 0%, #6355ea 40%, #a697f1 66%, #f4eff7 100%);
}
.login-scene::before,
.login-scene::after {
  position: absolute;
  z-index: -1;
  display: block;
  content: '';
  pointer-events: none;
}
.login-scene::before {
  inset: 0;
  opacity: .28;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(110deg, rgba(0,0,0,.9), transparent 75%);
}
.login-scene::after {
  width: min(52vw, 700px);
  height: min(52vw, 700px);
  right: -15vw;
  bottom: -24vw;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
  filter: blur(45px);
}
.login-shell {
  width: min(1180px, 100%);
  min-height: min(720px, calc(100dvh - 44px));
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .78fr);
  gap: clamp(26px, 5.5vw, 86px);
  align-items: center;
}
.login-hero {
  min-width: 0;
  min-height: min(640px, calc(100dvh - 100px));
  padding: clamp(8px, 2vw, 28px) 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}
.login-hero-meta,
.login-hero-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: .02em;
  font-size: 13px;
  color: rgba(255,255,255,.82);
}
.login-hero-meta { gap: 10px; }
.login-hero-meta strong { font-size: 15px; color: #fff; font-weight: 700; }
.login-hero-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.94);
  color: var(--scene-purple);
  box-shadow: 0 8px 20px rgba(27, 30, 124, .2);
}
.login-hero-mark svg { width: 21px; height: 21px; }
.login-hero-state {
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.27);
  border-radius: 999px;
  background: rgba(255,255,255,.11);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}
.login-hero-state::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #b8ffc5;
  box-shadow: 0 0 0 4px rgba(184,255,197,.13);
  content: '';
  vertical-align: 1px;
}
.login-hero-copy { max-width: 520px; padding: 8px 0 0; }
.login-hero-copy .eyebrow {
  margin-bottom: 13px;
  color: rgba(255,255,255,.75);
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: .15em;
  font-weight: 500;
}
.login-hero-copy h2 {
  max-width: 500px;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 800;
  text-shadow: 0 11px 28px rgba(38, 30, 142, .2);
}
.login-hero-copy .description {
  max-width: 410px;
  margin-top: 20px;
  color: rgba(255,255,255,.78);
  font-size: 15px;
  line-height: 1.85;
}
.login-art {
  width: min(100%, 590px);
  margin: clamp(10px, 2vh, 22px) auto 0;
  filter: drop-shadow(0 28px 28px rgba(34, 25, 132, .22));
  transform-origin: 50% 100%;
  animation: login-art-in .8s cubic-bezier(.22,.75,.22,1) both;
}
@keyframes login-art-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.login-hero-footer { color: rgba(255,255,255,.62); font-size: 12px; }
.login-hero-footer span { opacity: .55; }
.login-card.login-glass-card {
  position: relative;
  width: min(100%, 432px);
  justify-self: end;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,.32));
  box-shadow: 0 30px 70px rgba(28, 24, 112, .24), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(28px) saturate(1.16);
  -webkit-backdrop-filter: blur(28px) saturate(1.16);
  animation: login-card-in .65s .08s cubic-bezier(.22,.75,.22,1) both;
}
.login-card.login-glass-card::before {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.68), rgba(255,255,255,0));
  content: '';
  pointer-events: none;
}
@keyframes login-card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.login-card-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
}
.login-card-head > div:last-child { min-width: 0; }
.login-logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 15px;
  background: linear-gradient(145deg, #5f58ef, #4338bb);
  color: #fff;
  box-shadow: 0 10px 22px rgba(71, 58, 207, .25);
}
.login-logo svg { width: 20px; height: 20px; }
.login-card .card-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: rgba(55, 47, 134, .65);
  font-size: 10px;
  letter-spacing: .2em;
  font-weight: 800;
}
.login-card h1 {
  color: var(--scene-ink);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -.04em;
  text-align: left;
  font-weight: 760;
}
.login-card .sub {
  margin: 7px 0 0;
  color: var(--scene-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.login-card label {
  display: block;
  margin: 0 0 8px;
  color: rgba(29, 25, 76, .76);
  font-size: 12px;
  font-weight: 700;
}
.login-card input {
  width: 100%;
  min-height: 50px;
  margin: 0 0 17px;
  padding: 13px 15px;
  border: 1px solid rgba(105, 94, 185, .2);
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  color: var(--scene-ink);
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(58,44,138,.04);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-card input::placeholder { color: rgba(69, 62, 123, .43); }
.login-card input:focus {
  outline: none;
  border-color: rgba(83, 73, 219, .7);
  background: rgba(255,255,255,.8);
  box-shadow: 0 0 0 4px rgba(95, 83, 231, .13), inset 0 1px 2px rgba(58,44,138,.04);
}
.login-card .login-hint {
  min-height: 20px;
  margin: -1px 0 12px;
  color: rgba(29, 25, 76, .63);
  font-size: 12px;
  line-height: 1.6;
}
.login-card .err { min-height: 20px; margin: -1px 0 11px; color: #b32650; font-size: 13px; }
.login-card .btn-primary {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 14px;
  background: linear-gradient(110deg, #5144e3, #695ce9 55%, #796eea);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .08em;
  box-shadow: 0 14px 25px rgba(73, 60, 204, .24);
}
.login-card .btn-primary:hover { background: linear-gradient(110deg, #493bd2, #5e51dc 55%, #6d60df); transform: translateY(-1px); }
.login-card .btn-primary:active { transform: translateY(0); }
.login-card .btn-ghost { background: rgba(255,255,255,.42); border-color: rgba(105,94,185,.2); }
.login-scene.login-state > .login-card { justify-self: center; }
.login-state { display: grid; place-items: center; }
.login-state .login-card { width: min(100%, 420px); }
.login-state .login-card h1,
.login-state .login-card .sub { text-align: center; }
.login-state .login-card .login-logo { margin: 0 auto 16px; }
.login-state .login-card .login-card-head { display: block; text-align: center; }
.login-state .login-card .card-eyebrow { margin-top: 12px; }
.login-state .login-card .login-card-head > div:last-child { display: block; }
.login-state .login-card #sessionActions { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) {
  .login-art, .login-card.login-glass-card { animation: none; }
}
@media (max-width: 920px) {
  .login-scene { padding: 20px; }
  .login-shell { min-height: auto; grid-template-columns: 1fr; gap: 20px; }
  .login-hero { min-height: auto; padding: 8px 0 0; }
  .login-hero-copy { margin-top: 36px; }
  .login-hero-copy h2 { font-size: clamp(40px, 9vw, 66px); }
  .login-art { max-width: 500px; margin-top: -4px; }
  .login-card.login-glass-card { justify-self: center; }
  .login-hero-footer { display: none; }
}
@media (max-width: 560px) {
  .login-scene { padding: 14px; }
  .login-hero-meta { font-size: 12px; }
  .login-hero-state { padding: 6px 9px; }
  .login-hero-copy { margin-top: 28px; }
  .login-hero-copy .eyebrow { font-size: 14px; }
  .login-hero-copy h2 { font-size: clamp(36px, 13vw, 56px); }
  .login-hero-copy .description { margin-top: 14px; font-size: 13px; }
  .login-art { margin-top: 5px; }
  .login-card.login-glass-card { padding: 27px 22px 24px; border-radius: 25px; }
  .login-card-head { margin-bottom: 24px; }
  .login-card input { min-height: 48px; }
}

/* The reference artwork is kept as a pixel-faithful, read-only visual asset. */
.login-hero { min-height: 0; padding: 0; justify-content: center; }
.login-reference-art {
  display: block;
  width: min(100%, 650px);
  height: auto;
  margin: 0 auto;
  border-radius: 2px;
  filter: drop-shadow(0 28px 28px rgba(34, 25, 132, .18));
}
@media (max-width: 920px) {
  .login-hero { min-height: 0; padding: 0; }
  .login-reference-art { max-width: 560px; }
}
@media (max-width: 560px) {
  .login-reference-art { width: 100%; }
}

/* Unified generated hero artwork: people, lighting and gradient share one canvas. */
.login-scene {
  background-image: linear-gradient(90deg, rgba(62, 82, 216, .12), rgba(139, 128, 238, .04) 58%, rgba(255,255,255,.14)), url('/platform-assets/login-background.png');
  background-size: cover;
  background-position: center;
}
.login-scene::before { display: none; }
.login-scene::after { opacity: .22; }
.login-shell { grid-template-columns: minmax(0, 1.15fr) minmax(350px, .48fr); }
.login-reference-art { display: none; }
.login-hero { min-height: 0; padding: 0; }
@media (max-width: 920px) {
  .login-scene { background-position: 27% center; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: 260px; }
  .login-card.login-glass-card { margin-top: -8px; }
}
@media (max-width: 560px) {
  .login-scene { background-position: 19% top; background-size: auto 52%; background-repeat: no-repeat; background-color: #c9c8fb; }
  .login-shell { gap: 8px; }
  .login-hero { min-height: 240px; }
  .login-card.login-glass-card { margin-top: 0; }
}

/* Final desktop balance: reserve a real column for the glass form and scale the hero down. */
@media (min-width: 921px) {
  .login-scene {
    background-size: 88% auto;
    background-position: left center;
    background-repeat: no-repeat;
    background-color: #c9c8fb;
  }
  .login-shell {
    width: min(1340px, 100%);
    grid-template-columns: minmax(0, 1fr) minmax(440px, 480px);
    gap: clamp(28px, 4vw, 64px);
  }
  .login-card.login-glass-card { width: 100%; }
  .login-card h1 {
    font-size: clamp(21px, 1.8vw, 26px);
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 920px) {
  .login-scene { background-size: auto 50%; }
  .login-shell { width: min(620px, 100%); }
}
@media (max-width: 560px) {
  .login-scene { background-size: auto 47%; background-position: 18% top; }
  .login-hero { min-height: 218px; }
}

/* Mobile keeps one calm hero canvas above the form; never tile the artwork. */
.login-scene { background-repeat: no-repeat; }
@media (max-width: 920px) {
  .login-scene {
    background-size: auto 48%;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: #c9c8fb;
  }
}
@media (max-width: 560px) {
  .login-scene { background-size: auto 45%; background-position: 18% top; }
}
