.login-new {
  --white: #fff;
  --dim: #8a8a8a;
  --faint: #555;
  --txt: #f2f2f2;
  --line: #262626;
  --mono: "Chakra Petch", "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --accent: #ffffff;
  overflow: hidden;
}

.login-new .bg-aura { display: none; }

/* ---------- background layers ---------- */

.bg-video {
  display: block;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scaleX(-1);
  width: min(96vw, 1650px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.55;
  filter: grayscale(0.25) contrast(1.05);
  pointer-events: none;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.9), 0 0 120px rgba(0, 0, 0, 0.6);
}

.login-new .bg-video {
  opacity: 0.3;
  filter: grayscale(0.3) contrast(1.05) blur(1px);
  width: min(98vw, 1700px);
}

.bg-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
}

.login-new .bg-veil {
  background: rgba(0, 0, 0, 0.7);
}

.bg-veil::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.5) 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 3px
  );
  animation: scanmove 9s linear infinite, flicker 7s steps(1) infinite;
}

@keyframes scanmove {
  0% { background-position: 0 0; }
  100% { background-position: 0 6px; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  8% { opacity: 0.82; }
  9% { opacity: 1; }
  37% { opacity: 1; }
  38% { opacity: 0.9; }
  39% { opacity: 1; }
  63% { opacity: 1; }
  64% { opacity: 0.84; }
  65% { opacity: 1; }
  86% { opacity: 1; }
  87% { opacity: 0.93; }
  88% { opacity: 1; }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
  animation: vignetteBreathe 8s ease-in-out infinite;
}

@keyframes vignetteBreathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

/* ---------- glitch ---------- */

.glitch {
  position: relative;
  color: var(--white);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  animation: glitchSlice 3.4s infinite steps(1);
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 rgba(255, 0, 80, 0.85), 3px 0 rgba(0, 200, 255, 0.35);
  opacity: 0.8;
}

.glitch::after {
  left: -2px;
  text-shadow: 2px 0 rgba(0, 200, 255, 0.85), -3px 0 rgba(255, 0, 80, 0.35);
  opacity: 0.8;
}

@keyframes glitchSlice {
  0%, 86%, 100% {
    clip-path: inset(0 0 100% 0);
    transform: translate(0, 0);
    filter: none;
  }
  87% {
    clip-path: inset(12% 0 55% 0);
    transform: translate(-3px, 1px);
    filter: blur(0.4px);
  }
  89% {
    clip-path: inset(68% 0 6% 0);
    transform: translate(3px, -1px);
    filter: blur(0.4px);
  }
  91% {
    clip-path: inset(30% 0 45% 0);
    transform: translate(-2px, 2px);
  }
  93% {
    clip-path: inset(5% 0 85% 0);
    transform: translate(2px, 1px);
  }
  95% {
    clip-path: inset(50% 0 22% 0);
    transform: translate(0, -2px);
    filter: blur(0.6px);
  }
}

.typewriter {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 2px;
  min-height: 16px;
}

.shake { animation: shake 0.45s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   LOGIN — SPLIT LAYOUT
   ============================================================ */

.login-container {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100vh;
}

/* ---- LEFT PANEL (logo) ---- */

.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8,8,8,0.95) 0%, rgba(15,15,15,0.9) 100%);
}

.login-left::before,
.login-left::after { display: none; }

.login-left-inner {
  text-align: center;
  position: relative;
  z-index: 2;
  animation: loginLeftIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes loginLeftIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

.login-logo-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 32px;
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 30px rgba(255,255,255,0.15));
  animation: logoFloat 4s ease-in-out infinite, logoIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes logoIn {
  from { opacity: 0; transform: scale(0.7) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.login-logo-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 60%);
  animation: logoGlowPulse 3s ease-in-out infinite;
}

@keyframes logoGlowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.login-brand {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 16px;
  color: var(--white);
  margin-bottom: 4px;
  text-shadow: 0 0 40px rgba(255,255,255,0.2);
}

.login-brand-sub {
  font-size: 18px;
  letter-spacing: 20px;
  color: var(--dim);
  margin-bottom: 28px;
  font-weight: 500;
}

.login-tagline {
  color: var(--faint);
  font-size: 13px;
  letter-spacing: 2px;
  min-height: 20px;
}

.cursor-blink {
  animation: blink 0.8s steps(2, start) infinite;
  color: var(--accent);
}

