
/* ============================================================
   FACULTY LMS - PREMIUM ANIMATED LOGIN PAGE
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

body.login-page {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0e1a;
  overflow: hidden;
  position: relative;
}

.login-bg {
  position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(135deg, #0a0e1a 0%, #0f1b35 40%, #0d1a2e 100%);
  overflow: hidden;
}
.login-bg::before {
  content: ''; position: absolute; top: -40%; left: -20%;
  width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(59,130,246,0.18) 0%, transparent 70%);
  animation: bgPulse1 8s ease-in-out infinite alternate;
}
.login-bg::after {
  content: ''; position: absolute; bottom: -30%; right: -10%;
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
  animation: bgPulse2 10s ease-in-out infinite alternate;
}
@keyframes bgPulse1 { from { transform: translate(0,0) scale(1); } to { transform: translate(5%,8%) scale(1.12); } }
@keyframes bgPulse2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-6%,-4%) scale(1.1); } }

.grid-lines {
  position: fixed; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift { 0% { background-position: 0 0; } 100% { background-position: 60px 60px; } }

.orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 1; filter: blur(60px); animation: orbFloat ease-in-out infinite; }
.orb-1 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(59,130,246,0.22), transparent); top: -100px; left: -80px; animation-duration: 12s; }
.orb-2 { width: 280px; height: 280px; background: radial-gradient(circle, rgba(139,92,246,0.18), transparent); bottom: -60px; right: -60px; animation-duration: 15s; animation-direction: reverse; }
.orb-3 { width: 200px; height: 200px; background: radial-gradient(circle, rgba(16,185,129,0.12), transparent); top: 40%; right: 10%; animation-duration: 18s; }
@keyframes orbFloat { 0%, 100% { transform: translate(0,0); } 33% { transform: translate(30px,-20px); } 66% { transform: translate(-20px,15px); } }

.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.particle { position: absolute; border-radius: 50%; opacity: 0; animation: floatUp linear infinite; }
@keyframes floatUp { 0% { transform: translateY(100vh) scale(0); opacity: 0; } 10% { opacity: 0.6; } 90% { opacity: 0.3; } 100% { transform: translateY(-10vh) scale(1); opacity: 0; } }

.login-wrapper {
  position: relative; z-index: 10; width: 100%; max-width: 460px; padding: 1.5rem;
  animation: slideUp 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-radius: 18px;
  font-size: 2rem; margin-bottom: 1rem;
  box-shadow: 0 0 0 8px rgba(59,130,246,0.12), 0 8px 32px rgba(59,130,246,0.35);
  animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(59,130,246,0.12), 0 8px 32px rgba(59,130,246,0.35); }
  50% { box-shadow: 0 0 0 14px rgba(59,130,246,0.06), 0 12px 48px rgba(59,130,246,0.5); }
}
.login-logo h1 { font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -0.03em; line-height: 1.1; }
.login-logo p { font-size: 0.82rem; color: rgba(255,255,255,0.45); margin-top: 0.3rem; letter-spacing: 0.05em; text-transform: uppercase; }

.login-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 24px;
  padding: 2.25rem; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
.login-card-title { font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 0.3rem; }
.login-card-sub { font-size: 0.82rem; color: rgba(255,255,255,0.4); margin-bottom: 1.75rem; }

.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1.75rem; background: rgba(0,0,0,0.3); border-radius: 12px; padding: 0.3rem; }
.role-tab { display: flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.6rem; border-radius: 9px; border: none; background: transparent; color: rgba(255,255,255,0.45); font-size: 0.82rem; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer; transition: all 0.25s ease; }
.role-tab:hover { color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.05); }
.role-tab.active { background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; box-shadow: 0 4px 16px rgba(59,130,246,0.35); }
.role-tab .tab-icon { font-size: 1.1rem; }

.field-group { margin-bottom: 1rem; }
.field-label { display: block; font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.55); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.45rem; }
.field-wrap { position: relative; }
.field-icon { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); font-size: 1rem; color: rgba(255,255,255,0.3); pointer-events: none; transition: color 0.2s; }
.field-wrap:focus-within .field-icon { color: rgba(99,102,241,0.8); }

.login-input { width: 100%; padding: 0.82rem 1rem 0.82rem 2.75rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: #fff; font-size: 0.92rem; font-family: 'Inter', sans-serif; outline: none; transition: all 0.25s ease; }
.login-input::placeholder { color: rgba(255,255,255,0.2); }
.login-input:focus { border-color: rgba(59,130,246,0.6); background: rgba(59,130,246,0.07); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

.pw-toggle { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.3); font-size: 1rem; padding: 0.2rem; transition: color 0.2s; }
.pw-toggle:hover { color: rgba(255,255,255,0.7); }

.credential-hint { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: rgba(255,255,255,0.3); margin-top: 0.45rem; padding: 0.35rem 0.65rem; background: rgba(255,255,255,0.04); border-radius: 6px; border: 1px solid rgba(255,255,255,0.06); }

.login-error { display: none; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); border-radius: 10px; color: #fca5a5; font-size: 0.82rem; margin-bottom: 1rem; }
.login-error.show { display: flex; animation: shakeX 0.4s ease; }
@keyframes shakeX { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }

.login-btn { width: 100%; padding: 0.92rem; background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%); border: none; border-radius: 13px; color: #fff; font-size: 0.95rem; font-weight: 700; font-family: 'Inter', sans-serif; cursor: pointer; position: relative; overflow: hidden; transition: all 0.25s ease; box-shadow: 0 6px 24px rgba(59,130,246,0.4); letter-spacing: 0.01em; margin-top: 1.25rem; }
.login-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent); opacity: 0; transition: opacity 0.25s; }
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(59,130,246,0.55); }
.login-btn:hover::before { opacity: 1; }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-btn.loading .btn-text { display: none; }
.login-btn.loading .btn-spinner { display: block; }

.login-footer { margin-top: 1.5rem; text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.2); }
.login-footer strong { color: rgba(255,255,255,0.35); }

.login-success-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,14,26,0.95); z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; flex-direction: column; gap: 1rem; }
.login-success-overlay.show { opacity: 1; pointer-events: all; }
.success-icon { width: 80px; height: 80px; background: linear-gradient(135deg, #10b981, #059669); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; animation: successPop 0.5s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes successPop { from { transform: scale(0) rotate(-45deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.success-text { color: #fff; font-size: 1.15rem; font-weight: 700; animation: fadeInUp 0.5s 0.2s both; }
.success-sub { color: rgba(255,255,255,0.45); font-size: 0.82rem; animation: fadeInUp 0.5s 0.3s both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 500px) { .login-card { padding: 1.5rem; border-radius: 18px; } .login-wrapper { padding: 1rem; } }

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}
.error-icon {
  flex-shrink: 0;
  stroke: #ef4444;
}
.login-card-footer-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1.5rem;
  padding: 0.75rem 0.95rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.45;
}
.login-card-footer-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: rgba(99, 102, 241, 0.85);
}