/* ============================================================
   FOVENTRA AUTH - ULTRA GLASSMORPHISM (LIGHT/DARK ADAPTIVE)
   ============================================================ */

/* ── Global & Reset ────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.w-full {
  width: 100%;
}

/* ── Page Layout ───────────────────────────────────────────────── */
.auth_page_layout {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: transparent;
}

/* ── Main Glass Card ───────────────────────────────────────────── */
.auth_glass_card {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  width: 100%;
  max-width: 1100px;
  min-height: 700px;
  background: rgba(var(--title-color-rgb), 0.02);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--ui-border-glass);
  border-radius: var(--border-radius-max);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* Grid taşma önleme (çok önemli) */
.auth_glass_card > * {
  min-width: 0;
}

/* ── Side Panel (Left - Branding) ──────────────────────────────── */
.auth_side_panel {
  background: linear-gradient(135deg, rgba(var(--page-color), 0.15), rgba(var(--title-color-rgb), 0.05));
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--ui-border-glass);
  position: relative;
  overflow: hidden;
}

.side_title {
  font-size: 48px;
  font-weight: 900;
  color: var(--title-color);
  margin-bottom: 20px;
}

.side_title span {
  color: var(--secondary-color);
}

.side_text {
  color: var(--subtext-color);
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
}

/* ── Main Panel (Right - Forms) ────────────────────────────────── */
.auth_main_panel {
  padding: 60px;
  background: rgba(var(--title-color-rgb), 0.02);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ── Tabs ──────────────────────────────────────────────────────── */
.auth_tabs_container {
  background: var(--ui-hover-bg);
  border: 1px solid var(--ui-border-glass);
  border-radius: var(--border-radius-xxl);
  padding: 6px;
  margin-bottom: 40px;
}

.auth_tabs {
  display: flex;
  position: relative;
  width: 100%;
}

.auth_tab_btn {
  flex: 1;
  padding: 15px;
  background: transparent;
  border: none;
  color: var(--subtext-color);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s;
}

.auth_tab_btn.active {
  color: #ffffff;
}

.auth_tab_indicator {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 50%;
  height: 100%;
  background: var(--secondary-color);
  border-radius: var(--border-radius-xl);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1;
}

/* ── Forms ─────────────────────────────────────────────────────── */
.auth_form {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: authSlideUp 0.5s ease forwards;
}

.auth_form.active_form {
  display: flex;
}

.auth_input_group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth_input_group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--title-color);
  margin-left: 4px;
}

.auth_input_group input {
  width: 100%;
  padding: 16px 20px;
  background: var(--form-input-bg);
  border: 1px solid var(--form-border);
  border-radius: var(--border-radius-xl);
  color: var(--text-color);
  font-size: 15px;
  transition: all 0.3s;
}

.auth_input_group input::placeholder {
  color: var(--subtext-color);
  opacity: 0.6;
}

.auth_input_group input:focus {
  border-color: var(--secondary-color);
  background: var(--form-input-2-bg);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--secondary-color-rgb), 0.15);
}

/* ── Ad + Soyad Satırı (Eşit genişlik + mobil uyumlu) ──────────── */
.auth_row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.auth_row .auth_input_group {
  flex: 1 1 220px; /* eşit genişlik + minimum daralma sınırı */
  min-width: 0;
}

.auth_row .auth_input_group input {
  width: 100%;
}

/* ── Extra Links / Agreements ─────────────────────────── */
/* ── Extra Links / Agreements ─────────────────────────── */

.auth_extra {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  margin-top: -5px;
  margin-bottom: 15px;
  width: 100%;
}

.auth_register_agreements {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
}

/* ── Checkbox ─────────────────────────── */

.auth_checkbox {
  display: flex;
  align-items: center;
  flex-wrap: wrap; /* EKLENDİ: Hata metninin alt satıra geçmesine izin verir */
  gap: 8px;

  color: var(--subtext-color);
  cursor: pointer;
  user-select: none;

  line-height: 1.4;
  font-weight: 500;

  /* flicker önleme */
  transition: none;
}

.auth_checkbox input.input_error ~ .checkmark {
  border-color: rgb(var(--error-rgb)) !important;
  background: rgba(var(--error-rgb), 0.05) !important;
}

