:root {
    --primary-dark: #1f4e43;
    --primary-green: #2d6a4f;
    --accent-orange: #f4a261;
    --accent-blue: #2a9d8f;
    --text-dark: #2d3748;
    --text-gray: #718096;
    --bg-light: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Sidebar Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

.sidebar.expanded::-webkit-scrollbar {
    width: 6px;
}

/* Sidebar Content Wrapper */
.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.sidebar-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0 16px;
}

.sidebar-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    background: linear-gradient(180deg, transparent 0%, rgba(248, 250, 252, 0.8) 100%);
}
.sidebar {
    width: 60px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 16px 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.sidebar.expanded {
    width: 260px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    flex-shrink: 0;
}

.sidebar.expanded .sidebar-top {
    align-items: flex-start;
    padding: 0 16px;
}


.logo-area {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 8px;
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.08), rgba(45, 106, 79, 0.04));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    overflow: hidden;
    margin-bottom: 8px;
    flex-direction: row;
    gap: 0;
    border: 1px solid rgba(45, 106, 79, 0.1);
}

.logo-area:hover {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.12), rgba(45, 106, 79, 0.06));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.15);
}

.sidebar-logo {
    width: 100%;
    height: 100%;
    -o-object-fit: contain;
       object-fit: contain;
    display: block;
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 0;
}

.logo-area p {
    display: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-green);
    margin: 0;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.sidebar.expanded .logo-area {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 20px;
    flex-direction: row;
    gap: 12px;
}

.sidebar.expanded .sidebar-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.sidebar.expanded .logo-area p {
    display: block;
    opacity: 1;
    flex: 1;
}

.nav-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: row;
    font-size: 0.75rem;
    gap: 12px;
    padding: 0 10px;
    white-space: nowrap;
    position: relative;
    margin-bottom: 4px;
}

/* Make link-based nav items look like the old div-based ones */
a.nav-item {
    text-decoration: none;
    color: var(--text-gray);
}

.sidebar.expanded .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 0 16px;
    margin-bottom: 2px;
}

.nav-item i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.nav-item span {
    font-size: 0.85rem;
    display: none;
    font-weight: 500;
}

.sidebar.expanded .nav-item span {
    display: inline;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.1), rgba(45, 106, 79, 0.05));
    color: var(--primary-green);
    transform: translateX(2px);
}

.sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 700;
    white-space: nowrap;
    display: none;
    padding: 20px 16px 8px;
    letter-spacing: 0.08em;
    position: relative;
}

.sidebar.expanded .sidebar-heading {
    display: block;
}

.sidebar-bottom {
    display: flex;
    justify-content: center;
    padding: 16px 8px;
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.sidebar.expanded .sidebar-bottom {
    justify-content: flex-start;
    padding: 16px 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.expanded~.main-content,
    .main-content.sidebar-expanded {
        margin-left: 0;
        width: 100%;
    }
    
        
    .sidebar-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar.expanded {
        width: 240px;
    }
    
    .sidebar.expanded~.main-content,
    .main-content.sidebar-expanded {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
}

/* Smooth animations for better UX */
.nav-item {
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(45, 106, 79, 0.1), transparent);
    transition: left 0.5s;
}

.nav-item:hover::before {
    left: 100%;
}

/* Improved focus states for accessibility */
.nav-item:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Enhanced active state */
.nav-item.active {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.15), rgba(45, 106, 79, 0.08));
    box-shadow: 0 2px 8px rgba(45, 106, 79, 0.2);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary-green);
    border-radius: 0 2px 2px 0;
}

.sidebar.expanded .nav-item.active::after {
    height: 24px;
}

/* Main Content */
.main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Ensure sidebar doesn't overlap content */
.sidebar {
    z-index: 100;
}

.main-content {
    z-index: 1;
}

/* Sidebar expanded state - desktop only */
@media (min-width: 769px) {
    .sidebar.expanded~.main-content,
    .main-content.sidebar-expanded {
        margin-left: 260px;
        width: calc(100% - 260px);
    }
}

/* Prevent content overflow */
.main-content * {
    max-width: 100%;
    box-sizing: border-box;
}


