/* REMVX — login: visible motion, mouse scene, engineered (not template) */

.login-page {
  min-height: 100vh;
  background: #000;
  overflow-x: hidden;
}

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

@media (min-width: 1024px) {
  .login-layout {
    grid-template-columns: 1.08fr 0.92fr;
  }
}

/* —— Art panel —— */
/* Home hero — illustration only, no card chrome */
.hero-art-panel {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero-art-panel {
    margin: 0;
    max-width: none;
  }
}

.hero-top {
  position: relative;
  z-index: 2;
}

.login-art {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2rem 3rem;
  background: #030303;
  border-right: 1px solid #1a1a1a;
  overflow: hidden;
  cursor: default;
}

@media (min-width: 1024px) {
  .login-art {
    display: flex;
  }
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 45% at 35% 30%, rgba(185, 28, 28, 0.18), transparent 60%);
  pointer-events: none;
}

.login-art-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

/* 3D scene — mouse tilt */
.login-scene {
  perspective: 900px;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg))
    translate(var(--shift-x, 0), var(--shift-y, 0));
  transition: transform 0.05s linear;
  will-change: transform;
}

.infra-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.infra-ring {
  fill: none;
  stroke: rgba(239, 68, 68, 0.22);
  stroke-width: 1.5;
  transform-origin: 240px 200px;
  animation: ringPulse 2.8s ease-out infinite;
}

.infra-ring-slow {
  animation-delay: -1.4s;
  stroke-opacity: 0.5;
}

@keyframes ringPulse {
  0% {
    transform: scale(0.92);
    stroke-opacity: 0.35;
  }
  100% {
    transform: scale(1.08);
    stroke-opacity: 0;
  }
}

.scene-calm .infra-ring {
  animation-duration: 5.5s;
  stroke: rgba(239, 68, 68, 0.14);
}

.infra-link {
  fill: none;
  stroke: url(#linkGrad);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 12 14;
  animation: linkFlow 2.4s linear infinite;
  opacity: 0.75;
}

.infra-link-dim {
  stroke: rgba(220, 38, 38, 0.35);
  stroke-width: 1.25;
  stroke-dasharray: 8 16;
  animation-duration: 3.2s;
  opacity: 0.55;
}

.scene-calm .infra-link {
  stroke-width: 1.5;
  opacity: 0.65;
  animation-duration: 3.6s;
}

.scene-calm .infra-link-dim {
  animation-duration: 4.5s;
  opacity: 0.45;
}

@keyframes linkFlow {
  to {
    stroke-dashoffset: -52;
  }
}

.infra-packet-live {
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.45));
  pointer-events: none;
}

.scene-calm .infra-packet-live {
  filter: drop-shadow(0 0 3px rgba(239, 68, 68, 0.35));
}

.infra-packet-trail {
  pointer-events: none;
}

.infra-endpoint {
  fill: #080808;
  stroke: #333;
  stroke-width: 1;
  transition: stroke 0.15s, fill 0.15s;
}

.infra-endpoint-interactive {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.infra-brand-node,
.infra-node-core-img {
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35))
    drop-shadow(0 0 28px rgba(239, 68, 68, 0.2));
  pointer-events: none;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.infra-svg {
  pointer-events: none;
}

.infra-brand-node.is-hot,
.infra-node-core-img.is-hot {
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 24px rgba(239, 68, 68, 0.55));
  transform: scale(1.04);
}

.infra-label {
  fill: #e4e4e7;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  pointer-events: none;
}

.infra-sublabel {
  fill: #71717a;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  pointer-events: none;
}

.infra-core-wrap {
  transition: transform 0.12s ease-out;
}

.infra-node-core {
  fill: #0c0606;
  stroke: #ef4444;
  stroke-width: 2;
  animation: coreGlow 2.2s ease-in-out infinite;
}

@keyframes coreGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.25));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.45));
  }
}

.scene-calm .infra-node-core {
  animation-duration: 4.5s;
}

.scene-calm .infra-scan {
  display: none;
}

