.login-page {
  min-height: 100vh;
  display: flex;
  background: white;
}

.login-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left Panel */
.login-left {
  width: 45%;
  background: linear-gradient(135deg, #1E1B4B 0%, #4C1D95 45%, #7C3AED 100%);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.login-brand-icon {
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.15);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: white;
  border: 1px solid rgba(255,255,255,0.25);
}

.login-brand-text h1 {
  color: white;
  font-size: 36px; font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.login-brand-text span {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}

.login-tagline {
  color: rgba(255,255,255,0.85);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  margin: 24px 0 40px;
  max-width: 320px;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white;
  flex-shrink: 0;
}

.feature-item span {
  color: rgba(255,255,255,0.8);
  font-size: 14px; font-weight: 500;
}

/* Decorative shapes */
.shape { position: absolute; border-radius: 50%; }
.shape-1 { width: 320px; height: 320px; bottom: -120px; right: -120px; background: rgba(255,255,255,0.04); }
.shape-2 { width: 180px; height: 180px; top: 30px; right: -30px; background: rgba(255,255,255,0.06); }
.shape-3 { width: 90px; height: 90px; top: 180px; right: 120px; background: rgba(255,255,255,0.05); }
.shape-4 { width: 60px; height: 60px; bottom: 200px; left: -20px; background: rgba(168,85,247,0.3); }

/* Right Panel */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  background: white;
}

.login-form-wrap {
  width: 100%;
  max-width: 420px;
}

.form-top-icon {
  width: 52px; height: 52px;
  background: var(--purple-pale);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--purple);
  margin-bottom: 20px;
}

.login-form-wrap h2 {
  font-size: 28px; font-weight: 800;
  color: var(--text); margin: 0 0 6px;
}

.login-sub { color: var(--text-muted); font-size: 14px; margin: 0 0 28px; }

/* Role Selector */
.role-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 4px; gap: 4px;
  margin-bottom: 28px;
}

.role-tab {
  flex: 1; padding: 10px 8px;
  border: none; background: transparent;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

.role-tab.active {
  background: var(--grad-purple);
  color: white;
  box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

.role-tab[data-role="teacher"].active { background: var(--grad-orange); box-shadow: 0 4px 12px rgba(249,115,22,0.3); }
.role-tab[data-role="student"].active { background: var(--grad-green);  box-shadow: 0 4px 12px rgba(16,185,129,0.3); }

/* Form */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 7px;
}

.input-wrap {
  position: relative;
  display: flex; align-items: center;
}

.input-wrap .input-icon {
  position: absolute; left: 14px;
  color: var(--text-muted); font-size: 14px;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px; color: var(--text);
  background: white; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.08);
}

.toggle-pw {
  position: absolute; right: 14px;
  background: none; border: none;
  cursor: pointer; color: var(--text-muted);
  padding: 0; font-size: 15px;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--purple); }

.error-msg {
  background: #FEF2F2; color: #DC2626;
  padding: 12px 14px; border-radius: 10px;
  font-size: 13px; margin-bottom: 16px;
  border: 1px solid #FECACA;
  display: flex; align-items: center; gap: 8px;
}

.success-msg {
  background: #F0FDF4; color: #16A34A;
  padding: 12px 14px; border-radius: 10px;
  font-size: 13px; margin-bottom: 16px;
  border: 1px solid #BBF7D0;
  display: flex; align-items: center; gap: 8px;
}

.btn-login {
  width: 100%; padding: 14px;
  background: var(--grad-purple);
  color: white; border: none;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.2s;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}
.btn-login:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-login:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-login.teacher { background: var(--grad-orange); box-shadow: 0 4px 16px rgba(249,115,22,0.35); }
.btn-login.student { background: var(--grad-green);  box-shadow: 0 4px 16px rgba(16,185,129,0.35); }

.login-footer {
  text-align: center;
  color: var(--text-muted); font-size: 13px;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .login-left { width: 40%; padding: 40px 30px; }
  .login-tagline { font-size: 18px; }
}

@media (max-width: 640px) {
  .login-left { display: none; }
  .login-right { padding: 40px 24px; }
}