/* EKLENDİ: Hata metnini hizalayıp alt satıra atar */
.auth_checkbox .auth_error_text {
  width: 100%;
  margin-left: 24px; /* Checkbox (16px) + gap (8px) hizalaması */
  margin-top: -4px;
  font-size: 12px;
  display: none; /* Varsayılan olarak gizli */
}

/* Hata durumunda görünür yap */
.auth_checkbox input.input_error ~ .auth_error_text {
  display: block;
}

.auth_checkbox:hover {
  color: var(--secondary-color);
}

/* input */
.auth_checkbox input {
  display: none;
}

/* checkmark box */
.auth_checkbox .checkmark {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;

  border: 1px solid var(--subtext-color);
  border-radius: 4px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* icon */
.auth_checkbox .checkmark i {
  font-size: 12px;
  color: transparent;
}

/* checked state */
.auth_checkbox input:checked + .checkmark {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.auth_checkbox input:checked + .checkmark i {
  color: var(--title-dark-color);
}

/* text */
.auth_checkbox .auth_text {
  display: inline-block;
  color: inherit;
}

/* link */
.auth_checkbox .auth_text a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;

  transition: none;
}

.auth_checkbox:hover .auth_text a {
  color: var(--secondary-color);
}

.forgot_pw_link {
  color: var(--secondary-color);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.forgot_pw_link:hover {
  text-shadow: 0 0 10px rgba(var(--secondary-color-rgb), 0.3);
  transform: scale(1.05);
}

/* ── Social Login Buttons ──────────────────────────────────────── */
.auth_divider {
  position: relative;
  text-align: center;
  margin: 15px 0;
}

.auth_divider::before {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline: 0;
  height: 1px;
  background: var(--ui-border-glass);
  transform: translateY(-50%);
}

.auth_divider span {
  position: relative;
  background: var(--page-color);
  padding: 0 15px;
  color: var(--subtext-color);
  font-weight: 600;
  font-size: 12px;
}

.auth_social_grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.auth_section {
  margin-top: 12px;
}

/* 🔹 Başlık (çok baskın olmayacak) */
.auth_section_title {
  font-size: 11px;
  font-weight: 600;
  color: var(--subtext-color);
  opacity: 0.6;
  margin-bottom: 6px;
  padding-left: 2px;
}

.social_btn {
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-hover-bg);
  border: 1px solid var(--ui-border-glass);
  border-radius: var(--border-radius-xl);
  color: var(--title-color);
  font-size: 24px;
  transition: all 0.3s;
  text-decoration: none;
}

.social_btn:hover {
  background: var(--ui-active-bg);
  transform: translateY(-3px);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.social_btn span {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  font-size: 10px;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  color: var(--secondary-color);
}

/* hover’da göster */
.social_btn:hover span {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Animations ────────────────────────────────────────────────── */
@keyframes authSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin_loader {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ── Responsive Adjustments ────────────────────────────────────── */
@media (max-width: 950px) {
  .auth_glass_card {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .auth_side_panel {
    display: block;
    padding: 50px 30px;
    min-height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--ui-border-glass);
  }

  .side_title {
    font-size: 36px;
  }
  .side_text {
    font-size: 15px;
  }
  .side_gradient_blob {
    opacity: 0.4;
  }

  .auth_main_panel {
    padding: 40px 20px;
  }
}

@media (max-width: 600px) {
  .auth_page_layout {
    padding: 20px 12px;
    min-height: 100vh;
  }

  .auth_main_panel {
    padding: 25px 16px;
  }

  .auth_row .auth_input_group {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .auth_row {
    gap: 16px;
  }

  .auth_form {
    gap: 18px;
  }

  .auth_input_group input {
    padding: 13px 14px;
    font-size: 14.5px;
  }

  .glass_btn {
    padding: 14px 24px;
    font-size: 15px;
  }

  .auth_tabs {
    font-size: 14px;
  }
}

/* ── Password Strength Rules ───────────────────────────────────── */
.auth_pw_rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding-left: 6px;
}

.auth_pw_rules span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--subtext-color);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.auth_pw_rules span i {
  font-size: 10px;
  color: var(--subtext-color);
  opacity: 0.7;
}

.auth_pw_rules span.rule-passed,
.auth_pw_rules span.rule-passed i {
  color: rgb(var(--success-rgb));
  opacity: 1;
}

/* ── Form Error States ─────────────────────────────────────────── */
.auth_error_text {
  color: rgb(var(--error-rgb));
  font-size: 12px;
  font-weight: 600;
  margin: 4px 0 0 4px;
  display: none;
  animation: authFadeIn 0.3s ease forwards;
}

.auth_input_group input.input_error {
  border-color: rgb(var(--error-rgb)) !important;
  background: rgba(var(--error-rgb), 0.05) !important;
}

.auth_input_group input.input_error:focus {
  border-color: rgb(var(--error-rgb)) !important;
  box-shadow: 0 0 15px rgba(var(--error-rgb), 0.25) !important;
  background: rgba(var(--error-rgb), 0.08) !important;
}

.auth_input_group input.input_error ~ .auth_error_text {
  display: block;
}

/* ── Hints & Page Specific ─────────────────────────────────────── */
.auth_hint_text {
  font-size: 11px;
  color: var(--subtext-color);
  opacity: 0.7;
  margin: 2px 0 0 4px;
}

/* Forgot Password sayfasına özel stiller */
.auth_back_link {
  margin-bottom: 25px;
}

.auth_back_link a {
  color: var(--subtext-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.auth_back_link a:hover {
  color: var(--secondary-color);
  transform: translateX(-5px);
}

.auth_form_header {
  margin-bottom: 30px;
}

.auth_form_header h3 {
  color: var(--title-color);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth_form_header p {
  color: var(--subtext-color);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Loading Button State ──────────────────────────────────────── */
.glass_btn.btn_loading {
  pointer-events: none;
  opacity: 0.7;
  cursor: not-allowed;
}

.spin_icon {
  display: inline-block;
  animation: spin_loader 1s linear infinite;
  margin-right: 8px;
  font-size: 18px;
}

.auth_pw_wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth_pw_wrapper input {
  width: 100%;
  padding-right: 45px;
}

.toggle-pw {
  position: absolute;
  right: 15px;
  color: var(--subtext-color);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-pw svg {
  width: 20px;
  height: 20px;
}

.toggle-pw:hover {
  color: var(--secondary-color);
}

/* 
              <div class="auth_info_section">
                <h3 class="auth_info_title">QR Kod ile Giriş</h3>
                <p class="auth_info_text">Mobil Cihazınız İle Hızlıca Giriş Yapın, QR Kodunu Tara ve Devam Et!</p>
                <p class="auth_info_text">QR Kod, Bilgisayarınızda Profil > Hızlı Giriş Sekmesinde Bulunabilir.</p>
              </div>
*/

.auth_info_section {
  background: var(--ui-hover-bg);
  border: 1px solid var(--ui-border-glass);
  border-radius: var(--border-radius-xl);
  padding: 20px;
}

.auth_info_title {
  font-size: 18px;
  font-weight: 700;
  color: var(--title-color);
  margin-bottom: 10px;
}

.auth_info_text {
  color: var(--subtext-color);
  font-size: 14px;
  line-height: 1.5;
}
/* ============================================================
   FOVENTRA QR SCANNER - CLEAN PRODUCTION CSS
   ============================================================ */

/* ── WRAPPER ───────────────────────── */
.qr_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

/* ── CONTROLS ───────────────────────── */
.qr_controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

/* ── BUTTONS ────────────────────────── */
.qr_btn {
  padding: 10px 14px;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--ui-border-glass);
  background: var(--ui-hover-bg);
  color: var(--title-color);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
}

.qr_btn:hover {
  border-color: var(--secondary-color);
  transform: translateY(-2px);
}

.qr_btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.qr_btn.danger:hover {
  background: rgba(var(--error-rgb), 0.1);
  color: rgb(var(--error-rgb));
}

/* ── SCANNER GLASS ─────────────────── */
.qr_scanner_glass {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;

  background: rgba(var(--title-color-rgb), 0.03);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--ui-border-glass);
  border-radius: var(--border-radius-xl);
  overflow: hidden;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: 0.3s ease;
}

.qr_scanner_glass.active {
  box-shadow: 0 15px 40px rgba(var(--secondary-color-rgb), 0.15);
}

/* ── CAMERA CONTAINER ───────────────── */
#qr-reader {
  width: 100%;
  height: 100%;
  position: relative;
}

#qr-reader video,
#qr-reader canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: inherit;
}

/* ── OVERLAY ────────────────────────── */
.qr_overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.qr_scanner_glass.active .qr_overlay {
  opacity: 1;
}

/* ── FRAME ──────────────────────────── */
.qr_frame {
  position: absolute;
  inset: 15%;
  border-radius: 12px;
  border: 2px solid rgba(var(--secondary-color-rgb), 0.6);

  box-shadow: inset 0 0 20px rgba(var(--secondary-color-rgb), 0.15);
}

/* ── SCAN LINE ──────────────────────── */
.qr_scan_line {
  position: absolute;
  left: 15%;
  right: 15%;
  height: 2px;

  background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);

  box-shadow: 0 0 15px rgba(var(--secondary-color-rgb), 0.6);
  animation: none;
}

.qr_scanner_glass.active .qr_scan_line {
  animation: qrScanMove 2.2s linear infinite;
}

@keyframes qrScanMove {
  0% {
    top: 15%;
  }
  100% {
    top: 85%;
  }
}

/* ── RESULT TEXT ────────────────────── */
.qr_result_text {
  font-size: 13px;
  font-weight: 600;
  color: var(--subtext-color);
  text-align: center;
  transition: 0.25s ease;
}

.qr_result_text.success {
  color: rgb(var(--success-rgb));
}

.qr_result_text.error {
  color: rgb(var(--error-rgb));
}

/* ── RESPONSIVE ─────────────────────── */
@media (max-width: 600px) {
  .qr_scanner_glass {
    max-width: 260px;
  }

  .qr_btn {
    font-size: 12px;
    padding: 9px 12px;
  }
}

.qr_mode_switch {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}

.qr_show_box {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-hover-bg);
  border: 1px solid var(--ui-border-glass);
  border-radius: var(--border-radius-xl);
}

.hidden {
  display: none !important;
}

#qr-show-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px; /* Boyut 320px'den 400px'e çıkarıldı */
  aspect-ratio: 1;
  background: #ffffff; /* QR kodun okutulabilmesi için zemin tamamen beyaz yapıldı */
  padding: 24px; /* Kameranın rahat odaklanması için etrafta kalın bir beyaz boşluk (Quiet Zone) bırakıldı */
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  box-sizing: border-box; /* Padding'in kutu boyutunu bozmasını engeller */
}

#qr-show-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ── CAMERA SWITCH BUTTON ───────────────── */
/* ── CAMERA SWITCH BUTTON (ROOT VAR VERSION) ───────────────── */
.qr_switch_btn {
  position: absolute;
  bottom: 15px;
  right: 15px;

  width: 38px;
  height: 38px;
  border-radius: 50%;

  background: var(--ui-hover-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: 1px solid var(--ui-border-glass);

  color: var(--title-color);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  z-index: 20;

  transition: 0.2s ease;
}

.qr_switch_btn:hover {
  background: var(--ui-active-bg, var(--ui-hover-bg));
  transform: scale(1.05);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.qr_switch_btn:active {
  transform: scale(0.95);
}

.qr_switch_btn i {
  font-size: 18px;
  color: inherit;
}

.otp_group {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.otp_input {
  width: 100%;
  height: 54px;
  text-align: center;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--form-border);
  background: var(--form-input-bg);
  color: var(--title-color);
  font-size: 22px;
  font-weight: 800;
  outline: none;
  transition: 0.25s ease;
}

.otp_input:focus {
  border-color: var(--secondary-color);
  background: var(--form-input-2-bg);
  box-shadow: 0 0 0 3px rgba(var(--secondary-color-rgb), 0.15);
}

.auth_magic_success {
  text-align: center;
  padding: 24px;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--ui-border-glass);
  background: rgba(var(--success-rgb), 0.08);
  animation: authSlideUp 0.45s ease forwards;
}

.magic_icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--success-rgb), 0.12);
  color: rgb(var(--success-rgb));
  font-size: 30px;
}

