:root {
  --background: #0d0d14;
  --foreground: #f1f5f9;
  --muted: rgba(226, 232, 240, 0.68);
  --muted-2: rgba(226, 232, 240, 0.52);
  --purple: #a855f7;
  --purple-2: #7c3aed;
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;
  --pink: #f472b6;
  --radius: 1.25rem;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.22), transparent 26%),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 20%),
    radial-gradient(circle at 20% 80%, rgba(168, 85, 247, 0.12), transparent 20%),
    linear-gradient(180deg, #090910 0%, #0d0f18 45%, #0f1320 100%);
  color: var(--foreground);
  letter-spacing: -0.01em;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

a {
  text-decoration: none;
}

.login-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .52;
  pointer-events: none;
  animation: orbFloat 10s ease-in-out infinite;
}

.orb-purple { background: radial-gradient(circle, rgba(124,58,237,.85), rgba(124,58,237,.34) 45%, transparent 72%); }
.orb-cyan { background: radial-gradient(circle, rgba(34,211,238,.82), rgba(34,211,238,.26) 45%, transparent 72%); }
.orb-indigo { background: radial-gradient(circle, rgba(99,102,241,.76), rgba(99,102,241,.22) 45%, transparent 72%); }

.orb-xl { width: 42rem; height: 42rem; top: -12%; left: -10%; }
.orb-lg { width: 32rem; height: 32rem; }
.orb-md { width: 22rem; height: 22rem; }
.orb-left-top { left: -8%; top: -8%; }
.orb-right-top { right: -8%; top: -8%; left: auto; }
.orb-mid-right { right: 8%; top: 40%; left: auto; }
.orb-bottom-left { left: -10%; bottom: -14%; top: auto; }

@keyframes orbFloat {
  0%, 100% { transform: scale(1) translate3d(0,0,0); }
  50% { transform: scale(1.12) translate3d(18px,-30px,0); }
}

.login-particle {
  position: absolute;
  border-radius: 50%;
  opacity: .34;
  animation: floatParticle 6s ease-in-out infinite;
}

.login-particle:nth-child(even) { background: rgba(34,211,238,.45); }
.login-particle:nth-child(odd) { background: rgba(168,85,247,.5); }

.p-1 { width: 4px; height: 4px; left: 8%; top: 15%; animation-delay: .3s; }
.p-2 { width: 2px; height: 2px; left: 17%; top: 34%; animation-delay: .8s; }
.p-3 { width: 2px; height: 2px; left: 26%; top: 54%; animation-delay: 1.2s; }
.p-4 { width: 4px; height: 4px; left: 35%; top: 75%; animation-delay: 1.6s; }
.p-5 { width: 2px; height: 2px; left: 53%; top: 24%; animation-delay: 2s; }
.p-6 { width: 2px; height: 2px; left: 67%; top: 47%; animation-delay: 2.4s; }
.p-7 { width: 4px; height: 4px; left: 79%; top: 67%; animation-delay: 2.8s; }
.p-8 { width: 2px; height: 2px; left: 89%; top: 20%; animation-delay: 3.2s; }

@keyframes floatParticle {
  0%, 100% { transform: translate(0,0); opacity: .25; }
  50% { transform: translate(10px, -22px); opacity: .78; }
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  position: relative;
  z-index: 1;
}

.login-shell {
  width: min(520px, 100%);
  margin: 0 auto;
}

.login-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.022) 100%),
    linear-gradient(135deg, rgba(124,58,237,.10) 0%, rgba(34,211,238,.05) 100%),
    rgba(14, 17, 29, 0.58);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 20px 44px rgba(0,0,0,.30),
    0 0 0 1px rgba(124,58,237,.14),
    0 0 36px rgba(124,58,237,.12);
  backdrop-filter: blur(30px) saturate(165%);
  -webkit-backdrop-filter: blur(30px) saturate(165%);
}

.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139,92,246,.68), rgba(34,211,238,.22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: .9;
}

.login-side-glow {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 140px;
  transform: translateY(-50%);
  border-radius: 999px;
  filter: blur(18px);
  opacity: .9;
  pointer-events: none;
  z-index: 0;
}

