/* main.css pins every button[type=submit] absolutely (the search arrows). */
.tf-2fa button[type='submit'] {
    position: static;
    height: 44px;
    transform: none;
}
.tf-2fa [hidden] {
    display: none !important;
}

/* Two-step sign-in (js/tf-auth.js): the second step on login.html and the
   "confirm it's you" dialog. Same language as the login form: dark field,
   hairline border, 8px radius, white primary button. */
.tf-2fa {
    box-sizing: border-box;
    width: 360px;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    color: #ededed;
    font-size: 14px;
}
.tf-2fa-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.tf-2fa-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #ededed;
}
.tf-2fa-head p {
    margin: 0;
    color: #a1a1a1;
    line-height: 1.45;
}
.tf-2fa-shield {
    flex: none;
    width: 34px;
    height: 34px;
    padding: 7px;
    box-sizing: border-box;
    border-radius: 10px;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}
.tf-2fa-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tf-2fa-form[hidden] {
    display: none;
}
.tf-2fa-form label {
    font-weight: 500;
    color: #a1a1a1;
}
.tf-2fa-input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid hsla(0, 0%, 100%, 0.14);
    border-radius: 8px;
    background: #0a0a0a;
    color: #ededed;
    font: 500 20px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.3em;
    text-align: center;
}
.tf-2fa-input::placeholder {
    color: #555;
}
.tf-2fa-input:focus {
    outline: none;
    border-color: hsla(0, 0%, 100%, 0.45);
}
.tf-2fa .tf-2fa-submit,
.tf-2fa .tf-2fa-key,
.tf-2fa .tf-2fa-cancel {
    box-sizing: border-box;
    height: 44px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.tf-2fa .tf-2fa-submit {
    width: 100%;
    transition: background-color 0.15s;
    border: none;
    background: #ededed;
    color: #0a0a0a;
}
.tf-2fa .tf-2fa-submit:hover:not(:disabled) {
    background: #fff;
}
.tf-2fa .tf-2fa-key {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid hsla(0, 0%, 100%, 0.18);
    background: #111;
    color: #ededed;
}
.tf-2fa .tf-2fa-key:hover:not(:disabled) {
    border-color: hsla(0, 0%, 100%, 0.4);
    background: #161616;
}
.tf-2fa .tf-2fa-key svg {
    width: 18px;
    height: 18px;
}
.tf-2fa .tf-2fa-cancel {
    padding: 0 18px;
    border: 1px solid hsla(0, 0%, 100%, 0.14);
    background: transparent;
    color: #ededed;
}
.tf-2fa button:disabled {
    opacity: 0.55;
    cursor: default;
}
.tf-2fa-or {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7d7d7d;
    font-size: 13px;
}
.tf-2fa-or::before,
.tf-2fa-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: hsla(0, 0%, 100%, 0.1);
}
.tf-2fa .tf-2fa-link {
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    color: #a1a1a1;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.tf-2fa .tf-2fa-link:hover {
    color: #ededed;
}
.tf-2fa .tf-2fa-link[hidden] {
    display: none;
}
.tf-2fa-error {
    margin: 0;
    color: #f87171;
    font-size: 13px;
}
.tf-2fa-error:empty {
    display: none;
}
.tf-2fa-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 4px;
}
.tf-2fa-actions .tf-2fa-submit {
    width: auto;
    padding: 0 22px;
}
.tf-2fa-dialog {
    padding: 24px;
    border: 1px solid hsla(0, 0%, 100%, 0.12);
    border-radius: 14px;
    background: #0d0d0d;
    color: #ededed;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.tf-2fa-dialog::backdrop {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
}

/* login.html: "Sign in with a passkey" under the provider buttons. */
.tf-passkey-btn {
    box-sizing: border-box;
    width: 320px;
    max-width: calc(100vw - 48px);
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid hsla(0, 0%, 100%, 0.18);
    border-radius: 8px;
    background: #111;
    color: #ededed;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.tf-passkey-btn:hover:not(:disabled) {
    border-color: hsla(0, 0%, 100%, 0.4);
}
.tf-passkey-btn svg {
    width: 18px;
    height: 18px;
}
.tf-passkey-btn[hidden] {
    display: none;
}

/* account.html#security (js/tf-security.js), on the dashboard's variables. */
.tf-sec-status {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 0 0 22px;
    padding: 16px 18px;
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    background: var(--tf-surface);
}
.tf-sec-status svg {
    flex: none;
    width: 36px;
    height: 36px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 10px;
}
.tf-sec-status.on svg {
    background: var(--tf-green-soft);
    color: var(--tf-green);
}
.tf-sec-status.off {
    border-color: rgba(245, 217, 132, 0.25);
}
.tf-sec-status.off svg {
    background: var(--tf-amber-soft);
    color: var(--tf-amber);
}
.tf-sec-status strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--tf-text);
}
.tf-sec-status p {
    margin: 0;
    max-width: 68ch;
    color: var(--tf-muted);
    font-size: 13.5px;
    line-height: 1.5;
}
.tf-sec-on {
    color: var(--tf-green);
    font-size: 15px;
}
.tf-sec-steps {
    margin: 0 0 10px;
    padding-left: 20px;
    color: var(--tf-muted);
    line-height: 1.5;
}
.tf-sec-steps strong {
    color: var(--tf-text);
    font-weight: 500;
}
.tf-sec-qr {
    display: flex;
    justify-content: center;
    margin: 6px 0 12px;
}
.tf-sec-qr img {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    background: #fff;
    image-rendering: pixelated;
}
.tf-sec-manual {
    margin: 0 0 14px;
    color: var(--tf-muted);
    font-size: 13px;
}
.tf-sec-manual summary {
    cursor: pointer;
    margin-bottom: 8px;
}
.tf-sec-secret {
    display: block;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--tf-surface-2);
    color: var(--tf-text);
    font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: 0.06em;
    word-break: break-all;
}
.tf-sec-code {
    width: 100%;
    box-sizing: border-box;
    font-size: 20px;
    letter-spacing: 0.3em;
    text-align: center;
}
.tf-sec-label {
    display: block;
    margin: 12px 0 6px;
    color: var(--tf-muted);
    font-size: 13px;
}
.tf-sec-err {
    margin: 8px 0 0;
    color: #f87171;
    font-size: 13px;
}
.tf-sec-err:empty {
    display: none;
}
.tf-sec-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 14px 0;
    padding: 14px 18px 14px 36px;
    border-radius: 8px;
    background: var(--tf-surface-2);
    color: var(--tf-text);
    font-size: 15px;
    letter-spacing: 0.04em;
}
.tf-sec-codes-actions {
    display: flex;
    gap: 8px;
}
@media (max-width: 480px) {
    .tf-sec-codes {
        grid-template-columns: minmax(0, 1fr);
    }
}
