/* ============================================================
   ZMIS - ZANZIBAR MALARIA INFORMATION SYSTEM
   Native DHIS2 Login Customization
   ============================================================ */


/* ============================================================
   GLOBAL RESET
   ============================================================ */

.zmis-login-page,
.zmis-login-page * {
    box-sizing: border-box;
}


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


body.zmis-custom-login-active {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f4f7fb !important;
}


/* ============================================================
   MAIN PAGE
   ============================================================ */

.zmis-login-page {
    position: fixed;
    inset: 0;

    z-index: 999999;

    display: flex;

    width: 100%;
    min-width: 320px;

    min-height: 100vh;

    overflow: auto;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    background: #f7f9fc;
}


/* ============================================================
   LEFT BRANDING PANEL
   ============================================================ */

.zmis-branding-panel {
    position: relative;

    width: 53%;

    min-height: 100vh;

    overflow: hidden;

    padding:
        42px
        55px
        90px;

    color: #ffffff;

    background:
        radial-gradient(
            circle at 82% 22%,
            rgba(0, 151, 210, 0.33),
            transparent 38%
        ),
        radial-gradient(
            circle at 12% 92%,
            rgba(31, 166, 90, 0.20),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #00284e 0%,
            #003e70 51%,
            #005b8e 100%
        );
}


/* ============================================================
   LOGOS
   ============================================================ */

.zmis-header-logos {
    position: relative;

    z-index: 5;

    display: flex;

    align-items: center;

    gap: 24px;

    min-height: 105px;
}


.zmis-smz-logo {
    display: block;

    width: auto;

    max-width: 190px;

    max-height: 105px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 6px 11px
            rgba(0, 0, 0, 0.18)
        );
}


.zmis-zamep-logo {
    display: block;

    width: auto;

    max-width: 125px;

    max-height: 105px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 6px 11px
            rgba(0, 0, 0, 0.18)
        );
}


.zmis-logo-divider {
    width: 1px;

    height: 82px;

    flex-shrink: 0;

    background:
        rgba(
            255,
            255,
            255,
            0.40
        );
}


/* ============================================================
   BRANDING CONTENT
   ============================================================ */

.zmis-branding-content {
    position: relative;

    z-index: 5;

    max-width: 610px;

    margin-top: 82px;
}


.zmis-system-tag {
    display: inline-flex;

    align-items: center;

    padding:
        7px
        12px;

    margin-bottom: 20px;

    color:
        rgba(
            255,
            255,
            255,
            0.92
        );

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1.6px;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.24
        );

    border-radius: 50px;

    background:
        rgba(
            255,
            255,
            255,
            0.08
        );

    backdrop-filter:
        blur(6px);
}


.zmis-branding-content h1 {
    margin: 0;

    color: #ffffff;

    font-size:
        clamp(
            76px,
            7vw,
            110px
        );

    line-height: 0.88;

    letter-spacing: -5px;

    font-weight: 800;

    text-shadow:
        0 8px 28px
        rgba(
            0,
            0,
            0,
            0.17
        );
}


.zmis-branding-content h2 {
    margin:
        24px
        0
        0;

    color:
        rgba(
            255,
            255,
            255,
            0.98
        );

    font-size: 27px;

    line-height: 1.3;

    font-weight: 500;
}


.zmis-green-line {
    width: 76px;

    height: 4px;

    margin:
        24px
        0
        27px;

    border-radius: 50px;

    background: #3bbb57;

    box-shadow:
        0 0 14px
        rgba(
            59,
            187,
            87,
            0.45
        );
}


.zmis-branding-content p {
    max-width: 535px;

    margin: 0;

    color:
        rgba(
            255,
            255,
            255,
            0.88
        );

    font-size: 17px;

    line-height: 1.7;
}


/* ============================================================
   DECORATIVE BACKGROUND
   ============================================================ */

.zmis-brand-decoration {
    position: absolute;

    width: 440px;
    height: 440px;

    right: -160px;
    top: 29%;

    border-radius: 50%;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.07
        );

    box-shadow:
        0 0 0 65px
            rgba(
                255,
                255,
                255,
                0.025
            ),
        0 0 0 135px
            rgba(
                255,
                255,
                255,
                0.018
            );
}


