.login-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #f4f8fc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.login-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.login-bg__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(2, 72, 144, 0.12), transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(71, 122, 174, 0.1), transparent 38%),
        radial-gradient(circle at 72% 82%, rgba(2, 72, 144, 0.08), transparent 40%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
}

.login-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(2, 72, 144, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2, 72, 144, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 85%);
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
    animation: loginOrbFloat 14s ease-in-out infinite;
}

.login-orb--1 {
    width: 280px;
    height: 280px;
    top: 8%;
    left: 6%;
    background: radial-gradient(circle, rgba(2, 72, 144, 0.18), rgba(2, 72, 144, 0));
}

.login-orb--2 {
    width: 220px;
    height: 220px;
    bottom: 10%;
    right: 8%;
    background: radial-gradient(circle, rgba(71, 122, 174, 0.16), rgba(71, 122, 174, 0));
    animation-delay: -4s;
}

.login-orb--3 {
    width: 160px;
    height: 160px;
    top: 42%;
    right: 18%;
    background: radial-gradient(circle, rgba(2, 72, 144, 0.12), rgba(2, 72, 144, 0));
    animation-delay: -8s;
}

.invoice-float {
    position: absolute;
    width: 168px;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(2, 72, 144, 0.1);
    box-shadow: 0 18px 40px rgba(2, 72, 144, 0.08);
    backdrop-filter: blur(8px);
    animation: invoiceFloat 12s ease-in-out infinite;
}

.invoice-float__badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #024890;
    background: rgba(2, 72, 144, 0.1);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    margin-bottom: 0.55rem;
}

.invoice-float__line {
    height: 6px;
    border-radius: 999px;
    background: rgba(2, 72, 144, 0.08);
    margin-bottom: 0.4rem;
}

.invoice-float__line--short { width: 58%; }
.invoice-float__line--medium { width: 78%; }
.invoice-float__line--long { width: 92%; }

.invoice-float--1 { top: 14%; left: 10%; animation-delay: 0s; }
.invoice-float--2 { top: 22%; right: 12%; animation-delay: -2.5s; width: 152px; }
.invoice-float--3 { bottom: 18%; left: 14%; animation-delay: -5s; width: 145px; }
.invoice-float--4 { bottom: 14%; right: 16%; animation-delay: -7s; width: 158px; }

.flow-line {
    position: absolute;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(2, 72, 144, 0.35), transparent);
    animation: flowPulse 6s ease-in-out infinite;
}

.flow-line--1 { width: 180px; top: 34%; left: 24%; transform: rotate(-12deg); }
.flow-line--2 { width: 220px; bottom: 32%; right: 22%; transform: rotate(18deg); animation-delay: -2s; }

.login-center {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
}

.login-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(2, 72, 144, 0.08);
    border-radius: 24px;
    box-shadow:
        0 24px 60px rgba(2, 72, 144, 0.1),
        0 2px 8px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(14px);
    padding: 2.25rem 2rem 1.75rem;
}

.login-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-brand__logo {
    height: 42px;
    width: auto;
    margin-bottom: 1rem;
}

.login-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #024890;
    background: rgba(2, 72, 144, 0.08);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.85rem;
}

.login-brand__title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.45rem;
    line-height: 1.2;
}

.login-brand__subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

.login-pipeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.login-pipeline__step {
    text-align: center;
    padding: 0.55rem 0.25rem;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid rgba(2, 72, 144, 0.08);
}

.login-pipeline__icon {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.login-pipeline__label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #475569;
    line-height: 1.2;
}

.login-card .form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.35rem;
}

.login-card .form-control {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid #dbe5f0;
    background: #fff;
    padding: 0.65rem 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-card .form-control:focus {
    border-color: #024890;
    box-shadow: 0 0 0 4px rgba(2, 72, 144, 0.1);
}

.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.5rem;
}

.login-actions .btn-primary {
    min-width: 132px;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #024890 0%, #1a5fa8 100%);
    border: none;
    box-shadow: 0 10px 24px rgba(2, 72, 144, 0.22);
}

.login-actions .btn-primary:hover {
    background: linear-gradient(135deg, #023a73 0%, #024890 100%);
}

.login-actions .btn-primary.is-loading,
.login-actions .btn-primary:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    box-shadow: none;
}

.login-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e8eef5;
    text-align: center;
}

.login-footer a {
    font-size: 0.78rem;
    color: #64748b;
    text-decoration: none;
}

.login-footer a:hover {
    color: #024890;
}

.two-fa-container {
    width: 100%;
}

.two-fa-container-inner {
    width: 100%;
}

.login-twofa {
    padding: 0.25rem 0 0;
}

.login-twofa__header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.login-twofa__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.85rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 72, 144, 0.1);
    color: #024890;
    font-size: 1.35rem;
}

.login-twofa__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.login-twofa__hint,
.login-twofa__note {
    font-size: 0.86rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.login-twofa__note {
    margin: 1rem 0 0.75rem;
    color: #b45309;
}

.login-twofa__qr {
    display: flex;
    justify-content: center;
    padding: 0.85rem;
    margin-bottom: 0.85rem;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid rgba(2, 72, 144, 0.1);
}

.login-twofa__secret {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.login-twofa__secret code {
    display: inline-block;
    margin-top: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 8px;
    background: #eef4fa;
    color: #024890;
    font-size: 0.78rem;
    word-break: break-all;
}

.login-twofa__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.55rem;
}

.login-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 0.25rem;
}

.login-otp-input {
    width: 46px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid #dbe5f0;
    background: #fff;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.login-otp-input:focus {
    outline: none;
    border-color: #024890;
    box-shadow: 0 0 0 4px rgba(2, 72, 144, 0.12);
    transform: translateY(-1px);
}

.login-twofa__error {
    min-height: 1.25rem;
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    color: #b42b2b;
    text-align: center;
}

.login-twofa__error:empty {
    display: none;
}

.login-twofa__submit {
    margin-top: 1.15rem;
    min-height: 46px;
    border-radius: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #024890 0%, #1a5fa8 100%);
    border: none;
    box-shadow: 0 10px 24px rgba(2, 72, 144, 0.22);
}

.login-twofa__submit:hover {
    background: linear-gradient(135deg, #023a73 0%, #024890 100%);
}

.login-mobile-alerts {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 420px);
    z-index: 20;
}

@keyframes loginOrbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-18px) scale(1.03); }
}

@keyframes invoiceFloat {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-14px) translateX(6px); }
}

@keyframes flowPulse {
    0%, 100% { opacity: 0.25; transform: scaleX(0.85); }
    50% { opacity: 0.85; transform: scaleX(1); }
}

@media (max-width: 991.98px) {
    .invoice-float,
    .flow-line,
    .login-orb--3 {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 1.75rem 1.25rem 1.25rem;
        border-radius: 20px;
    }

    .login-pipeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .login-otp-input {
        width: 40px;
        height: 46px;
        font-size: 1rem;
    }

    .login-otp-inputs {
        gap: 0.4rem;
    }

    .invoice-float--1,
    .invoice-float--2 {
        display: none;
    }
}