.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Top Header */
.top-header {
    background: linear-gradient(135deg, #0f3329 0%, #1a4d3e 35%, #2d6a4f 100%);
    color: white;
    padding: 14px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

.header-page-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: white;
    margin: 0;
    letter-spacing: 0.02em;
}

/* Logo (homepage mode) */
.header-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
}

.header-logo-wrap:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.header-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.header-org-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.02em;
    line-height: 1.35;
    padding-left: 14px;
    margin-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    /* max-width: 220px; */
}

@media (max-width: 1100px) {
    .header-org-name {
        font-size: 0.72rem;
        max-width: 160px;
    }
}

@media (max-width: 900px) {
    .header-org-name { display: none; }
}

.logo-box {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.klhk-logo {
    max-width: 100%;
    max-height: 100%;
}

/* Header center – branding pill */
.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
}

.header-center-inner {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.header-center-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(167, 243, 208, 0.25), rgba(16, 185, 129, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 1.1rem;
    color: #a7f3d0;
    flex-shrink: 0;
}

.header-center-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.header-center-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.header-center-tagline {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    letter-spacing: 0.04em;
}

@media (max-width: 1200px) {
    .header-center-title { font-size: 0.95rem; }
    .header-center-tagline { font-size: 0.65rem; }
    .header-center-inner { padding: 8px 18px; gap: 12px; }
    .header-center-icon { width: 36px; height: 36px; font-size: 1rem; }
}

@media (max-width: 900px) {
    .header-center { display: none; }
}

/* Header right */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

/* Notification bell (akun daerah) */
.header-notification {
    position: relative;
    z-index: 1001;
}

.notification-trigger {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.notification-trigger:hover,
.header-notification.active .notification-trigger {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    display: none;
    box-shadow: 0 0 0 2px rgba(15, 81, 50, 0.9);
}

.notification-badge.show {
    display: inline-block;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 24px));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 10000;
    overflow: hidden;
    pointer-events: none;
}

.header-notification.active .notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.notification-dropdown-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.notification-dropdown-header strong {
    display: block;
    color: #0f172a;
    font-size: 0.92rem;
}

.notification-subtitle {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.75rem;
}

.notification-mark-all {
    border: none;
    background: transparent;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    white-space: nowrap;
}

.notification-mark-all:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 380px;
    overflow-y: auto;
}

.notification-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #ecfdf5;
}

.notification-item.unread:hover {
    background: #d1fae5;
}

.notification-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.notification-item-title {
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
}

.notification-item-time {
    color: #94a3b8;
    font-size: 0.72rem;
    white-space: nowrap;
}

.notification-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.notification-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.7rem;
    font-weight: 600;
}

.notification-chip.count {
    background: #ecfdf5;
    color: #047857;
}

.notification-chip.action-create { background: #eff6ff; color: #1d4ed8; }
.notification-chip.action-update { background: #fff7ed; color: #c2410c; }
.notification-chip.action-delete { background: #fef2f2; color: #b91c1c; }

.notification-changes {
    margin: 0;
    padding-left: 16px;
    color: #475569;
    font-size: 0.75rem;
    line-height: 1.45;
}

.notification-changes li + li {
    margin-top: 2px;
}

.notification-empty {
    padding: 28px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
}

.header-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #047857;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.header-login-btn:hover {
    background: #f0fdf4;
    color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.header-user-profile {
    position: relative;
    z-index: 1001;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile-trigger:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255,255,255,0.25), rgba(255,255,255,0.15));
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.dropdown-arrow {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.65rem;
    transition: transform 0.25s ease;
}

.header-user-profile.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 10000;
    overflow: hidden;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.header-user-profile.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-profile-name {
    font-weight: 600;
    color: var(--text-dark);
    cursor: default;
    pointer-events: none;
}

.dropdown-profile-name:hover {
    background: transparent;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-gray);
}

.dropdown-item:hover i {
    color: var(--primary-green);
}

.dropdown-item#headerLogoutBtn {
    color: #ef4444;
}

.dropdown-item#headerLogoutBtn:hover {
    background: #fef2f2;
}

