/* ==========================================================================
   ZERO AUTH GATE & 2FA VAULT — MODERN MONOCHROME CYBER DESIGN
   Ultra-Smooth 60FPS CSS Animations, Zero CPU lag, Hardware-accelerated
   ========================================================================== */

/* Background with Ambient Glow */
.login-page, .login-new {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #050505;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.06) 0%, rgba(5, 5, 5, 0) 60%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.02) 0%, rgba(5, 5, 5, 0) 50%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Subtle Animated Ambient Glow Behind Card */
.login-ambient-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: ambientFloat 8s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes ambientFloat {
  0% { transform: translate(-20px, -20px) scale(0.95); opacity: 0.6; }
  100% { transform: translate(20px, 20px) scale(1.05); opacity: 1; }
}

/* Main Container Card */
.login-container {
  display: flex;
  width: 100%;
  max-width: 860px;
  background: rgba(10, 10, 10, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  position: relative;
  z-index: 2;
  animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left Brand Panel */
.login-left {
  flex: 1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.0) 100%);
  position: relative;
}

.login-logo-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.3));
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.25)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.45)); }
}

.login-brand {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: #71717a;
  margin-top: 6px;
  text-transform: uppercase;
}

.login-tagline {
  margin-top: 24px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #a1a1aa;
}

.login-left-decor {
  display: flex;
  gap: 6px;
  margin-top: 48px;
}

.decor-line {
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: all 0.3s ease;
}

.dl-1 { width: 32px; animation: pulseWidth 3s infinite alternate; }
.dl-2 { width: 16px; }
.dl-3 { width: 8px; }

@keyframes pulseWidth {
  0% { width: 32px; background: rgba(255, 255, 255, 0.12); }
  100% { width: 48px; background: rgba(255, 255, 255, 0.3); }
}

/* Right Form Panel */
.login-right {
  flex: 1.1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-card-header {
  margin-bottom: 24px;
}

.term-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #a1a1aa;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
}

.term-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

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

.login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

/* Input Fields */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  background: rgba(18, 20, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.input-group:focus-within {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(24, 27, 38, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  padding: 0;
  color: #71717a;
  transition: color 0.2s ease;
}

.input-group:focus-within .input-icon {
  color: #ffffff;
}

/* Ensure the input element inside input-group is strictly clean, borderless and transparent */
.input-group input,
.input-group .input-field,
input.input-field {
  flex: 1 !important;
  height: 100% !important;
  width: auto !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 4px !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-family: var(--font-mono, monospace) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  outline: none !important;
  line-height: normal !important;
  box-sizing: border-box !important;
}

.input-group input:focus,
.input-group .input-field:focus,
input.input-field:focus {
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.input-field::placeholder {
  color: #52525b !important;
  text-transform: none !important;
  font-family: var(--font-mono, monospace) !important;
  letter-spacing: 0.03em !important;
}

/* Telegram Brand Chip in Left Panel */
.telegram-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d4d4d8;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.telegram-brand-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

.telegram-brand-chip svg {
  color: #38bdf8;
  flex-shrink: 0;
}

/* Telegram Channel Footer Link */
.login-footer-links {
  margin-top: 18px;
  width: 100%;
}

.login-telegram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.login-telegram-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.login-telegram-link b {
  color: #ffffff;
}

.login-telegram-link svg {
  color: #38bdf8;
  flex-shrink: 0;
}

/* Primary Button with Interactive Sheen */
.login-btn {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #e4e4e7 100%);
  color: #070709;
  border: 1px solid #ffffff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

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

.login-btn:hover::after {
  left: 150%;
}

.login-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.3);
}

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

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 12px;
  margin-bottom: 16px;
  animation: shake 0.4s ease-in-out;
}

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

/* ==========================================================================
   2FA DEDICATED VAULT DESIGN (Sleek, High-Tech, Cyber Aesthetic)
   ========================================================================== */

.vault-card {
  width: 100%;
  max-width: 460px;
  background: rgba(14, 14, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 38px 34px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  position: relative;
  z-index: 2;
  animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Shield Icon & Glow Ring */
.vault-shield-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vault-shield-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  animation: spinSlow 16s linear infinite;
}

.vault-shield-ring-2 {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.vault-shield-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.vault-shield-icon svg {
  width: 24px;
  height: 24px;
}

.vault-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 6px;
}

.vault-subtitle {
  font-size: 11.5px;
  color: #a1a1aa;
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Key Pill */
.vault-key-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 24px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}

.vault-key-label {
  color: #71717a;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.vault-key-val {
  color: #e4e4e7;
  font-weight: 500;
}

/* 2FA Code Input Styling */
.otp-input-wrap {
  margin-bottom: 20px;
}

.otp-field {
  width: 100%;
  text-align: center;
  letter-spacing: 0.5em;
  font-size: 22px;
  font-weight: 700;
  padding: 14px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.otp-field:focus {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), 0 0 24px rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* Pairing Card Details */
.pairing-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.pairing-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin-bottom: 12px;
}

.pairing-head svg {
  color: #f59e0b;
}

.pairing-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11.5px;
  color: #a1a1aa;
  line-height: 1.5;
  margin-bottom: 16px;
}

.pairing-step-item {
  display: flex;
  gap: 8px;
}

.pairing-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Copy Command Box */
.pairing-cmd-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  margin-bottom: 14px;
}

.pairing-cmd-box code {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #4ade80;
  font-weight: 600;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

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

.telegram-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.telegram-link-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.sync-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: #71717a;
  margin-top: 14px;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
  animation: pulseGreen 1.5s infinite;
}

.vault-foot-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #71717a;
  margin-top: 20px;
}

.vault-foot-links a {
  color: #a1a1aa;
  text-decoration: none;
  transition: color 0.15s ease;
}

.vault-foot-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }
  .login-left {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 24px;
  }
  .login-right {
    padding: 32px 24px;
  }
  .vault-card {
    padding: 28px 20px;
  }
}
