/* Compact top navigation Pantau Ibu */
.fi-topbar {
    flex-wrap: wrap !important;
}

.fi-topbar nav,
.fi-topbar .fi-topbar-nav,
.fi-topbar .fi-tabs {
    flex-wrap: nowrap !important;
    gap: .25rem !important;
}

.fi-topbar nav a,
.fi-topbar nav button,
.fi-topbar .fi-dropdown-trigger {
    white-space: nowrap !important;
}

.fi-topbar a,
.fi-topbar button {
    font-size: .86rem !important;
}

.fi-topbar .fi-global-search {
    min-width: 190px !important;
}

/* layar sedang: padatkan menu */
@media (max-width: 1280px) {
    .fi-topbar a,
    .fi-topbar button {
        font-size: .78rem !important;
        padding-left: .45rem !important;
        padding-right: .45rem !important;
    }

    .fi-topbar .fi-global-search {
        min-width: 170px !important;
    }
}

/* layar lebih sempit: search turun ke baris kedua */
@media (max-width: 1120px) {
    .fi-topbar {
        row-gap: .5rem !important;
    }

    .fi-topbar .fi-global-search {
        order: 99 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
    }

    .fi-topbar .fi-global-search input {
        width: 100% !important;
    }
}

/* layar sempit: sembunyikan tulisan Pengaturan, sisakan ikon */
@media (max-width: 1180px) {
    .fi-topbar [aria-label="Pengaturan"],
    .fi-topbar button:has(span:contains("Pengaturan")) {
        max-width: 44px !important;
        overflow: hidden !important;
    }
}

/* Persempit global search agar menu tetap satu baris */
.fi-topbar .fi-global-search,
.fi-topbar [x-data*="globalSearch"] {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    flex: 0 0 150px !important;
}

.fi-topbar .fi-global-search input,
.fi-topbar [x-data*="globalSearch"] input {
    width: 150px !important;
    min-width: 150px !important;
    font-size: .78rem !important;
}

/* Jika layar masih sempit, search jadi lebih kecil lagi */
@media (max-width: 1280px) {
    .fi-topbar .fi-global-search,
    .fi-topbar [x-data*="globalSearch"] {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
        flex-basis: 120px !important;
    }

    .fi-topbar .fi-global-search input,
    .fi-topbar [x-data*="globalSearch"] input {
        width: 120px !important;
        min-width: 120px !important;
    }
}

/* Jangan turunkan search ke baris kedua kecuali layar sangat kecil */
@media (min-width: 1024px) {
    .fi-topbar .fi-global-search,
    .fi-topbar [x-data*="globalSearch"] {
        order: initial !important;
        flex-basis: 130px !important;
    }
}

/* === Filter tanggal + status inline di toolbar (ANC table) === */
.anc-filter-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-right: .5rem;
    flex-wrap: wrap;
}

.anc-filter-input,
.anc-filter-select {
    height: 2.25rem;
    padding: .25rem .625rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .5rem;
    border: none;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .15);
    background: #fff;
    color: #0f172a;
    min-width: 0;
    transition: box-shadow .12s ease;
}

/* Focus */
.anc-filter-input:focus,
.anc-filter-select:focus {
    box-shadow: 0 0 0 2px rgba(244, 63, 94, .25), inset 0 0 0 1px #f43f5e;
}

/* Dark mode */
.dark .anc-filter-input,
.dark .anc-filter-select {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
    background: rgba(255, 255, 255, .05);
    color: #f1f5f9;
    color-scheme: dark;
}

.dark .anc-filter-input:focus,
.dark .anc-filter-select:focus {
    box-shadow: 0 0 0 2px rgba(244, 63, 94, .35), inset 0 0 0 1px #f43f5e;
}

/* Desktop: date fixed width, status auto */
.anc-filter-input {
    width: 8.5rem;
}

.anc-filter-select {
    width: auto;
}

/* Mobile: full-width, kedua input berbagi baris */
@media (max-width: 640px) {
    .anc-filter-bar {
        width: 100%;
        padding-right: 0;
        gap: .375rem;
    }

    .anc-filter-input,
    .anc-filter-select {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        font-size: .8rem;
        padding: .25rem .5rem;
    }
}