.dropdown-item#headerLogoutBtn i {
    color: #ef4444;
}

.dropdown-item#headerLogoutBtn:hover i {
    color: #dc2626;
}

.header-search-icon {
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.header-search-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

/* Filters Bar */
.filters-bar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.filters-left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-item label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.filter-item select {
    padding: 10px 40px 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    min-width: 140px;
}

.filter-item select:hover {
    border-color: var(--primary-green);
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.1);
    transform: translateY(-1px);
}

.filter-item select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1), 0 2px 6px rgba(45, 106, 79, 0.15);
    outline: none;
}

.filter-item select.highlight {
    color: var(--accent-orange);
    font-weight: 600;
    border-color: rgba(244, 162, 97, 0.5);
    background: #fffaf0;
    box-shadow: 0 2px 6px rgba(244, 162, 97, 0.15);
}

.filter-item select option {
    padding: 10px;
    background: white;
    color: var(--text-dark);
}

.filters-center .sync-status {
    font-size: 0.85rem;
    background: #f1f2f6;
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--text-gray);
}

.filters-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.user-profile:hover {
    background-color: #f7fafc;
}

.user-dropdown {
    position: relative;
}


.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background-color: #f7fafc;
    color: var(--primary-green);
}

.dropdown-item i {
    font-size: 1rem;
    color: var(--text-gray);
}

.dropdown-item:hover i {
    color: var(--primary-green);
}

/* Sub Nav */
.sub-nav {
    padding: 15px 30px 0;
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.sub-link {
    text-decoration: none;
    color: var(--text-gray);
    padding-bottom: 15px;
    font-weight: 500;
    position: relative;
    font-size: 0.95rem;
}

.sub-link.active {
    color: var(--primary-green);
}

.sub-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-green);
    border-radius: 3px 3px 0 0;
}

