/* ============================================================
   Two-Factor Authentication — shared styles
   Used by both admin-panel and customer-panel 2FA components.
   ============================================================ */

/* ── Layout shells ─────────────────────────────────────────── */
.tfa-card { border-radius: 12px; background: #fff; border: none; overflow: hidden; }
.tfa-loader { height: 40vh; }
.tfa-loader i { color: var(--theme1-bg); }

/* ── Icon circles ──────────────────────────────────────────── */
.tfa-icon { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 14px; color: #fff; }
.tfa-icon-sm { width: 40px; height: 40px; margin-right: 12px; }
.tfa-icon-lg { width: 56px; height: 56px; margin-bottom: 12px; }
.tfa-icon-xl { width: 64px; height: 64px; margin-bottom: 20px; }
.tfa-icon-theme { background: var(--theme1-bg); }
.tfa-icon-success { background: #28a745; }
.tfa-icon-warning { background: #e67e22; }
.tfa-icon-telegram { background: #0088cc; }
.tfa-icon-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.tfa-icon-gradient { background: linear-gradient(135deg, var(--theme1-bg), var(--theme2-bg70, #0f2462)); }

/* ── Heading pairs ─────────────────────────────────────────── */
.tfa-header { display: flex; align-items: center; margin-bottom: 24px; }
.tfa-header-sm { margin-bottom: 12px; }
.tfa-title { margin: 0; font-weight: 700; font-size: 18px; }
.tfa-title-sm { font-size: 16px; }
.tfa-subtitle { margin: 0; color: #888; font-size: 13px; }
.tfa-subtitle-sm { font-size: 12px; }

/* ── Login 2FA verify header ──────────────────────────────── */
.tfa-login-header { text-align: center; margin-bottom: 20px; }
.tfa-login-header h4 { color: var(--theme1-bg); margin: 0; font-weight: 700; }
.tfa-login-header p { color: #888; font-size: 13px; margin: 8px 0 0; }

/* ── Status banners ────────────────────────────────────────── */
.tfa-status-active { background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%); border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; display: flex; align-items: center; }
.tfa-status-active .tfa-status-label { font-weight: 700; font-size: 14px; color: #155724; }
.tfa-status-active .tfa-status-method { font-size: 12px; color: #1e7e34; }

.tfa-status-active-sm { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; }

/* ── Alert boxes ───────────────────────────────────────────── */
.tfa-alert-warning { background: #fff3cd; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; display: flex; align-items: center; border: 1px solid #ffeeba; }
.tfa-alert-warning i { color: #856404; margin-right: 10px; }
.tfa-alert-warning span { font-size: 13px; color: #856404; }

.tfa-alert-save { background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px; padding: 12px 16px; margin-bottom: 20px; display: flex; align-items: flex-start; }
.tfa-alert-save-sm { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 12px; color: #5d4037; }
.tfa-alert-save i { color: #f57f17; margin-right: 10px; margin-top: 2px; flex-shrink: 0; }
.tfa-alert-save-sm i { margin-right: 4px; margin-top: 0; }
.tfa-alert-save div { font-size: 13px; color: #5d4037; line-height: 1.5; }

/* ── Backup codes info row ─────────────────────────────────── */
.tfa-backup-info { background: #f8f9fa; border-radius: 10px; padding: 14px 20px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.tfa-backup-info-sm { border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
.tfa-backup-info .tfa-backup-label { display: flex; align-items: center; font-size: 13px; color: #495057; }
.tfa-backup-info-sm .tfa-backup-label { font-size: 12px; }
.tfa-backup-info .tfa-backup-label i { color: #adb5bd; font-size: 14px; margin-right: 10px; }
.tfa-backup-info-sm .tfa-backup-label i { font-size: 11px; margin-right: 8px; }
.tfa-backup-badge { border-radius: 20px; padding: 2px 12px; font-size: 13px; font-weight: 700; }
.tfa-backup-badge-sm { border-radius: 12px; padding: 1px 10px; font-size: 12px; }
.tfa-backup-badge-ok { background: #28a745; color: #fff; }
.tfa-backup-badge-low { background: #ffc107; color: #212529; }
.tfa-backup-badge-empty { background: #dc3545; color: #fff; }

/* ── Backup codes grid ─────────────────────────────────────── */
.tfa-codes-grid { background: #fafbfc; border-radius: 10px; padding: 20px; margin-bottom: 20px; border: 1px solid #e9ecef; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.tfa-codes-grid-sm { padding: 12px; gap: 6px; border-radius: 8px; }
.tfa-code-item { display: flex; align-items: center; padding: 8px 12px; background: #fff; border-radius: 6px; border: 1px solid #e9ecef; }
.tfa-code-item-sm { padding: 6px 10px; background: #f8f9fa; }
.tfa-code-num { color: #adb5bd; font-size: 11px; font-weight: 600; margin-right: 10px; width: 18px; text-align: right; }
.tfa-code-num-sm { font-size: 10px; margin-right: 8px; width: 16px; }
.tfa-code-val { font-size: 14px; font-weight: 700; letter-spacing: 2px; color: #212529; font-family: monospace; }
.tfa-code-val-sm { font-size: 13px; letter-spacing: 1.5px; }

/* ── Buttons ───────────────────────────────────────────────── */
.tfa-btn-secondary { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 10px 16px; font-weight: 600; font-size: 13px; color: #495057; }
.tfa-btn-secondary-sm { font-size: 12px; padding: 8px 12px; }
.tfa-btn-secondary:hover { background: #e9ecef; }
.tfa-btn-rounded { border-radius: 8px; font-weight: 600; }
.tfa-btn-disable-trigger { background: transparent; border: 1px dashed #e0e0e0; border-radius: 8px; padding: 10px 16px; color: #aaa; font-size: 12px; margin-top: 8px; }
.tfa-btn-disable-trigger-sm { font-size: 11px; padding: 7px 14px; border-color: #ddd; margin-top: 6px; }
.tfa-btn-cancel { background: none; border: none; color: #aaa; font-size: 12px; cursor: pointer; }
.tfa-btn-cancel-sm { font-size: 11px; }
.tfa-btn-link { background: none; border: none; color: #888; font-size: 12px; cursor: pointer; padding: 4px 8px; }
.tfa-btn-link-sm { font-size: 11px; padding: 3px 6px; }
.tfa-btn-back { background: none; border: none; color: #aaa; font-size: 11px; cursor: pointer; padding: 4px 8px; margin-top: 4px; }
.tfa-btn-back-sm { font-size: 10px; margin-top: 2px; padding: 3px 6px; }

/* ── Disable confirmation box ──────────────────────────────── */
.tfa-disable-box { margin-top: 16px; padding: 16px; border: 1px solid #f5c6cb; border-radius: 10px; background: #fff5f5; }
.tfa-disable-box-sm { margin-top: 12px; padding: 14px; border-radius: 8px; }
.tfa-disable-box .tfa-disable-label { font-size: 13px; font-weight: 600; color: #721c24; margin-bottom: 10px; }
.tfa-disable-box-sm .tfa-disable-label { font-size: 12px; margin-bottom: 8px; }
.tfa-disable-box input { border-radius: 8px; font-size: 14px; margin-bottom: 10px; }
.tfa-disable-box-sm input { border-radius: 6px; font-size: 13px; margin-bottom: 8px; }
.tfa-disable-box .btn-cancel { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; font-size: 13px; }
.tfa-disable-box-sm .btn-cancel { font-size: 12px; }
.tfa-disable-box .btn-danger-confirm { background: #dc3545; color: #fff; border-radius: 6px; font-size: 13px; }
.tfa-disable-box-sm .btn-danger-confirm { font-size: 12px; }

/* ── Code input field ──────────────────────────────────────── */
.tfa-code-input { letter-spacing: 10px; font-size: 22px; font-weight: 700; padding: 12px 16px; border-radius: 8px; border: 2px solid #dee2e6; transition: border-color 0.2s; }
.tfa-code-input-lg { letter-spacing: 10px; font-size: 26px; padding: 14px 16px; border-radius: 10px; }
.tfa-code-input-sm { letter-spacing: 8px; font-size: 20px; padding: 10px 14px; }
.tfa-code-input.is-error, .tfa-code-input-lg.is-error, .tfa-code-input-sm.is-error { border-color: #e74c3c; }
.tfa-code-input-backup { letter-spacing: 3px; }
.tfa-code-input-backup-sm { letter-spacing: 3px; }
.tfa-error { color: #e74c3c; font-size: 12px; margin-top: 6px; text-align: center; }
.tfa-error-sm { font-size: 11px; margin-top: 4px; }
.tfa-input-label { font-size: 12px; color: #666; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block; }
.tfa-input-label-sm { font-size: 11px; color: #888; }

/* ── Divider line ──────────────────────────────────────────── */
.tfa-divider { border-top: 1px solid #eee; padding-top: 12px; text-align: center; }
.tfa-divider-sm { padding-top: 10px; }
.tfa-footer { text-align: center; margin-top: 16px; border-top: 1px solid #f0f0f0; padding-top: 12px; }
.tfa-footer-sm { margin-top: 12px; padding-top: 10px; }

/* ── Method selection cards ────────────────────────────────── */
.tfa-method-card { border: 2px solid #e9ecef; border-radius: 10px; padding: 18px 20px; cursor: pointer; transition: all 0.2s ease; background: #fff; margin-bottom: 12px; }
.tfa-method-card:hover { border-color: var(--theme1-bg); box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.tfa-method-card.telegram:hover { border-color: #0088cc; box-shadow: 0 2px 12px rgba(0,136,204,0.12); }
.tfa-method-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-right: 14px; flex-shrink: 0; }
.tfa-method-icon-totp { background: linear-gradient(135deg, var(--theme1-bg), var(--theme2-bg70, #0f2462)); }
.tfa-method-icon-telegram { background: linear-gradient(135deg, #0088cc, #006dad); }
.tfa-method-title { font-weight: 700; font-size: 15px; color: #212529; }
.tfa-method-desc { font-size: 12px; color: #888; margin-top: 2px; }

/* ── Step indicators ───────────────────────────────────────── */
.tfa-step { display: flex; align-items: center; margin-bottom: 20px; }
.tfa-step-num { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-right: 10px; flex-shrink: 0; transition: all 0.3s ease; }
.tfa-step-num.active { background: var(--theme1-bg); color: #fff; }
.tfa-step-num.done { background: #28a745; color: #fff; }
.tfa-step-num.pending { background: #e9ecef; color: #adb5bd; }
.tfa-step-label { font-size: 13px; }
.tfa-step-label.active { font-weight: 700; color: #212529; }
.tfa-step-label.pending { font-weight: 400; color: #adb5bd; }

/* ── Telegram step rows ────────────────────────────────────── */
.tfa-tg-step { display: flex; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.tfa-tg-step:last-child { border-bottom: none; }
.tfa-tg-step.inactive { opacity: 0.45; }
.tfa-tg-step-num { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; margin-right: 14px; flex-shrink: 0; margin-top: 2px; }
.tfa-tg-step-title { font-weight: 600; font-size: 14px; color: #212529; margin-bottom: 6px; }
.tfa-tg-bot-link { display: inline-flex; align-items: center; padding: 8px 20px; background: #0088cc; color: #fff; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 600; }
.tfa-tg-bot-link:hover { color: #fff; background: #006dad; }
.tfa-tg-command { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #f0f9ff; border: 2px dashed #0088cc; border-radius: 8px; cursor: pointer; }
.tfa-tg-command code { font-size: 14px; font-weight: 700; color: #0088cc; letter-spacing: 0.5px; }
.tfa-tg-command .tfa-tg-copy { color: #0088cc; font-size: 13px; margin-left: 12px; flex-shrink: 0; }
.tfa-tg-command .tfa-tg-copy.copied { color: #28a745; }
.tfa-tg-expire { text-align: center; padding: 10px 0; color: #adb5bd; font-size: 12px; }
.tfa-tg-success { text-align: center; padding: 32px; background: linear-gradient(135deg, #d4edda, #c3e6cb); border-radius: 12px; }
.tfa-tg-success h5 { font-weight: 700; color: #155724; margin-bottom: 4px; }
.tfa-tg-success p { color: #1e7e34; font-size: 13px; margin: 0; }

/* ── QR code display ───────────────────────────────────────── */
.tfa-qr-wrap { text-align: center; padding: 24px; margin-bottom: 20px; background: #fafbfc; border-radius: 12px; border: 1px solid #f0f0f0; }
.tfa-qr-wrap-sm { padding: 20px; margin-bottom: 16px; border-radius: 10px; }
.tfa-qr-frame { display: inline-block; padding: 12px; background: #fff; border-radius: 12px; box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.tfa-qr-frame-sm { padding: 10px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.tfa-qr-hint { color: #888; font-size: 12px; margin-top: 12px; margin-bottom: 0; }
.tfa-qr-hint-sm { font-size: 11px; margin-top: 10px; }

/* ── Manual key box ────────────────────────────────────────── */
.tfa-manual-key { background: #f8f9fa; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; border: 1px solid #e9ecef; }
.tfa-manual-key-sm { padding: 10px 14px; margin-bottom: 16px; }
.tfa-manual-key-label { font-size: 11px; color: #888; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 6px; }
.tfa-manual-key-label-sm { font-size: 10px; margin-bottom: 4px; }
.tfa-manual-key code { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; color: #495057; word-break: break-all; flex: 1; }
.tfa-manual-key-sm code { font-size: 12px; letter-spacing: 1px; }
.tfa-copy-btn { background: none; border: none; cursor: pointer; padding: 4px 8px; margin-left: 8px; flex-shrink: 0; color: #6c757d; font-size: 14px; }
.tfa-copy-btn-sm { padding: 2px 6px; font-size: 13px; }
.tfa-copy-btn.copied { color: #28a745; }

/* ── Prompt / modal overlay ────────────────────────────────── */
.tfa-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; justify-content: center; align-items: center; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tfa-modal { background: #fff; border-radius: 16px; max-width: 400px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; }
.tfa-modal-accent { height: 4px; }
.tfa-modal-accent-theme { background: linear-gradient(90deg, var(--theme1-bg), var(--theme2-bg70, #0f2462)); }
.tfa-modal-accent-danger { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.tfa-modal-body { padding: 36px 32px 32px; text-align: center; }
.tfa-modal-body h5 { font-weight: 700; font-size: 20px; margin-bottom: 8px; color: #212529; }
.tfa-modal-body p { color: #666; font-size: 14px; margin-bottom: 28px; line-height: 1.6; }
.tfa-btn-force { background: linear-gradient(135deg, #e74c3c, #c0392b); color: #fff; border-radius: 10px; padding: 12px 24px; font-weight: 700; font-size: 15px; border: none; box-shadow: 0 4px 14px rgba(231,76,60,0.3); }
.tfa-btn-prompt-primary { border-radius: 10px; padding: 12px 24px; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.tfa-btn-prompt-secondary { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 10px; padding: 10px 24px; font-weight: 600; font-size: 14px; color: #495057; margin-bottom: 8px; }
.tfa-btn-prompt-skip { background: none; border: none; color: #adb5bd; font-size: 12px; cursor: pointer; padding: 4px 8px; }

/* ── Empty / promo box (customer) ──────────────────────────── */
.tfa-promo { background: #f8f9fa; border-radius: 8px; padding: 16px; margin-bottom: 16px; text-align: center; }
.tfa-promo i { font-size: 28px; color: #dee2e6; margin-bottom: 10px; display: block; }
.tfa-promo p { color: #666; font-size: 13px; margin-bottom: 4px; line-height: 1.5; }
.tfa-promo .tfa-promo-sub { color: #aaa; font-size: 11px; margin: 0; }

/* ── Description text ──────────────────────────────────────── */
.tfa-desc { color: #666; font-size: 14px; margin-bottom: 20px; line-height: 1.5; }
.tfa-desc-sm { font-size: 13px; margin-bottom: 14px; }

/* ── 2FA badge in table (list-clients) ─────────────────────── */
.tfa-badge-toggle::after { display: none !important; }
.tfa-badge-toggle:focus { box-shadow: none !important; }

.tfa-badge { display: inline-flex; align-items: center; gap: 3px; border-radius: 3px; padding: 3px 7px; font-size: 10px; font-weight: 700; line-height: 1; letter-spacing: 0.3px; cursor: pointer; transition: opacity 0.15s; }
.tfa-badge:hover { opacity: 0.85; }
.tfa-badge-on { background: #28a745; color: #fff; }
.tfa-badge-forced { background: #ffc107; color: #212529; }
.tfa-badge-off { background: #e9ecef; color: #6c757d; }

.tfa-dd-menu { min-width: 190px; padding: 6px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,0.14); border: 1px solid #e4e4e4; border-radius: 10px; background: #fff; }
.tfa-dd-header { padding: 6px 10px 8px; font-size: 10px; color: #999; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px; }
.tfa-dd-menu .dropdown-item { padding: 8px 10px; font-size: 13px; border-radius: 6px; color: #333; transition: background 0.15s, color 0.15s; display: flex; align-items: center; }
.tfa-dd-menu .dropdown-item:hover,
.tfa-dd-menu .dropdown-item:focus { background: #f5f6f8 !important; color: #111 !important; }
.tfa-dd-menu .dropdown-item:active { background: #ebedf0 !important; }
.tfa-dd-menu .dropdown-item.disabled { color: #b0b0b0; cursor: default; }
.tfa-dd-menu .dropdown-item i.tfa-dd-icon { width: 18px; text-align: center; font-size: 12px; margin-right: 8px; flex-shrink: 0; }