.auth_magic_success h3 {
  color: var(--title-color);
  font-size: 20px;
  margin-bottom: 8px;
}

.auth_magic_success p {
  color: var(--subtext-color);
  font-size: 14px;
  line-height: 1.5;
}

.auth_code_step {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: authSlideUp 0.45s ease forwards;
}

.auth_code_sent_card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  gap: 12px;
  padding: 20px;

  border-radius: var(--border-radius-xl);
  border: 1px solid rgba(var(--success-rgb), 0.25);
  background: rgba(var(--success-rgb), 0.08);
}

.code_sent_icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--success-rgb), 0.14);
  color: rgb(var(--success-rgb));
  margin: 0 auto;
  box-shadow: 0 0 0 6px rgba(var(--success-rgb), 0.06);
}

.auth_code_sent_card > div:last-child {
  text-align: center;
}

.code_sent_icon i {
  font-size: 24px;
  line-height: 1;
  display: block;
  transform: translateY(1px);
}

.auth_code_sent_card h4 {
  color: var(--title-color);
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}

.auth_code_sent_card p {
  color: var(--subtext-color);
  margin: 0;
  font-size: 13px;
}

.otp_group {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.otp_input {
  width: 100%;
  height: 58px;
  text-align: center;
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--form-border);
  background: var(--form-input-bg);
  color: var(--title-color);
  font-size: 24px;
  font-weight: 900;
  outline: none;
  transition: 0.25s ease;
}

