/* assets/css/style.css - RT 02 RW 01 Desa Brecek */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

:root {
    --primary: #065f46;         /* Emerald Village Green */
    --primary-light: #10b981;
    --primary-dark: #064e3b;
    --primary-bg: #ecfdf5;
    
    --secondary: #0284c7;       /* Sky Cyan */
    --secondary-bg: #e0f2fe;

    --accent: #d97706;          /* Gold Amber */
    --accent-light: #fef3c7;
    
    --dark: #0f172a;            /* Slate 900 */
    --dark-muted: #334155;
    --light: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0284c7;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.06), 0 2px 5px rgba(0,0,0,0.03);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-glow: 0 6px 20px rgba(16, 185, 129, 0.2);
    
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-arabic: 'Amiri', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: var(--font-main);
    background-color: #f8fafc;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Typography & Anchor Scroll Offset */
[id] {
    scroll-margin-top: 74px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

.arabic-text, 
.arabic-content-box, 
.ty-arabic-text, 
.quran-arabic-text,
.font-arabic {
    font-family: 'Amiri', 'Traditional Arabic', serif !important;
    direction: rtl !important;
    text-align: right !important;
    word-spacing: 2px;
}

.arabic-text {
    font-size: var(--ty-arab-size, 1.55rem);
    line-height: var(--ty-arab-lh, 2.2);
    color: var(--primary-dark);
}

.arabic-content-box {
    font-size: 1.55rem !important;
    line-height: 2.3 !important;
    color: #064e3b !important;
    font-weight: 700 !important;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-right: 5px solid #059669;
    border-radius: var(--radius-md);
    padding: 16px 22px;
    margin: 16px 0;
    word-spacing: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.latin-content-p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 12px;
}

/* Multi Photo / Document Gallery */
.doc-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.doc-thumb-item {
    width: 110px;
    height: 85px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #cbd5e1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.doc-thumb-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.doc-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-file-badge {
    padding: 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0284c7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Dashboard Topbar (Admin & Warga) */
.dashboard-site-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.dash-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Tombol & Penyangga Sidebar Desktop (Secara default tersembunyi, hanya aktif di desktop min-width: 1025px) */
.sidebar-desktop-toggle-btn,
.sidebar-desktop-top-anchor {
    display: none;
}

/* Dashboard Menu Toggle Button (Hanya untuk Mobile/Tablet Membuka Drawer Menu) */
.dash-menu-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3.5px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1.5px solid #a7f3d0;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

@media (max-width: 1024px) {
    .dash-menu-toggle-btn {
        display: inline-flex;
    }
}

.dash-menu-toggle-btn:hover {
    background: #dcfce7;
    border-color: #6ee7b7;
    transform: scale(1.04);
}

.dash-menu-toggle-btn:active {
    transform: scale(0.95);
}

.dash-menu-bar {
    display: block;
    width: 17px;
    height: 2.2px;
    background-color: #065f46;
    border-radius: 2px;
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Backdrop Overlay Mobile */
.dash-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 99990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.dash-sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.dash-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.dash-topbar-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.dash-topbar-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #064e3b;
    display: block;
    line-height: 1.2;
}

.dash-topbar-sub {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dash-clock-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 0.75rem;
    color: #334155;
    font-weight: 600;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.dash-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 4px 12px 4px 6px;
    border-radius: 999px;
}

.dash-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #059669;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.dash-user-meta {
    line-height: 1.2;
}

.dash-user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #064e3b;
    display: block;
}

.dash-user-role {
    font-size: 0.68rem;
    color: #059669;
    font-weight: 600;
    text-transform: uppercase;
}

/* Tombol Keluar Mandiri Berbingkai Elegan & Indah */
.dash-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
    border: 1.5px solid #e11d48;
    color: #be123c;
    padding: 6px 14px;
    border-radius: 999px;
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    position: relative;
}

.dash-logout-icon {
    font-size: 0.95rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.dash-logout-text {
    font-weight: 800;
    text-transform: capitalize;
}

.dash-logout-btn:hover {
    background: linear-gradient(135deg, #e11d48, #be123c);
    border-color: #9f1239;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
    transform: translateY(-1px);
}

.dash-logout-btn:hover .dash-logout-icon {
    transform: translateX(2px);
}

.dash-logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(225, 29, 72, 0.2);
}

/* Mobile Dashboard Subbar & Bottom Navigation Dock */
.dash-mobile-subbar {
    display: none;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    padding: 8px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}

.dash-mobile-drawer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #065f46, #047857);
    color: #ffffff;
    border: 1px solid #059669;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(6, 95, 70, 0.2);
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.dash-mobile-drawer-btn:active {
    transform: scale(0.97);
}

/* Bottom Navigation Bar for Mobile */
.dash-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    z-index: 9998;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    padding: 4px 6px;
}

.dash-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 700;
    flex: 1;
    padding: 4px 2px;
    border-radius: 8px;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-main);
}

.dash-bottom-nav-item .b-icon {
    font-size: 1.22rem;
    margin-bottom: 2px;
    line-height: 1;
}

.dash-bottom-nav-item.active,
.dash-bottom-nav-item:hover {
    color: #065f46;
}

.dash-bottom-nav-item.highlight-menu {
    color: #047857;
    font-weight: 800;
}

.dash-bottom-nav-item.highlight-menu .b-icon {
    background: #ecfdf5;
    border-radius: 6px;
    padding: 1px 6px;
    border: 1px solid #a7f3d0;
}

/* Sidebar Backdrop Overlay on Mobile */
.dash-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 99998;
}

