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

/* Prevent global navbar/footer from rendering on login page */
.login-page #navbar-placeholder,
.login-page #footer-placeholder {
  display: none;
}

.login-page {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}

/* ============================================
   RETURN BUTTON
   ============================================ */

.return-btn {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.875rem 0.5rem 0.625rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.return-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.return-btn svg {
  transition: transform 0.2s ease;
}

.return-btn:hover svg {
  transform: translateX(-2px);
}

/* ============================================
   SPLIT LAYOUT
   ============================================ */

.login-split {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ============================================
   LEFT PANEL
   ============================================ */

.login-left {
  position: relative;
  width: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.login-left-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 3rem 3rem 3rem 3.5rem;
  gap: 1rem;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.brand-logo {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 28px rgba(180, 22, 22, 0.5));
  flex-shrink: 0;
}

.brand-name {
  font-size: 2.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.brand-tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
  letter-spacing: 0.01em;
  max-width: 480px;
  white-space: nowrap;
}

.left-fade-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, #000 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}



/* ============================================
   RIGHT PANEL
   ============================================ */

.login-right {
  width: 50%;
  background: rgba(11, 11, 11, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem;
  background-image: radial-gradient(ellipse at 60% 20%, rgba(180, 22, 22, 0.04) 0%, transparent 60%);
}

.login-form-wrapper {
  width: 100%;
  max-width: 400px;
}

/* ============================================
   FORM HEADER
   ============================================ */

.form-header {
  margin-bottom: 2rem;
}

.form-heading {
  font-size: 1.625rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.form-subheading {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   TOGGLE
   ============================================ */

.login-toggle {
  display: flex;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 0.3rem;
  margin-bottom: 1.75rem;
}

.toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.toggle-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
}

.toggle-btn.active {
  background: rgba(180, 22, 22, 0.15);
  color: #fff;
  border: 1px solid rgba(180, 22, 22, 0.3);
  box-shadow: 0 2px 8px rgba(180, 22, 22, 0.15);
}

/* Discord toggle active overrides for user tab */
.toggle-btn[data-type="user"].active {
  background: rgba(88, 101, 242, 0.12);
  border-color: rgba(88, 101, 242, 0.3);
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.15);
}

/* ============================================
   PANELS
   ============================================ */

.login-panel {
  display: none;
}

.login-panel.active {
  display: block;
}

.login-panel.animating-in {
  display: block;
}

.panel-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

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

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.form-group input:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.form-group input:focus {
  border-color: rgba(180, 22, 22, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(180, 22, 22, 0.1);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* Password field */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1.375rem;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #5865f2;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  cursor: pointer;
}

.inline-link {
  color: #5865f2;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.inline-link:hover {
  color: #7983f5;
  text-decoration: underline;
}

/* ============================================
   CLOUDFLARE TURNSTILE
   ============================================ */
.cf-turnstile-wrapper {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  /* Turnstile renders its own iframe — we just
     ensure it fits the form width cleanly */
}

.cf-turnstile-wrapper .cf-turnstile {
  width: 100%;
}

/* ============================================
   ERROR MESSAGE
   ============================================ */

.error-message {
  display: none;
  align-items: center;
  gap: 0.6rem;
  background: rgba(237, 66, 69, 0.08);
  border: 1px solid rgba(237, 66, 69, 0.25);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  margin-bottom: 1rem;
  color: #ff6b6b;
  font-size: 0.825rem;
}

.error-message.show {
  display: flex;
  animation: shake 0.35s ease;
}

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

/* ============================================
   BUTTONS
   ============================================ */

.login-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.login-btn:active {
  transform: translateY(1px) !important;
}

.discord-btn {
  background: #5865f2;
  color: #fff;
}

.discord-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.35);
}

.discord-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.staff-btn {
  background: #b41616;
  color: #fff;
  margin-top: 0.25rem;
}

.staff-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(180, 22, 22, 0.35);
}

/* ============================================
   2FA PANEL EXTRAS
   ============================================ */

.twofa-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.twofa-timer {
  color: rgba(255, 255, 255, 0.4);
}

.twofa-timer strong {
  color: rgba(255, 255, 255, 0.7);
}

.twofa-resend {
  background: none;
  border: none;
  color: #b41616;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.twofa-resend:hover:not(:disabled) {
  color: #d11a1a;
}

.twofa-resend:disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
  text-decoration: none;
}

.back-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding: 0.625rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.825rem;
  cursor: pointer;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.back-btn:hover {
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   2FA PANEL ADDITIONS
   ============================================ */

.twofa-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.twofa-timer {
  color: rgba(255, 255, 255, 0.4);
}

.twofa-resend {
  background: none;
  border: none;
  color: #b41616;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.twofa-resend:hover:not(:disabled) {
  color: #d11a1a;
}

.twofa-resend:disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  margin-top: 0.625rem;
  padding: 0.625rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.825rem;
  cursor: pointer;
  transition: color 0.2s ease;
  letter-spacing: 0.01em;
}

.back-btn:hover {
  color: rgba(255, 255, 255, 0.65);
}

/* ============================================
   RESPONSIVE — MOBILE SINGLE COLUMN
   ============================================ */

@media (max-width: 768px) {
  .login-page {
    height: auto;
    overflow: auto;
  }

  .login-split {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .login-left {
    width: 100%;
    height: 180px;
    flex-shrink: 0;
  }

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

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 1.5rem;
  }

  .brand-tagline {
    display: none;
  }

  .left-fade-bottom {
    display: none;
  }

  /* Bottom border on mobile */
  .login-left {
    border-bottom: 1px solid rgba(180, 22, 22, 0.3);
  }

  .login-right {
    width: 100%;
    padding: 2rem 1.5rem 3rem;
    overflow: visible;
  }

  .return-btn {
    top: 1rem;
    left: 1rem;
    font-size: 0.8rem;
  }

  .form-heading {
    font-size: 1.375rem;
  }
}