.zmis-chart-bars {
    position: absolute;

    left: 0;
    right: 0;

    bottom: 38px;

    height: 155px;

    display: flex;

    align-items: flex-end;

    gap: 14px;

    padding:
        0
        35px;

    opacity: 0.10;
}


.zmis-chart-bars span {
    flex: 1;

    min-width: 9px;

    border-radius:
        5px
        5px
        0
        0;

    background:
        linear-gradient(
            180deg,
            #67c9ef,
            #3db867
        );
}


.zmis-chart-bars span:nth-child(1) {
    height: 25%;
}

.zmis-chart-bars span:nth-child(2) {
    height: 46%;
}

.zmis-chart-bars span:nth-child(3) {
    height: 34%;
}

.zmis-chart-bars span:nth-child(4) {
    height: 65%;
}

.zmis-chart-bars span:nth-child(5) {
    height: 47%;
}

.zmis-chart-bars span:nth-child(6) {
    height: 81%;
}

.zmis-chart-bars span:nth-child(7) {
    height: 57%;
}

.zmis-chart-bars span:nth-child(8) {
    height: 92%;
}

.zmis-chart-bars span:nth-child(9) {
    height: 70%;
}

.zmis-chart-bars span:nth-child(10) {
    height: 82%;
}

.zmis-chart-bars span:nth-child(11) {
    height: 55%;
}


/* ============================================================
   RIGHT LOGIN AREA
   ============================================================ */

.zmis-login-area {
    width: 47%;

    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;

    padding:
        45px
        34px
        92px;

    background:
        radial-gradient(
            circle at center,
            #ffffff 0%,
            #f8fafc 58%,
            #eef3f8 100%
        );
}


/* ============================================================
   LOGIN CARD
   ============================================================ */

.zmis-login-card {
    position: relative;

    width: 440px;

    max-width: 100%;

    padding:
        37px
        38px
        31px;

    border:
        1px solid
        #dfe6ee;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 24px 65px
            rgba(
                23,
                48,
                76,
                0.12
            ),
        0 3px 8px
            rgba(
                23,
                48,
                76,
                0.04
            );
}


.zmis-login-card-header {
    text-align: center;
}


.zmis-mini-badge {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 60px;

    height: 27px;

    margin-bottom: 13px;

    padding:
        0
        13px;

    color: #ffffff;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1px;

    border-radius: 50px;

    background:
        linear-gradient(
            90deg,
            #005c96,
            #003d72
        );
}


.zmis-login-card h2 {
    margin: 0;

    color: #003b71;

    text-align: center;

    font-size: 30px;

    line-height: 1.2;

    font-weight: 800;
}


.zmis-login-intro {
    max-width: 320px;

    margin:
        10px
        auto
        26px;

    color: #617083;

    text-align: center;

    font-size: 14px;

    line-height: 1.55;
}


/* ============================================================
   DHIS2 ORIGINAL FORM
   ============================================================ */

.zmis-native-form {
    width: 100% !important;

    max-width: none !important;

    margin: 0 !important;

    padding: 0 !important;

    border: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}


.zmis-original-form-fragment {
    display: none !important;
}


.zmis-form-content {
    display: block;

    width: 100%;
}


/* ============================================================
   ERROR
   ============================================================ */

.zmis-error {
    margin-bottom: 18px;

    padding:
        11px
        13px;

    color: #b42318;

    border:
        1px solid
        #fecdca;

    border-radius: 7px;

    background: #fef3f2;

    font-size: 13px;

    line-height: 1.45;
}


.zmis-error[hidden] {
    display: none !important;
}


/* ============================================================
   FORM LABELS
   ============================================================ */

.zmis-native-form
.zmis-form-content
> label {
    display: block;

    margin-bottom: 7px;

    color: #27364a;

    font-size: 14px;

    font-weight: 600;
}


/* ============================================================
   INPUT GROUP
   ============================================================ */

