/* [UI] public/css/admin-custom.css */
/* World-Class Modern Government Aesthetic — Dashboard e-PRESENSI Pemprov Papua Pegunungan */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif !important;
    background-color: #F5F6FC !important;
    color: #171A2B !important;
}

/* ── SIDEBAR PANEL STYLING (Slate Dark Luxury) ── */
aside.fi-sidebar {
    background: linear-gradient(180deg, #0B0F19 0%, #111827 50%, #0F172A 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.25) !important;
}

/* Sidebar Header & Brand */
.fi-sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.25rem 1.5rem !important;
    background: rgba(11, 15, 25, 0.6) !important;
    backdrop-filter: blur(12px) !important;
}
.fi-sidebar-header img {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)) !important;
}

/* Sidebar Nav Group Labels */
.fi-sidebar-group-label span,
.fi-sidebar-group-label {
    color: #F59E0B !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

/* Sidebar Navigation Items */
.fi-sidebar-item-btn {
    border-radius: 0.75rem !important;
    padding: 0.65rem 1rem !important;
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    margin: 0.2rem 0.6rem !important;
}

.fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #FFFFFF !important;
    transform: translateX(4px) !important;
}

/* Active Nav Item */
.fi-sidebar-item-active .fi-sidebar-item-btn {
    background: linear-gradient(135deg, #323993 0%, #1E2368 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(50, 57, 147, 0.4) !important;
    border-left: 4px solid #F59E0B !important;
}

.fi-sidebar-item-btn svg {
    color: rgba(255, 255, 255, 0.55) !important;
    width: 20px !important;
    height: 20px !important;
    transition: all 0.2s ease !important;
}

.fi-sidebar-item-active .fi-sidebar-item-btn svg,
.fi-sidebar-item-btn:hover svg {
    color: #F59E0B !important;
}


/* ── TOPBAR / NAVBAR STYLING ── */
header.fi-topbar {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E6E8F2 !important;
    box-shadow: 0 2px 12px rgba(23, 26, 43, 0.03) !important;
    padding: 0.5rem 1.5rem !important;
}

/* User Profile Dropdown Button */
.fi-user-menu button {
    border-radius: 9999px !important;
    background: #F8F9FD !important;
    border: 1px solid #E4E6F0 !important;
    padding: 0.35rem 0.85rem !important;
    transition: all 0.2s ease !important;
}
.fi-user-menu button:hover {
    background: #EFF1F9 !important;
    border-color: #C5C9EA !important;
}


/* ── WIDGETS & CARDS STYLING ── */
.fi-wi-stats-overview-stat,
.fi-section,
.fi-ta-ctn,
.fi-wi-widget {
    background: #FFFFFF !important;
    border: 1.5px solid #E4E6F0 !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 6px 20px rgba(23, 26, 43, 0.04) !important;
    transition: all 0.25s ease !important;
}

.fi-wi-stats-overview-stat:hover {
    box-shadow: 0 10px 30px rgba(50, 57, 147, 0.08) !important;
    border-color: #C5C9EA !important;
    transform: translateY(-2px) !important;
}

/* Stat Card Value & Label */
.fi-wi-stats-overview-stat-value {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: #171A2B !important;
    letter-spacing: -0.03em !important;
}

.fi-wi-stats-overview-stat-label {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #5B5F73 !important;
}


/* ── TABLES STYLING ── */
.fi-ta-header-cell {
    background: #F8F9FD !important;
    color: #171A2B !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 0.85rem 1rem !important;
}

.fi-ta-cell {
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid #F0F2FB !important;
}

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


/* ── BUTTONS STYLING ── */
.fi-btn-primary {
    background: linear-gradient(135deg, #323993 0%, #20256B 100%) !important;
    border-radius: 0.65rem !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(50, 57, 147, 0.25) !important;
    transition: all 0.2s ease !important;
}

.fi-btn-primary:hover {
    box-shadow: 0 8px 20px rgba(50, 57, 147, 0.4) !important;
    transform: translateY(-1px) !important;
}


/* ── WELCOME BANNER WIDGET STYLING ── */
.epresensi-welcome-card {
    background: linear-gradient(135deg, #F3F4FB 0%, #E5E7F5 100%);
    border: 1px solid #C5C9EA;
    border-radius: 1.25rem;
    padding: 3rem 2rem;
    text-align: center;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    box-shadow: 0 8px 25px rgba(50, 57, 147, 0.05);
}

.epresensi-welcome-logo-wrap {
    margin-bottom: 1.25rem;
}

.epresensi-welcome-logo {
    height: 72px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

.epresensi-welcome-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #323993;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.epresensi-welcome-instansi {
    font-size: 1rem;
    color: #5B5F73;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.epresensi-welcome-sub {
    font-size: 0.875rem;
    color: #8C90A6;
    margin-bottom: 1.5rem;
}

.epresensi-welcome-divider {
    width: 48px;
    height: 3px;
    background: #F59E0B;
    border-radius: 2px;
    margin: 0 auto 1.25rem;
}

.epresensi-welcome-user {
    font-size: 0.9rem;
    color: #5B5F73;
}

.epresensi-welcome-username {
    color: #323993;
}

.epresensi-welcome-role {
    color: #5B5F73;
    font-weight: 500;
}

.epresensi-welcome-time {
    font-size: 0.8rem;
    color: #9CA0B3;
    margin-top: 0.5rem;
}


/* ── MOBILE ANDROID & TABLET RESPONSIVE OVERRIDES ── */
@media (max-width: 768px) {
    /* Touch optimization */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Auto-Narrow Mobile Sidebar (Persempit Menu Otomatis Aktif di Mobile) */
    aside.fi-sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 64px !important;
        max-width: 64px !important;
        transform: none !important;
        visibility: visible !important;
        z-index: 50 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0.5rem 0 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.3) !important;
    }

    /* Sembunyikan teks label menu pada mode persempit mobile, sisakan icon */
    aside.fi-sidebar .fi-sidebar-group-label,
    aside.fi-sidebar .fi-sidebar-item-label,
    aside.fi-sidebar .epresensi-typography,
    aside.fi-sidebar span:not(.fi-sidebar-item-icon) {
        display: none !important;
    }

    /* Format tombol item menu agar icon berada persis di tengah */
    aside.fi-sidebar .fi-sidebar-item-btn {
        justify-content: center !important;
        padding: 0.75rem !important;
        margin: 0.35rem 0 !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 0.75rem !important;
    }

    aside.fi-sidebar .fi-sidebar-item-btn svg {
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
    }

    /* Sidebar Header (Logo saja di mobile) */
    .fi-sidebar-header {
        padding: 0.75rem 0 !important;
        justify-content: center !important;
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    .fi-sidebar-header img {
        height: 32px !important;
        width: auto !important;
    }

    /* Geser Konten Utama agar tidak tertutup sidebar yang dipersempit */
    .fi-main-ctn,
    .fi-main,
    header.fi-topbar {
        margin-left: 64px !important;
        width: calc(100% - 64px) !important;
    }

    /* Topbar padding & Mobile Header */
    header.fi-topbar {
        padding: 0.5rem 1rem !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 40 !important;
    }

    /* Welcome Banner scaling on Mobile */
    .epresensi-welcome-card {
        padding: 1.75rem 1.25rem !important;
        border-radius: 1rem !important;
    }

    .epresensi-welcome-logo {
        height: 56px !important;
        margin-bottom: 0.75rem !important;
    }

    .epresensi-welcome-title {
        font-size: 1.35rem !important;
        line-height: 1.25 !important;
    }

    .epresensi-welcome-instansi {
        font-size: 0.875rem !important;
    }

    .epresensi-welcome-sub {
        font-size: 0.78rem !important;
        margin-bottom: 1.25rem !important;
    }

    /* Widget Grid Stack on Mobile */
    .fi-wi-stats-overview {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }

    .fi-wi-stats-overview-stat {
        padding: 1rem 1.25rem !important;
    }

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

    /* Responsive Tables Horizontal Scroll */
    .fi-ta-ctn {
        border-radius: 0.85rem !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .fi-ta-header-cell,
    .fi-ta-cell {
        padding: 0.65rem 0.75rem !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
    }

    /* Touch Friendly Form Fields & Buttons */
    .fi-btn,
    .fi-input,
    .fi-select-input {
        min-height: 44px !important;
    }

    /* Modals Responsiveness */
    .fi-modal-window {
        width: 94vw !important;
        max-height: 90vh !important;
        border-radius: 1rem !important;
    }
}

@media (max-width: 480px) {
    .epresensi-welcome-title {
        font-size: 1.2rem !important;
    }
    
    .epresensi-welcome-card {
        padding: 1.25rem 1rem !important;
    }
}