.scene-calm .infra-beacon {
  animation-duration: 3.5s;
  opacity: 0.7;
}

.hero-art-panel .infra-link {
  stroke: url(#linkGradHome);
}

.infra-core-title {
  fill: #fafafa;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  pointer-events: none;
}

.infra-core-sub {
  fill: #71717a;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
  pointer-events: none;
}

.infra-scan {
  stroke: rgba(239, 68, 68, 0.5);
  stroke-width: 2;
  animation: scanLine 3s ease-in-out infinite;
}

@keyframes scanLine {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(52px);
    opacity: 1;
  }
}

.infra-beacon {
  fill: #22c55e;
  animation: beaconPulse 1.8s ease-in-out infinite;
}

.infra-beacon:nth-of-type(2) {
  animation-delay: -0.9s;
}

@keyframes beaconPulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.85);
    transform-origin: center;
  }
  50% {
    opacity: 1;
    transform: scale(1.35);
    transform-origin: center;
  }
}

/* —— Form —— */
.login-form-side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.5rem 2.5rem;
  min-height: 100vh;
  background: #000;
}

@media (min-width: 640px) {
  .login-form-side {
    padding: 3rem 3.5rem;
  }
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #71717a;
  text-decoration: none;
  transition: color 0.15s;
}

.login-back:hover {
  color: #fff;
}

.login-form-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.login-logo {
  display: block;
  margin-bottom: 2rem;
  opacity: 0.98;
}

.login-logo__img {
  display: block;
  width: auto;
  max-width: min(100%, 420px);
  height: auto;
  max-height: 5.5rem;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.25));
}

@media (min-width: 640px) {
  .login-logo__img {
    max-height: 5rem;
  }
}

.login-logo:hover {
  opacity: 1;
}

.login-heading h1 {
  letter-spacing: -0.02em;
}

.login-card {
  margin-top: 1.75rem;
  padding: 2rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 5, 0.92);
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, 0.06) inset,
    0 24px 48px -24px rgba(0, 0, 0, 0.85);
}

@media (min-width: 640px) {
  .login-card {
    padding: 2rem;
  }
}

.login-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #a1a1aa;
  margin-bottom: 0.4rem;
}

.login-field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.login-field-row label {
  margin-bottom: 0;
}

.login-link-muted {
  font-size: 0.75rem;
  color: #52525b;
  text-decoration: none;
}

.login-link-muted:hover {
  color: #ef4444;
}

.login-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #262626;
  background: #000;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input::placeholder {
  color: #3f3f46;
}

.login-input:focus {
  outline: none;
  border-color: #b91c1c;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.35);
}

.login-submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #000;
  background: #e4e4e7;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.login-submit:hover {
  background: #fff;
}

.login-submit:active {
  transform: scale(0.99);
}

.login-divider {
  margin: 1.35rem 0 1rem;
  position: relative;
  text-align: left;
}

.login-divider::before {
  content: "";
  position: absolute;
  left: 2.5rem;
  right: 0;
  top: 50%;
  height: 1px;
  background: #1f1f1f;
}

.login-divider span {
  position: relative;
  padding: 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #52525b;
  background: rgba(5, 5, 5, 0.95);
}

.login-divider::before {
  left: 0;
  right: 0;
}

.login-divider {
  text-align: center;
}

.login-sso {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.login-sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #000;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4e4e7;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.login-sso-btn:hover {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(220, 38, 38, 0.05);
}

.login-sso-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-footer-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #52525b;
  line-height: 1.5;
}

.login-footer-note a {
  color: #d4d4d8;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #3f3f46;
}

.login-footer-note a:hover {
  color: #ef4444;
  text-decoration-color: #7f1d1d;
}

@media (prefers-reduced-motion: reduce) {
  .infra-ring,
  .infra-link,
  .infra-node-core,
  .infra-beacon,
  .infra-scan,
  .login-live-dot,
  .login-scene {
    animation: none;
  }
  .login-scene {
    transform: none;
  }
}
