
:root {
    --login-primary: #0d63d8;
    --login-primary-dark: #0a3f87;
    --login-primary-deep: #082f69;
    --login-accent: #18c6d9;
    --login-text: #15233b;
    --login-muted: #7d8ca6;
    --login-border: #dce4ef;
    --login-bg: #f5f9ff;
    --login-card: #ffffff;
    --login-danger: #c73737;
    --login-success: #0c8a5a;
}

* {
    box-sizing: border-box;
}

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

body.payroll-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--login-text);
    background: var(--login-bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(390px, 46%) minmax(0, 54%);
}


/* LEFT BRAND PANEL */

.login-brand-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding:
        max(46px, env(safe-area-inset-top))
        clamp(48px, 8vw, 132px)
        max(46px, env(safe-area-inset-bottom));

    color: #fff;

    background:
        radial-gradient(
            circle at 85% 82%,
            rgba(28, 152, 244, .28),
            transparent 26%
        ),
        linear-gradient(
            150deg,
            #173d78 0%,
            #0a4f9d 45%,
            #0868d3 100%
        );
}

.login-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.03),
            rgba(255,255,255,0)
        );
}

.brand-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    border: 28px solid rgba(255,255,255,.065);
}

.brand-orb-top {
    width: 270px;
    height: 270px;
    left: -140px;
    top: -95px;
}

.brand-orb-bottom {
    width: 390px;
    height: 390px;
    right: -175px;
    bottom: -190px;
}

.brand-content {
    width: min(100%, 570px);
    margin-inline: auto;
}