/* Dashboard Container */
.dashboard-container {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Sistem Informasi blocks (collapsible + RTH cards) --- */
.aks-collapse {
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.aks-collapse__summary {
    list-style: none;
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #0b5b7d;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 6px;
}

.aks-collapse__summary::-webkit-details-marker {
    display: none;
}

.aks-collapse__title {
    font-size: 0.95rem;
}

.aks-collapse__icon {
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.9;
}

.aks-collapse__body {
    padding: 12px 0 0;
}

.aks-kpi {
    border-radius: 8px;
    padding: 18px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 110px;
}

.aks-kpi--green {
    background: #0aa85f;
    color: #fff;
}

.aks-kpi__value {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.aks-kpi__label {
    font-size: 0.95rem;
    opacity: 0.95;
}

.aks-kpi__right {
    font-size: 3rem;
    opacity: 0.25;
    margin-left: 14px;
}

.aks-section {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eef2f6;
}

.aks-section__header {
    background: #0aa85f;
    color: #fff;
    font-weight: 800;
    padding: 10px 14px;
    font-size: 0.95rem;
}

.aks-rth-grid {
    padding: 18px 18px 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    background: #f8fafc;
}

.aks-rth-card {
    border-radius: 22px;
    padding: 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    text-align: center;
}

.aks-rth-card--orange {
    background: #ff8a17;
    color: #fff;
}

.aks-rth-card--green {
    background: #9bf08f;
    color: #1f2937;
}

.aks-rth-card__title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.aks-rth-card__value {
    font-weight: 900;
    font-size: 2.2rem;
    line-height: 1.1;
}

.aks-rth-card__unit {
    margin-top: 8px;
    font-weight: 700;
    opacity: 0.95;
}

.aks-rth-card__link {
    margin-top: 14px;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
    opacity: 0.95;
    font-size: 0.9rem;
}

.aks-rth-card__link:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .aks-rth-grid {
        grid-template-columns: 1fr;
    }
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    border-radius: 12px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.blue-gradient {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.yellow-gradient {
    background: linear-gradient(135deg, #fceed5 0%, #ffde9e 100%);
    color: var(--text-dark);
}

.green-gradient {
    background: linear-gradient(135deg, #064e3b, #10b981);
}

.orange-gradient {
    background: linear-gradient(135deg, #ea580c, #f97316);
}

.card-header-sm {
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-values {
    padding-top: 10px;
}

.stat-values .val-group {
    display: flex !important;
    align-items: center !important; /* Changed from baseline */
    gap: 12px !important; /* Increased gap */
    margin-bottom: 5px !important;
    justify-content: center !important; /* Changed from space-between */
}

.stat-values .value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1; /* Allow growing */
}

.stat-values .value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-values .unit {
    font-size: 0.8rem;
    opacity: 0.8;
}

.stat-values .value-sec {
    font-size: 1.1rem; /* Reduced from 1.5rem */
    font-weight: 700;
    opacity: 1;
    line-height: 1.2;
    white-space: nowrap; /* Prevent wrapping inside value */
}

.stat-values .value-label {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.stat-values .unit-separator {
    font-size: 1rem;
    opacity: 0.7;
    padding: 0 4px;
    flex-shrink: 0;
    align-self: center;
}

.stat-values .labels {
    display: flex;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 8px;
}

.stat-values .labels p {
    margin: 0;
    font-weight: 500;
}

.stat-difference {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.yellow-gradient .stat-difference {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-difference .diff-label {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
}

.stat-difference .diff-value {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-difference .diff-value.positive {
    color: #86efac;
}

.stat-difference .diff-value.negative {
    color: #fca5a5;
}

.yellow-gradient .stat-difference .diff-value.positive {
    color: #10b981;
}

.yellow-gradient .stat-difference .diff-value.negative {
    color: #ef4444;
}

.stat-difference .diff-percent {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 600;
}

.yellow-gradient .stat-main-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.big-percent {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.sub-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

.stat-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.big-num {
    font-size: 2.2rem;
    font-weight: 700;
}

.big-num-plus {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.8;
}

.stat-row-center {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.status-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-sub {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Comparison Container Styles */
.comparison-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 15px 0;
}

.comparison-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.comparison-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.comparison-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-label i {
    font-size: 0.85rem;
}

.comparison-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
    color: #fff;
}

.comparison-unit {
    font-size: 0.7rem;
    opacity: 0.85;
    font-weight: 500;
}

.comparison-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    opacity: 0.7;
    font-size: 1.2rem;
}

.comparison-divider i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.comparison-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.diff-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.diff-badge.positive {
    background: rgba(34, 197, 94, 0.25);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.diff-badge.negative {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.diff-badge i {
    font-size: 0.7rem;
}

/* Responsive for comparison */
@media (max-width: 1200px) {
    .comparison-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .comparison-divider {
        transform: rotate(90deg);
        padding: 8px 0;
    }
    
    .comparison-value {
        font-size: 1.4rem;
    }
}

/* Middle Section */
.middle-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.link-btn {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 6px;
}

/* Table */
.table-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.table-frame {
    overflow-x: auto;
    border-radius: 12px;
    margin: 0;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
}

th {
    text-align: left;
    padding: 14px 16px;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 2px solid #f0f0f0;
}

td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: #444;
}

/* DataTables Styling */
#comparisonTable_wrapper {
    border-radius: 12px;
    overflow: hidden;
}

#comparisonTable {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

#comparisonTable thead th:first-child {
    border-top-left-radius: 12px;
}

#comparisonTable tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

#comparisonTable thead th:last-child {
    border-top-right-radius: 12px;
}

#comparisonTable tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

#comparisonTable tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

#comparisonTable thead th {
    padding: 16px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#comparisonTable thead tr:last-child th {
    border-bottom: 3px solid #e5e7eb;
    padding-bottom: 18px;
}

#comparisonTable tbody {
    border-top: 8px solid transparent;
}

#comparisonTable tbody tr:first-child td {
    padding-top: 20px;
}

#comparisonTable tbody td {
    padding: 16px;
    font-size: 0.9rem;
    vertical-align: middle;
}

#comparisonTable tbody tr:hover {
    background-color: #f9fafb;
    transition: background-color 0.2s ease;
}

#comparisonTable tbody tr:last-child td {
    border-bottom: none;
}

.rank {
    color: var(--primary-green);
    font-weight: 700;
    margin-right: 8px;
}

.text-green {
    color: #10b981;
    font-weight: 600;
    background: #ecfdf5;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.table-footer {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination button {
    border: 1px solid var(--border-color);
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* ------------------------------------------------------------
   Sistem Informasi Dashboard (layout-only, uses existing palette/components)
------------------------------------------------------------ */
.wcc-filters .filters-left {
    flex-wrap: wrap;
    gap: 10px;
}

.wcc-filters .filter-item select {
    min-width: 160px;
}

.wcc-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wcc-kpi-card {
    padding: 18px 20px;
}

.wcc-kpi-title {
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 600;
}

.wcc-kpi-value {
    margin-top: 6px;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.wcc-kpi-sub {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.wcc-kpi-sub span {
    color: var(--text-gray);
    font-weight: 500;
}

.text-red {
    color: #ef4444;
}

.wcc-middle {
    align-items: center;
}

.wcc-middle .wcc-split-card {
    padding-bottom: 16px;
}

.wcc-middle .map-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.wcc-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

.wcc-mini-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
}

.wcc-mini-value {
    margin-top: 4px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
}

.wcc-mini-sub {
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.wcc-mini-sub span {
    color: var(--text-gray);
    font-weight: 500;
}

.wcc-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
}

.wcc-chart-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    background: #fbfdff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

.wcc-chart-card>* {
    width: 100%;
}

.wcc-chart-card .wcc-chart-title {
    text-align: center;
}

.wcc-chart-card .sankey-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcc-chart-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.wcc-donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.wcc-donut {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(#ef4444 0 86%, #10b981 86% 100%);
    position: relative;
}

.wcc-donut::after {
    content: "";
    position: absolute;
    inset: 42px;
    background: white;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--border-color);
}

.wcc-donut-legend {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 600;
}

.wcc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-weight: 600;
}

.dot.red {
    background: #ef4444;
}

.wcc-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wcc-bar {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    align-items: center;
}

.wcc-bar-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 700;
}

.wcc-bar-track {
    height: 10px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.wcc-bar-fill {
    height: 100%;
    display: block;
    border-radius: 999px;
}

.wcc-bar-fill.blue {
    background: #3b82f6;
}

.wcc-bar-fill.yellow {
    background: #f59e0b;
}

.wcc-bar-fill.orange {
    background: #f97316;
}

.wcc-bar-fill.green {
    background: #10b981;
}

.wcc-map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcc-map-image-wrap {
    padding: 0;
}

.wcc-map-image {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: 8px;
    display: block;
}

.wcc-map-note {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px dashed var(--border-color);
    padding: 10px 12px;
    border-radius: 10px;
}

.wcc-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: #22c55e;
    color: white;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
}

.wcc-wa:hover {
    filter: brightness(0.95);
}

@media (max-width: 1200px) {
    .wcc-kpi-row {
        grid-template-columns: 1fr;
    }

    .wcc-charts-row {
        grid-template-columns: 1fr;
    }
}

/* Map Section */
.map-container {
    height: 300px;
    background: #f8fafc;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.map-legend {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    align-items: center;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.blue {
    background: #3b82f6;
}

.dot.green {
    background: #10b981;
}

.dot.yellow {
    background: #f59e0b;
}

.dot.mobile {
    background: #6366f1;
}

.legend-tags {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag.orange {
    background: #fff7ed;
    color: #ea580c;
}

.tag.green-light {
    background: #f0fdf4;
    color: #16a34a;
}

.tag.blue-light {
    background: #eff6ff;
    color: #2563eb;
}

/* Bottom Section */
.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.mini-pie {
    height: 320px;
    /* Increased height for better visibility */
    width: 100%;
}

.charts-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 20px;
}

@media (max-width: 1024px) {
    .chart-box {
        width: 100%; /* Stack on smaller screens */
    }
    
    .mini-pie {
        height: 280px; /* Slightly shorter on mobile where width is constrained */
    }
}

.chart-box {
    width: 48%;
    position: relative;
}

.chart-label {
    display: none;
    /* Hidden, using ECharts Title instead */
}

.legend-row {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
}

.legend-row span {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-dark);
    font-weight: 500;
}

.legend-row span .dot {
    margin-right: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sankey-container {
    height: 600px;
    /* Increase height for better spacing */
}

.sankey-card {
    background-color: #ffffff;
    /* White background */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    /* Restore shadow with depth */
    border: 1px solid #e2e8f0;
    /* Define boundary */
}

.insight-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 0.9rem;
    max-height: 250px;
    overflow-y: auto;
}

.insight-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-legend {
    margin-top: 10px;
    background: #f9fafb;
    padding: 10px;
    border-radius: 6px;
}

.insight-legend h4 {
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.insight-legend ul {
    list-style: none;
    font-size: 0.8rem;
    padding-left: 0;
}

.insight-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.sq {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.sq.orange {
    background: #f59e0b;
}

.sq.green {
    background: #10b981;
}

.sq.blue {
    background: #3b82f6;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .middle-section, 
    .bottom-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease, width 0.3s ease;
    }

    .sidebar.expanded {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.expanded~.main-content,
    .main-content.sidebar-expanded {
        margin-left: 0;
        width: 100%;
    }

    .mobile-sidebar-toggle {
        display: block;
    }

    .sidebar-toggle {
        display: none;
    }
}

/* PERSAMPAHAN NASIONAL Section */
.aks-persampahan {
    margin-top: 0;
}

.aks-persampahan__grid {
    margin-top: 20px;
}

.aks-persampahan__filters {
    background-color: #f1f5f9;
    padding: 15px 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.aks-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aks-filter-item label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.aks-filter-item select {
    padding: 10px 40px 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: var(--text-dark);
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    min-width: 140px;
}

.aks-filter-item select:hover {
    border-color: var(--primary-green);
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.1);
    transform: translateY(-1px);
}

.aks-filter-item select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1), 0 2px 6px rgba(45, 106, 79, 0.15);
    outline: none;
}

.aks-filter-item select option {
    padding: 10px;
    background: white;
    color: var(--text-dark);
}

.aks-persampahan__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-light);
}