.zmis-input-group {
    position: relative;

    width: 100%;

    margin-bottom: 18px;
}


.zmis-input-group input {
    display: block !important;

    width: 100% !important;

    height: 49px !important;

    margin: 0 !important;

    padding:
        0
        46px !important;

    color: #172033 !important;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif !important;

    font-size: 14px !important;

    border:
        1px solid
        #cbd5e1 !important;

    border-radius: 7px !important;

    outline: none !important;

    background: #ffffff !important;

    box-shadow: none !important;

    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background-color 0.2s;
}


.zmis-input-group input:hover {
    border-color:
        #aebdcb !important;
}


.zmis-input-group input:focus {
    border-color:
        #0065a8 !important;

    box-shadow:
        0 0 0 3px
        rgba(
            0,
            101,
            168,
            0.11
        ) !important;
}


.zmis-input-group input::placeholder {
    color: #94a3b8 !important;
}


.zmis-input-icon {
    position: absolute;

    left: 15px;

    top: 50%;

    z-index: 4;

    display: flex;

    transform:
        translateY(-50%);

    color: #5e7084;

    pointer-events: none;
}


/* ============================================================
   SHOW PASSWORD
   ============================================================ */

.zmis-show-password {
    position: absolute;

    right: 11px;

    top: 50%;

    z-index: 5;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 31px;

    height: 31px;

    padding: 0;

    transform:
        translateY(-50%);

    color: #4d6075;

    border: 0;

    border-radius: 5px;

    outline: none;

    background: transparent;

    cursor: pointer;
}


.zmis-show-password:hover {
    color: #005f9e;

    background: #f0f6fa;
}


/* ============================================================
   LOGIN OPTIONS
   ============================================================ */

.zmis-login-options {
    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 12px;

    margin:
        -1px
        0
        21px;

    font-size: 13px;
}


.zmis-remember {
    display: flex;

    align-items: center;

    gap: 7px;

    margin: 0;

    color: #334155;

    font-weight: 400;

    cursor: pointer;
}


.zmis-remember input {
    width: 16px !important;

    height: 16px !important;

    min-height: 16px !important;

    margin: 0 !important;

    padding: 0 !important;

    accent-color: #00558c;
}


.zmis-forgot-link {
    padding: 0;

    color: #0064a8;

    font-size: 13px;

    border: 0;

    outline: 0;

    background: transparent;

    cursor: pointer;
}


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


/* ============================================================
   SIGN IN BUTTON
   ============================================================ */

.zmis-sign-in-button {
    width: 100%;

    height: 50px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    color: #ffffff;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 15px;

    font-weight: 700;

    letter-spacing: 0.3px;

    border: 0;

    border-radius: 7px;

    outline: none;

    cursor: pointer;

    background:
        linear-gradient(
            100deg,
            #005c96 0%,
            #003c70 100%
        );

    box-shadow:
        0 7px 18px
            rgba(
                0,
                67,
                116,
                0.19
            ),
        inset
        0
        -3px
        0
        #39b54a;

    transition:
        transform 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}


.zmis-sign-in-button:hover:not(:disabled) {
    transform:
        translateY(-1px);

    background:
        linear-gradient(
            100deg,
            #006aa8,
            #004a82
        );

    box-shadow:
        0 10px 22px
            rgba(
                0,
                67,
                116,
                0.24
            ),
        inset
        0
        -3px
        0
        #39b54a;
}


.zmis-sign-in-button:active:not(:disabled) {
    transform:
        translateY(0);
}


.zmis-sign-in-button:disabled {
    opacity: 0.69;

    cursor: wait;
}


.zmis-button-arrow {
    font-size: 20px;

    line-height: 1;

    transition:
        transform 0.2s;
}


.zmis-sign-in-button:hover
.zmis-button-arrow {
    transform:
        translateX(3px);
}


.zmis-sign-in-button.loading
.zmis-button-arrow {
    animation:
        zmis-arrow-loading
        0.9s
        ease-in-out
        infinite;
}


