/* =========================================================
   BRAVO CRM — TWO-FACTOR AUTHENTICATION SETTINGS
   (TwoFactorVerificationSettingsControl)
   ========================================================= */

/* ── FLASH ─────────────────────────────────── */
.tf-flash {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
}
.tf-flash--success { background: rgba(34,197,94,.12); color: #15803d; border: 1px solid rgba(34,197,94,.25); }
.tf-flash--danger  { background: rgba(220,38,38,.10); color: #dc2626; border: 1px solid rgba(220,38,38,.2); }
.tf-flash--warning { background: rgba(234,179,8,.12); color: #a16207; border: 1px solid rgba(234,179,8,.25); }

/* ── GRID ───────────────────────────────────── */
.tf-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ── CARD ───────────────────────────────────── */
.tf-card {
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.08);
    background: #fff;
    overflow: hidden;
    transition: box-shadow .2s ease, border-color .2s ease;
}
.tf-card--active {
    border-color: rgba(34,197,94,.3);
    box-shadow: 0 2px 12px rgba(34,197,94,.08);
}
.tf-card--featured {
    border-color: rgba(237,192,22,.35);
    box-shadow: 0 4px 18px rgba(237,192,22,.12);
}
:root.theme-dark .tf-card {
    background: var(--surface-2);
    border-color: var(--border);
}

/* ── CARD HEAD ──────────────────────────────── */
.tf-card__head {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15,23,42,.05);
    position: relative;
}
:root.theme-dark .tf-card__head { border-color: var(--border); }

.tf-card__badge {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
}
.tf-card__badge--on  { background: rgba(34,197,94,.12); color: #16a34a; border: 1px solid rgba(34,197,94,.25); }
.tf-card__badge--off { background: rgba(15,23,42,.05); color: #94a3b8; border: 1px solid rgba(15,23,42,.08); }

.tf-card__icon {
    grid-row: 1 / 3;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    flex-shrink: 0;
}
:root.theme-dark .tf-card__icon { background: var(--surface-3); color: var(--muted); }
.tf-card--active   .tf-card__icon { background: rgba(34,197,94,.1);  color: #16a34a; }
.tf-card--featured .tf-card__icon { background: rgba(237,192,22,.12); color: #b45309; }

.tf-card__title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
:root.theme-dark .tf-card__title { color: var(--heading); }

.tf-card__sub {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.tf-card__primary-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(37,99,235,.1);
    color: #2563eb;
    border: 1px solid rgba(37,99,235,.18);
}
.tf-card__primary-badge--google {
    background: rgba(237,192,22,.15);
    color: #b45309;
    border-color: rgba(237,192,22,.3);
}

/* ── CARD BODY ──────────────────────────────── */
.tf-card__body {
    padding: 16px 18px;
}

/* ── FORM ───────────────────────────────────── */
.tf-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tf-form__row { display: flex; gap: 8px; align-items: flex-start; width: 100%; }
.tf-form__error {
    font-size: 12px;
    color: #dc2626;
    background: rgba(220,38,38,.06);
    border: 1px solid rgba(220,38,38,.15);
    padding: 6px 10px;
    border-radius: 8px;
    width: 100%;
}

/* ── INPUTS ─────────────────────────────────── */
.tf-input {
    flex: 1;
    min-width: 0;
    padding: 9px 13px;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,.12);
    background: #f8fafc;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    width: 100%;
}
.tf-input--short { max-width: 250px; flex: 0 0 388px; }
.tf-input:focus {
    border-color: rgba(242,135,57,.5);
    box-shadow: 0 0 0 3px rgba(242,135,57,.1);
    background: #fff;
}
:root.theme-dark .tf-input {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text);
}

/* ── ACTIONS ROW ────────────────────────────── */
.tf-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ── INFO TEXT ──────────────────────────────── */
.tf-info {
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}
.tf-info--warn { color: #a16207; }
.tf-link { color: #2563eb; font-weight: 600; text-decoration: none; }
.tf-link:hover { text-decoration: underline; }

/* ── SETUP (details/summary) ────────────────── */
.tf-setup {
    margin-bottom: 14px;
    border: 1px solid rgba(15,23,42,.07);
    border-radius: 10px;
    overflow: hidden;
}
.tf-setup__trigger {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    background: #f8fafc;
    user-select: none;
}
.tf-setup__trigger::-webkit-details-marker { display: none; }
.tf-setup__trigger svg { transition: transform .2s; }
details[open] .tf-setup__trigger svg { transform: rotate(180deg); }
:root.theme-dark .tf-setup__trigger { background: var(--surface-3); color: var(--muted); }

.tf-setup__steps {
    margin: 0;
    padding: 10px 16px 12px 32px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
}

/* ── GOOGLE SETUP ───────────────────────────── */
.tf-google-setup { display: flex; flex-direction: column; gap: 12px; }

.tf-qr-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.tf-qr {
    width: 130px;
    height: 130px;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,.08);
    display: block;
}
.tf-qr__refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid rgba(15,23,42,.1);
    text-decoration: none;
    flex-shrink: 0;
}
.tf-qr__refresh:hover { background: #e2e8f0; }

.tf-secret-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tf-secret-label { font-size: 11px; color: #94a3b8; }
.tf-secret {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    color: #334155;
    word-break: break-all;
}
:root.theme-dark .tf-secret { background: var(--surface-3); color: var(--text); }

.tf-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid rgba(15,23,42,.1);
    background: #f8fafc;
    cursor: pointer;
    color: #64748b;
    transition: all .15s;
}
.tf-copy-btn:hover  { background: #e2e8f0; color: #0f172a; }
.tf-copy-btn.copied { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: #16a34a; }

/* ── Login toggle pill (in card head, replaces badge) ── */
.tf-login-pill {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    width: 38px;
    height: 22px;
    border-radius: 11px;
    padding: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, box-shadow .2s;
    flex-shrink: 0;
}
.tf-login-pill--on {
    background: #16a34a;
    box-shadow: 0 0 0 1px rgba(22,163,74,.25), 0 1px 4px rgba(22,163,74,.2);
}
.tf-login-pill--off {
    background: #cbd5e1;
    box-shadow: 0 0 0 1px rgba(15,23,42,.1);
}
.tf-login-pill--locked {
    cursor: not-allowed;
    opacity: .55;
}
.tf-login-pill:not(.tf-login-pill--locked):hover { filter: brightness(1.08); }
.tf-login-pill__dot {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.22);
    transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.tf-login-pill--on  .tf-login-pill__dot { transform: translateX(16px); }
.tf-login-pill--off .tf-login-pill__dot { transform: translateX(0); }
:root.theme-dark .tf-login-pill--off { background: #475569; }

/* ── Compact change-hint (replaces long info paragraphs) ── */
.tf-change-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.tf-change-hint svg { flex-shrink: 0; stroke: currentColor; }
.tf-change-hint--warn { color: #d97706; }
:root.theme-dark .tf-change-hint { color: #64748b; }

/* ── Toggle-row / payment-note removed — kept for legacy refs only ── */

/* ── Generic small action buttons (Back in verify step, Renew key) ── */
.tf-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.tf-btn--ghost { background: transparent; border-color: rgba(15,23,42,.12); color: #64748b; }
.tf-btn--ghost:hover { background: #f1f5f9; color: #0f172a; }
:root.theme-dark .tf-btn--ghost { border-color: var(--border); color: var(--muted); }
:root.theme-dark .tf-btn--ghost:hover { background: var(--surface-3); }

