﻿/* =============================================================
   TWO-FACTOR AUTHENTICATION 
   ============================================================= */

/* Full-height centered layout with PCB background */
.tfa-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 40px) 24px 60px;
    background: var(--navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cdefs%3E%3Cstyle%3E.t%7Bfill:none;stroke:%231a8fff;stroke-width:0.9%7D.t2%7Bfill:none;stroke:%2300d4aa;stroke-width:0.9%7D.d%7Bfill:%231a8fff%7D.d2%7Bfill:%2300d4aa%7D%3C/style%3E%3C/defs%3E%3Crect width='200' height='200' fill='%230b1220'/%3E%3Cline class='t' x1='0' y1='50' x2='70' y2='50' opacity='0.28'/%3E%3Cline class='t' x1='130' y1='50' x2='200' y2='50' opacity='0.28'/%3E%3Cline class='t' x1='0' y1='150' x2='60' y2='150' opacity='0.22'/%3E%3Cline class='t' x1='140' y1='150' x2='200' y2='150' opacity='0.22'/%3E%3Cline class='t2' x1='0' y1='100' x2='50' y2='100' opacity='0.18'/%3E%3Cline class='t2' x1='150' y1='100' x2='200' y2='100' opacity='0.18'/%3E%3Cline class='t' x1='50' y1='0' x2='50' y2='70' opacity='0.28'/%3E%3Cline class='t' x1='50' y1='130' x2='50' y2='200' opacity='0.28'/%3E%3Cline class='t' x1='150' y1='0' x2='150' y2='60' opacity='0.22'/%3E%3Cline class='t' x1='150' y1='140' x2='150' y2='200' opacity='0.22'/%3E%3Cline class='t2' x1='100' y1='0' x2='100' y2='50' opacity='0.18'/%3E%3Cline class='t2' x1='100' y1='150' x2='100' y2='200' opacity='0.18'/%3E%3Cpolyline class='t' points='70,50 100,50 100,100 150,100' opacity='0.24'/%3E%3Cpolyline class='t' points='60,150 100,150 100,100 50,100' opacity='0.2'/%3E%3Ccircle class='d' cx='50' cy='50' r='3.5' opacity='0.32'/%3E%3Ccircle class='d' cx='150' cy='50' r='3.5' opacity='0.32'/%3E%3Ccircle class='d' cx='50' cy='150' r='3.5' opacity='0.32'/%3E%3Ccircle class='d' cx='150' cy='150' r='3.5' opacity='0.32'/%3E%3Ccircle class='d' cx='100' cy='100' r='5' opacity='0.32'/%3E%3Ccircle class='d2' cx='100' cy='50' r='3' opacity='0.25'/%3E%3Ccircle class='d2' cx='50' cy='100' r='3' opacity='0.25'/%3E%3Ccircle class='d2' cx='150' cy='100' r='3' opacity='0.25'/%3E%3Ccircle class='d2' cx='100' cy='150' r='3' opacity='0.25'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    position: relative;
}

    .tfa-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 55% 55% at 50% 45%, rgba(26, 143, 255, 0.18) 0%, transparent 60%), linear-gradient(160deg, rgba(6, 8, 14, 0.82) 0%, rgba(9, 13, 26, 0.65) 50%, rgba(6, 8, 14, 0.88) 100%);
        pointer-events: none;
    }

/* Card — wider when showing method choices, narrower for code entry */
.tfa-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    background: var(--navy-mid);
    border: 1px solid var(--navy-border);
    border-radius: 14px;
    padding: 44px 40px 36px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

/* ── Shared header ── */
.tfa-logo {
    display: block;
    margin-bottom: 28px;
}

