/* ============================================================
   login.css — Login page styles
   ============================================================ */

/* --- Page base --- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px;
}

/* --- Background effects --- */
.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}

.login-bg__glow--1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  left: -150px;
  animation: glowPulse 8s ease-in-out infinite alternate;
}

.login-bg__glow--2 {
  width: 400px;
  height: 400px;
  background: #3b82f6;
  bottom: -100px;
  right: -100px;
  animation: glowPulse 10s ease-in-out infinite alternate-reverse;
  opacity: 0.07;
}

@keyframes glowPulse {
  0%   { opacity: 0.08; transform: scale(1); }
  100% { opacity: 0.14; transform: scale(1.08); }
}

/* Dot grid */
.login-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* --- Wrapper --- */
.login-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
  animation: loginFadeIn 400ms ease;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Logo --- */
.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.login-logo__mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.55));
}

.login-logo__mark svg {
  width: 32px;
  height: 32px;
}

.login-logo__text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-primary);
}

/* --- Tagline --- */
.login-tagline {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* --- Card --- */
.login-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(37, 99, 235, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-card__title {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: -4px;
}

/* --- Error alert --- */
.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--danger);
}

.login-error svg {
  flex-shrink: 0;
}

/* --- Submit button --- */
.login-submit {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 4px;
  position: relative;
}

.login-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: all;
}

/* Spinner inside button */
.login-spinner {
  animation: spinRotate 0.8s linear infinite;
}

@keyframes spinRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Apply link --- */
.login-apply {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: -4px;
}

.login-apply a {
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.login-apply a:hover {
  color: var(--accent-light);
}

/* --- Footer --- */
.login-footer {
  margin-top: 24px;
  text-align: center;
}

.login-footer__tagline {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .login-body {
    padding: 16px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .login-card {
    padding: 24px 20px;
  }
}