.otp_input:focus {
  border-color: var(--secondary-color);
  background: var(--form-input-2-bg);
  box-shadow: 0 0 0 3px rgba(var(--secondary-color-rgb), 0.15);
  transform: translateY(-2px);
}

.otp_input.filled {
  border-color: rgba(var(--success-rgb), 0.55);
  background: rgba(var(--success-rgb), 0.08);
}

.auth_magic_success {
  position: relative;
  text-align: center;
  padding: 28px 22px;
  border-radius: var(--border-radius-xl);
  border: 1px solid rgba(var(--success-rgb), 0.22);
  background: radial-gradient(circle at top, rgba(var(--success-rgb), 0.18), transparent 45%), rgba(var(--success-rgb), 0.07);
  animation: magicPop 0.55s ease forwards;
  overflow: hidden;
}

.magic_success_ring {
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--success-rgb), 0.08);
  box-shadow: 0 0 0 8px rgba(var(--success-rgb), 0.05);
  animation: magicPulse 1.8s ease-in-out infinite;
}

.magic_icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--success-rgb), 0.15);
  color: rgb(var(--success-rgb));
  font-size: 30px;
}

.auth_magic_success h3 {
  color: var(--title-color);
  font-size: 20px;
  margin: 0 0 8px;
}

.auth_magic_success p {
  color: var(--subtext-color);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

@keyframes magicPop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes magicPulse {
  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(var(--success-rgb), 0.05);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(var(--success-rgb), 0.1);
  }
}