@keyframes zmis-arrow-loading {

    0%,
    100% {
        transform:
            translateX(0);
    }

    50% {
        transform:
            translateX(5px);
    }
}


/* ============================================================
   SUPPORT BOX
   ============================================================ */

.zmis-support-box {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 27px;

    padding:
        13px
        14px;

    color: #314258;

    border:
        1px solid
        #d6e8da;

    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #f6fbf7,
            #f0f8f2
        );

    font-size: 13px;

    line-height: 1.45;
}


.zmis-support-icon {
    width: 40px;

    height: 40px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #ffffff;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #24964b,
            #147434
        );

    box-shadow:
        0 5px 13px
        rgba(
            20,
            116,
            52,
            0.20
        );
}


.zmis-support-box strong {
    color: #25364a;

    font-weight: 700;
}


.zmis-support-contact {
    color: #0062a2;
}


/* ============================================================
   LANGUAGE SWITCH
   ============================================================ */

.zmis-language-switch {
    display: flex;

    margin-top: 23px;

    overflow: hidden;

    border:
        1px solid
        #d4dce5;

    border-radius: 7px;

    background: #ffffff;
}


.zmis-language-switch button {
    flex: 1;

    height: 41px;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 7px;

    color: #334155;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 13px;

    font-weight: 500;

    border: 0;

    background: #ffffff;

    cursor: pointer;
}


.zmis-language-switch button:first-child {
    border-right:
        1px solid
        #d4dce5;
}


.zmis-language-switch button:hover {
    background: #f5f8fb;
}


.zmis-language-switch button.active {
    color: #ffffff;

    background:
        linear-gradient(
            100deg,
            #005b94,
            #003f73
        );
}


/* ============================================================
   FOOTER
   ============================================================ */

.zmis-login-footer {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 1000000;

    display: flex;

    justify-content:
        space-between;

    align-items: center;

    gap: 20px;

    min-height: 45px;

    padding:
        11px
        30px;

    color: #5d6877;

    border-top:
        1px solid
        #e1e7ee;

    background:
        rgba(
            255,
            255,
            255,
            0.97
        );

    box-shadow:
        0 -4px 18px
        rgba(
            25,
            47,
            73,
            0.035
        );

    font-size: 12px;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (
    max-width: 950px
) {

    body.zmis-custom-login-active {
        overflow: auto !important;
    }


    .zmis-login-page {
        position: absolute;

        flex-direction: column;
    }


    .zmis-branding-panel,
    .zmis-login-area {
        width: 100%;

        min-height: auto;
    }


    .zmis-branding-panel {
        padding:
            35px
            32px
            58px;
    }


    .zmis-branding-content {
        margin-top: 50px;
    }


    .zmis-branding-content h1 {
        font-size: 72px;
    }


    .zmis-login-area {
        padding:
            45px
            20px
            55px;
    }


    .zmis-login-footer {
        position: static;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (
    max-width: 600px
) {

    .zmis-branding-panel {
        padding:
            28px
            22px
            48px;
    }


    .zmis-header-logos {
        gap: 13px;

        min-height: 75px;
    }


    .zmis-smz-logo {
        max-width: 125px;

        max-height: 75px;
    }


    .zmis-zamep-logo {
        max-width: 82px;

        max-height: 75px;
    }


    .zmis-logo-divider {
        height: 62px;
    }


    .zmis-branding-content {
        margin-top: 35px;
    }


    .zmis-system-tag {
        font-size: 9px;
    }


    .zmis-branding-content h1 {
        font-size: 61px;

        letter-spacing: -3px;
    }


    .zmis-branding-content h2 {
        font-size: 20px;
    }


    .zmis-branding-content p {
        font-size: 14px;
    }


    .zmis-login-area {
        padding:
            35px
            14px;
    }


    .zmis-login-card {
        padding:
            28px
            22px;
    }


    .zmis-login-card h2 {
        font-size: 27px;
    }


    .zmis-login-options {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .zmis-login-footer {
        gap: 6px;

        padding:
            13px
            20px;

        flex-direction:
            column;

        text-align: center;
    }
}
