:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20243b;
  background: #f5f5fb;
}

* { box-sizing: border-box; }

body { margin: 0; min-height: 100vh; }

button,
input { font: inherit; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  background: #f7f7fc;
}

.brand-panel {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(30px, 3.6vw, 56px) clamp(30px, 4.7vw, 72px);
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(255,255,255,.06), transparent 38%),
    radial-gradient(circle at 90% 9%, rgba(159, 195, 221, .3), transparent 30rem),
    radial-gradient(circle at 8% 85%, rgba(166, 145, 207, .32), transparent 30rem),
    linear-gradient(145deg, #34375b 0%, #55517c 54%, #3c6778 100%);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .09;
  background-image: radial-gradient(circle, #fff 1px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: linear-gradient(135deg, #000, transparent 65%);
}

.ambient {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(2px);
}

.ambient-one {
  width: 330px;
  height: 330px;
  right: -140px;
  top: -120px;
  background: rgba(188, 219, 255, .12);
  box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 145px rgba(255,255,255,.018);
}

.ambient-two {
  width: 260px;
  height: 260px;
  left: -160px;
  bottom: -105px;
  background: rgba(210, 177, 255, .14);
  box-shadow: 0 0 0 70px rgba(255,255,255,.025);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  z-index: 3;
}

.brand-mark {
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.25), rgba(255,255,255,.08));
  box-shadow: 0 14px 38px rgba(20, 19, 75, .32);
  backdrop-filter: blur(14px);
}

.brand-symbol { overflow: hidden; }
.brand-symbol::before,
.brand-symbol::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}
.brand-symbol::before {
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255,255,255,.3);
  animation: brand-orbit 7s linear infinite;
}
.brand-symbol::after {
  width: 44px;
  height: 44px;
  border: 1px dashed rgba(204,224,255,.24);
  animation: brand-orbit 11s linear infinite reverse;
}
.brand-symbol-core {
  width: 17px;
  height: 17px;
  position: relative;
  z-index: 2;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff, #c7e9ff 52%, #cebfff);
  box-shadow: 0 0 22px rgba(217,235,255,.72);
  animation: brand-core 3.2s ease-in-out infinite;
}
.brand-symbol-node {
  width: 6px;
  height: 6px;
  position: absolute;
  z-index: 3;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255,255,255,.85);
}
.brand-symbol-node-one { left: 9px; top: 14px; animation: node-breathe 2.5s ease-in-out infinite; }
.brand-symbol-node-two { right: 9px; top: 11px; animation: node-breathe 2.5s .8s ease-in-out infinite; }
.brand-symbol-node-three { right: 12px; bottom: 9px; animation: node-breathe 2.5s 1.5s ease-in-out infinite; }

