@import '../../../../vendor/filament/filament/resources/css/theme.css';

@source '../../../../app/Filament/**/*';
@source '../../../../resources/views/filament/**/*';


/* =========================================================
   TATA PERSURATAN DIGITAL
   KEMENTERIAN HAJI DAN UMRAH
   BLACK & GOLD OFFICIAL THEME
   ========================================================= */

:root {
    --khu-black: #050505;
    --khu-black-soft: #0b0b0b;
    --khu-black-light: #151515;

    --khu-gold: #c89518;
    --khu-gold-dark: #a9790d;
    --khu-gold-light: #e3b83f;
    --khu-gold-bright: #f2c94c;

    --khu-white: #ffffff;

    --khu-text: #171717;
    --khu-muted: #6b7280;

    --khu-background: #f7f7f6;
    --khu-border: #e5e5e3;

    --khu-radius: 0.7rem;
}


/* =========================================================
   BODY
   ========================================================= */

.fi-body {
    background: var(--khu-background) !important;
}


/* =========================================================
   TOPBAR
   HANYA TAMPILKAN AREA USER DAN NOTIFIKASI
   ========================================================= */

.fi-topbar-ctn {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: 70 !important;
    pointer-events: none !important;
}

.fi-topbar {
    height: 0 !important;
    min-height: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Hilangkan kotak pencarian */
.fi-global-search {
    display: none !important;
}

/* Gabungkan lonceng notifikasi dan menu profil sejajar di pojok kanan atas */
.fi-topbar-database-notifications-btn,
div[x-data*="databaseNotifications"],
button[aria-label*="Notification"],
button[aria-label*="notifikasi"] {
    position: fixed !important;
    top: 18px !important;
    right: 70px !important; /* Terletak di sebelah kiri avatar */
    z-index: 100 !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fi-user-menu {
    position: fixed !important;
    top: 18px !important;
    right: 22px !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}


/* =========================================================
   LAYOUT UTAMA
   JANGAN MENGUBAH OVERFLOW / MARGIN
   ========================================================= */

.fi-main-ctn {
    width: 100% !important;
    max-width: none !important;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.fi-sidebar {
    width: 280px !important;

    background:
        linear-gradient(
            180deg,
            #050505 0%,
            #090909 55%,
            #111111 100%
        ) !important;

    border-right:
        1px solid #292929 !important;

    box-shadow:
        5px 0 25px rgb(0 0 0 / 0.15) !important;

    overflow: hidden !important;
}


/* =========================================================
   SIDEBAR FULL HEIGHT
   ========================================================= */

@media (min-width: 1024px) {

    #fi-main-sidebar {
        position: sticky !important;

        top: 0 !important;

        height: 100vh !important;

        min-height: 100vh !important;

        align-self: flex-start !important;

        z-index: 40 !important;
    }

    #fi-main-sidebar .fi-sidebar {
        height: 100% !important;

        min-height: 100% !important;

        top: 0 !important;

        inset-block-start: 0 !important;
    }
}


/* =========================================================
   SIDEBAR HEADER
   ========================================================= */

.fi-sidebar-header {
    height: 300px !important;

    min-height: 300px !important;

    padding: 20px 18px !important;

    background: #050505 !important;

    border-bottom:
        1px solid #292929 !important;

    display: flex !important;

    align-items: center !important;

    justify-content: center !important;

    position: relative !important;

    z-index: 5 !important;
}


/* =========================================================
   LOGO
   ========================================================= */

.fi-sidebar-header img {
    width: 125px !important;

    height: 125px !important;

    max-width: 125px !important;

    max-height: 125px !important;

    object-fit: contain !important;

    display: block !important;

    margin: 0 auto !important;
}


/* =========================================================
   BRAND
   ========================================================= */

.fi-sidebar-header a {
    width: 100% !important;

    color: #ffffff !important;

    text-decoration: none !important;

    display: flex !important;

    flex-direction: column !important;

    align-items: center !important;

    justify-content: center !important;

    text-align: center !important;
}


/* =========================================================
   BRAND TEXT
   ========================================================= */

.fi-sidebar-header a::after {
    content:
        "KEMENTERIAN\A"
        "HAJI DAN UMRAH\A"
        "KABUPATEN POHUWATO\A"
        "\A"
        "✦  TATA PERSURATAN DIGITAL  ✦";

    white-space: pre;

    text-align: center;

    color: #ffffff;

    font-size: 0.90rem;

    line-height: 1.45;

    font-weight: 700;

    letter-spacing: 0.02em;

    margin-top: 10px;
}


/* =========================================================
   BRAND GOLD LINE
   ========================================================= */

.fi-sidebar-header::before {
    content: "";

    position: absolute;

    left: 20px;

    right: 20px;

    bottom: 16px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--khu-gold) 20%,
            var(--khu-gold-light) 50%,
            var(--khu-gold) 80%,
            transparent
        );
}


