:root {
    --gm-office-header-height: 116px;
    --gm-office-header-font: "Kalimati", "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
    --gm-office-header-title-font: "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
    --gm-primary: #0468B1;
    --gm-primary-deep: #00689D;
    --gm-primary-light: #0A97D9;
    --gm-brand-red: #DC143C;
    --gm-neutral-dark: #59616F;
    --gm-primary-10: #E6F0F8;
    --gm-primary-25: #C0DAEC;
    --gm-ink: #1E293B;
}

.gm-office-header {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: var(--gm-office-header-height);
    overflow: visible;
    border: 0;
    border-bottom: 2px solid rgba(4, 104, 177, .72);
    background-color: var(--gm-primary-10);
    background-image: url("../images/gandaki-machhapuchhre-sunrise-v2.webp");
    background-position: center 30%;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 12px 30px rgba(4, 104, 177, .15);
    color: var(--gm-ink);
    font-family: var(--gm-office-header-font);
}

.gm-office-header__overlay {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(245, 249, 252, .82) 0%, rgba(230, 240, 248, .48) 25%, rgba(255, 255, 255, .32) 50%, rgba(230, 240, 248, .5) 76%, rgba(245, 249, 252, .82) 100%),
        linear-gradient(180deg, rgba(4, 104, 177, .13) 0%, rgba(255, 255, 255, .06) 48%, rgba(10, 151, 217, .18) 100%);
}

.gm-office-header__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(430px, 680px) minmax(250px, 1fr);
    align-items: center;
    gap: 1rem;
    min-height: var(--gm-office-header-height);
    margin: 0 auto;
    padding: 6px 24px;
}

.gm-office-header__emblem {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: max-content;
    border-radius: 8px;
}

.gm-office-header__emblem:focus-visible {
    outline: 3px solid rgba(4, 104, 177, .45);
    outline-offset: 4px;
}

.gm-office-header__emblem img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 7px 12px rgba(4, 104, 177, .18));
}

.gm-office-header__identity {
    min-width: 0;
    padding: 0 1rem;
    text-align: center;
    line-height: 1.18;
    text-shadow: 0 1px 2px rgba(255, 255, 255, .96);
}

.gm-office-header__government {
    font-family: var(--gm-office-header-title-font);
    color: var(--gm-neutral-dark);
    font-size: .98rem;
    font-weight: 800;
}

.gm-office-header__office {
    margin-top: .18rem;
    font-family: var(--gm-office-header-title-font);
    color: var(--gm-brand-red);
    font-size: 1.08rem;
    font-weight: 800;
}

.gm-office-header__system {
    margin-top: .38rem;
    font-family: var(--gm-office-header-title-font);
    color: var(--gm-primary);
    font-size: clamp(1.58rem, 2vw, 1.98rem);
    font-weight: 900;
    line-height: 1.22;
    -webkit-text-stroke: .45px rgba(255, 255, 255, .9);
    paint-order: stroke fill;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, .92),
        0 2px 0 rgba(0, 104, 157, .18),
        0 4px 8px rgba(4, 104, 177, .18);
}

.gm-office-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .7rem;
    min-width: 0;
}

.gm-office-header--app .gm-office-header__actions > :not(.gm-office-header__flag) {
    position: relative;
    z-index: 1;
}

.gm-office-header__flag {
    width: auto;
    height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 7px 10px rgba(4, 104, 177, .18));
}

.gm-office-header--auth {
    flex: 0 0 auto;
}

.gm-office-header--auth .gm-office-header__inner {
    grid-template-columns: 100px minmax(420px, 720px) 100px;
    max-width: 1120px;
}

.gm-office-header--auth .gm-office-header__actions {
    justify-content: flex-end;
}

#page-topbar.gm-office-header {
    right: 0 !important;
    width: auto !important;
    background-color: var(--gm-primary-10) !important;
    box-shadow: 0 12px 30px rgba(4, 104, 177, .15) !important;
}

#page-topbar .gm-office-header__inner {
    min-height: var(--gm-office-header-height);
}

#page-topbar .gm-office-header__actions .gm-fiscal-year-picker,
#page-topbar .gm-office-header__actions .topbar-user > .btn,
#page-topbar .gm-office-header__actions > .btn {
    border-color: rgba(4, 104, 177, .2) !important;
    background: rgba(255, 255, 255, .88) !important;
    box-shadow: 0 7px 18px rgba(4, 104, 177, .1) !important;
    backdrop-filter: blur(8px);
}

.page-content {
    padding-top: calc(var(--gm-office-header-height) + 1rem) !important;
}

@media (max-width: 1199.98px) {
    :root {
        --gm-office-header-height: 116px;
    }

    .gm-office-header__inner {
        grid-template-columns: 78px minmax(360px, 1fr) minmax(220px, auto);
        padding: 6px 18px;
    }

    .gm-office-header__emblem img {
        width: 76px;
        height: 76px;
    }

    .gm-office-header__government {
        font-size: .96rem;
    }

    .gm-office-header__office {
        font-size: 1.06rem;
    }

    .gm-office-header__system {
        font-size: 1.58rem;
    }

    .gm-office-header__flag {
        height: 54px;
    }
}

@media (max-width: 991.98px) {
    :root {
        --gm-office-header-height: 170px;
    }

    .gm-office-header {
        background-position: center 28%;
    }

    .gm-office-header__inner,
    .gm-office-header--auth .gm-office-header__inner {
        grid-template-columns: 72px minmax(0, 1fr) 72px;
        grid-template-rows: auto auto;
        align-content: center;
        gap: .55rem .75rem;
        padding: 10px 16px;
    }

    .gm-office-header__identity {
        padding-inline: .25rem;
    }

    .gm-office-header__actions {
        grid-column: 1 / -1;
        justify-content: center;
        flex-wrap: wrap;
        gap: .45rem;
    }

    .gm-office-header--auth .gm-office-header__actions {
        grid-column: 3;
        grid-row: 1;
    }

    .gm-office-header__system {
        margin-top: .32rem;
        font-size: 1.48rem;
    }
}

@media (max-width: 575.98px) {
    :root {
        --gm-office-header-height: 158px;
    }

    .gm-office-header__inner,
    .gm-office-header--auth .gm-office-header__inner {
        grid-template-columns: 50px minmax(0, 1fr) 46px;
        padding: 8px 10px;
    }

    .gm-office-header__emblem img {
        width: 48px;
        height: 48px;
    }

    .gm-office-header__government {
        font-size: .78rem;
    }

    .gm-office-header__office {
        margin-top: .2rem;
        font-size: .84rem;
    }

    .gm-office-header__system {
        margin-top: .42rem;
        font-size: 1.18rem;
        -webkit-text-stroke-width: .45px;
        text-shadow:
            0 1px 0 rgba(255, 255, 255, .92),
            0 1.5px 0 rgba(0, 104, 157, .18),
            0 2px 4px rgba(4, 104, 177, .18);
    }

    .gm-office-header__flag {
        height: 44px;
    }

    .gm-office-header--app .gm-office-header__flag {
        display: none;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .gm-office-header__overlay {
        background: rgba(244, 249, 255, .78);
    }
}

@media print {
    .gm-office-header {
        min-height: auto !important;
        border-bottom: 2px solid var(--gm-primary) !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .gm-office-header__overlay {
        display: none !important;
    }
}
