:root {
  color-scheme: light;
  --navy: #063B78;
  --blue: #1688E8;
  --sky: #40B4FF;
  --white: #FFFFFF;
  --background: #F5F7FA;
  --text: #172033;
  --muted: #6D7789;
  --line: #E1E7EF;
  --error: #B42318;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 38px;
  background:
    radial-gradient(ellipse at 85% 4%, rgba(64, 180, 255, .09), transparent 34%),
    var(--background);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }

.login-shell {
  width: min(1120px, 100%);
  min-height: 690px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(6, 59, 120, .06);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 25px 70px rgba(21, 48, 82, .12), 0 4px 14px rgba(21, 48, 82, .04);
  animation: rise-in .65s cubic-bezier(.2, .75, .3, 1) both;
}

.welcome-panel {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 42px 48px 27px;
  color: var(--white);
  background: linear-gradient(145deg, var(--navy) 0%, #0B5CAF 55%, var(--blue) 100%);
}

.welcome-panel::before, .welcome-panel::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-panel::before { width: 430px; height: 430px; right: -210px; top: 115px; }
.welcome-panel::after { width: 330px; height: 330px; right: -160px; top: 165px; }

.brand-lockup {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(2, 27, 62, .18);
}

.brand-logo { display: block; width: 100%; height: 100%; object-fit: cover; }
.welcome-copy { position: relative; z-index: 1; margin-top: 48px; }
.eyebrow, .form-overline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.55px;
}

.eyebrow { color: rgba(255, 255, 255, .78); }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 12px rgba(64, 180, 255, .9); }

