.site-header {
    background: #fff;
    border-bottom: 1px solid #e1e8f0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background-color 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.site-header.is-scrolled {
    background: rgba(255, 255, 255, .78);
    border-bottom-color: rgba(192, 207, 223, .6);
    box-shadow: 0 8px 28px rgba(17, 45, 76, .08);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
}
.site-header-inner { min-height: 78px; padding-block: 12px; gap: 30px; }
.topnav-brand { gap: 11px; }
.topnav-brand img { width: 47px; height: 47px; }
.topnav-brand .topnav-brand-text { display: flex; align-items: center; line-height: 1; }
.topnav-brand-text strong { font-size: 21px; font-weight: 800; color: #12385f; }
.topnav-panel { gap: 20px; }
.topnav-menu { gap: 5px; }
.topnav-link, .topnav-dropdown > summary { position: relative; min-height: 40px; padding: 10px 12px; gap: 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #5b6e82; transition: background-color 180ms, color 180ms; }
.topnav-link > i, .topnav-dropdown > summary > i:first-child { font-size: 13px; color: #7990a5; }
.topnav-link:hover, .topnav-dropdown > summary:hover { background: #f0f4f8; color: #143c65; }
.topnav-link.active, .topnav-dropdown.current > summary, .topnav-dropdown[open] > summary { background: #eaf1f8; color: #123d67; }
.topnav-link.active > i, .topnav-dropdown.current > summary > i:first-child { color: #245d90; }
.topnav-link.active::after { content: ''; position: absolute; bottom: 4px; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: #285c8c; }
.topnav-chevron { font-size: 9px; margin-left: 4px; color: #8193a5; }
.topnav-search { flex-basis: 180px; max-width: 230px; min-width: 130px; }
.topnav-search input { height: 39px; border: 1px solid #e0e7ee; border-radius: 7px; background: #f5f7fa; font-size: 11px; transition: background-color 180ms, border-color 180ms, box-shadow 180ms; }
.topnav-search input:focus { background: #fff; border-color: #8cacc9; box-shadow: 0 0 0 3px #285c8c0c; }
.topnav-search i { left: 13px; color: #8298ad; font-size: 12px; pointer-events: none; }
.site-header .btn-login { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; height: 39px; padding: 0 17px; border: 0; border-radius: 6px; background: #153d66; color: #fff; font-size: 12px; font-weight: 600; box-shadow: none; transition: background-color 180ms, transform 180ms; }
.site-header .btn-login:hover { color: #fff; background: #275982; transform: translateY(-1px); }
.topnav-account > summary { min-height: 41px; padding: 4px 9px 4px 4px; border: 1px solid #e1e8ef; border-radius: 7px; background: #ffffff80; max-width: 220px; gap: 8px; }
.topnav-avatar { width: 31px; height: 31px; border-radius: 5px; background: #1a466f; font-size: 10px; }
.topnav-account-name { font-size: 11px; }
.topnav-account-role { font-size: 9px; }
.topnav-mega, .topnav-account-menu { background: #fff; border: 1px solid #dce5ee; border-radius: 8px; box-shadow: 0 14px 40px #1534521a; animation: topnav-enter 280ms cubic-bezier(.2,.8,.2,1) both; transform-origin: top center; }
.topnav-mega { max-height: calc(100dvh - 120px); overflow-y: auto; padding: 21px; }
.topnav-mega-organization { left: 50%; transform: translateX(-50%); }
.topnav-group-title { color: #64819b; font-size: 9px; font-weight: 700; margin-bottom: 13px; }
.topnav-group a { font-size: 11px; padding: 9px; color: #415e79; border-radius: 4px; transition: background-color 150ms, color 150ms; }
.topnav-account-menu a, .topnav-account-menu button { font-size: 11px; }
.topnav-group a:hover { color: #123e67; background: #edf3f8; }
.site-header a:focus-visible, .site-header summary:focus-visible, .site-header button:focus-visible { outline: 2px solid #5085b3; outline-offset: 3px; }
.topnav-toggle { width: 39px; height: 39px; background: #f0f4f8; color: #204f78; border: 1px solid #e0e7ee; border-radius: 6px; }
.site-header.is-open .topnav-toggle { background: #163f67; color: #fff; }
@keyframes topnav-enter { from { opacity: 0; translate: 0 -9px; scale: .98; } to { opacity: 1; translate: 0 0; scale: 1; } }
.topnav-link, .topnav-dropdown > summary { transition: background-color 180ms, color 180ms, translate 180ms; }
.topnav-link > i, .topnav-dropdown > summary > i:first-child { transition: transform 220ms cubic-bezier(.2,.8,.2,1), color 180ms; }
.topnav-link:not(.active)::after { content: ''; position: absolute; bottom: 4px; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: #5e85a9; transform: scaleX(0); transform-origin: left; transition: transform 220ms ease; }
.topnav-chevron { transition: transform 240ms cubic-bezier(.2,.8,.2,1); }
.topnav-brand img { transition: transform 260ms cubic-bezier(.2,.8,.2,1); }
.topnav-group a, .topnav-account-menu a, .topnav-account-menu button { transition: background-color 160ms, color 160ms, translate 180ms; }
.topnav-dropdown[open] .topnav-group { animation: topnav-item-enter 320ms ease both; }
.topnav-dropdown[open] .topnav-group:nth-child(2) { animation-delay: 35ms; }
.topnav-dropdown[open] .topnav-group:nth-child(3) { animation-delay: 70ms; }
.topnav-dropdown[open] .topnav-group:nth-child(4) { animation-delay: 105ms; }
.topnav-dropdown[open] .topnav-dropdown[open] .topnav-dropdown[open] .topnav-account[open] .topnav-account-menu > a { animation: topnav-item-enter 280ms 40ms ease both; }
.topnav-toggle { transition: background-color 180ms, color 180ms; }
.topnav-toggle i { transition: transform 220ms ease; }
.site-header.is-open .topnav-toggle i { transform: rotate(90deg); }
@keyframes topnav-item-enter { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (hover: hover) {
    .topnav-link:hover > i, .topnav-dropdown > summary:hover > i:first-child { transform: translateY(-2px); color: #245d90; }
    .topnav-link:not(.active):hover::after { transform: scaleX(1); }
    .topnav-brand:hover img { transform: rotate(-5deg) scale(1.04); }
    .topnav-group a:hover, .topnav-account-menu a:hover { translate: 3px 0; }
}
@media (min-width: 1081px) and (max-width: 1320px) {
    .site-header-inner { padding-inline: 24px; gap: 18px; }
    .topnav-brand .topnav-brand-text { display: flex; }
    .topnav-panel { gap: 14px; }
    .topnav-search { max-width: 190px; }
}
@media (max-width: 1080px) {
    .site-header-inner { min-height: 70px; padding: 11px 20px; }
    .site-header.is-open .topnav-panel { animation: topnav-enter 240ms ease-out both; }
    .topnav-brand img { width: 43px; height: 43px; }
    .topnav-brand-text strong { font-size: 19px; }
    .topnav-panel { max-height: calc(100dvh - 70px); background: rgba(255, 255, 255, .98); padding: 16px 20px 22px; gap: 16px; }
    .topnav-menu { gap: 5px; }
    .topnav-link, .topnav-dropdown > summary { min-height: 43px; font-size: 12px; }
    .topnav-link.active::after { display: none; }
    .topnav-chevron { margin-left: auto; }
    .topnav-search { max-width: none; min-width: 0; flex: none; }
    .topnav-search input { height: 42px; }
    .topnav-mega, .topnav-account-menu { max-height: none; overflow: visible; padding: 14px; box-shadow: none; }
    .topnav-mega-organization { left: auto; transform: none; }
    .topnav-account > summary { max-width: none; }
    .topnav-account-menu { width: 100%; }
    .topnav-mega-organization { gap: 14px 0; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header.is-scrolled { background: rgba(255, 255, 255, .97); }
}
@media (prefers-reduced-motion: reduce) {
    .site-header, .site-header *, .site-header *::after { transition: none !important; animation: none !important; }
}

/* ---------- Navbar modern (navy-white, selaras dengan beranda) ---------- */
.site-header { --topnav-ink: #0f2742; --topnav-navy: #123761; --topnav-soft: #f1f5f9; border-bottom-color: transparent; }
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(11, 37, 69, .08); }
.topnav-brand img { transition: transform 260ms cubic-bezier(.2, .8, .2, 1); }
.topnav-brand-text strong { font-family: var(--font-heading); font-size: 22px; color: var(--topnav-ink); letter-spacing: 0; }
.topnav-progress { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: linear-gradient(90deg, #1c4a7e, #3a6ea5, #8fb8e3); transform: scaleX(var(--topnav-progress, 0)); transform-origin: left; opacity: 0; transition: opacity 200ms; pointer-events: none; }
.site-header.is-scrolled .topnav-progress { opacity: 1; }

/* Pencarian berbentuk pil dengan pintasan "/" */
.topnav-search input { height: 42px; padding-right: 40px; border-radius: 999px; border-color: transparent; background: var(--topnav-soft); font-size: 13px; color: var(--topnav-ink); }
.topnav-search input:hover { background: #e9eef4; }
.topnav-search input:focus { background: #fff; border-color: #3a6ea5; box-shadow: 0 0 0 4px #8fb8e340; }
.topnav-search i { left: 15px; }
.topnav-kbd { position: absolute; top: 50%; right: 10px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; transform: translateY(-50%); border: 1px solid #d5dee8; border-bottom-width: 2px; border-radius: 6px; background: #fff; color: #6d819a; font: 600 11px/1 var(--font-body); pointer-events: none; transition: opacity 160ms; }
.topnav-search:focus-within .topnav-kbd { opacity: 0; }

/* Tombol login dan akun */
.site-header .btn-login { height: 42px; min-height: 42px; padding: 0 18px; border-radius: 999px; background: var(--topnav-navy); font-size: 13px; box-shadow: 0 6px 16px rgba(18, 55, 97, .22); }
.site-header .btn-login:hover { background: #1c4a7e; box-shadow: 0 10px 22px rgba(18, 55, 97, .28); }
.topnav-account > summary { min-height: 44px; padding: 4px 12px 4px 4px; border: 0; border-radius: 999px; background: var(--topnav-soft); transition: background-color 180ms; }
.topnav-account > summary:hover, .topnav-account[open] > summary { background: #e6edf5; }
.topnav-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #1c4a7e, #123761); font-size: 12px; }
.topnav-account-name { font-size: 12px; color: var(--topnav-ink); }
.topnav-account-role { font-size: 11px; }

/* Panel dropdown */
.topnav-mega, .topnav-account-menu { border: 1px solid #e3e9f0; border-radius: 18px; box-shadow: 0 24px 60px rgba(11, 37, 69, .16), 0 2px 6px rgba(11, 37, 69, .05); }
.topnav-mega { padding: 22px; }
.topnav-group-title { color: #3a6ea5; font-size: 11px; letter-spacing: 0; }
.topnav-group a { padding: 9px 12px; border-radius: 10px; font-size: 13px; color: #3c5269; }
.topnav-group a:hover { background: var(--topnav-soft); color: var(--topnav-ink); }
.topnav-group a.active { background: var(--topnav-navy); color: #fff; font-weight: 600; }
.topnav-account-menu a, .topnav-account-menu button { border-radius: 10px; font-size: 13px; }

@media (min-width: 1081px) {
    /* Menu utama sebagai grup tersegmentasi; item aktif menjadi pil putih */
    .topnav-menu { gap: 2px; padding: 4px; border-radius: 999px; background: var(--topnav-soft); }
    .topnav-link, .topnav-dropdown > summary { min-height: 38px; padding: 9px 15px; border-radius: 999px; font-size: 13px; color: #556a80; }
    .topnav-link:hover, .topnav-dropdown > summary:hover { background: #ffffffa6; color: var(--topnav-ink); }
    .topnav-link.active, .topnav-dropdown.current > summary, .topnav-dropdown[open] > summary { background: #fff; color: var(--topnav-ink); box-shadow: 0 1px 3px rgba(11, 37, 69, .1), 0 4px 12px rgba(11, 37, 69, .06); }
    .topnav-link.active > i, .topnav-dropdown.current > summary > i:first-child, .topnav-dropdown[open] > summary > i:first-child { color: #1c4a7e; }
    .topnav-link.active::after, .topnav-link:not(.active)::after { display: none; }
    .topnav-dropdown[open] .topnav-chevron { transform: rotate(180deg); }
    .topnav-mega { margin-top: 10px; }
}
@media (min-width: 1081px) and (max-width: 1320px) {
    .topnav-link, .topnav-dropdown > summary { padding-inline: 11px; font-size: 12px; }
}
@media (max-width: 1080px) {
    .topnav-kbd { display: none; }
    .topnav-search input { padding-right: 14px; }
    .topnav-toggle { width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--topnav-soft); }
    .topnav-panel { background: #fff; border-top: 1px solid #e8eef4; box-shadow: 0 24px 40px rgba(11, 37, 69, .12); }
    .topnav-link, .topnav-dropdown > summary { border-radius: 12px; font-size: 14px; }
    .topnav-link.active, .topnav-dropdown.current > summary { background: #eaf1f9; }
    .topnav-mega, .topnav-account-menu { border-radius: 14px; box-shadow: none; }
}

/* Tinggi navbar dibuat tetap agar scroll tidak bergeser dan memicu loop naik-turun. */
.site-header { overflow-anchor: none; }
.site-header-inner { min-height: 72px; }