/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */

.fi-sidebar-nav {
    padding:
        12px 10px 120px !important;

    background: #050505 !important;

    position: relative !important;

    z-index: 3 !important;
}


/* =========================================================
   NAVIGATION GROUP
   ========================================================= */

.fi-sidebar-group {
    margin-top: 22px !important;
}


.fi-sidebar-group:first-child {
    margin-top: 5px !important;
}


/* =========================================================
   GROUP LABEL
   ========================================================= */

.fi-sidebar-group-label {
    padding-left: 13px !important;

    margin-bottom: 8px !important;

    color: var(--khu-gold-bright) !important;

    font-size: 0.72rem !important;

    font-weight: 700 !important;

    letter-spacing: 0.08em !important;

    text-transform: uppercase !important;
}


/* Hilangkan garis group */

.fi-sidebar-group-label::after {
    display: none !important;
}


/* =========================================================
   MENU ITEM
   ========================================================= */

.fi-sidebar-item {
    margin: 2px 0 !important;
}


/* =========================================================
   MENU BUTTON
   FILAMENT AKTUAL: fi-sidebar-item-btn
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn {
    min-height: 44px !important;

    padding:
        9px 13px !important;

    border-radius:
        7px !important;

    background:
        transparent !important;

    color:
        #eeeeee !important;

    transition:
        background-color 150ms ease,
        color 150ms ease,
        transform 150ms ease !important;
}


/* =========================================================
   MENU ICON NORMAL
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn
.fi-sidebar-item-icon {
    width: 21px !important;

    height: 21px !important;

    color:
        var(--khu-gold) !important;
}


/* =========================================================
   MENU TEXT NORMAL
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn
.fi-sidebar-item-label {
    color:
        #eeeeee !important;

    font-size:
        0.88rem !important;

    font-weight:
        500 !important;
}


/* =========================================================
   MENU HOVER
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn:hover {
    background:
        rgb(200 149 24 / 0.12) !important;

    color:
        #ffffff !important;

    transform:
        translateX(2px);
}


/* =========================================================
   MENU HOVER ICON
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn:hover
.fi-sidebar-item-icon {
    color:
        var(--khu-gold-light) !important;
}


/* =========================================================
   ACTIVE MENU
   DASBOR / MENU YANG SEDANG DIBUKA
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn[aria-current="page"] {
    background:
        linear-gradient(
            90deg,
            #c89518 0%,
            #a9790d 100%
        ) !important;

    color:
        #ffffff !important;

    border-left:
        3px solid #f2c94c !important;

    border-radius:
        7px !important;

    box-shadow:
        0 5px 15px rgb(200 149 24 / 0.22) !important;
}


/* =========================================================
   ACTIVE MENU TEXT
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn[aria-current="page"]
.fi-sidebar-item-label {
    color:
        #ffffff !important;

    font-weight:
        700 !important;
}


/* =========================================================
   ACTIVE MENU ICON
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn[aria-current="page"]
.fi-sidebar-item-icon {
    color:
        #ffffff !important;
}


/* =========================================================
   ACTIVE SVG
   ========================================================= */