.dash-sidebar-overlay.active {
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* Header & Navbar Proportional */
.site-header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

/* Batas kanan-kiri diperlebar agar lebih lega dilihat, posisi menu tetap center */
.site-header .container {
    max-width: 1400px;
    padding: 0 36px;
    margin: 0 auto;
    width: 100%;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 16px;
    width: 100%;
}

@media (min-width: 1025px) {
    .navbar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        justify-content: initial;
        width: 100%;
    }
    .brand {
        justify-self: start;
    }
    .nav-menu {
        justify-self: center;
        margin: 0 !important;
        gap: 8px; /* Lebih lega dan teratur */
    }
    .desktop-nav-auth {
        justify-self: end;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #047857);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.brand-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 0;
    border: none;
    background: transparent;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.22));
    flex-shrink: 0;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.brand:hover .brand-logo-img {
    transform: scale(1.08);
    filter: drop-shadow(0 6px 12px rgba(5, 150, 105, 0.35));
}

.brand-info h1 {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
    line-height: 1.2;
}

.brand-info p {
    font-size: 0.68rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    flex-wrap: nowrap;
    margin: 0 auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--dark-muted);
    font-weight: 700;
    font-size: 0.86rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-bg);
}

/* Navigation Dropdown Menu System */
.nav-item-dropdown {
    position: relative;
    list-style: none;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.dropdown-caret {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    margin-left: 3px;
    opacity: 0.7;
    display: inline-block;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 235px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
    padding: 8px;
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 3px;
    z-index: 10000;
    margin-top: 4px;
    animation: dropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Jembatan hover tak kasat mata untuk menjamin kursor tidak putus hover saat turun */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
    display: block;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-muted);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    cursor: pointer;
}

.nav-dropdown-menu .dropdown-item:hover,
.nav-dropdown-menu .dropdown-item.active {
    background: var(--primary-bg);
    color: var(--primary);
    padding-left: 17px;
}

/* Desktop Hover & Click Toggle Trigger */
@media (min-width: 1025px) {
    .nav-item-dropdown:hover .nav-dropdown-menu,
    .nav-item-dropdown.is-open .nav-dropdown-menu {
        display: flex;
    }
    .nav-item-dropdown:hover .dropdown-caret,
    .nav-item-dropdown.is-open .dropdown-caret {
        transform: rotate(180deg);
        color: var(--primary);
    }
}

/* Mobile Menu Proportions & Transparent Soft Separators (Tampilan HP Rapi, Center, Tanpa Garis Tegas) */
@media (max-width: 1024px) {
    .nav-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        padding: 16px 16px 22px 16px !important;
        gap: 10px !important;
        box-sizing: border-box !important;
        flex-direction: column !important;
        border-bottom: 2px solid var(--primary) !important;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
        z-index: 9999 !important;
        max-height: calc(100vh - 72px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .nav-menu.mobile-active {
        display: flex !important;
    }
    .nav-menu > li {
        width: 100% !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .nav-menu > li > .nav-link,
    .nav-menu > li.nav-item-dropdown > .nav-dropdown-toggle {
        width: 100% !important;
        min-height: 48px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 12px 18px !important;
        font-weight: 700 !important;
        font-size: 0.94rem !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
        transition: all 0.2s ease !important;
        text-decoration: none !important;
        position: relative !important;
        gap: 8px !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important; /* Batas transparan halus, tidak garis tegas */
        background: rgba(248, 250, 252, 0.8) !important;
        box-shadow: none !important;
    }

    /* Warna Aksentuasi Lembut & Transparan Antar Menu (Tidak Garis Tegas) */
    /* 1. Beranda: Nuansa Hijau Emerald Lembut */
    .nav-menu > li:nth-child(1) > .nav-link {
        background: rgba(16, 185, 129, 0.07) !important;
        border: 1px solid rgba(16, 185, 129, 0.15) !important;
        color: #065f46 !important;
    }
    .nav-menu > li:nth-child(1) > .nav-link:hover,
    .nav-menu > li:nth-child(1) > .nav-link.active {
        background: rgba(16, 185, 129, 0.16) !important;
        border-color: rgba(16, 185, 129, 0.3) !important;
        color: #047857 !important;
    }

    /* 2. Profil & Warga: Nuansa Biru Langit Lembut */
    .nav-menu > li:nth-child(2) > .nav-dropdown-toggle {
        background: rgba(2, 132, 199, 0.07) !important;
        border: 1px solid rgba(2, 132, 199, 0.15) !important;
        color: #0369a1 !important;
    }
    .nav-menu > li:nth-child(2) > .nav-dropdown-toggle:hover,
    .nav-menu > li:nth-child(2).is-open > .nav-dropdown-toggle {
        background: rgba(2, 132, 199, 0.16) !important;
        border-color: rgba(2, 132, 199, 0.3) !important;
        color: #0284c7 !important;
    }

    /* 3. Pelayanan Administrasi: Nuansa Amber Emas Lembut */
    .nav-menu > li:nth-child(3) > .nav-link {
        background: rgba(217, 119, 6, 0.07) !important;
        border: 1px solid rgba(217, 119, 6, 0.15) !important;
        color: #92400e !important;
    }
    .nav-menu > li:nth-child(3) > .nav-link:hover,
    .nav-menu > li:nth-child(3) > .nav-link.active {
        background: rgba(217, 119, 6, 0.16) !important;
        border-color: rgba(217, 119, 6, 0.3) !important;
        color: #b45309 !important;
    }

    /* 4. Informasi: Nuansa Ungu Lembut */
    .nav-menu > li:nth-child(4) > .nav-dropdown-toggle {
        background: rgba(147, 51, 234, 0.07) !important;
        border: 1px solid rgba(147, 51, 234, 0.15) !important;
        color: #6b21a8 !important;
    }
    .nav-menu > li:nth-child(4) > .nav-dropdown-toggle:hover,
    .nav-menu > li:nth-child(4).is-open > .nav-dropdown-toggle {
        background: rgba(147, 51, 234, 0.16) !important;
        border-color: rgba(147, 51, 234, 0.3) !important;
        color: #7e22ce !important;
    }

    /* 5. Lingkungan & Kas: Nuansa Toska Lembut */
    .nav-menu > li:nth-child(5) > .nav-dropdown-toggle {
        background: rgba(13, 148, 136, 0.07) !important;
        border: 1px solid rgba(13, 148, 136, 0.15) !important;
        color: #0f766e !important;
    }
    .nav-menu > li:nth-child(5) > .nav-dropdown-toggle:hover,
    .nav-menu > li:nth-child(5).is-open > .nav-dropdown-toggle {
        background: rgba(13, 148, 136, 0.16) !important;
        border-color: rgba(13, 148, 136, 0.3) !important;
        color: #0d9488 !important;
    }

    .dropdown-caret {
        font-size: 0.70rem !important;
        transition: transform 0.25s ease !important;
        margin-left: 6px !important;
        opacity: 0.85 !important;
        display: inline-block !important;
    }
    .nav-item-dropdown.is-open .dropdown-caret {
        transform: rotate(180deg) !important;
    }

    .nav-dropdown-menu {
        position: static !important;
        display: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 6px 0 8px 0 !important;
        padding: 8px !important;
        border-radius: 12px !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important; /* Transparan lembut */
        background: rgba(248, 250, 252, 0.85) !important;
        box-shadow: none !important;
        flex-direction: column !important;
        gap: 6px !important;
        animation: dropdownFade 0.2s ease !important;
    }
    .nav-item-dropdown:not(.is-open) .nav-dropdown-menu,
    .nav-item-dropdown:not(.is-open):hover .nav-dropdown-menu {
        display: none !important;
    }
    .nav-item-dropdown.is-open .nav-dropdown-menu,
    .nav-item-dropdown.is-open:hover .nav-dropdown-menu {
        display: flex !important;
    }
    .nav-dropdown-menu .dropdown-item {
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 10px 14px !important;
        font-size: 0.88rem !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 1px solid rgba(0, 0, 0, 0.04) !important; /* Transparan halus */
        color: #334155 !important;
        transition: all 0.15s ease !important;
    }
    .nav-dropdown-menu .dropdown-item:hover,
    .nav-dropdown-menu .dropdown-item.active {
        background: rgba(16, 185, 129, 0.12) !important;
        border-color: rgba(16, 185, 129, 0.25) !important;
        color: #065f46 !important;
        font-weight: 700 !important;
    }

    .mobile-only-auth {
        display: block !important;
        margin-top: 10px !important;
        padding-top: 14px !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
        width: 100% !important;
    }
}

/* Sidebar Section Headers (Admin & Warga) */
.sidebar-group-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 14px 10px 4px 10px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    border-top: 1px dashed #f1f5f9;
}
.sidebar-group-title:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
    padding: 6px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #047857);
    color: white !important;
    box-shadow: 0 3px 10px rgba(6, 95, 70, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857, #064e3b);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #b45309);
    color: white !important;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.2);
}