.aks-persampahan__left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Mid-sized Cards Grid */
.aks-persampahan__mid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Small Cards */
.aks-persampahan__small-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Right Section - Pie Chart */
.aks-persampahan__right {
    display: flex;
    flex-direction: column;
}

.aks-pie-chart-container {
    height: 400px;
    width: 100%;
}

.aks-pie-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.aks-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.aks-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* Responsive */
@media (max-width: 1200px) {
    .aks-persampahan__grid {
        grid-template-columns: 1fr;
    }

    .aks-persampahan__mid-cards,
    .aks-persampahan__small-cards {
        grid-template-columns: 1fr;
    }
}

/* Logout Modal Styles */
.logout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.logout-modal.active {
    display: flex;
}

.logout-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.logout-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease;
    text-align: center;
}

.logout-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.logout-modal-icon i {
    font-size: 36px;
    color: #ffffff;
}

.logout-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.logout-modal-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

.logout-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.logout-btn-cancel,
.logout-btn-confirm {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    border: none;
    min-width: 120px;
}

.logout-btn-cancel {
    background-color: #f3f4f6;
    color: #374151;
}

.logout-btn-cancel:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logout-btn-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

.logout-btn-confirm:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.4);
}

.logout-btn-confirm:active,
.logout-btn-cancel:active {
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .logout-modal-content {
        padding: 24px;
        max-width: 90%;
    }

    .logout-modal-icon {
        width: 64px;
        height: 64px;
    }

    .logout-modal-icon i {
        font-size: 28px;
    }

    .logout-modal-title {
        font-size: 20px;
    }

    .logout-modal-message {
        font-size: 14px;
    }

    .logout-modal-actions {
        flex-direction: column;
    }

    .logout-btn-cancel,
    .logout-btn-confirm {
        width: 100%;
    }
}

