:root {
  --lp-purple-950: #17123f;
  --lp-purple-900: #20185a;
  --lp-purple-800: #2a1f78;
  --lp-purple-700: #30297f;
  --lp-purple-600: #4b3fb3;
  --lp-purple-500: #6355d8;
  --lp-purple-100: #efedff;
  --lp-accent: #fbc02d;
  --lp-text: #252238;
  --lp-muted: #6f6b85;
  --lp-border: #e8e5f3;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Manrope', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  color: var(--lp-text);
  background:
    radial-gradient(circle at 12% 15%, rgba(251, 192, 45, .20), transparent 24rem),
    radial-gradient(circle at 88% 80%, rgba(99, 85, 216, .32), transparent 28rem),
    linear-gradient(135deg, var(--lp-purple-950), var(--lp-purple-800) 50%, var(--lp-purple-700));
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
}

.login-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 4.5rem);
  color: #fff;
  overflow: hidden;
}

.login-aside::before,
.login-aside::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  pointer-events: none;
}

.login-aside::before {
  width: 28rem;
  height: 28rem;
  right: -10rem;
  top: -9rem;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 65%);
}

.login-aside::after {
  width: 18rem;
  height: 18rem;
  left: -7rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(251,192,45,.12), transparent 65%);
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.brand-lockup img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .25);
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-role {
  font-size: .78rem;
  color: rgba(255, 255, 255, .62);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  margin-top: .15rem;
}

.aside-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: 4rem 0;
}

.aside-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lp-accent);
  margin-bottom: 1.1rem;
}

.aside-copy .eyebrow::before {
  content: '';
  width: 34px;
  height: 2px;
  border-radius: 99px;
  background: var(--lp-accent);
}

.aside-copy h1 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  margin: 0 0 1.1rem;
  font-weight: 800;
}

.aside-copy h1 span {
  color: var(--lp-accent);
}

.aside-copy p {
  font-size: .98rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, .66);
  max-width: 29rem;
}

.aside-footer {
  position: relative;
  z-index: 1;
  font-size: .78rem;
  color: rgba(255, 255, 255, .42);
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.login-card {
  width: min(100%, 440px);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 26px;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  box-shadow: 0 30px 90px rgba(10, 6, 40, .38);
  backdrop-filter: blur(14px);
}

.login-card h2 {
  margin: 0 0 .35rem;
  font-size: 1.55rem;
  letter-spacing: -.035em;
  font-weight: 800;
  color: var(--lp-purple-950);
}

.login-card .subtitle {
  margin: 0 0 1.6rem;
  color: var(--lp-muted);
  font-size: .9rem;
}

.form-field { margin-bottom: 1.05rem; }

.form-field label {
  display: block;
  margin-bottom: .45rem;
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #4d4964;
}

.input-wrap { position: relative; }

.input-wrap .field-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a7a1bb;
  font-size: .95rem;
  pointer-events: none;
}

.form-field input {
  width: 100%;
  height: 48px;
  border-radius: 13px;
  border: 1px solid var(--lp-border);
  background: #fbfaff;
  padding: 0 3rem 0 2.8rem;
  font: inherit;
  font-size: .92rem;
  color: var(--lp-text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.form-field input:focus {
  border-color: var(--lp-purple-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 85, 216, .13);
}

.form-field input.is-invalid {
  border-color: #d95a7a;
  box-shadow: 0 0 0 4px rgba(217, 90, 122, .10);
}

.field-error {
  margin-top: .38rem;
  font-size: .76rem;
  color: #b23355;
  font-weight: 600;
}

.toggle-password {
  position: absolute;
  right: .7rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #8d87a4;
  cursor: pointer;
  padding: .35rem;
  border-radius: 8px;
}

.toggle-password:hover { color: var(--lp-purple-600); background: var(--lp-purple-100); }

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .2rem 0 1.25rem;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: var(--lp-muted);
  font-weight: 600;
}

.remember input { accent-color: var(--lp-purple-600); width: 16px; height: 16px; }

.forgot-link {
  color: var(--lp-purple-600);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}

.forgot-link:hover { text-decoration: underline; }

.btn-login {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(115deg, var(--lp-purple-600), var(--lp-purple-500));
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(99, 85, 216, .32);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 18px 32px rgba(99, 85, 216, .38);
}

.btn-login:active { transform: translateY(0); }

.alert {
  border: 0;
  border-radius: 12px;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  font-size: .84rem;
  font-weight: 600;
}

.alert-danger { background: #fde8ee; color: #a52d4f; }
.alert-success { background: #e4f7ec; color: #187b43; }
.alert-warning { background: #fff3cd; color: #7a5a00; }
.alert-info { background: var(--lp-purple-100); color: var(--lp-purple-800); }

.alert ul { margin: 0; padding-left: 1.1rem; }

.small-note {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--lp-border);
  text-align: center;
  font-size: .75rem;
  color: #9a94ae;
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-panel { min-height: 100vh; }
}
