/* ── KamZour 2FA / Security settings ── */

/* ── Security section wrapper ── */
.pf-security {
  margin-top: 36px;
}

.pf-sec-heading {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff2e95;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ── 2FA card (matches pf-card visual language) ── */
.tfa-card {
  background: linear-gradient(135deg, #0e0018 0%, #1a0030 60%, #280045 100%);
  border: 1px solid rgba(196, 115, 243, 0.18);
  border-radius: 24px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.28s ease;
}
.tfa-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(196,115,243,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.tfa-card-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 14px;
}
.tfa-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.tfa-card-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 24px;
}

/* ── Status badge ── */
.tfa-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
}
.tfa-status--on {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.25);
}
.tfa-status--off {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.1);
}
.tfa-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Backup codes remaining pill ── */
.tfa-backup-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 99px;
  padding: 4px 12px;
  margin-left: 10px;
}
.tfa-backup-pill b { color: rgba(255,255,255,0.75); }

/* ── Action row ── */
.tfa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

/* ── Buttons (mirror kz-btn family but inline with tfa card) ── */
.tfa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.14s, opacity 0.14s;
  border: none;
  letter-spacing: 0.01em;
}
.tfa-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tfa-btn--primary {
  background: linear-gradient(135deg, #ff2e95, #c473f3);
  color: #fff;
}
.tfa-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,46,149,0.35);
}
.tfa-btn--ghost {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.12);
}
.tfa-btn--ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.tfa-btn--danger {
  background: rgba(255,80,80,0.1);
  color: #ff6464;
  border: 1px solid rgba(255,80,80,0.2);
}
.tfa-btn--danger:hover:not(:disabled) {
  background: rgba(255,80,80,0.18);
}

/* ── Setup panel ── */
.tfa-setup-panel {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.tfa-setup-steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.tfa-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.tfa-step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2e95, #c473f3);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.tfa-step-body { flex: 1; }
.tfa-step-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}
.tfa-step-hint {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 12px;
  line-height: 1.55;
}

/* ── QR code container ── */
.tfa-qr-wrap {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
#tfaQrCanvas {
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  display: block;
  flex-shrink: 0;
}
.tfa-qr-fallback {
  flex: 1;
  min-width: 200px;
}
.tfa-qr-fallback-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.tfa-manual-code {
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: #c473f3;
  letter-spacing: 0.12em;
  background: rgba(196,115,243,0.08);
  border: 1px solid rgba(196,115,243,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  word-break: break-all;
  line-height: 1.8;
  cursor: text;
  user-select: all;
}
.tfa-copy-hint {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.3);
  margin-top: 6px;
}

/* ── Code input ── */
.tfa-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.tfa-code-input {
  width: 168px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-align: center;
  transition: border-color 0.18s;
  outline: none;
}
.tfa-code-input:focus {
  border-color: rgba(255,46,149,0.55);
  box-shadow: 0 0 0 3px rgba(255,46,149,0.12);
}
.tfa-code-input::placeholder { color: rgba(255,255,255,0.2); letter-spacing: 0.1em; }

/* ── Inline error ── */
.tfa-error {
  font-size: 0.83rem;
  color: #ff7070;
  margin-top: 10px;
  display: none;
}
.tfa-error.show { display: block; }

/* ── Backup codes reveal panel ── */
.tfa-backup-reveal {
  margin-top: 20px;
  padding: 20px;
  background: rgba(74,222,128,0.05);
  border: 1px solid rgba(74,222,128,0.18);
  border-radius: 16px;
}
.tfa-backup-reveal-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 4px;
}
.tfa-backup-reveal-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}
.tfa-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.tfa-backup-code {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  letter-spacing: 0.1em;
  user-select: all;
}

/* ── 2FA login modal step ── */
.kz-2fa-step { display: none; }

