/* Zwei-Faktor-Anmeldung (twofactor.js), gilt fuer Weboberflaeche und Handwerker-App */
.tf-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 20, 20, 0.55);
}

.tf-card {
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px;
    border-radius: 10px;
    background: #fff;
    color: #222;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.tf-title {
    margin: 0 0 8px;
    font-size: 20px;
    color: #222;
}

.tf-text, .tf-hint, .tf-state {
    margin: 0 0 12px;
}

.tf-hint {
    font-size: 13px;
    color: #6d6e70;
}

.tf-state {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.tf-state-on { background: #e8f5e9; color: #1b5e20; }
.tf-state-off { background: #fff3e0; color: #8a4b00; }

.tf-setup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 4px 0 16px;
}

.tf-qr {
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.tf-manual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.tf-secret {
    font: 600 14px/1.4 ui-monospace, Consolas, monospace;
    letter-spacing: 0.04em;
    word-break: break-all;
    text-align: center;
}

.tf-link {
    font-size: 14px;
    color: #e2001a;
}

.tf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    font-weight: 600;
}

.tf-code {
    padding: 10px 12px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font: 600 22px/1.2 ui-monospace, Consolas, monospace;
    letter-spacing: 0.2em;
    text-align: center;
}

.tf-code:focus {
    outline: 2px solid #e2001a;
    outline-offset: 1px;
}

.tf-card .tf-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 400;
}

.tf-card .tf-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    accent-color: #e2001a;
}

.tf-error {
    margin: 0 0 12px;
    color: #b00016;
    font-weight: 600;
}

.tf-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
    margin: 0 0 16px;
    padding: 12px 12px 12px 36px;
    border-radius: 6px;
    background: #f4f4f4;
    font: 600 15px/1.6 ui-monospace, Consolas, monospace;
}

.tf-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.tf-btn {
    padding: 9px 16px;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font: inherit;
    cursor: pointer;
}

.tf-btn:disabled { opacity: 0.55; cursor: default; }

.tf-btn-primary {
    border-color: #e2001a;
    background: #e2001a;
    color: #fff;
    font-weight: 600;
}

.tf-account {
    padding: 4px 8px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: 600 12px/1.2 system-ui, sans-serif;
    cursor: pointer;
}

.tf-account:hover { border-color: #e2001a; color: #e2001a; }

@media (max-width: 480px) {
    .tf-card { padding: 18px; }
    .tf-codes { grid-template-columns: 1fr; }
    .tf-actions .tf-btn { flex: 1 1 auto; }
}