.fi-sidebar .fi-sidebar-item-btn[aria-current="page"] svg {
    color:
        #ffffff !important;
}


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

.fi-sidebar-footer {
    background:
        rgb(5 5 5 / 0.96) !important;

    border-top:
        1px solid rgb(200 149 24 / 0.55) !important;

    z-index: 5 !important;
}


/* =========================================================
   SIDEBAR ORNAMENT
   ========================================================= */

.fi-sidebar::after {
    content: "";

    position: absolute;

    left: 0;

    right: 0;

    bottom: 0;

    height: 92px;

    z-index: 2;

    pointer-events: none;

    opacity: 0.85;

    background-image:
        linear-gradient(
            135deg,
            transparent 44%,
            rgb(200 149 24 / 0.90) 45%,
            rgb(200 149 24 / 0.90) 47%,
            transparent 48%
        ),
        linear-gradient(
            45deg,
            transparent 44%,
            rgb(200 149 24 / 0.90) 45%,
            rgb(200 149 24 / 0.90) 47%,
            transparent 48%
        );

    background-size:
        28px 28px;

    background-position:
        0 0,
        14px 0;

    mask-image:
        linear-gradient(
            to top,
            black 0%,
            black 65%,
            transparent 100%
        );

    -webkit-mask-image:
        linear-gradient(
            to top,
            black 0%,
            black 65%,
            transparent 100%
        );
}


/* =========================================================
   SIDEBAR SCROLLBAR
   ========================================================= */

.fi-sidebar::-webkit-scrollbar {
    width: 7px;
}


.fi-sidebar::-webkit-scrollbar-track {
    background:
        #050505;
}


.fi-sidebar::-webkit-scrollbar-thumb {
    background:
        #4a4a4a;

    border-radius:
        10px;
}


.fi-sidebar::-webkit-scrollbar-thumb:hover {
    background:
        #c89518;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.fi-main {
    background:
        var(--khu-background) !important;
}