.btn-success {
    background: var(--success);
    color: white !important;
}

.btn-danger {
    background: var(--danger);
    color: white !important;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 0.98rem;
    border-radius: var(--radius-md);
}

/* Slogan & Hero Section */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, #022c22 0%, #064e3b 50%, #047857 100%);
    color: white;
    padding: 64px 0 76px;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.7;
}

.hero-container-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo-side {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-logo-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(6, 95, 70, 0.1) 60%, transparent 80%);
    border-radius: 50%;
    filter: blur(25px);
    pointer-events: none;
}

.hero-logo-large {
    width: 270px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.5));
    animation: floatSlow 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.hero-logo-large:hover {
    transform: scale(1.04) rotate(1deg);
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-slogan-box {
    background: rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--accent);
    padding: 14px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 20px;
}

.hero-slogan {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fde68a;
    font-style: italic;
    margin: 0;
}

.hero-subtitle {
    font-size: 1rem;
    color: #d1fae5;
    margin-bottom: 28px;
    max-width: 720px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Quick Stats Bar Proportional */
.quick-stats-bar {
    margin-top: -36px;
    position: relative;
    z-index: 2;
    margin-bottom: 44px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.blue { background: #e0f2fe; color: #0369a1; }
.stat-icon.amber { background: #fef3c7; color: #b45309; }
.stat-icon.purple { background: #f3e8ff; color: #7e22ce; }

.stat-details h3 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
    line-height: 1.15;
}

.stat-details p {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 600;
}

/* Cards & Surfaces */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: #ffffff;
    flex-shrink: 0;
    min-width: 0;
    box-sizing: border-box;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.card-body {
    padding: 22px;
    flex-grow: 1;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.card-footer {
    padding: 14px 22px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* Sections */
.section {
    padding: 48px 0;
}

.section-title-wrap {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 36px;
}

.section-pill {
    display: inline-block;
    padding: 4px 14px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #64748b;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1.2;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-dark { background: #e2e8f0; color: #1e293b; }

/* Grid Layouts - Equal height columns */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    align-items: stretch;
    min-width: 0;
    box-sizing: border-box;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: stretch;
    min-width: 0;
    box-sizing: border-box;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    align-items: stretch;
    min-width: 0;
    box-sizing: border-box;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > * {
    min-width: 0;
    box-sizing: border-box;
}

/* Table & Chart Horizontal Scroll Containers */
/* .table-responsive: untuk tabel yang perlu scroll kanan-kiri di HP */
.table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    box-sizing: border-box;
    margin-bottom: 14px;
    position: relative;
}

.table-responsive::-webkit-scrollbar {
    height: 5px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* .chart-scroll-wrap: untuk grafik/canvas yang perlu scroll kanan-kiri di HP */
.chart-scroll-wrap {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    box-sizing: border-box;
    position: relative;
}

.chart-scroll-wrap::-webkit-scrollbar {
    height: 4px;
}
.chart-scroll-wrap::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}
.chart-scroll-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.chart-scroll-wrap::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Chart inner container - minimum width so chart doesn't get crushed on narrow screens */
.chart-scroll-inner {
    min-width: 300px;
    position: relative;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.table-responsive > .table,
.table-responsive > table {
    min-width: 650px;
}

.table th {
    background: #f8fafc;
    padding: 12px 16px;
    font-weight: 700;
    color: #475569;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: #334155;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--dark-muted);
}

.form-control {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--dark);
    background: white;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-text {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 4px;
}

/* Alert notifications */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.alert-success { background: #dcfce7; color: #14532d; border-left: 4px solid var(--success); }
.alert-danger { background: #fee2e2; color: #7f1d1d; border-left: 4px solid var(--danger); }
.alert-warning { background: #fef3c7; color: #78350f; border-left: 4px solid var(--warning); }
.alert-info { background: #e0f2fe; color: #0c4a6e; border-left: 4px solid var(--info); }

/* News Card Proportional */
.news-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #e2e8f0;
    flex-shrink: 0;
}

.news-body {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    color: #64748b;
    margin-bottom: 10px;
}

.news-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.news-title a {
    color: var(--dark);
}

.news-title a:hover {
    color: var(--primary);
}

.news-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ronda Active Banner Proportional */
.ronda-today-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    margin-bottom: 0;
}

.ronda-badge {
    background: #ef4444;
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ronda-pulse {
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* Keilmuan / Fiqih Card */
.keilmuan-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 22px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    border-top: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.keilmuan-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.hadits-box {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 14px;
    margin: 14px 0;
    border: 1px dashed #cbd5e1;
}

/* Footer Proportional */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    margin-top: auto;
    padding: 50px 0 24px;
    border-top: 1px solid #1e293b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 32px;
    margin-bottom: 36px;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 6px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary-light);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 3px;
}

.footer-bottom {
    padding-top: 28px;
    padding-bottom: 14px;
    border-top: 1px solid #1e293b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 22px 36px;
    font-size: 0.84rem;
    line-height: 1.6;
}

.footer-copyright {
    color: #94a3b8;
    line-height: 1.7;
}

.footer-slogan {
    color: #cbd5e1;
    font-size: 0.86rem;
    line-height: 1.7;
}

/* Dashboard Footer (Admin & Warga di Semua Akun) */
.dashboard-footer {
    margin-top: 36px;
    padding-top: 20px;
    padding-bottom: 8px;
    border-top: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}

.dashboard-footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}

.dashboard-footer-copy {
    font-weight: 500;
    color: #475569;
}

.dashboard-footer-dev {
    color: #047857;
    font-weight: 700;
}

/* Fallback jika elemen dashboard footer berada di luar .main-content */
body.is-dashboard-page > .dashboard-footer,
body.is-dashboard-page .dashboard-wrapper + .dashboard-footer {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 18px 32px 24px;
    background: #f8fafc;
}

@media (max-width: 1024px) {
    .dashboard-footer-content {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        gap: 4px;
    }
    body.is-dashboard-page > .dashboard-footer,
    body.is-dashboard-page .dashboard-wrapper + .dashboard-footer {
        margin-left: 0;
        width: 100%;
        padding: 16px 14px 24px;
    }
}

:root {
    --dash-topbar-h: 58px;
}

/* Dashboard Panel Layout (Admin & Warga) */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - var(--dash-topbar-h));
    position: relative;
    width: 100%;
}

.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    padding: 16px 14px 24px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-profile-info h4 {
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.2;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    color: var(--dark-muted);
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.2s;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.sidebar-link .icon {
    font-size: 17px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex-grow: 1;
    min-width: 0;
    padding: 28px 32px;
    background: #f8fafc;
    box-sizing: border-box;
}

/* =========================================================================
   TRUE INDEPENDENT SCROLLING UNTUK DESKTOP (ADMIN & WARGA)
   Memastikan ketika konten dashboard di-scroll, menu sidebar TETAP DIAM 100%
   dan ketika menu sidebar di-scroll, konten dashboard TETAP DIAM 100%.
   ========================================================================= */
@media (min-width: 1025px) {
    /* Root viewport mengizinkan scrolling alami (natural browser scroll)
       sehingga touchpad laptop (scroll 2 jari) bekerja 100% mulus di seluruh area konten */
    html.is-dashboard-page,
    body.is-dashboard-page {
        height: auto !important;
        min-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    body.is-dashboard-page .dashboard-site-topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: var(--dash-topbar-h) !important;
        z-index: 1000 !important;
        background: #ffffff !important;
        border-bottom: 1px solid var(--border) !important;
        box-sizing: border-box !important;
    }

    body.is-dashboard-page .dashboard-wrapper {
        padding-top: var(--dash-topbar-h) !important;
        min-height: 100vh !important;
        position: relative !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Sidebar terkunci mati (position: fixed) di sisi kiri layar.
       Ketika isi halaman di sebelah kanan di-scroll ke bawah/ke atas,
       menu sidebar tetap diam 100% di tempatnya tanpa bergeser.
       Jika menu sidebar memiliki banyak entri melebihi tinggi layar,
       menu sidebar tetap dapat di-scroll secara independen. */
    body.is-dashboard-page .sidebar {
        position: fixed !important;
        top: var(--dash-topbar-h) !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
        height: calc(100vh - var(--dash-topbar-h)) !important;
        max-height: calc(100vh - var(--dash-topbar-h)) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
        z-index: 500 !important;
        box-sizing: border-box !important;
        border-right: 1px solid var(--border) !important;
        background: #ffffff !important;
        padding: 56px 14px 28px !important;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* Penyangga header putih bersih di atas sidebar agar menu tidak bertumpuk saat di-scroll */
    .sidebar-desktop-top-anchor {
        display: block !important;
        position: fixed;
        top: var(--dash-topbar-h);
        left: 0;
        width: 259px;
        height: 52px;
        background: #ffffff;
        z-index: 503;
        pointer-events: none;
        border-bottom: 1px solid #f1f5f9;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Area konten di sebelah kanan dialokasikan margin-left sebesar lebar sidebar (260px).
       Konten bergulir bebas mengikuti scroll browser utama,
       sehingga scroll 2 jari di touchpad laptop di posisi manapun (kartu, teks, tabel, area kosong)
       langsung merespons dan menggulir halaman dengan mulus. */
    body.is-dashboard-page .main-content {
        margin-left: 260px !important;
        width: calc(100% - 260px) !important;
        min-height: calc(100vh - var(--dash-topbar-h)) !important;
        box-sizing: border-box !important;
        padding: 28px 32px !important;
        background: #f8fafc !important;
        overflow: visible !important;
        transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1), padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    body.is-dashboard-page > .dashboard-footer,
    body.is-dashboard-page .dashboard-wrapper + .dashboard-footer {
        transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1), padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* Tombol Toggle Sidebar Desktop (Posisi Persis di Bawah Logo RT di Topbar) */
    .sidebar-desktop-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: calc(var(--dash-topbar-h) + 9px);
        left: 24px; /* Posisi lurus persis di bawah Logo RT */
        width: 36px;
        height: 34px;
        border-radius: 9px;
        background: #ffffff;
        border: 1.5px solid #d1fae5;
        color: #065f46;
        cursor: pointer;
        z-index: 505;
        box-shadow: 0 2px 6px rgba(6, 78, 59, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
        transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        user-select: none;
        outline: none;
        padding: 0;
    }

    .sidebar-desktop-toggle-btn:hover {
        background: #ecfdf5;
        border-color: #10b981;
        color: #047857;
        transform: translateY(-1px) scale(1.05);
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.24);
    }

    .sidebar-desktop-toggle-btn:active {
        transform: scale(0.95);
    }

    .sidebar-toggle-svg {
        width: 17px;
        height: 17px;
        stroke-width: 2.5;
        stroke: currentColor;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Kondisi Ketika Menu Sidebar Desktop Disembunyikan (Collapsed / Hidden) */
    html.sidebar-desktop-collapsed body.is-dashboard-page .sidebar,
    body.sidebar-desktop-collapsed.is-dashboard-page .sidebar {
        transform: translateX(-260px) !important;
    }

    html.sidebar-desktop-collapsed .sidebar-desktop-top-anchor,
    body.sidebar-desktop-collapsed .sidebar-desktop-top-anchor {
        transform: translateX(-260px) !important;
    }

    html.sidebar-desktop-collapsed body.is-dashboard-page .main-content,
    body.sidebar-desktop-collapsed.is-dashboard-page .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding-left: 80px !important;
    }

    html.sidebar-desktop-collapsed body.is-dashboard-page > .dashboard-footer,
    html.sidebar-desktop-collapsed body.is-dashboard-page .dashboard-wrapper + .dashboard-footer,
    body.sidebar-desktop-collapsed.is-dashboard-page > .dashboard-footer,
    body.sidebar-desktop-collapsed.is-dashboard-page .dashboard-wrapper + .dashboard-footer {
        margin-left: 0 !important;
        width: 100% !important;
        padding-left: 80px !important;
    }

    html.sidebar-desktop-collapsed .sidebar-desktop-toggle-btn,
    body.sidebar-desktop-collapsed .sidebar-desktop-toggle-btn {
        left: 24px; /* Tetap persis di bawah Logo RT */
        background: #047857;
        border-color: #047857;
        color: #ffffff;
        box-shadow: 0 4px 14px rgba(4, 120, 87, 0.35);
    }

    html.sidebar-desktop-collapsed .sidebar-desktop-toggle-btn:hover,
    body.sidebar-desktop-collapsed .sidebar-desktop-toggle-btn:hover {
        background: #065f46;
        border-color: #065f46;
        color: #ffffff;
        transform: translateY(-1px) scale(1.08);
        box-shadow: 0 6px 18px rgba(6, 95, 70, 0.45);
    }

    /* Ketika disembunyikan, ikon panah < otomatis berputar 180 derajat menjadi > */
    html.sidebar-desktop-collapsed .sidebar-toggle-svg,
    body.sidebar-desktop-collapsed .sidebar-toggle-svg {
        transform: rotate(180deg);
    }

    /* Scrollbar halus untuk sidebar jika menu melebihi tinggi layar */
    body.is-dashboard-page .sidebar::-webkit-scrollbar {
        width: 6px;
    }
    body.is-dashboard-page .sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    body.is-dashboard-page .sidebar::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    body.is-dashboard-page .sidebar::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

    /* ==========================================================================
       ADAPTIF LAYOUT DASHBOARD: MODE SIDEBAR HIDDEN / UNHIDDEN
       Memastikan seluruh kartu, kolom grid, tabel, dan tombol adaptif mulus
       tanpa ada elemen yang terpotong atau keluar dari batas kartu (overflow).
       ========================================================================== */

    /* Kontainer Dashboard & Main Content */
    body.is-dashboard-page .dashboard-wrapper {
        display: flex;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        position: relative;
        box-sizing: border-box;
    }

    body.is-dashboard-page .main-content {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Proteksi Anti-Overflow Menyeluruh */
    body.is-dashboard-page .card,
    body.is-dashboard-page .card-body,
    body.is-dashboard-page .card-header,
    body.is-dashboard-page .card-footer,
    body.is-dashboard-page .stat-card,
    body.is-dashboard-page .stat-details,
    body.is-dashboard-page .table-responsive,
    body.is-dashboard-page .grid-2,
    body.is-dashboard-page .grid-3,
    body.is-dashboard-page .grid-4,
    body.is-dashboard-page .stats-grid,
    body.is-dashboard-page .responsive-split-grid,
    body.is-dashboard-page div[style*="display: grid"],
    body.is-dashboard-page div[style*="display:grid"] {
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body.is-dashboard-page .grid-2 > *,
    body.is-dashboard-page .grid-3 > *,
    body.is-dashboard-page .grid-4 > *,
    body.is-dashboard-page .stats-grid > *,
    body.is-dashboard-page .responsive-split-grid > *,
    body.is-dashboard-page div[style*="display: grid"] > *,
    body.is-dashboard-page div[style*="display:grid"] > * {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Penyesuaian Grid Dinamis saat Sidebar Terbuka (Unhidden) */
    html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .grid-4,
    html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
        gap: 18px !important;
    }

    html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .grid-3 {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
        gap: 20px !important;
    }

    html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .grid-2 {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
        gap: 20px !important;
    }

    /* Resolusi Laptop Sedang (1025px - 1380px) saat Sidebar Terbuka:
       Karena sidebar memakan 260px, grid 4 ditata rapi 2 kolom agar angka statistik & kartu tidak terjepit */
    @media (min-width: 1025px) and (max-width: 1380px) {
        html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .grid-4,
        html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .stats-grid {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }

    /* Resolusi Layar Lebar (>= 1381px) saat Sidebar Terbuka:
       Ruang luas, grid 4 kembali penuh 4 kolom */
    @media (min-width: 1381px) {
        html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .grid-4,
        html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .stats-grid {
            grid-template-columns: repeat(4, 1fr) !important;
        }
        html:not(.sidebar-desktop-collapsed) body.is-dashboard-page:not(.sidebar-desktop-collapsed) .grid-3 {
            grid-template-columns: repeat(3, 1fr) !important;
        }
    }

    /* Penyesuaian Grid Dinamis saat Sidebar Disembunyikan (Collapsed / Hidden) */
    html.sidebar-desktop-collapsed body.is-dashboard-page .grid-4,
    body.sidebar-desktop-collapsed.is-dashboard-page .grid-4,
    html.sidebar-desktop-collapsed body.is-dashboard-page .stats-grid,
    body.sidebar-desktop-collapsed.is-dashboard-page .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
        gap: 18px !important;
    }

    @media (min-width: 1180px) {
        html.sidebar-desktop-collapsed body.is-dashboard-page .grid-4,
        body.sidebar-desktop-collapsed.is-dashboard-page .grid-4,
        html.sidebar-desktop-collapsed body.is-dashboard-page .stats-grid,
        body.sidebar-desktop-collapsed.is-dashboard-page .stats-grid {
            grid-template-columns: repeat(4, 1fr) !important;
        }
        html.sidebar-desktop-collapsed body.is-dashboard-page .grid-3,
        body.sidebar-desktop-collapsed.is-dashboard-page .grid-3 {
            grid-template-columns: repeat(3, 1fr) !important;
        }
        html.sidebar-desktop-collapsed body.is-dashboard-page .grid-2,
        body.sidebar-desktop-collapsed.is-dashboard-page .grid-2 {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }
}

/* Responsive Tables and Controls */
.table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    margin-bottom: 16px;
}

/* Utilitas Tabel Scroll Vertikal & Horizontal untuk Tabel Data Banyak */
.table-scrollable,
.table-responsive[style*="max-height"] {
    max-height: 380px;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.table-scrollable table thead th,
.table-responsive[style*="max-height"] table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.table-scrollable::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
.table-scrollable::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.table-scrollable::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.table-scrollable::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dash-mobile-menu-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #065f46, #047857);
    border: 1.5px solid #10b981;
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(6, 95, 70, 0.25);
    transition: all 0.2s ease;
}

.dash-mobile-menu-btn:hover {
    background: #047857;
    transform: translateY(-1px);
}

.dash-logout-link {
    color: #dc2626;
    font-size: 0.8rem;
    margin-left: 6px;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 6px;
    background: #fee2e2;
    font-weight: 700;
    transition: background 0.2s;
    white-space: nowrap;
}

.dash-logout-link:hover {
    background: #fca5a5;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .nav-link {
        padding: 6px 8px;
        font-size: 0.82rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .desktop-nav-auth {
        display: none !important;
    }
    .mobile-only-auth {
        display: block !important;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .dash-mobile-menu-btn {
        display: inline-flex !important;
    }
    :root {
        --dash-topbar-h: 54px;
    }

    /* Di tampilan HP: Tombol Pilihan Menu Admin & Tombol Toggle Desktop dihapus total */
    .sidebar-desktop-toggle-btn,
    .sidebar-desktop-top-anchor,
    .dash-mobile-subbar {
        display: none !important;
    }

    /* Icon Garis 3 Terpusat di Topbar HP */
    .dash-menu-toggle-btn {
        display: inline-flex !important;
        position: relative !important;
        z-index: 100002 !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    /* Animasi Tombol Icon Garis 3 di Layar HP (Transformasi menjadi ✕ saat menu terbuka) */
    html.sidebar-mobile-active .dash-menu-toggle-btn,
    body.sidebar-mobile-active .dash-menu-toggle-btn {
        background: #dcfce7 !important;
        border-color: #10b981 !important;
    }

    html.sidebar-mobile-active .dash-menu-bar:nth-child(1),
    body.sidebar-mobile-active .dash-menu-bar:nth-child(1) {
        transform: translateY(5.7px) rotate(45deg);
        background-color: #047857 !important;
    }

    html.sidebar-mobile-active .dash-menu-bar:nth-child(2),
    body.sidebar-mobile-active .dash-menu-bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    html.sidebar-mobile-active .dash-menu-bar:nth-child(3),
    body.sidebar-mobile-active .dash-menu-bar:nth-child(3) {
        transform: translateY(-5.7px) rotate(-45deg);
        background-color: #047857 !important;
    }

    /* Header Publik Terkunci (Fixed) di Tampilan HP saat discroll */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 10000 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
        box-sizing: border-box !important;
    }

    body:not(.is-dashboard-page) {
        padding-top: 72px !important;
    }

    html.is-dashboard-page,
    body.is-dashboard-page {
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    /* Header Dashboard Terkunci (Fixed) di Tampilan HP saat discroll */
    .dashboard-site-topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: var(--dash-topbar-h, 54px) !important;
        z-index: 100000 !important;
        background: #ffffff !important;
        min-height: var(--dash-topbar-h, 54px) !important;
        box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
        box-sizing: border-box !important;
    }

    .dashboard-wrapper {
        padding-top: var(--dash-topbar-h, 54px) !important;
        display: block !important;
        flex-direction: column !important;
        height: auto !important;
        max-height: none !important;
        min-height: 100vh !important;
        position: relative !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .main-content {
        display: block !important;
        margin-left: 0 !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 16px 14px 36px 14px !important;
    }

    .sidebar {
        display: none;
    }

    /* Sidebar Drawer Mobile - Muncul di bawah Topbar sehingga Tombol Garis 3 Selalu Aktif & Terlihat */
    .sidebar.mobile-open {
        display: flex !important;
        position: fixed !important;
        top: var(--dash-topbar-h, 54px) !important;
        left: 0 !important;
        width: 290px !important;
        max-width: 86vw !important;
        height: calc(100vh - var(--dash-topbar-h, 54px)) !important;
        z-index: 99995 !important;
        background: #ffffff !important;
        box-shadow: 4px 0 35px rgba(0, 0, 0, 0.45) !important;
        padding: 16px 14px 40px 14px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        animation: slideInLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .sidebar.mobile-open .sidebar-mobile-close-wrap {
        display: flex !important;
    }

    .dash-sidebar-overlay {
        position: fixed !important;
        top: var(--dash-topbar-h, 54px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 99990 !important;
    }
}

.dash-mobile-subbar {
    display: none;
}
.dash-mobile-subbar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1.5px solid #6ee7b7;
    border-radius: 8px;
    padding: 7px 14px;
    color: #064e3b;
    font-weight: 800;
    font-size: 0.84rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(6, 95, 70, 0.06);
    transition: all 0.2s ease;
}
.dash-mobile-subbar-btn:active {
    background: #d1fae5;
    transform: scale(0.99);
}
.dash-mobile-subbar-badge {
    font-size: 0.72rem;
    color: #047857;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
        margin: 0;
        padding: 0;
        position: relative;
        box-sizing: border-box;
    }
    .container {
        padding: 0 12px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .hero-banner {
        padding: 30px 0 20px 0 !important;
        overflow: hidden;
    }
    .hero-container-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
        max-width: 100%;
    }
    .hero-logo-side {
        order: -1;
        margin-bottom: 8px;
    }
    .hero-logo-large {
        width: 140px;
        max-width: 60vw;
        height: auto;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-bottom: 6px;
    }
    .hero-buttons .btn {
        width: 100%;
        white-space: normal;
        text-align: center;
        padding: 12px 14px;
        font-size: 0.90rem;
        box-sizing: border-box;
    }
    /* Memisahkan tombol Cek Jadwal Ronda dan Kartu Total Warga agar tidak bertumpuk */
    .quick-stats-bar {
        margin-top: 24px !important;
        margin-bottom: 28px !important;
        position: relative;
        z-index: 2;
    }
    .hero-title {
        font-size: 1.55rem;
        word-break: break-word;
    }
    .shalat-grid-responsive {
        grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)) !important;
        gap: 4px !important;
    }
    .shalat-grid-responsive > div {
        padding: 6px 2px !important;
        font-size: 0.85rem !important;
    }
    .card {
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }
    .card-body {
        padding: 14px 12px;
        box-sizing: border-box;
    }
    .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
        box-sizing: border-box;
        margin-bottom: 14px;
        border-radius: var(--radius-sm);
    }
    .table-responsive > .table,
    .table-responsive > table {
        min-width: 720px !important;
    }
    #kas .table,
    #jimpitan .table,
    #koperasi .table,
    #warga .table,
    #surat .table,
    #webometrics .table,
    #history_keuangan .table,
    #historyAngsuran .table,
    .card .table {
        min-width: 780px !important;
    }
    .desktop-nav-auth {
        display: none !important;
    }
    body:not(.is-dashboard-page) {
        padding-top: 64px !important;
    }
    .navbar {
        height: 64px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .brand-logo-img {
        width: 36px;
        height: 36px;
    }
    .brand-info h1 {
        font-size: 0.88rem;
    }
    .brand-info p {
        font-size: 0.62rem;
    }
    .dashboard-site-topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: var(--dash-topbar-h, 54px) !important;
        padding: 8px 10px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
        max-width: 100%;
        box-sizing: border-box;
    }
    .dash-topbar-left {
        gap: 6px;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    .dash-topbar-brand {
        min-width: 0;
        overflow: hidden;
    }
    .dash-topbar-logo {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
    .dash-topbar-title {
        font-size: 0.78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .dash-topbar-sub {
        display: none;
    }
    .dash-topbar-right {
        gap: 6px;
        flex-shrink: 0;
        align-items: center;
    }
    .dash-clock-badge {
        display: inline-flex !important;
        font-size: 0.70rem;
        padding: 2px 8px;
        border-radius: 999px;
        background: #f1f5f9;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .dash-clock-badge .clock-date-part,
    .dash-clock-badge .clock-sep-part {
        display: none !important;
    }
    .dash-user-pill {
        padding: 2px 6px 2px 4px;
        gap: 4px;
        flex-shrink: 0;
    }
    .dash-user-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.70rem;
    }
    .dash-user-name {
        font-size: 0.72rem;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .dash-user-role {
        font-size: 0.58rem;
    }
    .dash-logout-btn {
        font-size: 0.70rem;
        padding: 4px 8px;
        gap: 4px;
    }
    /* Tampilan Statistik, Diagram & Chart di HP: Otomatis Atas-Bawah (1 Kolom Vertikal), Tidak Terpotong */
    .grid-2, .grid-3, .grid-4,
    .responsive-split-grid,
    .chart-grid-responsive,
    .stats-grid, .qa-grid,
    div[style*="grid-template-columns"]:not(.shalat-grid-responsive) {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .sidebar-desktop-toggle-wrap {
        display: none !important;
    }
    .chart-box-card,
    .chart-container-box,
    div[style*="chart"],
    canvas {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Stat cards on mobile */
    .stat-card {
        padding: 14px 16px !important;
        gap: 12px !important;
    }
    .stat-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.3rem !important;
        flex-shrink: 0 !important;
    }
    .stat-details h3 {
        font-size: 1.30rem !important;
    }
    .stat-details p {
        font-size: 0.80rem !important;
    }

    /* Quick Nav Cards on mobile (Admin Jimpitan, Koperasi, etc) */
    .quick-nav-card {
        padding: 14px 14px !important;
        gap: 12px !important;
    }
    .quick-nav-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.4rem !important;
        border-radius: 10px !important;
    }
    .quick-nav-title {
        font-size: 0.95rem !important;
    }
    .quick-nav-desc {
        font-size: 0.80rem !important;
        line-height: 1.45 !important;
    }

    /* Modal popups on mobile touch screens */
    #modalEditKas > div,
    #modalEditKop > div,
    #modalEditJimpitan > div,
    #modalSaldoAwal > div {
        max-height: 90vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
        margin: auto !important;
    }

    /* Card header search forms on mobile */
    .card-header form {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    .card-header form input[type="text"],
    .card-header form input[type="search"],
    .card-header form input[type="date"] {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    /* Welcome Banner Actions in Warga Dashboard */
    .welcome-banner-actions {
        align-items: stretch !important;
        width: 100% !important;
    }
    .welcome-banner-actions .btn,
    .welcome-banner-actions > div {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 20px !important;
        padding-top: 26px !important;
        padding-bottom: 16px !important;
    }
    .footer-slogan {
        margin-top: 6px !important;
        padding-top: 14px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        width: 100% !important;
        max-width: 520px !important;
    }
    .dashboard-wrapper {
        width: 100%;
        max-width: 100vw;
        overflow-x: clip;
    }
    .main-content {
        padding: 14px 12px 28px 12px !important;
        width: 100%;
        max-width: 100vw;
        overflow-x: clip;
        box-sizing: border-box;
    }
    .main-content h2 {
        font-size: 1.30rem !important;
        line-height: 1.35 !important;
        word-break: break-word !important;
    }
    .main-content h3 {
        font-size: 1.10rem !important;
        word-break: break-word !important;
    }
    .rekap-action-buttons {
        width: 100%;
        gap: 6px !important;
    }
    .rekap-action-buttons .btn {
        flex: 1 1 calc(50% - 6px);
        text-align: center;
        justify-content: center;
        font-size: 0.76rem;
        padding: 8px 6px;
    }
    .quick-nominal-group button {
        flex: 1 1 calc(33.333% - 6px);
        text-align: center;
        white-space: nowrap;
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    /* Mobile Table Action & Modals */
    .table td[style*="white-space: nowrap"] {
        padding: 6px 8px !important;
    }
    .table td .btn-sm {
        font-size: 0.74rem !important;
        padding: 4px 7px !important;
    }
    #modalMenuOpsiWarga > div,
    #modalReset > div,
    #modalTolakUser > div,
    #modalHakAkses > div {
        width: 95% !important;
        max-width: 95% !important;
        margin: 15px auto !important;
        padding: 16px !important;
    }
    #modalPreview > div {
        width: 96% !important;
        height: 90vh !important;
        margin: 10px auto !important;
    }
}

/* Print Styling for Rekap Reports & Documents */
@media print {
    @page {
        size: auto;
        margin: 10mm 10mm 12mm 10mm;
    }
    *, *::before, *::after {
        box-sizing: border-box !important;
    }
    body, html {
        background: white !important;
        color: black !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 8.5pt !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body.is-dashboard-page .dashboard-site-topbar,
    .dashboard-site-topbar,
    body.is-dashboard-page .sidebar,
    .sidebar,
    .sidebar-admin,
    .sidebar-desktop-toggle-btn,
    .sidebar-desktop-top-anchor,
    .site-header, .site-footer, .btn, .no-print, .topbar, .dashboard-footer {
        display: none !important;
    }
    body.is-dashboard-page .dashboard-wrapper,
    .dashboard-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-top: 0 !important;
    }
    body.is-dashboard-page .main-content,
    .main-content {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    .card {
        border: 1px solid #94a3b8 !important;
        box-shadow: none !important;
        margin-bottom: 18px !important;
        page-break-inside: auto !important;
        break-inside: auto !important;
        width: 100% !important;
    }
    .card-header,
    .print-header,
    .stat-card,
    .ttd-wrapper,
    .kotak-ttd,
    .signature-container,
    .verif-box,
    .verif-card,
    .verification-footer,
    [style*="border: 1.5px dashed"],
    [style*="border: 1px dashed"] {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
    .table-responsive {
        overflow: visible !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .table-responsive > .table,
    .table-responsive > table,
    .card .table,
    .table {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: auto !important;
        border-collapse: collapse !important;
        font-size: 8pt !important;
    }
    thead {
        display: table-header-group !important;
    }
    tfoot {
        display: table-footer-group !important;
    }
    tr, th, td {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .table th, .table td {
        border: 1px solid #cbd5e1 !important;
        padding: 4px 6px !important;
        font-size: 8pt !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
    }
    .table th {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        font-weight: 700 !important;
    }
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
    }
    .grid-4 {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .grid-3 {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .grid-2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

.print-header {
    display: none;
}
