:root {
  --ink: #1A1A2E;
  --ink-soft: #6B7280;
  --brand: #6366F1;
  --brand-strong: #4F46E5;
  --bg: #F8F7F4;
  --card: #FFFFFF;
  --danger: #EF4444;
  --border: #E5E7EB;
  --ring: rgba(99, 102, 241, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  overflow-x: clip;
  background:
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.12), transparent 30%),
    radial-gradient(circle at 85% 80%, rgba(59, 130, 246, 0.10), transparent 35%),
    var(--bg);
}

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

.login-hero {
  position: relative;
  padding: 72px clamp(24px, 6vw, 80px);
  overflow: visible;
}

.hero-tag {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-strong);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-hero h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.95;
}

.login-hero h1 span {
  color: var(--brand);
}

.hero-copy {
  max-width: 34ch;
  margin-top: 18px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-soft);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(3px);
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-glow-a {
  width: 320px;
  height: 320px;
  right: -110px;
  top: 12%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.36), rgba(99, 102, 241, 0));
  animation: glowFloatA 13s ease-in-out infinite, glowFadeA 8s ease-in-out infinite;
}

.hero-glow-b {
  width: 280px;
  height: 280px;
  left: -90px;
  bottom: 8%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28), rgba(59, 130, 246, 0));
  animation: glowFloatB 15s ease-in-out infinite, glowFadeB 10s ease-in-out infinite;
}

@keyframes glowFloatA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -12px, 0) scale(1.05); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes glowFloatB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-16px, 10px, 0) scale(1.06); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes glowFadeA {
  0% { opacity: 0.45; }
  50% { opacity: 0.68; }
  100% { opacity: 0.45; }
}

@keyframes glowFadeB {
  0% { opacity: 0.35; }
  50% { opacity: 0.58; }
  100% { opacity: 0.35; }
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px);
}

.panel-header h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
}

.panel-header p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.login-form {
  margin-top: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 10px;
}

.login-form label {
  font-size: 0.9rem;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.login-form button {
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.login-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.22);
}

.login-error {
  min-height: 18px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--danger);
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 220px;
    padding-bottom: 24px;
  }

  .login-panel {
    justify-content: flex-start;
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-glow-a,
  .hero-glow-b {
    animation: none;
    opacity: 0.5;
  }
}