/* Centred hero: icon + title + subtitle */
.kz-2fa-hero {
  text-align: center;
  margin-bottom: 36px;
}
.kz-2fa-icon-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #ff2e95, #7e24dd);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; line-height: 1;
  margin: 0 auto 24px;
  box-shadow: 0 8px 32px rgba(255,46,149,0.3), 0 0 0 1px rgba(255,46,149,0.15);
}
.kz-2fa-hero .kz-modal-title { margin-bottom: 12px; }
.kz-2fa-hero .kz-modal-sub   { margin-bottom: 0; line-height: 1.72; }

/* "Works with" label + app badges */
.kz-2fa-apps {
  text-align: center;
  margin-bottom: 32px;
}
.kz-2fa-apps-label {
  display: block;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 14px;
}
.kz-2fa-app-icons {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
}
.kz-2fa-app-badge {
  font-size: 0.76rem; font-weight: 500;
  color: rgba(196,115,243,0.85);
  background: rgba(196,115,243,0.08);
  border: 1px solid rgba(196,115,243,0.22);
  border-radius: 99px;
  padding: 6px 14px;
}

/* OTP input wrapper */
.kz-2fa-input-wrap { margin-bottom: 28px; }

/* Space after the primary Verify button (direct child only, not the backup submit) */
.kz-2fa-step > .kz-btn-primary { margin-bottom: 4px; }
.kz-2fa-big-input {
  width: 100%;
  padding: 20px 16px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 2.2rem; font-weight: 700;
  letter-spacing: 0.5em;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  margin-bottom: 0;
}
.kz-2fa-big-input:focus {
  border-color: #ff2e95;
  box-shadow: 0 0 0 4px rgba(255,46,149,0.14), inset 0 1px 0 rgba(255,46,149,0.06);
  background: rgba(255,46,149,0.03);
}
.kz-2fa-big-input::placeholder {
  color: rgba(255,255,255,0.12);
  font-size: 1.8rem; letter-spacing: 0.4em;
}

/* Divider */
.kz-2fa-or {
  display: flex; align-items: center; gap: 14px;
  margin: 28px 0 24px;
  font-size: 0.74rem; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.22);
}
.kz-2fa-or::before,
.kz-2fa-or::after {
  content: ''; flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* Backup toggle link */
.kz-2fa-backup-toggle {
  font-size: 0.84rem; font-weight: 500;
  color: rgba(196,115,243,0.7);
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: 'Inter', sans-serif;
  display: block; width: 100%; text-align: center;
  margin-bottom: 24px;
  transition: color 0.15s;
  text-decoration: underline;
  text-decoration-color: rgba(196,115,243,0.28);
  text-underline-offset: 3px;
}
.kz-2fa-backup-toggle:hover {
  color: #c473f3;
  text-decoration-color: rgba(196,115,243,0.6);
}

/* ── Copy backup code button ── */
.tfa-backup-copy-btn {
  display: block;
  margin: 14px auto 0;
  background: rgba(196,115,243,0.1);
  border: 1px solid rgba(196,115,243,0.25);
  border-radius: 99px;
  color: rgba(196,115,243,0.9);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem; font-weight: 600;
  padding: 8px 22px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  letter-spacing: 0.02em;
}
.tfa-backup-copy-btn:hover {
  background: rgba(196,115,243,0.18);
  color: #c473f3;
}
.tfa-backup-copy-btn.copied {
  background: rgba(74,222,128,0.1);
  border-color: rgba(74,222,128,0.3);
  color: #4ade80;
}

/* Backup code section container */
.kz-2fa-backup-section {
  background: rgba(196,115,243,0.05);
  border: 1px solid rgba(196,115,243,0.15);
  border-radius: 14px;
  padding: 22px 22px 14px;
  margin-bottom: 20px;
}
.kz-2fa-backup-section .kz-label       { margin-bottom: 10px; }
.kz-2fa-backup-section .kz-form-group  { margin-bottom: 20px; }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .tfa-card { padding: 28px 20px; }
  .tfa-qr-wrap { flex-direction: column; }
  .tfa-backup-grid { grid-template-columns: 1fr; }
  .tfa-code-row { flex-direction: column; align-items: flex-start; }
}