.brand-company {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand-company-mark {
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;

    border-radius: 21px;

    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.08em;

    color: #fff;

    background:
        linear-gradient(
            145deg,
            #0de0f0,
            #0787f7
        );

    box-shadow:
        inset 0 0 0 5px rgba(255,255,255,.14),
        0 15px 35px rgba(2, 21, 56, .25);
}

.brand-company-name {
    font-size: clamp(27px, 2vw, 39px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.025em;
}

.brand-company-tagline {
    margin-top: 8px;
    color: rgba(255,255,255,.78);
    font-size: 14px;
}

.brand-divider {
    width: 56px;
    height: 4px;
    margin: 40px 0 37px;
    border-radius: 999px;
    background: linear-gradient(90deg, #42eaf4, #ffffff);
}

.brand-product-kicker {
    margin-bottom: 10px;
    color: #8edbff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .17em;
}

.brand-product-title {
    margin: 0;

    font-size: clamp(33px, 3.2vw, 49px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand-product-title span {
    display: inline-block;
    margin-left: 5px;
    color: #50e5d6;
    font-size: .56em;
    font-weight: 700;
    letter-spacing: -.02em;
}

.brand-product-subtitle {
    margin-top: 9px;
    color: rgba(255,255,255,.82);
    font-size: 13px;
}

.brand-product-description {
    max-width: 520px;
    margin: 26px 0 0;

    color: rgba(255,255,255,.88);
    font-size: 15px;
    line-height: 1.78;
}

.brand-security {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 36px;

    color: rgba(255,255,255,.78);
    font-size: 12px;
}

.brand-security-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #3ef0c0;

    box-shadow:
        0 0 0 5px rgba(62,240,192,.12),
        0 0 18px rgba(62,240,192,.62);
}


/* RIGHT FORM AREA */

.login-form-panel {
    min-width: 0;
    display: grid;
    place-items: center;
    padding:
        max(34px, env(safe-area-inset-top))
        clamp(28px, 6vw, 90px)
        max(34px, env(safe-area-inset-bottom));

    background:
        radial-gradient(
            circle at 50% 35%,
            #ffffff 0,
            #f8fbff 45%,
            #eef5fc 100%
        );
}

.login-card {
    width: min(100%, 500px);
    padding: clamp(28px, 4vw, 47px);

    border: 1px solid rgba(168, 187, 211, .45);
    border-radius: 25px;

    background: rgba(255,255,255,.94);

    box-shadow:
        0 26px 72px rgba(49, 85, 125, .16);
}

.login-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.login-logo {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;

    border-radius: 20px;

    color: #fff;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;

    background:
        linear-gradient(
            145deg,
            #0578e7,
            #14bfe1
        );

    box-shadow:
        0 14px 32px rgba(13, 99, 216, .23);
}

.login-logo-copy {
    line-height: .95;
}

.login-logo-title {
    color: #0c315f;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: .06em;
}

.login-logo-core {
    margin-top: 5px;
    color: #11aebb;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

.login-heading {
    margin-top: 32px;
    text-align: center;
}

.login-heading h2 {
    margin: 0;

    color: #15243c;

    font-size: clamp(25px, 3vw, 33px);
    font-weight: 800;
    letter-spacing: -.025em;
}

.login-heading p {
    max-width: 390px;
    margin: 10px auto 0;

    color: var(--login-muted);
    font-size: 13px;
    line-height: 1.6;
}

.login-form {
    margin-top: 31px;
}

.login-field + .login-field {
    margin-top: 20px;
}

.login-label {
    display: block;
    margin-bottom: 8px;

    color: #29405f;
    font-size: 12px;
    font-weight: 800;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);

    width: 20px;
    display: grid;
    place-items: center;

    opacity: .65;
    pointer-events: none;
    font-size: 14px;
}

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

    padding:
        0 48px
        0 48px;

    border: 1px solid var(--login-border);
    border-radius: 12px;

    outline: none;

    color: #1d2e46;
    background: #fff;

    font-size: 14px;

    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.login-input:not(.login-password-input) {
    padding-right: 15px;
}

.login-input::placeholder {
    color: #a7b3c5;
}

.login-input:focus {
    border-color: #66aef8;

    box-shadow:
        0 0 0 4px rgba(13,99,216,.10);

    background: #fff;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    width: 36px;
    height: 36px;

    border: 0;
    border-radius: 9px;

    color: #65748a;
    background: transparent;
}

.password-toggle:hover {
    background: #f2f6fb;
}

.login-validation {
    display: block;
    min-height: 17px;
    margin-top: 5px;

    color: var(--login-danger);
    font-size: 11px;
}

.login-options {
    margin-top: 1px;
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #617089;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--login-primary);
}

.login-submit {
    width: 100%;
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;

    margin-top: 28px;

    border: 0;
    border-radius: 12px;

    color: #fff;

    background:
        linear-gradient(
            90deg,
            #1165e8,
            #0e78fa
        );

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

    box-shadow:
        0 13px 30px rgba(17, 101, 232, .23);

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        filter .15s ease;
}

.login-submit:hover {
    transform: translateY(-1px);

    filter: brightness(1.03);

    box-shadow:
        0 16px 34px rgba(17, 101, 232, .30);
}

.login-submit:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 28px;
    padding-top: 21px;

    border-top: 1px solid #edf1f6;

    text-align: center;
}

.login-footer-product {
    color: #40536e;
    font-size: 11px;
    font-weight: 800;
}

.login-footer-dev {
    margin-top: 6px;

    color: #9aa6b8;
    font-size: 10px;
}

.login-footer-dev strong {
    color: #1971d5;
}

.login-alert {
    margin-top: 18px;
    padding: 11px 13px;

    border-radius: 10px;

    font-size: 12px;
    line-height: 1.5;
}

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

.login-alert-error {
    color: #a02929;
    border: 1px solid #f0caca;
    background: #fff4f4;
}

.login-alert-success {
    color: #08724b;
    border: 1px solid #bde7d5;
    background: #f0fff8;
}


/* TABLET */

@media (max-width: 1050px) {

    .login-shell {
        grid-template-columns:
            minmax(330px, 42%)
            minmax(0, 58%);
    }

    .login-brand-panel {
        padding-left: 45px;
        padding-right: 45px;
    }

    .brand-company-name {
        font-size: 28px;
    }

}


/* MOBILE / PWA STANDALONE */

@media (max-width: 760px) {

    body.payroll-login-page {
        background:
            linear-gradient(
                180deg,
                #0b4b97 0,
                #0d64cc 235px,
                #f3f8fd 235px,
                #f3f8fd 100%
            );
    }

    .login-shell {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-brand-panel {
        min-height: 235px;

        display: block;

        padding:
            max(34px, env(safe-area-inset-top))
            22px
            72px;

        background: transparent;
    }

    .brand-content {
        width: 100%;
        max-width: none;
    }

    .brand-company {
        justify-content: center;
        text-align: left;
    }

    .brand-company-mark {
        width: 50px;
        height: 50px;
        border-radius: 15px;
        font-size: 17px;
    }

    .brand-company-name {
        font-size: 21px;
    }

    .brand-company-tagline {
        margin-top: 3px;
        font-size: 10px;
    }

    .brand-divider,
    .brand-product {
        display: none;
    }

    .brand-orb-top {
        width: 190px;
        height: 190px;
        left: -105px;
        top: -115px;
    }

    .brand-orb-bottom {
        width: 240px;
        height: 240px;
        right: -120px;
        bottom: -150px;
    }

    .login-form-panel {
        min-height: calc(100vh - 170px);
        min-height: calc(100dvh - 170px);

        display: block;

        margin-top: -50px;

        padding:
            0 14px
            max(22px, env(safe-area-inset-bottom));

        background: transparent;
    }

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

        margin-inline: auto;

        padding: 27px 21px 24px;

        border-radius: 22px;

        box-shadow:
            0 20px 54px rgba(29, 60, 104, .18);
    }

    .login-logo {
        width: 50px;
        height: 50px;
        border-radius: 15px;
        font-size: 23px;
    }

    .login-logo-title {
        font-size: 20px;
    }

    .login-logo-core {
        font-size: 14px;
    }

    .login-heading {
        margin-top: 23px;
    }

    .login-heading h2 {
        font-size: 25px;
    }

    .login-form {
        margin-top: 25px;
    }

    .login-input {
        min-height: 56px;

        font-size: 16px;
    }

}


/* SMALL PHONE */

@media (max-width: 390px) {

    .login-card {
        padding-left: 17px;
        padding-right: 17px;
    }

    .brand-company-name {
        font-size: 19px;
    }

}


/* SHORT DESKTOP / LANDSCAPE TABLET */

@media (min-width: 761px) and (max-height: 760px) {

    .login-brand-panel {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .brand-divider {
        margin-top: 25px;
        margin-bottom: 22px;
    }

    .brand-product-description {
        margin-top: 17px;
        line-height: 1.55;
    }

    .brand-security {
        margin-top: 22px;
    }

    .login-form-panel {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .login-card {
        padding-top: 28px;
        padding-bottom: 26px;
    }

    .login-heading {
        margin-top: 20px;
    }

    .login-form {
        margin-top: 22px;
    }

    .login-field + .login-field {
        margin-top: 13px;
    }

    .login-submit {
        margin-top: 20px;
    }

    .login-footer {
        margin-top: 19px;
        padding-top: 16px;
    }

}


/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

}
