.login-page { min-height: 100vh; background: #0b0f24; overflow-x: hidden; }

/* ---------- Animated background ---------- */
.login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 10% 10%, #312e81 0%, transparent 60%),
              radial-gradient(900px 600px at 90% 80%, #581c87 0%, transparent 60%),
              linear-gradient(135deg, #0b0f24 0%, #111736 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: floatSlow 18s ease-in-out infinite;
}
.blob-1 { width: 460px; height: 460px; background: #6366f1; top: -120px; left: -80px; }
.blob-2 { width: 380px; height: 380px; background: #d946ef; bottom: -120px; left: 38%; animation-delay: -6s; animation-duration: 22s; }
.blob-3 { width: 300px; height: 300px; background: #06b6d4; top: 30%; right: -60px; animation-delay: -12s; opacity: .35; }
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}

/* ---------- Hero ---------- */
.login-hero {
  position: relative;
  padding: 48px 56px;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gradient-primary);
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
  box-shadow: 0 10px 30px -8px rgba(139, 92, 246, .8);
  color: #fff;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.brand-name span { color: #c4b5fd; }
.brand-tag { font-size: 12px; color: rgba(255, 255, 255, .6); }

.hero-copy { margin: auto 0; max-width: 540px; padding: 40px 0; }
.hero-copy h1 {
  color: #fff;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1.12;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero-highlight {
  background: linear-gradient(90deg, #a5b4fc, #f0abfc, #67e8f9, #a5b4fc);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s linear infinite;
}
.hero-copy p { color: rgba(255, 255, 255, .72); font-size: 16px; line-height: 1.7; margin-bottom: 26px; }
.hero-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .88);
  font-weight: 500;
  animation: fadeUp .6s var(--ease) both;
}
.hero-features i {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #c4b5fd;
}

.hero-cards { position: absolute; right: 30px; bottom: 90px; width: 280px; height: 260px; pointer-events: none; }
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-width: 230px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
  color: #fff;
  animation: float 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 13.5px; }
.float-card small { color: rgba(255, 255, 255, .65); font-size: 11.5px; }
.fc-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; }
.fc-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: auto; box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.dot-primary { background: #818cf8; }
.dot-success { background: #34d399; }
.card-a { top: 0; right: 40px; }
.card-b { top: 88px; right: -10px; animation-delay: -2s; }
.card-c { top: 176px; right: 70px; animation-delay: -4s; }

/* ---------- Form panel ---------- */
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.login-card {
  width: min(430px, 100%);
  background: rgba(255, 255, 255, .97);
  border-radius: 24px;
  padding: 38px 34px 28px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .5) inset;
  animation: popIn .7s var(--ease-spring) .15s both;
  position: relative;
}
.login-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .8), rgba(217, 70, 239, .6), rgba(6, 182, 212, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.login-card-head { text-align: center; margin-bottom: 26px; }
.lock-badge {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: var(--shadow-primary);
  animation: float 4s ease-in-out infinite;
}
.login-card-head h2 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.login-card-head p { color: var(--muted); margin: 0; }

.field { margin-bottom: 18px; animation: fadeUp .6s var(--ease) both; }
.field:nth-of-type(1) { animation-delay: .35s; }
.field:nth-of-type(2) { animation-delay: .45s; }
.login-page .form-control-lg { font-size: 15px; padding-top: 12px; padding-bottom: 12px; border-radius: 12px; }
.password-wrap .form-control { padding-right: 46px; }
.toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: all .2s;
}
.toggle-password:hover { background: var(--primary-50); color: var(--primary); }
.caps-hint { font-size: 12px; color: var(--warning); opacity: 0; transition: opacity .2s; }
.caps-hint.show { opacity: 1; }

.login-error {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--danger-50);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
  animation: fadeDown .3s var(--ease);
}
.login-error.show { display: flex; }

.login-submit {
  height: 50px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  animation: fadeUp .6s var(--ease) .55s both;
}
.login-submit i { transition: transform .3s var(--ease); }
.login-submit:hover i { transform: translateX(4px); }
.login-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  animation: shine 3.5s ease-in-out 1.5s infinite;
}
@keyframes shine { 0% { left: -120%; } 40%, 100% { left: 160%; } }

.login-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 12.5px;
  display: flex;
  gap: 8px;
  animation: fadeIn .6s .7s both;
}
.login-copyright { margin-top: 22px; font-size: 12px; color: rgba(255, 255, 255, .45); }

.login-card.success { animation: successOut .6s var(--ease) forwards; }
@keyframes successOut { to { transform: scale(.96) translateY(-10px); opacity: 0; filter: blur(4px); } }

@media (max-width: 991.98px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 24px 0; }
  .hero-copy, .hero-cards { display: none; }
  .login-panel { padding-top: 24px; justify-content: flex-start; }
}
@media (max-width: 480px) {
  .login-card { padding: 30px 22px 22px; border-radius: 20px; }
}