.fi-main-ctn {
    width:
        100% !important;

    max-width:
        none !important;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.fi-header-heading {
    color:
        var(--khu-text) !important;

    font-weight:
        700 !important;

    letter-spacing:
        -0.02em !important;
}


.fi-header-subheading {
    color:
        var(--khu-muted) !important;
}


/* =========================================================
   SECTION
   ========================================================= */

.fi-section {
    background:
        #ffffff !important;

    border:
        1px solid var(--khu-border) !important;

    border-radius:
        var(--khu-radius) !important;

    box-shadow:
        0 2px 6px rgb(0 0 0 / 0.025) !important;
}


.fi-section-header {
    border-bottom:
        1px solid #eeeeec !important;
}


/* =========================================================
   STATISTICS
   ========================================================= */

.fi-wi-stats-overview {
    gap:
        20px !important;
}


.fi-wi-stats-overview-stat {
    position:
        relative !important;

    min-height:
        160px !important;

    padding:
        22px 24px !important;

    background:
        #ffffff !important;

    border:
        1px solid #e4e4e1 !important;

    border-top:
        2px solid #c89518 !important;

    border-radius:
        12px !important;

    box-shadow:
        0 3px 10px rgb(0 0 0 / 0.045) !important;

    overflow:
        hidden !important;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease !important;
}


.fi-wi-stats-overview-stat:hover {
    transform:
        translateY(-3px) !important;

    border-color:
        rgb(200 149 24 / 0.55) !important;

    box-shadow:
        0 10px 25px rgb(0 0 0 / 0.08) !important;
}


.fi-wi-stats-overview-stat-label {
    color:
        #202020 !important;

    font-size:
        0.88rem !important;

    font-weight:
        600 !important;

    line-height:
        1.4 !important;
}


.fi-wi-stats-overview-stat-value {
    margin-top:
        5px !important;

    color:
        #b7830e !important;

    font-size:
        2.05rem !important;

    line-height:
        1.15 !important;

    font-weight:
        700 !important;

    letter-spacing:
        -0.025em !important;
}


.fi-wi-stats-overview-stat-description {
    margin-top:
        7px !important;

    color:
        #6b7280 !important;

    font-size:
        0.78rem !important;

    line-height:
        1.5 !important;
}


/* =========================================================
   STAT DECORATION
   ========================================================= */

.fi-wi-stats-overview-stat::after {
    content: "";

    position:
        absolute;

    right:
        -35px;

    bottom:
        -45px;

    width:
        110px;

    height:
        110px;

    border-radius:
        9999px;

    border:
        1px solid rgb(200 149 24 / 0.12);

    pointer-events:
        none;
}


/* =========================================================
   TABLE
   ========================================================= */

.fi-ta-ctn {
    background:
        #ffffff !important;

    border:
        1px solid var(--khu-border) !important;

    border-radius:
        var(--khu-radius) !important;

    box-shadow:
        0 2px 6px rgb(0 0 0 / 0.025) !important;
}


.fi-ta-header {
    background:
        #fafaf9 !important;

    border-bottom:
        1px solid var(--khu-border) !important;
}


.fi-ta-header-cell {
    color:
        #4b4b48 !important;

    font-size:
        0.70rem !important;

    font-weight:
        700 !important;

    letter-spacing:
        0.035em !important;

    text-transform:
        uppercase !important;
}


.fi-ta-row:hover {
    background:
        #fffdf7 !important;
}


/* =========================================================
   BUTTON
   ========================================================= */

.fi-btn {
    border-radius:
        0.55rem !important;

    font-weight:
        600 !important;
}


.fi-btn-color-primary {
    box-shadow:
        0 2px 5px rgb(200 149 24 / 0.15);
}


.fi-btn-color-primary:hover {
    box-shadow:
        0 5px 12px rgb(200 149 24 / 0.22);
}


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

.fi-fo-field-wrp-label {
    color:
        #30302e !important;

    font-weight:
        600 !important;
}


.fi-input-wrp {
    border-radius:
        0.55rem !important;

    border-color:
        #ddddda !important;
}


.fi-input-wrp:focus-within {
    border-color:
        var(--khu-gold) !important;

    box-shadow:
        0 0 0 2px rgb(200 149 24 / 0.12) !important;
}


/* =========================================================
   BADGE
   ========================================================= */

.fi-badge {
    border-radius:
        9999px !important;

    font-weight:
        600 !important;
}


/* =========================================================
   MODAL
   ========================================================= */

.fi-modal-window {
    border-radius:
        0.8rem !important;

    box-shadow:
        0 20px 50px rgb(0 0 0 / 0.15) !important;
}


.fi-modal-header {
    border-bottom:
        1px solid #eeeeec !important;
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.fi-dropdown-panel {
    border-radius:
        0.65rem !important;

    border-color:
        var(--khu-border) !important;

    box-shadow:
        0 12px 30px rgb(0 0 0 / 0.10) !important;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.fi-pagination-item.fi-active {
    background:
        var(--khu-gold) !important;

    border-color:
        var(--khu-gold) !important;

    color:
        #ffffff !important;
}


/* =========================================================
   DASHBOARD WELCOME
   ========================================================= */

.dashboard-welcome {
    width:
        100% !important;

    margin:
        0 !important;

    padding:
        0 !important;
}


.dashboard-welcome-content {
    width:
        100% !important;

    min-height:
        120px !important;

    display:
        grid !important;

    grid-template-columns:
        minmax(0, 1fr) auto !important;

    align-items:
        center !important;

    gap:
        50px !important;

    padding:
        12px 8px 24px !important;

    box-sizing:
        border-box !important;
}


/* =========================================================
   WELCOME TEXT
   ========================================================= */

.dashboard-welcome-text {
    width:
        100% !important;

    min-width:
        0 !important;

    max-width:
        none !important;
}


.dashboard-welcome-title {
    margin:
        0 !important;

    color:
        #151515 !important;

    font-size:
        2rem !important;

    line-height:
        1.2 !important;

    font-weight:
        700 !important;

    letter-spacing:
        -0.025em !important;
}


.dashboard-welcome-title span {
    color:
        #c89518 !important;
}


.dashboard-welcome-description {
    max-width:
        650px !important;

    margin-top:
        8px !important;

    color:
        #6b7280 !important;

    font-size:
        0.92rem !important;

    line-height:
        1.55 !important;
}


/* =========================================================
   DATE CARD
   ========================================================= */

.dashboard-date-card {
    width:
        310px !important;

    min-width:
        310px !important;

    max-width:
        310px !important;

    min-height:
        82px !important;

    margin:
        0 !important;

    padding:
        15px 18px !important;

    display:
        flex !important;

    align-items:
        center !important;

    gap:
        14px !important;

    justify-self:
        end !important;

    align-self:
        center !important;

    box-sizing:
        border-box !important;

    background:
        linear-gradient(
            135deg,
            #050505 0%,
            #111111 100%
        ) !important;

    border:
        1px solid #242424 !important;

    border-radius:
        12px !important;

    box-shadow:
        0 7px 18px rgb(0 0 0 / 0.11) !important;
}


/* =========================================================
   DATE ICON
   ========================================================= */

.dashboard-date-icon {
    width:
        48px !important;

    height:
        48px !important;

    min-width:
        48px !important;

    display:
        flex !important;

    align-items:
        center !important;

    justify-content:
        center !important;

    flex-shrink:
        0 !important;

    color:
        #d8a928 !important;

    background:
        rgb(200 149 24 / 0.08) !important;

    border:
        1px solid rgb(200 149 24 / 0.40) !important;

    border-radius:
        9px !important;
}


.dashboard-date-icon svg {
    width:
        27px !important;

    height:
        27px !important;
}


/* =========================================================
   DATE CONTENT
   ========================================================= */

.dashboard-date-content {
    min-width:
        0 !important;

    flex:
        1 !important;
}


.dashboard-date-day {
    color:
        #ffffff !important;

    font-size:
        0.86rem !important;

    font-weight:
        600 !important;

    line-height:
        1.45 !important;

    white-space:
        nowrap !important;
}


.dashboard-date-time {
    margin-top:
        4px !important;

    color:
        #e3b83f !important;

    font-size:
        0.95rem !important;

    font-weight:
        700 !important;

    line-height:
        1.3 !important;

    letter-spacing:
        0.015em !important;
}


/* =========================================================
   DASHBOARD WIDGET
   ========================================================= */

.fi-wi {
    margin-bottom:
        0 !important;
}


.fi-wi-table {
    margin-top:
        0 !important;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .dashboard-welcome-content {
        grid-template-columns:
            1fr !important;

        gap:
            18px !important;

        padding:
            10px 4px 20px !important;
    }


    .dashboard-date-card {
        width:
            100% !important;

        min-width:
            0 !important;

        max-width:
            none !important;

        justify-self:
            stretch !important;
    }

}


@media (max-width: 768px) {

    .fi-wi-stats-overview {
        gap:
            14px !important;
    }


    .fi-wi-stats-overview-stat {
        min-height:
            140px !important;

        padding:
            18px !important;
    }


    .fi-wi-stats-overview-stat-value {
        font-size:
            1.75rem !important;
    }

}


@media (max-width: 640px) {

    .dashboard-welcome-title {
        font-size:
            1.55rem !important;
    }


    .dashboard-welcome-description {
        font-size:
            0.85rem !important;
    }


    .dashboard-date-card {
        padding:
            14px 16px !important;
    }


    .dashboard-date-day {
        font-size:
            0.82rem !important;
    }


    .dashboard-date-time {
        font-size:
            0.90rem !important;
    }

}

/* HILANGKAN LOGO TOPBAR YANG MASIH TERLIHAT */
.fi-topbar-start {
    display: none !important;
}

/* =========================================================
   MOBILE - AKTIFKAN KEMBALI TOMBOL HAMBURGER
   ========================================================= */

@media (max-width: 1023px) {

    .fi-topbar-ctn {
        pointer-events: auto !important;
    }

    .fi-topbar {
        pointer-events: auto !important;
    }

    .fi-topbar-start {
        display: flex !important;
    }

    /* Hilangkan logo Filament, tetapi jangan sembunyikan tombol */
    .fi-topbar-start > a {
        display: none !important;
    }

    .fi-topbar-open-sidebar-btn,
    .fi-topbar-close-sidebar-btn {
        display: flex !important;
        pointer-events: auto !important;
    }
}
/* =========================================================
   FIX HAMBURGER MOBILE
   ========================================================= */

@media (max-width: 1023px) {

    /* Tombol buka sidebar */
    .fi-topbar-open-sidebar-btn {
        position: fixed !important;
        top: 12px !important;
        left: 12px !important;
        z-index: 100 !important;
        display: flex !important;
        pointer-events: auto !important;
    }

    /* Tombol tutup jangan tampil sebelum sidebar dibuka */
    .fi-topbar-close-sidebar-btn {
        display: none !important;
    }

}


/* =========================================================
   PENYESUAIAN SIDEBAR - HEADER LEBIH RINGKAS
   ========================================================= */

/* Perkecil area identitas kantor */
.fi-sidebar-header {
    height: 210px !important;
    min-height: 210px !important;
    padding: 10px 12px 16px !important;
}

/* Perkecil logo Kemenhaj */
.fi-sidebar-header img {
    width: 82px !important;
    height: 82px !important;
    max-width: 82px !important;
    max-height: 82px !important;
    margin: 0 auto !important;
}

/* Rapikan teks identitas di bawah logo */
.fi-sidebar-header a::after {
    font-size: 0.76rem !important;
    line-height: 1.3 !important;
    letter-spacing: 0.015em !important;
    margin-top: 6px !important;
}

/* Naikkan garis emas agar sesuai dengan header baru */
.fi-sidebar-header::after {
    bottom: 7px !important;
    left: 16px !important;
    right: 16px !important;
    height: 1px !important;
}

/* Kurangi ruang kosong pada area navigasi */
.fi-sidebar-nav {
    padding: 6px 8px 20px !important;
}

/* Rapatkan jarak antarkelompok menu */
.fi-sidebar-group {
    margin-top: 10px !important;
}

.fi-sidebar-group:first-child {
    margin-top: 2px !important;
}

/* Rapatkan jarak label kelompok dengan menu */
.fi-sidebar-group-label {
    margin-bottom: 4px !important;
}

/* Rapatkan tinggi setiap item menu */
.fi-sidebar-item-btn {
    min-height: 36px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Kurangi ruang antarmenu jika masih diperlukan */
.fi-sidebar-item {
    margin-top: 1px !important;
    margin-bottom: 1px !important;
}

/* --- PERBAIKAN POSISI LONCENG NOTIFIKASI --- */
.fi-topbar-database-notifications-btn,
div[x-data*="databaseNotifications"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    top: 0 !important;
    transform: none !important;
    margin-right: 15px !important; /* Jarak dengan profil */
    visibility: visible !important;
    opacity: 1 !important;
}

.fi-topbar nav .flex.items-center.gap-x-4 {
     display: flex !important;
     align-items: center !important;
}