/* ============================================================
   UMWEKA ACADEMY — Two-Factor Authentication Styles
   ============================================================ */

/* ── Challenge Page ──────────────────────────────────────────── */
.tfa-big-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 12px;
}
.tfa-icon-wrap { text-align: center; margin-bottom: 4px; }

.tfa-code-input-wrap {
    display: flex;
    justify-content: center;
    margin: 6px 0;
}
.tfa-code-input {
    width: 100%;
    max-width: 260px;
    background: #0d1117;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    font-family: 'Courier New', monospace;
    text-align: center;
    letter-spacing: 8px;
    padding: 16px 12px;
    outline: none;
    transition: border-color 0.2s;
}
.tfa-code-input:focus { border-color: var(--primary, #0d6efd); }
.tfa-code-input::placeholder { color: #2d3748; letter-spacing: 4px; font-size: 22px; }

.tfa-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 13px;
}
.tfa-link-btn {
    background: none;
    border: none;
    color: var(--primary, #4d9eff);
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: none;
}
.tfa-link-btn:hover { text-decoration: underline; }
.tfa-dot { color: var(--text-faint, #6b7280); }

.tfa-backup-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(245,166,35,0.08);
    border: 1px solid rgba(245,166,35,0.2);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #f5a623;
    margin-top: 12px;
}
.tfa-backup-hint code {
    background: rgba(245,166,35,0.15);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.tfa-timer {
    text-align: center;
    font-size: 12px;
    color: var(--text-faint, #6b7280);
    margin-top: 14px;
}
#countdown { color: #f5a623; font-weight: 700; }

.tfa-dev-notice {
    background: rgba(245,166,35,0.1);
    border: 1px solid rgba(245,166,35,0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #f5a623;
    margin-bottom: 16px;
    text-align: center;
}

/* ── Security Page ───────────────────────────────────────────── */
.sec-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 700px;
}
.sec-card {
    background: #1a2035;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 24px;
}
.sec-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sec-card-icon {
    font-size: 28px;
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sec-card-title { font-size: 16px; font-weight: 700; color: #fff; }
.sec-card-sub   { font-size: 12px; color: #8b9bba; margin-top: 2px; }
.sec-status-badge {
    margin-left: auto;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid;
    white-space: nowrap;
}
.sec-status-badge.enabled  { color: #4CAF50; background: rgba(76,175,80,0.1);  border-color: rgba(76,175,80,0.3);  }
.sec-status-badge.disabled { color: #f5a623; background: rgba(245,166,35,0.1); border-color: rgba(245,166,35,0.3); }

.sec-intro { font-size: 14px; color: #8b9bba; margin: 0 0 18px; line-height: 1.6; }

.sec-enabled-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: rgba(76,175,80,0.07);
    border-radius: 10px;
    margin-bottom: 18px;
    border: 1px solid rgba(76,175,80,0.15);
}
.sec-method-badge {
    font-size: 13px;
    font-weight: 600;
    color: #4CAF50;
}
.sec-backup-info {
    font-size: 12px;
    color: #8b9bba;
    margin-left: auto;
}

.sec-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* Buttons */
.sec-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: 9px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1px solid; transition: all 0.2s;
    text-decoration: none;
}
.sec-btn-primary {
    background: var(--primary, #0d6efd);
    border-color: var(--primary, #0d6efd);
    color: #fff;
}
.sec-btn-primary:hover { opacity: 0.9; }
.sec-btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.15);
    color: #c5d0e6;
}
.sec-btn-outline:hover { background: rgba(255,255,255,0.05); }
.sec-btn-danger {
    background: rgba(244,67,54,0.1);
    border-color: rgba(244,67,54,0.3);
    color: #F44336;
}
.sec-btn-danger:hover { background: rgba(244,67,54,0.2); }
.sec-btn-danger-outline {
    background: transparent;
    border-color: rgba(244,67,54,0.2);
    color: #ef5350;
    font-size: 13px;
}
.sec-btn-danger-outline:hover { background: rgba(244,67,54,0.08); }

/* Method selection cards */
.sec-method-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 4px;
}
@media (max-width: 540px) { .sec-method-cards { grid-template-columns: 1fr; } }

.sec-method-card {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}
.sec-method-card:hover {
    border-color: rgba(13,110,253,0.4);
    background: rgba(13,110,253,0.06);
    transform: translateY(-2px);
}
.sec-mc-icon  { font-size: 30px; margin-bottom: 10px; }
.sec-mc-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.sec-mc-desc  { font-size: 12px; color: #8b9bba; line-height: 1.5; margin-bottom: 12px; }
.sec-mc-btn   { font-size: 13px; font-weight: 600; color: var(--primary, #4d9eff); }
.sec-mc-badge {
    position: absolute; top: 12px; right: 12px;
    font-size: 10px; font-weight: 700; padding: 2px 8px;
    background: rgba(76,175,80,0.15); color: #4CAF50;
    border-radius: 99px; border: 1px solid rgba(76,175,80,0.3);
}

/* Backup codes */
.sec-backup-codes-box {
    background: #0d1117;
    border: 1px solid rgba(245,166,35,0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
}
.sec-backup-title {
    font-size: 14px;
    font-weight: 700;
    color: #f5a623;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sec-backup-warn {
    font-size: 12px;
    font-weight: 400;
    color: #8b9bba;
}
.sec-codes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
@media (max-width: 500px) { .sec-codes-grid { grid-template-columns: repeat(2, 1fr); } }
.sec-code-chip {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}
.sec-backup-note { font-size: 12px; color: var(--text-faint, #6b7280); margin: 0; }

/* Verify box */
.sec-verify-box {
    background: rgba(13,110,253,0.06);
    border: 1px solid rgba(13,110,253,0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 4px;
}
.sec-code-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.sec-code-row .tfa-code-input { max-width: 180px; font-size: 22px; padding: 12px; }

/* TOTP Setup */
.totp-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.totp-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.totp-step-num {
    width: 28px; height: 28px;
    background: var(--primary, #0d6efd);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #fff;
    flex-shrink: 0;
}
.totp-step-text { font-size: 14px; color: #c5d0e6; line-height: 1.5; padding-top: 4px; }
.totp-step-text strong { color: #fff; }

.totp-qr-wrap {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.07);
}
.totp-qr-img {
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    display: block;
    margin: 0 auto 10px;
}
.totp-qr-sub { font-size: 12px; color: #8b9bba; }

.totp-manual { margin-bottom: 4px; }
.totp-manual-label { font-size: 12px; color: #8b9bba; margin-bottom: 8px; }
.totp-secret-box {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: border-color 0.2s;
}
.totp-secret-box:hover { border-color: rgba(255,255,255,0.25); }
.totp-secret-box code {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: #4d9eff;
    letter-spacing: 3px;
    word-break: break-all;
}
.totp-copy-hint { font-size: 11px; color: var(--text-faint, #6b7280); white-space: nowrap; }

/* Modal */
.sec-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    display: none; align-items: center; justify-content: center;
    z-index: 9999; padding: 20px;
}
.sec-modal-overlay.show { display: flex; }
.sec-modal {
    background: #1a2035;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 28px;
    width: 100%; max-width: 420px;
}
.sec-modal-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.sec-modal-text  { font-size: 14px; color: #8b9bba; margin-bottom: 20px; }
.sec-modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