.otp_show_anim {
  animation: otpReveal 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes otpReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.otp_pop {
  animation: otpPop 0.18s ease;
}

@keyframes otpPop {
  0% {
    transform: scale(0.9);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

.magic_burst {
  animation: magicBurst 0.6s ease;
}

@keyframes magicBurst {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  60% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.auth_code_email_step {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth_code_links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
}

.auth_inline_btn {
  border: 0;
  background: transparent;
  color: var(--secondary-color);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  transition: 0.25s ease;
}

.auth_inline_btn:hover {
  transform: translateY(-1px);
  text-shadow: 0 0 10px rgba(var(--secondary-color-rgb), 0.25);
}

.auth_inline_btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.otp_error {
  animation: otpShake 0.38s ease;
  border-color: rgb(var(--error-rgb)) !important;
  background: rgba(var(--error-rgb), 0.08) !important;
  box-shadow: 0 0 0 3px rgba(var(--error-rgb), 0.12) !important;
}

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

/* ============================================================
   AUTH 2FA CHALLENGE MODAL - SAFE RESPONSIVE LAYOUT
   ============================================================ */

.auth_2fa_overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: grid;
  place-items: center;

  padding: 16px;

  background: radial-gradient(circle at top, rgba(var(--primary-rgb), 0.22), transparent 34%), rgba(5, 7, 15, 0.72);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  overflow-x: hidden;
  overflow-y: auto;

  animation: auth2faFade 0.22s ease both;
}

.auth_2fa_overlay.hidden {
  display: none !important;
}

.auth_2fa_card {
  position: relative;

  width: 100%;
  max-width: 430px;
  max-height: calc(100dvh - 32px);

  margin: auto;

  display: flex;
  flex-direction: column;

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;

  border-radius: 24px;
  padding: 24px;

  text-align: center;

  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06)), rgba(14, 17, 30, 0.94);

  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);

  animation: auth2faPop 0.3s cubic-bezier(0.2, 0.9, 0.25, 1.08) both;
}