/* --- Global Responsive Grid Helpers --- */
.dashboard-grid-3,
.dashboard-grid-3-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 768px) {
    .dashboard-grid-3,
    .dashboard-grid-3-2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .dashboard-grid-3,
    .dashboard-grid-3-2 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 1024px) {
    .dashboard-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.col-span-2-desktop {
    grid-column: span 1;
}

@media (min-width: 1200px) {
    .col-span-2-desktop {
        grid-column: span 2;
    }
}
/* Header Navigation Tabs – pulse dengan effect putih di belakang */
@keyframes header-nav-pulse {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(255, 255, 255, 0.5),
            0 0 20px 4px rgba(255, 255, 255, 0.35),
            0 2px 10px rgba(0, 0, 0, 0.18);
        transform: scale(1.03);
    }
}

@keyframes header-nav-pulse-inactive {
    0%, 100% {
        box-shadow: none;
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 0 6px rgba(255, 255, 255, 0.3),
            0 0 14px 2px rgba(255, 255, 255, 0.2);
        transform: scale(1.02);
    }
}

.header-nav-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 5px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-left: 12px;
}

.header-nav-tabs-right {
    margin-left: 0;
    margin-right: 0;
}

.header-nav-tab {
    padding: 8px 22px;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    animation: header-nav-pulse-inactive 2.5s ease-in-out infinite;
}

