/* ============================================================
   Student Login — Premium Split-Screen
   ============================================================ */

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  background: #0f172a;
  overflow-x: hidden;
}

.lgn-wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ================= LEFT PANEL ================= */
.lgn-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 500px at 15% 10%, rgba(168,85,247,.35), transparent 60%),
    radial-gradient(600px 500px at 90% 90%, rgba(99,102,241,.45), transparent 55%),
    linear-gradient(140deg, #1e1b4b 0%, #312e81 45%, #4c1d95 100%);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 3.5rem 3rem;
}
.lgn-panel-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.lgn-brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  margin-bottom: 3rem;
}
.lgn-logo { display: grid; place-items: center; }
.lgn-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.lgn-brand-text strong {
  font-family: 'Baloo 2', system-ui;
  font-size: 1.25rem;
  color: #fff;
  font-weight: 800;
}
.lgn-brand-text small {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  font-weight: 700;
}

.lgn-hero h1 {
  font-family: 'Baloo 2', system-ui;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: #fff;
  letter-spacing: -.01em;
}
.lgn-hero h1 span {
  background: linear-gradient(135deg, #fbbf24, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lgn-hero > p {
  color: rgba(255,255,255,.78);
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0 0 2.25rem;
  max-width: 40ch;
}

.lgn-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  gap: 1rem;
}
.lgn-features li {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: .9rem 1.1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .25s, background .25s;
}
.lgn-features li:hover {
  transform: translateX(6px);
  background: rgba(255,255,255,.1);
}
.lgn-feat-icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251,191,36,.25), rgba(244,114,182,.25));
  font-size: 1.25rem;
}
.lgn-features li div { display: flex; flex-direction: column; line-height: 1.3; }
.lgn-features li strong {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
}
.lgn-features li small {
  color: rgba(255,255,255,.65);
  font-size: .82rem;
}

.lgn-panel-foot {
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  margin: 0;
  letter-spacing: .02em;
}

/* Decorative blobs */
.lgn-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
}
.lgn-blob-1 {
  width: 300px; height: 300px;
  background: #a855f7;
  top: -80px; right: -80px;
  animation: lgnFloat 9s ease-in-out infinite;
}
.lgn-blob-2 {
  width: 260px; height: 260px;
  background: #6366f1;
  bottom: -60px; left: -60px;
  animation: lgnFloat 11s ease-in-out infinite reverse;
}
@keyframes lgnFloat {
  0%,100% { transform: translate(0,0); }
  50%     { transform: translate(20px, -25px); }
}

/* ================= RIGHT FORM SIDE ================= */
.lgn-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  padding: 3rem 2rem;
  min-height: 100dvh;
}

.lgn-form-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 22px;
  padding: 2.5rem 2.25rem 2rem;
  box-shadow:
    0 1px 3px rgba(15,23,42,.04),
    0 24px 60px -22px rgba(79,70,229,.28);
  border: 1px solid #eef2ff;
  animation: lgnSlideUp .55s cubic-bezier(.2,.8,.2,1);
}
@keyframes lgnSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lgn-form-head { margin-bottom: 1.75rem; text-align: center; }
.lgn-badge {
  display: inline-block;
  padding: .3rem .85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(168,85,247,.12));
  border: 1px solid rgba(99,102,241,.25);
  color: #4f46e5;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  margin-bottom: .85rem;
}
.lgn-form-head h2 {
  font-family: 'Baloo 2', system-ui;
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 .35rem;
  color: #0f172a;
}
.lgn-form-head p {
  color: #64748b;
  font-size: .92rem;
  margin: 0;
}

/* Alerts */
.lgn-alert {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid;
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.25);
  color: #b91c1c;
}
.lgn-alert-warn {
  background: rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.3);
  color: #b45309;
}
.lgn-alert-hint {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1rem;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 1rem;
  background: rgba(99,102,241,.06);
  border: 1px solid rgba(99,102,241,.15);
  color: #4f46e5;
}

/* Form */
.lgn-form { display: grid; gap: 1.15rem; }

.lgn-field { display: grid; gap: .45rem; }
.lgn-field label {
  font-size: .82rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: .02em;
}

.lgn-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.lgn-input-icon {
  position: absolute;
  left: .95rem;
  display: grid;
  place-items: center;
  color: #94a3b8;
  pointer-events: none;
  transition: color .2s;
}
.lgn-input-wrap input {
  width: 100%;
  padding: .95rem 2.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-size: .95rem;
  color: #0f172a;
  font-family: inherit;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.lgn-input-wrap input::placeholder { color: #94a3b8; }
.lgn-input-wrap input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,.14);
}
.lgn-input-wrap:focus-within .lgn-input-icon { color: #6366f1; }

/* Password toggle */
.lgn-toggle-pw {
  position: absolute;
  right: .75rem;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.lgn-toggle-pw:hover { color: #4f46e5; background: rgba(99,102,241,.08); }

.lgn-error {
  font-size: .8rem;
  color: #b91c1c;
  font-weight: 600;
}

/* Big submit button */
.lgn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  margin-top: .35rem;
  padding: 1.05rem 1.25rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(99,102,241,.75);
  transition: transform .18s, box-shadow .18s, filter .18s;
  position: relative;
  overflow: hidden;
  min-height: 52px;
}
.lgn-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  opacity: 0;
  transition: opacity .3s;
}
.lgn-btn > * { position: relative; z-index: 1; }
.lgn-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px rgba(99,102,241,.9);
}
.lgn-btn:hover:not(:disabled)::before { opacity: 1; }
.lgn-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  filter: grayscale(.3);
}

/* Divider */
.lgn-divider {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-size: .82rem;
  font-weight: 600;
}
.lgn-divider::before,
.lgn-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Ghost button */
.lgn-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .18s;
  min-height: 52px;
}
.lgn-btn-ghost:hover {
  border-color: #a5b4fc;
  background: #eef2ff;
  color: #4f46e5;
  transform: translateY(-2px);
}

/* Footer */
.lgn-form-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  font-size: .85rem;
  color: #94a3b8;
}
.lgn-form-foot a {
  color: #6366f1;
  font-weight: 700;
  text-decoration: none;
}
.lgn-form-foot a:hover { color: #a855f7; }

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .lgn-wrap {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .lgn-panel {
    padding: 2.5rem 2rem;
    min-height: auto;
  }
  .lgn-hero h1 { font-size: 1.9rem; }
  .lgn-features { display: none; }
  .lgn-panel-foot { margin-top: 1rem; }
  .lgn-blob { display: none; }
  .lgn-form-side {
    padding: 2.5rem 1.5rem 3rem;
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .lgn-panel { padding: 2rem 1.5rem; }
  .lgn-brand { margin-bottom: 1.75rem; }
  .lgn-hero h1 { font-size: 1.55rem; }
  .lgn-hero > p { font-size: .92rem; margin-bottom: 1.25rem; }

  .lgn-form-side { padding: 1.75rem 1.25rem 2.5rem; }
  .lgn-form-card { padding: 1.85rem 1.35rem 1.5rem; border-radius: 18px; }
  .lgn-form-head h2 { font-size: 1.35rem; }
  .lgn-form-head p { font-size: .85rem; }
  .lgn-input-wrap input { padding: .85rem 2.65rem; font-size: .92rem; }

  .lgn-form-foot {
    flex-wrap: wrap;
    font-size: .8rem;
  }
}