:root {
  --pulse-bg-1: #070b16;
  --pulse-bg-2: #0f1a32;
  --pulse-card: rgba(10, 16, 30, 0.76);
  --pulse-border: rgba(148, 163, 184, 0.28);
  --pulse-text: #e6edf7;
  --pulse-muted: #9fb0cc;
  --pulse-primary: #22d3ee;
  --pulse-primary-strong: #06b6d4;
  --pulse-input-bg: rgba(15, 23, 42, 0.88);
  --pulse-error: #ef4444;
}

* { box-sizing: border-box; }

body.pulse-login {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--pulse-text);
  background:
    radial-gradient(circle at 15% 20%, #10254c 0%, transparent 48%),
    radial-gradient(circle at 85% 80%, #112547 0%, transparent 44%),
    linear-gradient(145deg, var(--pulse-bg-1), var(--pulse-bg-2));
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
}

.pulse-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.8;
}

.pulse-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(94vw, 430px);
  background: var(--pulse-card);
  border: 1px solid var(--pulse-border);
  border-radius: 18px;
  padding: 24px 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.login-badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pulse-primary);
  margin-bottom: 8px;
}

.login-title {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.2;
}

.login-subtitle {
  margin: 10px 0 18px;
  color: var(--pulse-muted);
  font-size: 0.95rem;
}

.login-form p { margin: 0 0 12px; }

.login-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  color: #c4d0e4;
}

.login-form input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #334155;
  background: var(--pulse-input-bg);
  color: var(--pulse-text);
  padding: 0.72rem 0.78rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
  border-color: var(--pulse-primary);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.login-form .errorlist {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  color: #fecaca;
  font-size: 0.82rem;
}

.login-submit {
  width: 100%;
  margin-top: 8px;
  padding: 0.76rem;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  color: #04203a;
  background: linear-gradient(135deg, var(--pulse-primary), var(--pulse-primary-strong));
  transition: transform 0.15s ease, filter 0.2s ease;
}

.login-submit:hover { filter: brightness(1.05); }
.login-submit:active { transform: translateY(1px); }

.message-stack {
  margin-bottom: 12px;
}

.message-item {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(127, 29, 29, 0.34);
  color: #fee2e2;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.card-footer-note {
  margin-top: 12px;
  color: #8ea0bf;
  font-size: 0.79rem;
  text-align: center;
}

.pulse-path {
  stroke: var(--pulse-primary);
  stroke-width: 2;
  fill: none;
  filter: drop-shadow(0 0 2px rgba(34, 211, 238, 0.22));
}

.pulse-trace {
  stroke: rgba(34, 211, 238, 0.2);
  stroke-width: 1;
  fill: none;
}

@media (prefers-reduced-motion: reduce) {
  .pulse-path { filter: none; }
}