.glow-left {
  left: -8px;
  background: linear-gradient(180deg, rgba(168,85,247,.0), rgba(168,85,247,.95), rgba(34,211,238,.0));
}

.glow-right {
  right: -8px;
  background: linear-gradient(180deg, rgba(34,211,238,.0), rgba(168,85,247,.95), rgba(34,211,238,.0));
}

.login-card-inner {
  position: relative;
  z-index: 1;
  padding: 34px 30px 28px;
}

.login-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.login-icon-circle {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(34,211,238,.78);
  color: #67e8f9;
  font-size: 2rem;
  background: rgba(255,255,255,.03);
  box-shadow:
    0 0 0 8px rgba(34,211,238,.05),
    0 0 28px rgba(124,58,237,.12);
}

.login-card-top {
  text-align: center;
  margin-bottom: 22px;
}

.login-card-tag {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .72rem 1.08rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: #d8b4fe;
  background: rgba(25, 24, 39, 0.58);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  margin-bottom: 14px;
}

.pulse-dot {
  width: .46rem;
  height: .46rem;
  border-radius: 999px;
  background: #c084fc;
  box-shadow: 0 0 14px rgba(192, 132, 252, .8);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .55; }
}

.login-card-top h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 2.5vw, 2.4rem);
  line-height: 1.08;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.login-card-top p {
  margin: 0 auto;
  max-width: 380px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: .88rem;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}

.login-alert-error {
  background: rgba(120, 28, 28, .28);
  color: #fecaca;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-field .form-label {
  display: inline-block;
  margin-bottom: 7px;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(241,245,249,.88);
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #c084fc;
  font-size: .88rem;
  pointer-events: none;
  z-index: 2;
}

.login-input {
  min-height: 52px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.07);
  color: #f8fafc;
  padding: 12px 14px 12px 42px;
  font-size: .9rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 6px 18px rgba(0,0,0,.10);
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease, transform .18s ease;
}

.login-input::placeholder {
  color: rgba(226,232,240,.52);
  font-size: .88rem;
}

.login-input:focus {
  background: rgba(255,255,255,.11);
  color: #fff;
  border-color: rgba(124,58,237,.55);
  box-shadow:
    0 0 0 4px rgba(124,58,237,.14),
    0 0 24px rgba(124,58,237,.10),
    inset 0 1px 0 rgba(255,255,255,.08);
  transform: translateY(-1px);
}

.login-submit-btn {
  min-height: 54px;
  width: 100%;
  margin-top: 4px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--purple-2), var(--cyan-2));
  color: #fff;
  font-size: .94rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    0 0 24px rgba(168, 85, 247, 0.22),
    0 0 60px rgba(34, 211, 238, 0.08);
  transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
}

.login-submit-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.login-submit-btn:focus {
  color: #fff;
  box-shadow: 0 0 0 4px rgba(124,58,237,.16), 0 18px 32px rgba(111, 76, 255, 0.24);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}

.login-divider span {
  color: rgba(226,232,240,.58);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}

.login-footer-actions {
  display: flex;
  justify-content: center;
}

.login-secondary-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: #f8fafc;
  font-size: .88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}

.login-secondary-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  border-color: rgba(124,58,237,.35);
  box-shadow: 0 12px 26px rgba(0,0,0,.22);
}

.login-help-note {
  margin-top: 16px;
  text-align: center;
  color: rgba(226,232,240,.60);
  font-size: .8rem;
  line-height: 1.6;
}

@media (max-width: 575.98px) {
  .login-page {
    padding: 20px 14px;
  }

  .login-card-inner {
    padding: 28px 18px 22px;
  }

  .login-icon-circle {
    width: 78px;
    height: 78px;
    font-size: 1.7rem;
  }

  .login-card-top h1 {
    font-size: 1.55rem;
  }

  .login-card-top p {
    font-size: .86rem;
  }

  .login-input,
  .login-submit-btn {
    min-height: 50px;
  }

  .login-secondary-btn {
    width: 100%;
  }
}