@keyframes blink { 50% { opacity: 0; } }

/* decorative lines */

.login-left-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.decor-line {
  position: absolute;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.06), transparent);
}

.dl-1 { left: 8%; top: 10%; width: 1px; height: 30%; animation: decorSlide 6s ease-in-out infinite; }
.dl-2 { right: 12%; top: 20%; width: 1px; height: 40%; animation: decorSlide 8s ease-in-out 1s infinite; }
.dl-3 { left: 20%; bottom: 10%; width: 1px; height: 25%; animation: decorSlide 7s ease-in-out 2s infinite; }

@keyframes decorSlide {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50% { opacity: 0.8; transform: scaleY(1); }
}

.decor-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.dd-1 { top: 15%; right: 20%; animation: dotPulse 2s ease-in-out infinite; }
.dd-2 { bottom: 25%; left: 15%; animation: dotPulse 3s ease-in-out 0.5s infinite; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* ---- RIGHT PANEL (form) ---- */

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.login-right::before { display: none; }

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 0 12px;
  position: relative;
  animation: loginCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateX(40px) scale(0.96); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.login-card-header { display: none; }

.term-label {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--dim);
  font-weight: 600;
}

.login-card-body { padding: 36px 32px; }

.login-title-block { margin-bottom: 40px; }

.login-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 12px;
  color: var(--white);
  margin-bottom: 16px;
}

.login-title-line {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

/* ---- INPUT GROUP ---- */

.input-group {
  position: relative;
  margin-bottom: 32px;
}

.input-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  transition: color 0.3s ease;
  z-index: 1;
}

.input-field {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 3px;
  padding: 14px 0 14px 30px;
  outline: none;
  transition: border-color 0.3s ease;
}

.input-field::placeholder {
  color: var(--faint);
  letter-spacing: 2px;
  font-size: 13px;
}

.input-field:focus { border-bottom-color: var(--white); }

.input-field:focus ~ .input-icon,
.input-group:focus-within .input-icon { color: var(--white); }

.input-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--white);
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.input-field:focus ~ .input-bar { transform: scaleX(1); }

/* ---- ERROR ---- */

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  border-bottom: 1px solid rgba(255,59,59,0.3);
  padding: 12px 0;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.login-error svg {
  flex-shrink: 0;
  color: #ff5f57;
}

/* ---- BUTTON ---- */

.login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 15px 28px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.login-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s ease;
}

.login-btn:hover {
  border-color: rgba(255,255,255,0.5);
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
  letter-spacing: 6px;
}

.login-btn:hover::before { left: 100%; }

.login-btn:active { transform: scale(0.98); }

.login-btn-icon {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.login-btn:hover .login-btn-icon { transform: translateX(4px); }

/* ---- UNPAIR NEW ---- */

.unpair-new {
  margin-top: 28px;
  border: 1px solid rgba(255,170,40,0.2);
  background: rgba(255,170,40,0.04);
  border-radius: 6px;
  padding: 18px;
  animation: fadeInScale 0.4s ease both;
}

.unpair-new-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #febc2e;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 12px;
}

.unpair-new-text {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.unpair-new-text b { color: var(--txt); }

.unpair-cmd-new {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
}

.unpair-cmd-new code {
  flex: 1;
  color: var(--white);
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 1px;
  word-break: break-all;
}

.copy-btn-new {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--txt);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.copy-btn-new:hover {
  background: rgba(255,255,255,0.18);
  border-color: var(--accent);
  color: var(--accent);
}

.copy-btn-new.copied {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.9);
}

.unpair-link-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: 11px;
  letter-spacing: 2px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.unpair-link-new:hover { color: var(--accent); }

.unpair-link-new svg { transition: transform 0.2s ease; }

.unpair-link-new:hover svg { transform: translate(3px, -3px); }

/* ---- RESPONSIVE ---- */

@media (max-width: 860px) {
  .login-container { flex-direction: column; }
  .login-left {
    min-height: 40vh;
    padding: 40px 20px;
  }
  .login-left::after { display: none; }
  .login-brand { font-size: 42px; letter-spacing: 10px; }
  .login-brand-sub { font-size: 14px; letter-spacing: 14px; }
  .login-logo-wrap { width: 140px; height: 140px; margin-bottom: 20px; }
  .login-right { padding: 20px; }
  .login-right::before { display: none; }
  .login-card-body { padding: 28px 24px; }
  .decor-line { display: none; }
}
