:root {
    --navy: #071a38;
    --navy-dark: #06142f;

    --blue: #4b66f2;
    --blue-dark: #3e57d7;
    --blue-soft: #eef1ff;

    --text: #182230;
    --muted: #667085;
    --light-muted: #98a2b3;

    --border: #e4e7ec;
    --background: #f7f8fb;
    --surface: #ffffff;

    --danger: #c94343;
    --danger-soft: #fff1f1;

    --shadow:
        0 20px 60px
        rgba(16, 24, 40, 0.12);
}


* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    min-height: 100%;
}


body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);
    background: var(--background);
}


button,
input {
    font: inherit;
}


.login-page {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(360px, 0.9fr)
        minmax(500px, 1.1fr);
}


/* =========================================================
   LEFT BRAND PANEL
   ========================================================= */

.login-brand-panel {
    min-height: 100vh;

    padding: 42px 48px;

    display: flex;
    flex-direction: column;

    color: white;

    background:
        radial-gradient(
            circle at top left,
            rgba(94, 119, 255, 0.28),
            transparent 38%
        ),
        linear-gradient(
            160deg,
            var(--navy) 0%,
            var(--navy-dark) 100%
        );
}


.login-brand {
    display: flex;
    align-items: center;

    gap: 12px;

    font-size: 19px;
    font-weight: 700;
}


.login-logo {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #7c8cff,
            #4b66f2
        );

    color: white;

    font-size: 19px;
    font-weight: 800;

    box-shadow:
        0 10px 28px
        rgba(75, 102, 242, 0.28);
}


.brand-content {
    max-width: 520px;

    margin: auto 0;
}


.brand-label {
    display: inline-block;

    margin-bottom: 18px;

    color: #9daeff;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1.5px;
}


.brand-content h1 {
    margin: 0;

    max-width: 510px;

    font-size: 48px;
    line-height: 1.08;

    letter-spacing: -1.6px;
}


.brand-content p {
    margin: 24px 0 0;

    max-width: 500px;

    color: #bfc9dc;

    font-size: 16px;
    line-height: 1.7;
}


.brand-footer {
    color: #72809a;

    font-size: 12px;
}


/* =========================================================
   LOGIN SIDE
   ========================================================= */

.login-main {
    min-height: 100vh;

    padding: 40px;

    display: flex;
    align-items: center;
    justify-content: center;
}


.login-card {
    width: 100%;
    max-width: 430px;

    padding: 38px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow: var(--shadow);
}


.mobile-brand {
    display: none;

    align-items: center;

    gap: 10px;

    margin-bottom: 30px;

    font-weight: 700;
}


.login-heading {
    margin-bottom: 28px;
}


.login-heading h2 {
    margin: 0;

    font-size: 28px;
    line-height: 1.2;
}


.login-heading p {
    margin: 8px 0 0;

    color: var(--muted);

    font-size: 13px;
}


.login-field {
    margin-bottom: 19px;
}


.login-field label {
    display: block;

    margin-bottom: 7px;

    color: #344054;

    font-size: 12px;
    font-weight: 600;
}


.login-field input {
    width: 100%;
    height: 44px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: 0;

    background: white;

    color: var(--text);
}


.login-field input::placeholder {
    color: var(--light-muted);
}


.login-field input:focus {
    border-color: #aebaff;

    box-shadow:
        0 0 0 3px
        rgba(75, 102, 242, 0.09);
}


.password-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.password-input-wrapper {
    position: relative;
}


.password-input-wrapper input {
    padding-right: 70px;
}


.password-toggle {
    position: absolute;

    right: 8px;
    top: 50%;

    transform: translateY(-50%);

    height: 30px;

    padding: 0 8px;

    border: 0;
    border-radius: 6px;

    background: transparent;

    color: var(--blue);

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
}


.password-toggle:hover {
    background: var(--blue-soft);
}


.login-button {
    width: 100%;
    height: 44px;

    margin-top: 3px;

    border: 0;
    border-radius: 9px;

    background: var(--blue);

    color: white;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}


.login-button:hover {
    background: var(--blue-dark);
}


.login-button:disabled {
    opacity: 0.65;
    cursor: default;
}


.login-error {
    margin: -3px 0 16px;

    padding: 10px 12px;

    border: 1px solid #f0c3c3;
    border-radius: 8px;

    background: var(--danger-soft);

    color: var(--danger);

    font-size: 11px;
    line-height: 1.45;
}


.hidden {
    display: none !important;
}


.login-security {
    margin-top: 22px;

    padding-top: 18px;

    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    color: var(--muted);

    font-size: 10px;
}


.security-icon {
    width: 17px;
    height: 17px;

    border-radius: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #e9f8ef;
    color: #2f9b67;

    font-size: 9px;
    font-weight: 700;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-main {
        padding: 24px;
    }

    .mobile-brand {
        display: flex;
    }

}


@media (max-width: 520px) {

    .login-main {
        align-items: stretch;

        padding: 0;
    }

    .login-card {
        max-width: none;
        min-height: 100vh;

        padding: 28px 20px;

        border: 0;
        border-radius: 0;

        box-shadow: none;
    }

}

/* =========================================================
   REGISTER LINK
   ========================================================= */

.login-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 0.88rem;
    color: #667085;
}

.login-register a {
    color: #4f67f6;
    font-weight: 700;
    text-decoration: none;
}

.login-register a:hover {
    text-decoration: underline;
}

/* =========================================================
   FORGOT PASSWORD LINK
   ========================================================= */

.password-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.forgot-password-link {
    color: #4f67f6;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* =========================================================
   MFA / TWO-STEP VERIFICATION
   ========================================================= */

#mfaLoginView {
    width: 100%;
}

#mfaCode {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.18em;
}

#mfaCode::placeholder {
    letter-spacing: 0.18em;
}

.mfa-secondary-button {
    width: 100%;
    margin-top: 16px;
    padding: 12px 16px;

    border: 1px solid #d8dee8;
    border-radius: 8px;

    background: #ffffff;

    font: inherit;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.mfa-secondary-button:hover {
    background: #f7f9fc;
    border-color: #c3ccd9;
}

.mfa-secondary-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.mfa-back-button {
    display: block;

    margin: 18px auto 0;

    padding: 6px 8px;

    border: 0;
    background: transparent;

    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;

    cursor: pointer;

    opacity: 0.72;
}

.mfa-back-button:hover {
    opacity: 1;
}

.mfa-back-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.hidden {
    display: none !important;
}