.welcome-copy h1 {
  margin: 20px 0 13px;
  font: 700 clamp(31px, 3.3vw, 42px)/1.2 "Segoe UI", Arial, sans-serif;
  letter-spacing: -1.65px;
}
.welcome-copy h1 span { color: #A8DFFF; }
.tagline { margin: 0; font: 600 16px "Segoe UI", Arial, sans-serif; letter-spacing: .15px; }
.welcome-description { max-width: 360px; margin: 13px 0 0; color: rgba(255, 255, 255, .76); font-size: 13px; line-height: 1.75; }

.learning-art { position: relative; height: 224px; margin-top: 8px; flex: 1; min-height: 210px; }
.art-glow { position: absolute; width: 250px; height: 150px; top: 52px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: rgba(64, 180, 255, .22); filter: blur(35px); }
.art-orbit { position: absolute; left: 50%; top: 48%; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; transform: translate(-50%, -50%) rotate(-18deg); }
.orbit-one { width: 370px; height: 140px; }
.orbit-two { width: 320px; height: 115px; transform: translate(-50%, -50%) rotate(28deg); }

.art-book {
  position: absolute;
  z-index: 1;
  width: 208px;
  height: 130px;
  left: 50%;
  top: 48%;
  display: flex;
  gap: 3px;
  transform: translate(-50%, -50%) rotate(-7deg);
  filter: drop-shadow(0 18px 16px rgba(2, 27, 62, .28));
}

.book-page {
  position: relative;
  width: 50%;
  height: 100%;
  padding: 43px 16px 15px;
  background: linear-gradient(145deg, #fff, #E9F5FF);
}
.book-page-left { border-radius: 9px 3px 4px 12px; transform: skewY(4deg); }
.book-page-right { border-radius: 3px 9px 12px 4px; transform: skewY(-4deg); }
.book-page-left::after, .book-page-right::after { position: absolute; content: ""; top: 0; bottom: 0; width: 1px; background: rgba(6, 59, 120, .08); }
.book-page-left::after { right: 0; }
.book-page-right::after { left: 0; }
.book-line { display: block; height: 3px; margin: 0 0 8px; border-radius: 5px; background: #C6DAEB; }
.book-line.short { width: 62%; }
.book-line.medium { width: 76%; }
.book-spark { position: absolute; top: 15px; left: 16px; color: var(--blue); font-size: 17px; }

.art-card {
  position: absolute;
  z-index: 2;
  width: 180px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 24px rgba(2, 27, 62, .15);
}
.art-card-back { left: 8px; bottom: 28px; transform: rotate(4deg); }
.art-card-kicker { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.progress-track { display: block; height: 5px; margin: 10px 0 8px; overflow: hidden; border-radius: 6px; background: #EAF0F6; }
.progress-track span { display: block; width: 72%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--sky)); }
.art-card-caption { color: #58667A; font-size: 9px; }
.art-badge { position: absolute; z-index: 2; right: 4px; top: 32px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.58); border-radius: 30px; background: linear-gradient(120deg, var(--navy), var(--blue)); color: var(--white); box-shadow: 0 8px 20px rgba(2,27,62,.2); font-size: 10px; font-weight: 700; transform: rotate(4deg); }
.art-badge span { margin-right: 4px; color: var(--sky); }
.welcome-footer { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.7); font-size: 11px; }

.form-panel { display: grid; place-items: center; padding: 54px 58px; }
.form-wrap { width: min(100%, 390px); animation: fade-in .65s .1s both; }
.form-heading { margin-bottom: 27px; }
.form-overline { margin-bottom: 10px; color: var(--blue); font-size: 9px; letter-spacing: 1.2px; }
.form-heading h2 { margin: 0; font: 700 27px/1.3 "Segoe UI", Arial, sans-serif; letter-spacing: -.8px; }
.form-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border: 1px solid #E8EDF3; border-radius: 11px; background: #F5F7FA; }
.login-tab { min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; background: transparent; color: #687487; cursor: pointer; font-size: 12px; font-weight: 600; transition: background .2s, color .2s, box-shadow .2s; }
.login-tab svg { width: 17px; height: 17px; fill: currentColor; }
.login-tab.is-active { color: var(--navy); background: var(--white); box-shadow: 0 2px 6px rgba(16, 43, 74, .1); }
.login-tab:focus-visible, .forgot-link:focus-visible, .visibility-toggle:focus-visible, .submit-button:focus-visible { outline: 3px solid rgba(22, 136, 232, .35); outline-offset: 2px; }
.login-form { margin-top: 25px; }
.field-group { margin-bottom: 18px; }
.field-group label { display: block; margin-bottom: 8px; color: #283449; font-size: 12px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 48px; padding: 0 44px 0 42px; border: 1px solid #DCE3EB; border-radius: 8px; outline: none; background: #fff; color: var(--text); font-size: 12px; transition: border-color .2s, box-shadow .2s; }
.input-wrap input::placeholder { color: #A3ADBA; }
.input-wrap input:hover { border-color: #B8C6D5; }
.input-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 136, 232, .12); }
.field-icon { position: absolute; z-index: 1; left: 13px; top: 15px; width: 17px; height: 17px; fill: #91A0B1; pointer-events: none; }
.visibility-toggle { position: absolute; right: 7px; top: 5px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #8794A5; cursor: pointer; }
.visibility-toggle:hover { color: var(--navy); background: #F3F7FB; }
.visibility-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.field-error { min-height: 0; margin: 0; color: var(--error); font-size: 11px; }
.field-error:not(:empty) { margin-top: 6px; }
.input-wrap input[aria-invalid="true"] { border-color: var(--error); }

.form-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 1px 0 18px; }
.remember-option { display: inline-flex; align-items: center; gap: 8px; color: #526074; cursor: pointer; font-size: 11px; }
.remember-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.custom-checkbox { width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid #C7D1DC; border-radius: 4px; background: #fff; transition: all .15s; }
.remember-option input:checked + .custom-checkbox { border-color: var(--blue); background: var(--blue); }
.remember-option input:checked + .custom-checkbox::after { width: 7px; height: 4px; border-bottom: 1.5px solid white; border-left: 1.5px solid white; content: ""; transform: translateY(-1px) rotate(-45deg); }
.remember-option input:focus-visible + .custom-checkbox { outline: 3px solid rgba(22, 136, 232, .3); outline-offset: 2px; }
.forgot-link { padding: 4px 0; border: 0; background: none; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 600; }
.forgot-link:hover { color: var(--navy); text-decoration: underline; }

.form-notice { display: none; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #C9E5FB; border-radius: 7px; background: #F1F8FE; color: #17466F; font-size: 11px; line-height: 1.5; }
.form-notice.is-visible { display: block; }
.form-notice.is-error { border-color: #F0D8D5; background: #FFFAF9; color: #A63C36; }
.submit-button { width: 100%; height: 49px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 8px; background: linear-gradient(100deg, var(--navy), var(--blue)); box-shadow: 0 6px 13px rgba(6, 59, 120, .18); color: #fff; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .18s, box-shadow .18s, filter .18s; }
.submit-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform .18s; }
.submit-button:hover { box-shadow: 0 9px 19px rgba(6, 59, 120, .24); filter: brightness(1.06); transform: translateY(-1px); }
.submit-button:hover svg { transform: translateX(3px); }
.submit-button:active { transform: translateY(0); }
.security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 22px 0 0; color: #7A8797; font-size: 10px; }
.security-note svg { width: 14px; height: 14px; fill: var(--blue); }
.form-footer { margin: 24px 0 0; color: #8993A2; text-align: center; font-size: 11px; }
.support-link { color: var(--blue); cursor: pointer; font-size: inherit; font-weight: 600; text-decoration: none; }
.support-link:hover { color: var(--navy); text-decoration: underline; }
.support-link:focus-visible { outline: 3px solid rgba(22, 136, 232, .35); outline-offset: 2px; }

@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1400px) { .login-shell { width: min(1160px, 100%); min-height: 710px; } }
@media (max-width: 900px) {
  body { padding: 24px; }
  .login-shell { min-height: 650px; }
  .welcome-panel { padding: 34px 32px 24px; }
  .welcome-copy { margin-top: 62px; }
  .form-panel { padding: 44px 34px; }
  .art-card-back { left: -7px; }
  .art-badge { right: -7px; }
}
@media (max-width: 680px) {
  body { min-height: 100svh; display: block; padding: 0; background: var(--white); }
  .login-shell { width: 100%; min-height: 100svh; display: flex; flex-direction: column; border: 0; border-radius: 0; box-shadow: none; }
  .welcome-panel { min-height: 288px; flex: none; padding: 20px 26px 24px; }
  .learning-art, .welcome-footer { display: none; }
  .brand-lockup { width: 60px; height: 60px; border-radius: 9px; }
  .welcome-copy { margin: 12px 0 0; }
  .eyebrow { font-size: 8px; }
  .welcome-copy h1 { margin: 14px 0 7px; font-size: 29px; letter-spacing: -1px; }
  .tagline { font-size: 13px; }
  .welcome-description { max-width: 380px; margin-top: 6px; font-size: 11px; }
  .form-panel { flex: 1; display: block; padding: 25px 26px 32px; }
  .form-wrap { width: min(100%, 400px); margin: 0 auto; }
  .form-heading { margin-bottom: 20px; }
  .form-heading h2 { font-size: 24px; }
  .login-form { margin-top: 20px; }
}
@media (max-width: 380px) {
  .welcome-panel { padding-right: 21px; padding-left: 21px; }
  .form-panel { padding-right: 21px; padding-left: 21px; }
  .form-options { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
