﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --tf-bg-1: #7cc7f3;
    --tf-bg-2: #d9eefb;
    --tf-bg-3: #2c92f2;
    --tf-ink: #0f172a;
    --tf-muted: rgba(15,23,42,.62);
    --tf-line: rgba(15,23,42,.10);
    --tf-white: rgba(255,255,255,.96);
    --tf-card: rgba(255,255,255,.84);
    --tf-card-strong: rgba(255,255,255,.92);
    --tf-primary: #0d74d6;
    --tf-primary-2: #1d86ea;
    --tf-radius: 28px;
    --tf-radius-lg: 34px;
    --tf-shadow: 0 28px 60px rgba(35,76,120,.18), 0 10px 24px rgba(35,76,120,.10);
}

html,
body.twofactor-page {
    min-height: 100%;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: radial-gradient(1200px 520px at 50% 0%, rgba(255,255,255,.46) 0%, rgba(255,255,255,0) 58%), linear-gradient(140deg, var(--tf-bg-1) 0%, var(--tf-bg-2) 48%, #9bd2f6 72%, #cfeafc 100%);
    overflow-x: hidden;
}

    body.twofactor-page::before {
        content: "";
        position: fixed;
        inset: 0;
        background: radial-gradient(900px 320px at -10% 72%, rgba(25,138,236,.34) 0%, rgba(25,138,236,0) 70%), radial-gradient(860px 320px at 110% 42%, rgba(25,138,236,.28) 0%, rgba(25,138,236,0) 70%), radial-gradient(680px 240px at 50% 108%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 72%);
        pointer-events: none;
        z-index: 0;
    }

    body.twofactor-page .main-content-wrapper {
        position: relative;
        z-index: 1;
        min-height: 100vh;
    }

.twofactor-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.twofactor-card {
    width: 100%;
    max-width: 560px;
    border-radius: var(--tf-radius-lg);
    background: linear-gradient(to bottom, var(--tf-card-strong), var(--tf-card));
    box-shadow: var(--tf-shadow);
    border: 1px solid rgba(255,255,255,.72);
    overflow: hidden;
    backdrop-filter: blur(8px);
 }

.twofactor-card__topbar {
    height: 8px;
    background: linear-gradient(90deg, #f17a1a 0%, #d96a1a 16%, #2a7de1 52%, #0d74d6 100%);
}

.twofactor-card__inner {
    padding: 34px 34px 32px 34px;
    text-align: center;
}

.twofactor-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(243, 236, 232, .95);
    color: #0d5ea9;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.twofactor-title {
    margin: 0 0 10px 0;
    color: var(--tf-ink);
    font-size: clamp(34px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 800;
    text-wrap: balance;
}

.twofactor-subtitle {
    max-width: 420px;
    margin: 0 auto 26px auto;
    color: var(--tf-muted);
    font-size: 15px;
    line-height: 1.65;
    text-wrap: balance;
}

.twofactor-form {
    text-align: left;
}

.twofactor-validation {
    margin-bottom: 16px;
    color: #b42318;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.twofactor-field {
    margin-bottom: 22px;
}

.twofactor-label {
    display: block;
    margin-bottom: 10px;
    color: var(--tf-ink);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.twofactor-input {
    width: 100%;
    min-height: 62px;
    padding: 0 18px;
    border-radius: 20px;
    border: 2px solid #9ac7f8;
    background: rgba(244,248,255,.9);
    color: var(--tf-ink);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: .08em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

    .twofactor-input:focus {
        border-color: #4a9cf0;
        box-shadow: 0 0 0 4px rgba(74,156,240,.16);
        transform: translateY(-1px);
    }

.twofactor-field-validation {
    display: block;
    margin-top: 8px;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
}

.twofactor-actions {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.twofactor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 18px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    cursor: pointer;
}

.twofactor-btn--primary {
    width: 100%;
    background: linear-gradient(135deg, var(--tf-primary) 0%, var(--tf-primary-2) 100%);
    color: #fff;
    box-shadow: 0 16px 30px rgba(13,116,214,.22), inset 0 1px 0 rgba(255,255,255,.16);
}

    .twofactor-btn--primary:hover {
        transform: translateY(-2px);
        filter: brightness(1.02);
        color: #fff;
    }

@media (max-width: 640px) {
    .twofactor-shell {
        padding: 18px 12px;
    }

    .twofactor-card {
        max-width: 100%;
        border-radius: 26px;
    }

    .twofactor-card__inner {
        padding: 24px 18px 22px 18px;
    }

    .twofactor-title {
        font-size: 34px;
    }

    .twofactor-subtitle {
        font-size: 14px;
        margin-bottom: 22px;
    }

    .twofactor-input {
        min-height: 58px;
        font-size: 24px;
        border-radius: 18px;
    }

    .twofactor-btn {
        min-height: 54px;
        font-size: 17px;
        border-radius: 16px;
    }
}
.twofactor-card--setup {
    max-width: 720px;
}

.twofactor-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 8px 0 28px 0;
}

.twofactor-qr-card {
    padding: 18px;
    border-radius: 24px;
    background: linear-gradient(to bottom, rgba(255,255,255,.96), rgba(248,251,255,.92));
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 18px 34px rgba(13,116,214,.10), inset 0 1px 0 rgba(255,255,255,.96);
}

.twofactor-qr-image {
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
    border-radius: 14px;
    background: #fff;
}

.twofactor-form--setup {
    text-align: left;
}

.twofactor-input--readonly {
    background: rgba(240,245,252,.92);
    border-color: rgba(15,23,42,.08);
    color: rgba(15,23,42,.86);
    cursor: default;
}

    .twofactor-input--readonly:focus {
        transform: none;
        box-shadow: none;
        border-color: rgba(15,23,42,.08);
    }

.twofactor-input--code {
    letter-spacing: .04em;
    font-size: 15px;
}

.twofactor-helptext {
    margin-top: 8px;
    color: var(--tf-muted);
    font-size: 13px;
    line-height: 1.55;
}

.twofactor-actions--double {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.twofactor-btn--ghost {
    background: rgba(255,255,255,.76);
    color: var(--tf-ink);
    border: 1px solid rgba(15,23,42,.10);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.84);
}

    .twofactor-btn--ghost:hover {
        color: var(--tf-ink);
        background: rgba(255,255,255,.9);
        transform: translateY(-2px);
    }

@media (max-width: 640px) {
    .twofactor-card--setup {
        max-width: 100%;
    }

    .twofactor-qr-card {
        padding: 14px;
        border-radius: 20px;
    }

    .twofactor-qr-image {
        max-width: 210px;
    }

    .twofactor-actions--double {
        flex-direction: column;
    }

        .twofactor-actions--double .twofactor-btn {
            width: 100%;
        }

    .twofactor-input--code {
        font-size: 14px;
        letter-spacing: .02em;
    }
}

.login-modal .modal-dialog {
    max-width: 600px;
}

.login-modal .modal-content.login-modal-content {
    position: relative;
    border: 0;
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(255,255,255,.96), rgba(248,251,255,.92));
    box-shadow: 0 28px 60px rgba(35,76,120,.20), 0 10px 24px rgba(35,76,120,.10);
    backdrop-filter: blur(8px);
}

    .login-modal .modal-content.login-modal-content .login-card__topbar {
        height: 8px;
        background: linear-gradient(90deg, #f17a1a 0%, #d96a1a 16%, #2a7de1 52%, #0d74d6 100%);
    }

.login-modal-body {
    padding: 34px 34px 30px 34px;
    text-align: center;
}

.login-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(15,23,42,.72);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

    .login-modal-close:hover {
        color: rgba(15,23,42,.95);
    }

.login-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(243,236,232,.95);
    color: #0d5ea9;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.login-title {
    margin: 0 0 10px 0;
    color: #0f172a;
    font-size: clamp(34px, 4vw, 52px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 800;
    text-wrap: balance;
}

.login-subtitle {
    max-width: 420px;
    margin: 0 auto 26px auto;
    color: rgba(15,23,42,.62);
    font-size: 15px;
    line-height: 1.65;
}

.login-form {
    text-align: left;
}

.login-field {
    margin-bottom: 18px;
}

.login-label {
    display: block;
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.login-input {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 20px;
    border: 2px solid #9ac7f8;
    background: rgba(244,248,255,.9);
    color: #0f172a;
    font-size: 18px;
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

    .login-input:focus {
        border-color: #4a9cf0;
        box-shadow: 0 0 0 4px rgba(74,156,240,.16);
        transform: translateY(-1px);
    }

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 18px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    cursor: pointer;
}

.login-btn--primary {
    background: linear-gradient(135deg, #0d74d6 0%, #1d86ea 100%);
    color: #fff;
    box-shadow: 0 16px 30px rgba(13,116,214,.22), inset 0 1px 0 rgba(255,255,255,.16);
}

    .login-btn--primary:hover {
        transform: translateY(-2px);
        filter: brightness(1.02);
        color: #fff;
    }

.login-footer-link {
    margin-top: 18px;
    text-align: center;
    color: rgba(15,23,42,.62);
    font-size: 14px;
}

    .login-footer-link a {
        color: #0d74d6;
        font-weight: 700;
        text-decoration: none;
        margin-left: 4px;
    }

.login-validation {
    margin-bottom: 16px;
    color: #b42318;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    background: rgba(254,226,226,.9);
    border: 1px solid rgba(185,28,28,.14);
    border-radius: 16px;
    padding: 12px 14px;
}

@media (max-width: 640px) {
    .login-modal {
        padding: 0 !important;
    }

        .login-modal .modal-dialog,
        .login-modal .modal-dialog.modal-dialog-centered {
            display: flex !important;
            align-items: flex-start !important;
            min-height: 100dvh !important;
            max-width: calc(100% - 18px);
            margin: 0 auto !important;
            padding-top: 12px !important;
        }

        .login-modal .modal-content.login-modal-content {
            margin-top: 0 !important;
        }

    .login-modal-body {
        padding: 24px 18px 22px 18px;
    }

    .login-title {
        font-size: 34px;
    }

    .login-input {
        min-height: 54px;
        border-radius: 18px;
        font-size: 17px;
    }
    .twofactor-shell {
        padding: 6px 12px 18px 12px;
        align-items: flex-start;
    }
    .login-btn {
        min-height: 54px;
        font-size: 17px;
        border-radius: 16px;
    }
     
}

@media (min-width: 641px) {
    .twofactor-shell {
        min-height: 100vh;
        align-items: flex-start;
        justify-content: center;
        padding-top: 105px;
        padding-bottom: 40px;
    }

    .login-modal .modal-dialog,
    .login-modal .modal-dialog.modal-dialog-centered {
        min-height: 100vh;
        display: flex !important;
        align-items: flex-start !important;
        max-width: 600px;
        margin: 0 auto !important;
        padding-top: 85px !important;
    }
}