.auth_2fa_card,
.auth_2fa_card * {
  box-sizing: border-box;
  min-width: 0;
}

.auth_2fa_card::-webkit-scrollbar {
  width: 6px;
}

.auth_2fa_card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.auth_2fa_glow {
  position: absolute;
  width: 210px;
  height: 210px;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(var(--primary-rgb), 0.42);
  filter: blur(72px);
  pointer-events: none;
}

.auth_2fa_icon {
  position: relative;

  width: 68px;
  height: 68px;

  margin: 0 auto 16px;

  display: grid;
  place-items: center;

  flex: 0 0 auto;

  border-radius: 22px;

  color: var(--title-dark-color);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.95), rgba(var(--info-rgb), 0.75));
  box-shadow: 0 16px 36px rgba(var(--primary-rgb), 0.28);
}

.auth_2fa_icon i {
  font-size: 32px;
  line-height: 1;
}

.auth_2fa_card h3 {
  position: relative;

  margin: 0 0 7px;

  color: var(--title-dark-color);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
}

.auth_2fa_card p {
  position: relative;

  width: 100%;
  max-width: 36ch;

  margin: 0 auto;

  color: var(--text-dark-color);
  font-size: 13.5px;
  line-height: 1.45;
}

.auth_2fa_account {
  position: relative;

  width: fit-content;
  max-width: 100%;

  margin: 13px auto 16px;
  padding: 7px 12px;

  display: inline-flex;

  border-radius: 999px;

  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);

  font-size: 12.5px;
  line-height: 1.25;

  word-break: break-word;
  overflow-wrap: anywhere;
}

.auth_2fa_digits {
  width: 100%;
  max-width: 330px;

  margin: 16px auto;

  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.auth_2fa_digit {
  width: 100%;
  min-width: 0;

  height: 48px;

  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);

  background: rgba(255, 255, 255, 0.08);
  color: var(--title-dark-color);

  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  text-align: center;

  outline: none;
  transition: 0.18s ease;
}

.auth_2fa_digit:focus,
.auth_2fa_digit.filled {
  border-color: rgba(var(--primary-rgb), 0.72);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.16);
  transform: translateY(-1px);
}

.auth_2fa_digit.otp_error,
.auth_2fa_backup_input.otp_error {
  border-color: rgba(var(--error-rgb), 0.9) !important;
  background: rgba(var(--error-rgb), 0.08) !important;
  box-shadow: 0 0 0 3px rgba(var(--error-rgb), 0.12) !important;
  animation: auth2faShake 0.4s ease;
}

.auth_2fa_backup {
  width: 100%;

  margin: 14px 0 16px;

  text-align: left;

  animation: auth2faBackupIn 0.22s ease both;
}

.auth_2fa_backup.hidden {
  display: none !important;
}

.auth_2fa_backup label {
  display: block;

  margin-bottom: 8px;

  color: var(--title-dark-color);

  font-size: 13px;
  font-weight: 700;
}

.auth_2fa_backup_input {
  width: 100%;
  height: 46px;

  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);

  background: rgba(255, 255, 255, 0.08);
  color: var(--title-dark-color);

  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-align: center;
  text-transform: uppercase;

  outline: none;
  transition: 0.18s ease;
}

.auth_2fa_backup_input:focus {
  border-color: rgba(var(--primary-rgb), 0.72);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.16);
}

.auth_2fa_backup small {
  display: block;

  margin-top: 8px;

  color: var(--text-dark-color);

  font-size: 12px;
  line-height: 1.42;

  opacity: 0.78;
}

