/* Navbar modul keuangan: menempel ke atas, selebar area konten (dari sidebar sampai tepi kanan). */
body.standard-page .finance-navbar {
  position: sticky;
  top: -24px; /* main.content adalah wadah scroll dengan padding atas 24px */
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  /* !important: menimpa aturan global .content > * { width/max-width: 100% !important } */
  width: calc(100% + 56px) !important; /* tembus padding kiri-kanan main.content (28px + 28px) */
  max-width: none !important;
  height: 60px;
  margin: -24px -28px 20px;
  padding: 0 24px 0 16px;
  background: color-mix(in srgb, var(--fm3-surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--fm3-line);
  transition: box-shadow .2s ease, background-color .2s ease;
}
body.standard-page .finance-navbar.is-scrolled {
  box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .35);
}
html[data-finance-theme="dark"] body.standard-page .finance-navbar.is-scrolled {
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .7);
}

/* Tab menu: pil dengan ikon */
body.standard-page .finance-navbar-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
body.standard-page .finance-navbar-tabs::-webkit-scrollbar { display: none; }
body.standard-page .finance-navbar-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px 0 11px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fm3-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
body.standard-page .finance-navbar-tab .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  opacity: .85;
  transition: transform .15s ease;
}
body.standard-page .finance-navbar-tab:hover {
  color: var(--fm3-text);
  background: var(--fm3-surface-2);
}
body.standard-page .finance-navbar-tab:hover .material-symbols-outlined { transform: translateY(-1px); }
body.standard-page .finance-navbar-tab.is-active {
  color: var(--fm3-primary);
  font-weight: 600;
  background: color-mix(in srgb, var(--fm3-primary) 11%, transparent);
}
body.standard-page .finance-navbar-tab.is-active .material-symbols-outlined { opacity: 1; }
/* Garis penanda di bawah tab aktif, menempel ke tepi bawah navbar */
body.standard-page .finance-navbar-tab.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -11px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--fm3-primary);
}
body.standard-page .finance-navbar-tab:focus-visible { outline: 2px solid var(--fm3-primary); outline-offset: 1px; }

body.standard-page .finance-navbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
body.standard-page .finance-navbar-actions .finance-navbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--fm3-line);
}
body.standard-page .finance-navbar-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 16px 0 11px;
  border-radius: 10px;
  background: var(--fm3-primary);
  color: var(--fm3-on-primary) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--fm3-primary) 70%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
body.standard-page .finance-navbar-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--fm3-primary) 75%, transparent);
}
body.standard-page .finance-navbar-primary:active { transform: none; }
body.standard-page .finance-navbar-primary.is-active { box-shadow: 0 0 0 3px color-mix(in srgb, var(--fm3-primary) 25%, transparent); }
body.standard-page .finance-navbar-primary .material-symbols-outlined { font-size: 20px; line-height: 1; }

body.standard-page .finance-navbar-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fm3-muted);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
body.standard-page .finance-navbar-icon:hover { background: var(--fm3-surface-2); color: var(--fm3-text); }
body.standard-page .finance-navbar-icon.is-active { color: var(--fm3-primary); background: color-mix(in srgb, var(--fm3-primary) 11%, transparent); }
body.standard-page .finance-navbar-icon .material-symbols-outlined { font-size: 21px; line-height: 1; }
body.standard-page .finance-navbar .finance-theme-visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important;
}

/* Tombol Tur dari finance_tour.php dipindah ke navbar. */
body.standard-page .finance-navbar button.ft-launch.finance-navbar-tour {
  height: 38px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  border: 1px solid var(--fm3-line) !important;
  background: var(--fm3-surface) !important;
  color: var(--fm3-text) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
}
body.standard-page .finance-navbar button.ft-launch.finance-navbar-tour:hover { background: var(--fm3-surface-2) !important; }

/* Layar sedang: ikon tab disembunyikan agar semua menu tetap muat. */
@media (max-width: 1279.98px) {
  body.standard-page .finance-navbar-tab { padding: 0 12px; }
  body.standard-page .finance-navbar-tab .material-symbols-outlined { display: none; }
}

/* Layar sempit: navbar tidak menempel (header mobile sudah fixed), tab bisa digeser. */
@media (max-width: 991.98px) {
  body.standard-page .finance-navbar {
    position: relative;
    top: auto;
    width: 100% !important;
    max-width: 100% !important;
    height: 54px;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding: 0 8px;
    border: 1px solid var(--fm3-line);
    border-radius: 14px;
    background: var(--fm3-surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.standard-page .finance-navbar-tab.is-active::after { display: none; }
  body.standard-page .finance-navbar-tab { height: 36px; }
  body.standard-page .finance-navbar-actions .finance-navbar-divider { display: none; }
  body.standard-page .finance-navbar-primary { padding: 0 10px 0 8px; }
  body.standard-page .finance-navbar button.ft-launch.finance-navbar-tour { display: none !important; }
}
@media (max-width: 575.98px) {
  body.standard-page .finance-navbar-primary { width: 38px; padding: 0; justify-content: center; font-size: 0; }
  body.standard-page .finance-navbar-primary .material-symbols-outlined { font-size: 22px; }
}
@media print {
  body.standard-page .finance-navbar { display: none !important; }
  /* Elemen aplikasi yang tidak boleh ikut tercetak di halaman mana pun. */
  body.standard-page .mobile-header,
  body.standard-page .mobile-nav-backdrop,
  body.standard-page .finance-sidebar-toggle,
  body.standard-page .topbar,
  body.standard-page .office-messenger-widget,
  body.standard-page .ocs-menu { display: none !important; }
  body.standard-page main.content { margin: 0 !important; padding: 0 !important; overflow: visible !important; height: auto !important; }
}
