:root {
  --bg-deep: #01030d;
  --bg-navy: #040b29;
  --bg-glow: #081854;
  --cyan: #00e5ff;
  --magenta: #ff2e97;
  --gold: #ffc400;
  --blue-dot: #4285f4;
  --red-dot: #ea4335;
  --yellow-dot: #fbbc05;
  --green-dot: #34a853;
  --text-primary: #f8fbff;
  --text-secondary: rgba(206, 222, 255, 0.68);
  --text-muted: rgba(154, 180, 232, 0.46);
  --card-bg: rgba(5, 12, 36, 0.72);
  --card-border: rgba(110, 168, 255, 0.18);
  --input-bg: rgba(3, 8, 26, 0.78);
  --input-border: rgba(105, 155, 245, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2.5rem 2rem;
  background:
    radial-gradient(ellipse 68% 58% at 38% 52%, rgba(12, 34, 108, 0.62) 0%, rgba(4, 11, 41, 0.38) 52%, rgba(1, 3, 13, 0.98) 100%),
    radial-gradient(circle at 78% 24%, rgba(0, 180, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 72% 80%, rgba(255, 46, 151, 0.07) 0%, transparent 45%),
    var(--bg-deep);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 1, 8, 0.75) 100%);
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(360px, 420px);
  gap: 3.25rem;
  align-items: center;
}

.visual-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  user-select: none;
}

.dot-cluster {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 18px rgba(66, 133, 244, 0.25));
}

.brand-title {
  font-size: clamp(2.5rem, 4.6vw, 4.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 0 36px rgba(100, 170, 255, 0.22);
}

.canvas-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.2;
  max-width: 780px;
  border-radius: 20px;
}

#neuralCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.stage-caption {
  margin-top: 0.5rem;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.login-card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  border-radius: 24px;
  padding: 2.4rem 2.2rem 2.1rem;
  border: 1px solid var(--card-border);
  box-shadow:
    0 28px 70px rgba(0, 2, 12, 0.78),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 0 rgba(255, 255, 255, 0.12) inset;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 229, 255, 0.85) 28%,
    rgba(255, 46, 151, 0.85) 55%,
    rgba(255, 196, 0, 0.85) 80%,
    transparent 100%
  );
  opacity: 0.85;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.22);
  color: #8ceeff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.15rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.card-heading {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.38rem;
}

.card-subtext {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.65rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(220, 233, 255, 0.86);
  letter-spacing: 0.01em;
}

.micro-link {
  background: none;
  border: none;
  color: #63c7ff;
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.18s ease;
}

.micro-link:hover {
  color: #a8e4ff;
  text-decoration: underline;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.82rem 0.95rem;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder {
  color: rgba(145, 172, 224, 0.36);
}

input:focus {
  border-color: rgba(0, 229, 255, 0.65);
  background: rgba(4, 12, 38, 0.92);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.13), 0 0 18px rgba(0, 162, 255, 0.14);
}

.pw-toggle {
  position: absolute;
  right: 0.65rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.18s ease, background 0.18s ease;
}

.pw-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.pw-toggle.revealed {
  color: var(--cyan);
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.2rem 0 1.4rem;
  cursor: pointer;
  user-select: none;
}

.remember-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid rgba(120, 168, 255, 0.35);
  background: var(--input-bg);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.remember-row input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: scale(0);
  transition: transform 0.15s ease-in-out;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.remember-row input[type="checkbox"]:checked {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
}

.remember-row input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.remember-row span {
  font-size: 0.81rem;
  color: var(--text-secondary);
}

.btn-primary {
  position: relative;
  width: 100%;
  padding: 0.88rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 210, 255, 0.38);
  background: linear-gradient(135deg, #1557e8 0%, #0d74f5 48%, #00a6ff 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 10px 26px rgba(13, 116, 245, 0.36),
    0 1px 0 rgba(255, 255, 255, 0.28) inset;
  transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
  box-shadow:
    0 14px 32px rgba(0, 166, 255, 0.45),
    0 0 20px rgba(255, 46, 151, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.btn-primary:active {
  transform: translateY(0);
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.2rem 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(120, 165, 245, 0.14);
}

.btn-ghost {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 165, 245, 0.2);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(230, 240, 255, 0.88);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.36);
  color: #ffffff;
}

.nowhere-status {
  margin-top: 1.15rem;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.09), rgba(255, 46, 151, 0.08));
  border: 1px solid rgba(0, 229, 255, 0.28);
  font-size: 0.82rem;
  line-height: 1.48;
  color: #d9eeff;
  display: none;
  animation: revealStatus 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.nowhere-status.visible {
  display: block;
}

.nowhere-status strong {
  color: #7ef4ff;
  font-weight: 600;
}

.nowhere-status code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  color: #ffc94d;
  background: rgba(0, 0, 0, 0.32);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

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

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
    max-width: 680px;
    gap: 2.2rem;
  }
  .login-card {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  body {
    padding: 1.5rem 1rem;
  }
  .dot-cluster {
    width: 50px;
    height: 50px;
  }
  .brand-lockup {
    gap: 0.85rem;
  }
  .login-card {
    padding: 1.8rem 1.4rem;
  }
}
