@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  background: #071120;
}

body {
  min-height: 100vh;
}

.legacy-auth-wrapper {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #071120;
  overflow: hidden;
}

.legacy-auth-left {
  background: linear-gradient(rgba(4, 10, 20, 0.78), rgba(4, 10, 20, 0.88)),
    url("https://images.unsplash.com/photo-1560518883-ce09059eeffa?q=80&w=1200&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.legacy-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
}

.legacy-logo span {
  color: #fff;
}

.legacy-logo img {
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  object-fit: cover;
}

.legacy-auth-text h1 {
  font-size: 38px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.legacy-auth-text p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 500px;
}

.legacy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.legacy-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 50px;
  font-size: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.legacy-auth-right {
  width: 100%;
  min-height: 100vh;
  background: #071120;
  padding: 24px 14px 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.legacy-form-container {
  width: 100%;
  max-width: 640px;
  margin: auto;
}

.legacy-right-brand {
  display: none;
  justify-content: center;
  margin-bottom: 18px;
}

.legacy-tabs {
  display: flex;
  background: #0f1d34;
  padding: 6px;
  border-radius: 18px;
  margin-bottom: 24px;
}

.legacy-tab {
  flex: 1;
  padding: 13px;
  border: none;
  background: transparent;
  color: #93a7c4;
  font-size: 14px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.3s ease;
}

.legacy-tab.active {
  background: #8d6b12;
  color: #fff;
}

.legacy-form {
  display: none;
}

.legacy-form.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.legacy-form-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.1;
}

.legacy-form-subtitle {
  color: #93a7c4;
  font-size: 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.legacy-input-group {
  margin-bottom: 16px;
}

.legacy-input-group label {
  display: block;
  color: #f1f5ff;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.legacy-req {
  color: #fbbf24;
}

/* Glassmorphism inputs */
.legacy-input {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 31, 57, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: 0.3s ease;
}

.legacy-input::placeholder {
  color: rgba(142, 163, 192, 0.9);
}

.legacy-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.legacy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.legacy-forgot {
  text-align: right;
  margin-top: -4px;
  margin-bottom: 14px;
}

.legacy-forgot a {
  color: #5f9eff;
  font-size: 14px;
  text-decoration: none;
}

.legacy-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: #a8b6ca;
  font-size: 14px;
}

.legacy-checkbox input {
  width: 18px;
  height: 18px;
}

.legacy-submit {
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #8c6a12, #c69a22);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 8px 25px rgba(198, 154, 34, 0.28);
}

.legacy-submit:hover {
  transform: translateY(-2px);
}

.legacy-submit-secondary {
  background: linear-gradient(135deg, #7c5c10, #b88b18);
}

.legacy-divider {
  text-align: center;
  color: #8ea3c0;
  margin: 22px 0;
  font-size: 14px;
  position: relative;
}

.legacy-divider::before,
.legacy-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.legacy-divider::before {
  left: 0;
}

.legacy-divider::after {
  right: 0;
}

.legacy-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.legacy-social-btn {
  padding: 16px;
  border-radius: 16px;
  background: rgba(16, 31, 57, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  text-align: center;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s ease;
}

.legacy-social-btn:hover {
  background: rgba(23, 40, 68, 0.65);
}

.legacy-alert {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 29, 52, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #d9e6ff;
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.55;
}

.legacy-alert.success {
  border-color: rgba(34, 197, 94, 0.35);
}

.legacy-alert.error {
  border-color: rgba(239, 68, 68, 0.35);
}

.legacy-hidden {
  display: none !important;
}

.legacy-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(16, 31, 57, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 16px;
  margin-top: 12px;
}
.legacy-card-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 10px;
}
.legacy-password-hint {
  color: #93a7c4;
  font-size: 12px;
  margin: 4px 0 12px;
  line-height: 1.5;
}

/* Face scan */
.legacy-face-scan {
  margin-bottom: 14px;
}
.legacy-face-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 6px;
}
.legacy-face-sub {
  color: #93a7c4;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.legacy-face-camera {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  aspect-ratio: 16 / 10;
}
.legacy-face-camera video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.legacy-scan-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.legacy-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  top: 0;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0), rgba(251, 191, 36, 0.9), rgba(251, 191, 36, 0));
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.55);
  animation: lhav3Scan 1.6s linear infinite;
}
.legacy-scan-rays {
  position: absolute;
  inset: -20%;
  background: conic-gradient(
    from 180deg,
    rgba(251, 191, 36, 0.0),
    rgba(251, 191, 36, 0.08),
    rgba(251, 191, 36, 0.0),
    rgba(59, 130, 246, 0.06),
    rgba(251, 191, 36, 0.0)
  );
  animation: lhav3Rays 2.2s linear infinite;
}
@keyframes lhav3Scan {
  0% { transform: translateY(0%); opacity: 0.35; }
  15% { opacity: 1; }
  100% { transform: translateY(420%); opacity: 0.35; }
}
@keyframes lhav3Rays {
  0% { transform: rotate(0deg); opacity: 0.55; }
  100% { transform: rotate(360deg); opacity: 0.55; }
}
.legacy-face-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.legacy-submit[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* Popup */
.legacy-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.legacy-overlay.show {
  opacity: 1;
  visibility: visible;
}

.legacy-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(15, 29, 52, 0.95);
  width: 90%;
  max-width: 360px;
  padding: 28px;
  border-radius: 22px;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.legacy-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.legacy-popup-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.legacy-popup h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 10px;
}

.legacy-popup p {
  font-size: 14px;
  line-height: 1.6;
  color: #a8b6ca;
  margin-bottom: 20px;
}

.legacy-popup button {
  padding: 13px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #8c6a12, #c69a22);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 900px) {
  .legacy-auth-wrapper {
    grid-template-columns: 1fr;
  }
  .legacy-auth-left {
    display: none;
  }
  .legacy-right-brand {
    display: flex;
  }
}

@media (max-width: 600px) {
  .legacy-auth-right {
    padding: 16px 12px 85px;
  }
  .legacy-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .legacy-form-title {
    font-size: 24px;
  }
  .legacy-form-subtitle {
    font-size: 13px;
  }
  .legacy-tab {
    font-size: 13px;
    padding: 12px;
  }
  .legacy-input {
    padding: 15px;
    font-size: 14px;
  }
  .legacy-submit {
    font-size: 17px;
    padding: 16px;
  }
  .legacy-social-btn {
    padding: 15px;
    font-size: 14px;
  }
}