.tfa-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--teal);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tfa-title {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tfa-header {
    margin-bottom: 24px;
}

.tfa-sub {
    font-size: 14px;
    color: var(--gray-mid);
    line-height: 1.65;
    margin-bottom: 24px;
}

/* ── Step 1: method selection grid ── */
.tfa-method-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.tfa-method-card {
    grid-template-columns: 40px 1fr 20px;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    padding: 18px 20px;
    background: var(--navy-light);
    border: 1px solid var(--navy-border);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

    .tfa-method-card:hover {
        border-color: var(--azure);
        background: rgba(14, 110, 184, 0.08);
        transform: translateY(-1px);
        color: inherit;
    }

.tfa-method-card-icon {
    grid-row: span 2;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: left;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    flex-shrink: 0;
}

.tfa-method-card-label {
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    display: block;
}

.tfa-method-card-desc {
    font-size: 12px;
    color: var(--gray-mid);
    line-height: 1.45;
    display: block;
    margin-top: 3px;
}

.tfa-method-card-arrow {
    grid-row: span 2;
    color: var(--gray-lo);
    font-size: 16px;
    justify-self: end;
    transition: color 0.2s, transform 0.2s;
}

.tfa-method-card:hover .tfa-method-card-arrow {
    color: var(--azure);
    transform: translateX(3px);
}

/* ── Step 2: code entry ── */
.tfa-code-group {
    margin-bottom: 20px;
}

.tfa-digit-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tfa-digit {
    width: 52px;
    height: 60px;
    background: var(--navy-light);
    border: 1px solid var(--navy-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 500;
    text-align: center;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    caret-color: var(--blue-bright);
    -moz-appearance: textfield;
}

    .tfa-digit::-webkit-outer-spin-button,
    .tfa-digit::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    .tfa-digit:focus {
        border-color: var(--blue);
        background: rgba(26, 143, 255, 0.06);
        box-shadow: 0 0 0 3px rgba(26, 143, 255, 0.15);
    }

    .tfa-digit:not(:placeholder-shown) {
        border-color: var(--blue-dim);
        color: var(--blue-bright);
    }

.tfa-digit-sep {
    color: var(--gray-lo);
    font-size: 20px;
    font-weight: 300;
    margin: 0 2px;
    user-select: none;
}

/* Verify button — dim until all 6 digits filled */
.tfa-btn-verify {
    width: 100%;
    background: var(--blue-dim);
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    padding: 14px;
    border-radius: var(--radius);
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
    display: block;
}

    .tfa-btn-verify.ready {
        background: var(--blue);
        color: #fff;
        box-shadow: 0 4px 20px rgba(26, 143, 255, 0.3);
    }

        .tfa-btn-verify.ready:hover {
            background: var(--blue-bright);
            box-shadow: 0 6px 28px rgba(26, 143, 255, 0.4);
        }

/* Resend row */
.tfa-resend {
    text-align: center;
    font-size: 13px;
    color: var(--gray-mid);
    margin-bottom: 20px;
}

.tfa-resend-link {
    color: var(--blue-bright);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-body);
    padding: 0;
    transition: color 0.2s;
}

    .tfa-resend-link:hover {
        color: var(--teal);
    }

.tfa-resend-timer {
    color: var(--gray-lo);
    font-size: 12px;
    margin-left: 4px;
}

/* Change method link */
.tfa-change-method {
    text-align: center;
    margin-bottom: 20px;
}

.tfa-change-link {
    font-size: 12px;
    color: var(--gray-mid);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    padding: 0;
    transition: color 0.2s;
}

    .tfa-change-link:hover {
        color: var(--white);
    }

/* Error / success banners */
.tfa-error {
    background: rgba(255, 68, 85, 0.1);
    border: 1px solid rgba(255, 68, 85, 0.3);
    color: #ff8899;
    font-size: 13px;
    padding: 11px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    line-height: 1.5;
}

.tfa-success {
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.25);
    color: var(--teal);
    font-size: 13px;
    padding: 11px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    text-align:center;
}

/* Shared footer */
.tfa-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--navy-border);
    font-size: 12px;
    margin-top: 8px;
}

.tfa-back-link,
.tfa-help-link {
    color: var(--gray-mid);
    transition: color 0.2s;
}

    .tfa-back-link:hover,
    .tfa-help-link:hover {
        color: var(--white);
    }
/* ── TFA email picker (Step 1.5) additions ── */
.tfa-email-list {
    margin: 0 0 24px;
}

.tfa-email-rbl ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tfa-email-rbl li {
    display: flex;
    align-items: center;
}

.tfa-email-rbl input[type="radio"] {
    accent-color: var(--blue);
    width: 16px;
    height: 16px;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.tfa-email-rbl label {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    flex: 1;
    transition: border-color 0.15s, background 0.15s;
    letter-spacing: 0.5px;
}

.tfa-email-rbl li:has(input:checked) label {
    border-color: var(--blue);
    background: rgba(26,143,255,0.07);
    color: #fff;
}

.tfa-email-rbl label:hover {
    border-color: rgba(26,143,255,0.4);
    background: rgba(26,143,255,0.04);
}
/* Responsive */
@media (max-width: 540px) {
    .tfa-card {
        padding: 32px 20px 28px;
    }

    .tfa-digit {
        width: 44px;
        height: 54px;
        font-size: 20px;
    }

    .tfa-digit-row {
        gap: 6px;
    }

    .tfa-method-card {
        grid-template-columns: 36px 1fr 16px;
    }

    .tfa-method-card-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