.brand > span:last-child { display: grid; gap: 2px; }
.brand b { font-size: 24px; letter-spacing: -.4px; }
.brand small { color: #d4d9f4; font-size: 12px; letter-spacing: .08em; }

.brand-copy {
  max-width: 610px;
  margin: clamp(34px, 5.6vh, 72px) 0 0;
  position: relative;
  z-index: 2;
}

.brand-copy h1 {
  max-width: 590px;
  margin: 0 0 20px;
  font-size: clamp(40px, 4.1vw, 61px);
  line-height: 1.1;
  letter-spacing: -1.8px;
}

.brand-copy h1 em {
  display: block;
  color: #d9d5ff;
  font-style: normal;
}

.brand-copy p {
  max-width: 510px;
  margin: 0;
  color: #d9ddf0;
  font-size: clamp(17px, 1.25vw, 20px);
  line-height: 1.55;
}

.workspace-scene { width: 100%; max-width: 550px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 34px 0 auto; flex-shrink: 0; pointer-events: none; user-select: none; }
.workspace-card { min-width: 0; position: relative; border: 1px solid #ffffffb3; background: linear-gradient(130deg, #fffffffa, #eeedf7f5); color: #373850; box-shadow: 0 14px 32px #18213a1f, inset 0 1px #fff; border-radius: 17px; }
.focus-card { grid-column: 1 / -1; padding: 22px 25px; }
.card-kicker { display: flex; gap: 9px; align-items: center; font-size: 12px; font-weight: 700; color: #62627b; }
.scene-icon { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; }
.scene-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lavender { background: #e9e4f7; color: #7967ac; }
.mint { background: #dfeee9; color: #4f8276; }
.peach { background: #f5e9dc; color: #ab7954; }
.card-dots { margin-left: auto; letter-spacing: 2px; }
.focus-card h3 { margin: 16px 0 17px; font-size: 24px; font-weight: 650; line-height: 1.25; letter-spacing: -.5px; }
.scene-row { display: flex; align-items: center; gap: 10px; margin-top: 13px; font-size: 13px; }
.scene-check { width: 23px; height: 23px; border-radius: 7px; background: #eae5f5; color: #8570b0; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.scene-check.mint { color: #508173; background: #e2ede8; }
.scene-check.peach { color: #a9825e; background: #f2e8db; }
.scene-row-detail { margin-left: auto; color: #76758b; font-size: 11px; }
.scene-progress { position: relative; overflow: hidden; height: 3px; margin-top: 21px; border-radius: 4px; background: #e2ddec; }
.scene-progress i { position: absolute; inset: 0 auto 0 0; width: 32%; border-radius: inherit; background: linear-gradient(90deg, #a59acb, #7767ad, #a59acb); animation: indicator-sweep 6s ease-in-out infinite; }
.conversation-card, .learning-card { padding: 20px 17px; min-height: 108px; display: flex; align-items: flex-start; gap: 11px; }
.mini-label { display: block; margin: 2px 0 6px; font-size: 9px; letter-spacing: 1px; color: #6f7384; font-weight: 750; }
.workspace-card b { display: block; font-size: 13px; font-weight: 650; line-height: 1.45; }
.conversation-dots { position: absolute; right: 18px; bottom: 13px; display: flex; gap: 4px; }
.conversation-dots i { width: 4px; height: 4px; background: #638b7f; border-radius: 50%; animation: typing-indicator 3s ease-in-out infinite; }
.conversation-dots i:nth-child(2) { animation-delay: .2s; }
.conversation-dots i:nth-child(3) { animation-delay: .4s; }
.learning-card .scene-icon { position: relative; overflow: hidden; }
.learning-card .scene-icon::after { content: ""; position: absolute; inset: -5px auto -5px -22px; width: 17px; background: linear-gradient(90deg, transparent, #ffffffb3, transparent); transform: translateX(0) skewX(-18deg); animation: academy-glint 6s ease-in-out infinite; }
@keyframes indicator-sweep { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(212.5%); } }
@keyframes typing-indicator { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
@keyframes academy-glint { 0%, 10% { transform: translateX(0) skewX(-18deg); } 65%, 100% { transform: translateX(80px) skewX(-18deg); } }

.brand-panel footer {
  margin-top: 35px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d2d6ea;
  font-size: 13px;
  position: relative;
  z-index: 2;
}
.brand-panel footer span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7bdd9a;
  box-shadow: 0 0 0 5px rgba(123,221,154,.12), 0 0 16px rgba(123,221,154,.65);
}

.login-panel {
  min-width: 0;
  min-height: 100vh;
  padding: clamp(28px, 3.6vw, 58px) clamp(28px, 3.6vw, 58px) 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 12%, #e8e5fb, transparent 25rem),
    radial-gradient(circle at 12% 90%, #e3f4f7, transparent 29rem),
    linear-gradient(145deg, #f7f7fb, #f4f6fb);
}

.panel-glow {
  width: 440px;
  height: 440px;
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(119, 104, 209, .08);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 70px rgba(119,104,209,.025), 0 0 0 145px rgba(98,181,211,.018);
}

form {
  min-width: 0;
  width: min(480px, 100%);
  padding: clamp(30px, 4vw, 47px);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(220, 221, 236, .9);
  border-radius: 30px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 30px 90px rgba(54, 49, 101, .14), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(22px);
}

.form-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; }
.form-brand > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(145deg, #f2efff, #e8f3ff);
  box-shadow: inset 0 0 0 1px rgba(113, 91, 210, .1), 0 8px 24px rgba(93,72,183,.1);
}
.em-motion::before {
  content: "";
  width: 30px;
  height: 30px;
  position: absolute;
  border: 1px solid rgba(111,91,204,.18);
  border-radius: 10px;
  animation: em-frame 5s ease-in-out infinite;
}
.em-motion i {
  position: absolute;
  color: #6655c7;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.08em;
  text-shadow: 0 4px 12px rgba(103,83,199,.18);
}
.em-motion i:first-child { transform: translateX(-7px); animation: em-e 4s ease-in-out infinite; }
.em-motion i:nth-child(2) { transform: translateX(7px); animation: em-m 4s ease-in-out infinite; }
.em-motion b {
  width: 5px;
  height: 5px;
  position: absolute;
  right: 7px;
  top: 7px;
  border-radius: 50%;
  background: #8d7ce1;
  box-shadow: 0 0 0 4px rgba(141,124,225,.11), 0 0 14px rgba(117,97,211,.45);
  animation: em-spark 2.4s ease-in-out infinite;
}
.form-brand div { display: grid; gap: 3px; }
.form-brand small { color: #7766d8; font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.form-brand b { color: #555b70; font-size: 14px; }

h2 { margin: 0 0 8px; color: #20243b; font-size: clamp(30px, 3vw, 38px); letter-spacing: -1.2px; }
form > p { margin: 0 0 27px; color: #636b80; font-size: 15px; line-height: 1.55; }

label {
  margin: 17px 0 8px;
  display: block;
  color: #3c4257;
  font-size: 13px;
  font-weight: 760;
}

.input-shell {
  min-height: 54px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dde0eb;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.input-shell:focus-within {
  border-color: #8a78df;
  box-shadow: 0 0 0 4px rgba(130, 110, 222, .11), 0 8px 20px rgba(74,65,128,.06);
  transform: translateY(-1px);
}
.input-shell > span { width: 18px; color: #9186c9; font-size: 13px; font-weight: 850; text-align: center; }
.input-shell input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  color: #20243b;
  background: transparent;
  font-size: 16px;
}
.input-shell input::placeholder { color: #767e90; }

.password-toggle {
  padding: 7px 4px;
  border: 0;
  color: #7162c8;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.password-toggle:hover { color: #5445ad; }
.password-toggle:focus-visible { outline: 2px solid #8a78df; outline-offset: 2px; border-radius: 5px; }

.submit-button {
  width: 100%;
  min-height: 55px;
  margin-top: 24px;
  padding: 0 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #7866cc, #6656b6);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(102, 86, 202, .25);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.submit-button:hover { transform: translateY(-2px); box-shadow: 0 20px 34px rgba(102,86,202,.29); }
.submit-button:focus-visible { outline: 3px solid rgba(118,101,209,.28); outline-offset: 3px; }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; }
.submit-button b { font-size: 20px; line-height: 1; }

.notice {
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid #f2d7db;
  border-radius: 11px;
  color: #9f3d49;
  background: #fff2f3;
  font-size: 13px;
  line-height: 1.45;
}

form aside {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #ececf3;
  color: #6c7386;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}
form aside b { color: #62697d; }

.security-note {
  margin: 0;
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3vh, 34px);
  z-index: 2;
  color: #6c7486;
  font-size: 11px;
  transform: translateX(-50%);
  white-space: nowrap;
}
.security-note span { color: #54b776; }

@keyframes brand-orbit {
  to { transform: rotate(360deg); }
}

@keyframes brand-core {
  0%, 100% { transform: rotate(0deg) scale(1); border-radius: 6px; }
  50% { transform: rotate(45deg) scale(.9); border-radius: 50%; }
}

@keyframes node-breathe {
  0%, 100% { transform: scale(.72); opacity: .48; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes em-frame {
  0%, 100% { transform: rotate(0deg) scale(1); border-radius: 10px; }
  50% { transform: rotate(45deg) scale(.82); border-radius: 50%; }
}

@keyframes em-e {
  0%, 100% { transform: translateX(-7px); }
  50% { transform: translate(-4px, -2px); color: #7d6ce0; }
}

@keyframes em-m {
  0%, 100% { transform: translateX(7px); }
  50% { transform: translate(4px, 2px); color: #4e8eb7; }
}

@keyframes em-spark {
  0%, 100% { transform: scale(.68); opacity: .45; }
  50% { transform: scale(1.12); opacity: 1; }
}

.loading-overlay[hidden] { display: none; }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 26%, rgba(132, 114, 231, .11), transparent 28rem),
    radial-gradient(circle at 82% 72%, rgba(82, 199, 232, .1), transparent 30rem),
    #f8f9fd;
  animation: loader-arrive .24s ease-out both;
}

.loading-card {
  width: 100%;
  padding: 0 0 28px;
  overflow: visible;
  text-align: center;
}

.loading-eyebrow {
  color: #7766d8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
}

.loading-monogram { width: 94px; height: 94px; margin: 28px auto 30px; display: grid; place-items: center; position: relative; border-radius: 29px; color: #7660b7; background: linear-gradient(135deg, #ebe5fa, #e1eef3); box-shadow: 0 15px 40px #67598d1c, inset 0 0 0 1px #ffffffc2; }
.loading-monogram span { font-size: 28px; letter-spacing: -1px; font-weight: 750; }
.loading-monogram i { position: absolute; inset: -12px; border: 2px solid #e3dfed; border-top-color: #8975be; border-radius: 50%; animation: brand-orbit 2s linear infinite; }

.loading-card h2 {
  margin: 0 0 7px;
  font-size: clamp(25px, 4vw, 31px);
  letter-spacing: -.8px;
}

.loading-card p {
  margin: 0;
  color: #636b80;
  font-size: 14px;
  line-height: 1.5;
}

body.is-loading { overflow: hidden; }
body.is-loading .login-shell { filter: saturate(.82) brightness(.96); }

@keyframes loader-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1180px) {
  .brand-panel { padding-inline: 32px; }
  .brand-copy h1 { font-size: clamp(38px, 4.1vw, 49px); }
  .login-panel { padding-inline: 28px; }
  form { padding: 30px; }
  .workspace-scene { gap: 10px; }
  .focus-card { padding: 20px; }
  .conversation-card, .learning-card { padding: 15px 13px; min-height: 114px; gap: 8px; }
  .workspace-card b { font-size: 12px; }
  .scene-row-detail { display: none; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: auto; padding: 24px max(24px, calc((100vw - 480px) / 2)); }
  .brand-mark { width: 48px; height: 48px; border-radius: 15px; }
  .brand b { font-size: 21px; }
  .brand-copy { margin: 24px 0 0; max-width: 100%; }
  .brand-copy p, .brand-panel footer, .workspace-scene { display: none; }
  .brand-copy h1 { margin: 0; font-size: clamp(28px, 5vw, 38px); letter-spacing: -1px; }
  .brand-copy h1 em { display: inline; }
  .login-panel { min-height: calc(100vh - 160px); padding: 28px 20px 68px; align-items: start; }
  form { padding: 29px; border-radius: 24px; }
  .security-note { bottom: 18px; width: 100%; padding: 0 18px; text-align: center; white-space: normal; }
}

@media (max-width: 520px) {
  .brand-panel { padding: 22px; }
  .brand-copy { margin-top: 22px; }
  .loading-card { padding-bottom: 22px; }
  .login-panel { padding: 22px 14px 68px; }
  form { padding: 24px 20px; }
  .form-brand { margin-bottom: 18px; }
  .form-brand > span { width: 43px; height: 43px; }
  h2 { font-size: 29px; }
  .security-note { width: 100%; padding: 0 18px; text-align: center; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}