.header-nav-tab.active {
    background: white;
    color: #047857;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    font-weight: 600;
    animation: header-nav-pulse 2.5s ease-in-out infinite;
}

.header-nav-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

/* Dashboard Dropdown Menu */
.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px;
    flex-shrink: 0;
}

.sidebar.expanded .nav-dropdown-toggle {
    width: calc(100% - 16px);
}

.nav-dropdown-toggle:hover {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.1), rgba(45, 106, 79, 0.05));
    color: var(--primary-green);
    transform: translateX(2px);
}

.nav-dropdown-toggle.active {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.15), rgba(45, 106, 79, 0.08));
    color: var(--primary-green);
    transform: translateX(2px);
}

.nav-dropdown-icon {
    font-size: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: auto;
}

.nav-dropdown-toggle.active .nav-dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu Container */
.nav-dropdown-menu {
    display: none;
    overflow: hidden;
}

.nav-dropdown-menu.open {
    display: block;
}

/* Sub-menu items - styled as children of Dashboard */
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-gray) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    margin: 4px 8px;
    flex-shrink: 0;
    position: relative;
}

.sidebar.expanded .nav-dropdown-item {
    padding-left: 36px; /* Elegant consistent indentation */
    width: calc(100% - 16px);
}

.nav-dropdown-item i {
    font-size: 1rem;
    flex-shrink: 0;
    color: var(--text-gray);
    transition: color 0.25s ease;
}

.nav-dropdown-item span {
    font-size: 0.85rem;
    display: none;
}

.sidebar.expanded .nav-dropdown-item span {
    display: inline;
}

/* Hover State for Submenu */
.nav-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.1), rgba(45, 106, 79, 0.05)) !important;
    color: var(--primary-green) !important;
    transform: translateX(2px) !important;
    box-shadow: none !important;
}

.nav-dropdown-item:hover i {
    color: var(--primary-green) !important;
}

/* Active State for Submenu */
.nav-dropdown-item.active {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.15), rgba(45, 106, 79, 0.08)) !important;
    color: var(--primary-green) !important;
    font-weight: 600 !important;
    transform: translateX(2px) !important;
    box-shadow: 0 2px 8px rgba(45, 106, 79, 0.1) !important;
}

.nav-dropdown-item.active i {
    color: var(--primary-green) !important;
}

/* Position the active indicator green bar relative to the indented item, not the absolute sidebar edge */
.nav-dropdown-item.active::after {
    content: '';
    position: absolute;
    left: 0; /* Placed perfectly at the absolute left edge of the pill */
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary-green);
    border-radius: 0 2px 2px 0;
    display: block !important;
}

/* Mobile - Sidebar collapsed/overlay mode */
@media (max-width: 768px) {
    .nav-dropdown-toggle {
        padding-left: 16px;
        width: 100%;
    }

    .nav-dropdown-item {
        padding-left: 32px;
    }

    .nav-dropdown-item span {
        display: inline !important;
    }

    .nav-dropdown-icon {
        margin-left: auto;
    }
}