.auth_2fa_actions {
  width: 100%;

  display: grid;
  gap: 9px;
}

.auth_2fa_actions .glass_btn {
  width: 100%;
  min-width: 0;
  min-height: 46px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  white-space: normal;
  text-align: center;
}

.auth_2fa_actions .auth_inline_btn {
  width: 100%;

  padding: 6px 0;

  text-align: center;
  line-height: 1.25;

  white-space: normal;
}

.auth_2fa_hint {
  margin-top: 12px !important;

  color: var(--text-dark-color);

  font-size: 11.5px;
  line-height: 1.35;

  opacity: 0.72;
}

/* Tablet / Nest Hub / kısa ekran */
@media (max-height: 640px) {
  .auth_2fa_overlay {
    place-items: start center;
    padding: 10px;
  }

  .auth_2fa_card {
    max-height: calc(100dvh - 20px);
    max-width: 410px;
    padding: 16px;
    border-radius: 20px;
  }

  .auth_2fa_icon {
    width: 46px;
    height: 46px;
    margin-bottom: 8px;
    border-radius: 16px;
  }

  .auth_2fa_icon i {
    font-size: 24px;
  }

  .auth_2fa_card h3 {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .auth_2fa_card p {
    font-size: 11.5px;
    line-height: 1.32;
  }

  .auth_2fa_account {
    margin: 8px auto 10px;
    padding: 5px 10px;
    font-size: 10.5px;
  }

  .auth_2fa_digits {
    margin: 10px auto;
    gap: 6px;
  }

  .auth_2fa_digit {
    height: 38px;
    border-radius: 11px;
    font-size: 17px;
  }

  .auth_2fa_backup {
    margin: 9px 0 10px;
  }

  .auth_2fa_backup_input {
    height: 40px;
  }

  .auth_2fa_backup small {
    font-size: 10.5px;
    line-height: 1.3;
  }

  .auth_2fa_actions {
    gap: 6px;
  }

  .auth_2fa_actions .glass_btn {
    min-height: 40px;
  }

  .auth_2fa_hint {
    margin-top: 8px !important;
    font-size: 10px;
  }
}

/* Dar ekran */
@media (max-width: 520px) {
  .auth_2fa_overlay {
    place-items: start center;
    padding: 10px;
  }

  .auth_2fa_card {
    max-width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 18px 14px;
    border-radius: 20px;
  }

  .auth_2fa_digits {
    width: 100%;
    gap: 6px;
  }

  .auth_2fa_digit {
    height: 42px;
    font-size: 18px;
    border-radius: 12px;
  }
}

/* Çok dar / çok kısa ekran */
@media (max-width: 380px), (max-height: 500px) {
  .auth_2fa_overlay {
    padding: 8px;
  }

  .auth_2fa_card {
    max-height: calc(100dvh - 16px);
    padding: 14px 12px;
    border-radius: 18px;
  }

  .auth_2fa_icon {
    width: 42px;
    height: 42px;
    margin-bottom: 7px;
    border-radius: 14px;
  }

  .auth_2fa_icon i {
    font-size: 22px;
  }

  .auth_2fa_card h3 {
    font-size: 18px;
  }

  .auth_2fa_card p {
    font-size: 11px;
  }

  .auth_2fa_account {
    margin: 7px auto 9px;
    font-size: 10.5px;
  }

  .auth_2fa_digits {
    margin: 9px auto;
    gap: 5px;
  }

  .auth_2fa_digit {
    height: 36px;
    font-size: 16px;
    border-radius: 10px;
  }

  .auth_2fa_hint {
    display: none;
  }
}

/* Aşırı kısa ekran */
@media (max-height: 430px) {
  .auth_2fa_overlay {
    display: block;
    padding: 8px;
  }

  .auth_2fa_card {
    margin: 0 auto;
  }

  .auth_2fa_hint,
  .auth_2fa_account {
    display: none;
  }
}

@keyframes auth2faFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes auth2faPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth2faShake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  50% {
    transform: translateX(4px);
  }

  75% {
    transform: translateX(-3px);
  }
}

@keyframes auth2faBackupIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
