/* =========================================
    VARIABLES & THEME
    ========================================= */
:root {
    --primary-color: #2D489C;
    --primary-hover: #1e3a8a;
    --accent-color: #0081A7; 
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
}

body { background-color: #FFFFFF !important; }

/* Reset Wrapper CKAN */
#content .wrapper {
    background: transparent !important; border: none !important;
    box-shadow: none !important; padding: 0 !important;
}
#content .container {
    width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important;
}

/* =========================================
    HERO SECTION
    ========================================= */
.ipb-hero-full {
    position: relative;
    color: #ffffff;
    padding: 3rem 0 4rem;
    background-image: linear-gradient(90deg, rgba(38, 60, 146, 0.85) 0%, rgba(38, 60, 146, 0.65) 100%), url("/hero-gedung-ahn.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn-add-dataset {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-add-dataset:hover {
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
}

/* =========================================
    SEARCH COMPONENTS
    ========================================= */
/* Simple Search */
.simple-search-wrapper {
    display: flex; background: white; border-radius: 8px; padding: 6px;
    width: 100%; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); align-items: center; margin-top: 20px;
}
.simple-input { flex: 1; border: none; padding: 12px 20px; font-size: 16px; outline: none; background: transparent; color: var(--text-dark); }

.btn-search-blue {
    background: var(--primary-color); color: white; border: none; padding: 10px 35px;
    border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; 
    gap: 8px; font-size: 15px; margin-right: 2px; transition: background 0.2s;
}
.btn-search-blue:hover { background: var(--primary-hover); }

/* Advanced Search Styles */
.search-panel-container { display: none; background: transparent; margin-top: 20px; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.adv-row { display: flex; align-items: center; background: white; border-radius: 4px; padding: 5px 10px; margin-bottom: 10px; gap: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.adv-input { flex: 1; border: none; font-size: 14px; padding: 10px; color: #333; outline: none; }
.logic-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #888; background: #f8f9fa; padding: 5px 10px; border-radius: 20px; border: 1px solid #eee; }
.switch { position: relative; display: inline-block; width: 36px; height: 18px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #2D489C; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #E0E0E0; } 
input:checked + .slider:before { transform: translateX(18px); }
.adv-select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; background: white; cursor: pointer; min-width: 140px; }
.adv-operator { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; background: white; cursor: pointer; width: 80px; }
.btn-remove { background: none; border: none; color: #999; font-size: 16px; cursor: pointer; padding: 0 10px; }
.btn-add-big { width: 100%; background-color: #dbeafe; border: 1px dashed #2D489C; color: #2D489C; padding: 12px; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; margin-bottom: 15px; }
.btn-add-big:hover { background-color: #bfdbfe; }
.adv-footer { display: flex; justify-content: space-between; align-items: center; color: white; font-size: 14px; }
.btn-adv-search { background: white; color: var(--primary-color); border: none; width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; transition: 0.2s; }

/* =========================================
    BREADCRUMB & WRAPPERS
    ========================================= */
.custom-breadcrumb {
    max-width: 1200px; margin: 0 auto; padding: 20px 20px 0 20px;
    font-size: 15px; color: #555; display: flex; align-items: center;
}
.custom-breadcrumb a { color: #0077b6; text-decoration: none; transition: color 0.2s; }
.custom-breadcrumb a:hover { text-decoration: underline; color: var(--primary-color); }
.custom-breadcrumb .separator { margin: 0 10px; color: #999; font-size: 12px; }
.custom-breadcrumb .current { color: #333; font-weight: 400; }

.read-layout-wrapper {
    display: flex; gap: 30px; margin-top: 20px; align-items: flex-start;
    max-width: 1200px; margin: 20px auto 60px auto; padding: 0 20px;
}

.main-content-wrapper {
    max-width: 1200px; margin: 20px auto 60px auto; padding: 0 20px;
}

/* =========================================
    SIDEBAR & WIDGETS
    ========================================= */
.read-sidebar { 
    width: 280px; flex-shrink: 0; 
    background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; padding: 20px;
}
.sidebar-widget { margin-bottom: 25px; }
.sidebar-heading { 
    font-weight: 700; color: #333; font-size: 15px; 
    border-bottom: 1px solid #eee; padding-bottom: 8px; margin-bottom: 10px; display: block; 
}
.org-image-lg { width: 100%; border-radius: 6px; border: 1px solid #eee; padding: 5px; margin-bottom: 15px; }

/* Fixed Filter Styles */
.filter-group { margin-bottom: 25px; }
.filter-group-title {
    font-size: 12px; font-weight: 700; color: #666;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 8px; display: block;
}
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list li { border-bottom: 1px solid #f0f4f8; padding: 2px 0; }
.filter-list li:last-child { border-bottom: none; }

.filter-link {
    display: flex; justify-content: space-between; align-items: center;
    text-decoration: none; color: #333; font-size: 13px;
    padding: 6px 8px; border-radius: 4px; transition: all 0.2s;
}
.filter-link:hover {
    background-color: #f1f5f9; color: var(--primary-color); text-decoration: none;
}
.filter-link.active {
    background-color: #eff6ff; color: var(--primary-color);
    font-weight: 700; border-left: 3px solid var(--primary-color);
}
.filter-link.active:hover {
    background-color: #fee2e2; color: #dc2626; border-left-color: #dc2626;
}
.filter-link.active .filter-count { display: none; }
.remove-icon { display: none; margin-right: 6px; }
.filter-link.active:hover .remove-icon { display: inline-block; }
.filter-link.active:hover .text-label { text-decoration: line-through; }

.filter-count {
    background-color: #F1F5F9; color: #475569;
    font-size: 11px; font-weight: 600; padding: 2px 8px;
    border-radius: 12px; min-width: 24px; text-align: center;
}

/* =========================================
    MAIN CONTENT AREA
    ========================================= */
.read-content { flex-grow: 1; width: 100%; }

.dataset-content-card, 
.content-card {
    background: white; border: 1px solid #E0E0E0; border-radius: 10px; padding: 30px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); margin-bottom: 20px;
}

.org-main-title { font-size: 32px; font-weight: 700; color: #333; margin-bottom: 10px; line-height: 1.3; }

/* Toolbar & Tabs */
.dataset-toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; border-bottom: 1px solid #eee; padding-bottom: 20px;}

.btn-action {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    background: #fff; border: 1px solid #ccc; color: #333; border-radius: 4px; 
    font-size: 13px; font-weight: 600; text-decoration: none; transition: 0.2s;
}
.btn-action:hover { background: #f8f9fa; border-color: #999; color: var(--primary-color); }
.btn-action.active { 
    background: #e0f2fe; color: var(--primary-color); border-color: var(--primary-color); 
    pointer-events: none;
}
.btn-action.active .count-badge { background-color: white; border-color: transparent; }

.count-badge {
    background-color: #e0f2fe; color: var(--primary-color);
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 12px; margin-left: 6px;
    border: 1px solid rgba(45, 72, 156, 0.2); vertical-align: middle;
}

/* =========================================================
    TAMBAHAN CSS UNTUK HOVER EFFECT PADA DATASET ITEM
    ========================================================= */
    
    /* 1. Base Style (Kondisi Awal) */
    .dataset-item {
        display: flex;
        gap: 15px;
        background: #ffffff;
        border: 1px solid #e0e0e0; /* Border abu-abu halus */
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 15px;
        
        /* Transisi agar efek hover terasa halus (tidak kaku) */
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        position: relative;
    }

    /* 2. Hover State (Saat Mouse Diarahkan) */
    .dataset-item:hover {
        /* Mengubah warna border menjadi warna Primary IPB (Biru) */
        border-color: #2D489C; 
        
        /* Mengubah warna background menjadi biru sangat muda */
        background-color: #f6faff; 
        
        /* Efek mengangkat kartu sedikit ke atas (-5px) */
        transform: translateY(-5px); 
        
        /* Menambahkan bayangan (shadow) agar terlihat melayang */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 6px 6px rgba(0, 0, 0, 0.05);
    }

    /* Opsional: Membuat Judul ikut berubah warna saat hover di kotaknya */
    .dataset-item:hover .ds-title {
        color: #2D489C;
        text-decoration: none;
    }

    /* Layout internal item (supaya rapi) */
    .ds-icon {
        flex-shrink: 0;
        width: 50px;
        height: 50px;
        background: #f1f5f9;
        color: #2D489C;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
    }
    
    .ds-content {
        flex-grow: 1;
    }

    .ds-title {
        font-size: 18px;
        font-weight: 700;
        color: #333;
        text-decoration: none;
        display: block;
        margin-bottom: 5px;
        transition: color 0.2s;
    }

    .ds-desc {
        font-size: 14px;
        color: #666;
        margin-bottom: 10px;
        line-height: 1.5;
    }

    .ds-meta {
        font-size: 12px;
        color: #888;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .format-badge {
        background: #e2e8f0;
        color: #475569;
        padding: 2px 6px;
        border-radius: 4px;
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
    }

/* =========================================
    ORGANIZATION GRID & CARDS
    ========================================= */
.ipb-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 24px; margin-top: 20px;
}

.org-card {
    background: white; border: 1px solid #E0E0E0; border-radius: 8px; 
    overflow: hidden; display: flex; flex-direction: column; 
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
}
.org-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    border-color: var(--primary-color);
}
.org-card:hover .org-title { color: var(--primary-color); }

.card-img-wrapper {
    height: 140px; background: #F0F4FE; display: flex;
    align-items: center; justify-content: center; padding: 20px;
    border-bottom: 1px solid #eee;
}
.card-img-wrapper img { max-height: 100px; max-width: 100%; object-fit: contain; }
.placeholder-icon { font-size: 50px; color: #cbd5e1; }

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.org-title {
    margin: 0 0 10px 0; font-size: 16px; font-weight: 700; line-height: 1.4;
    color: var(--text-dark); transition: color 0.2s;
}
.org-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 15px; flex-grow: 1; }

.card-footer {
    padding-top: 15px; border-top: 1px solid #eee; margin-top: auto;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--text-muted);
}
.view-text { font-weight: 600; color: var(--primary-color); }
.badge-count { background: #E0E7FF; color: var(--primary-color); padding: 3px 10px; border-radius: 12px; font-weight: bold; }

/* =========================================
    MEMBERS & ROLES
    ========================================= */
.members-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.members-table th { text-align: left; padding: 15px; background: #f8f9fa; color: #555; font-weight: 700; border-bottom: 2px solid #eee; font-size: 14px; }
.members-table td { padding: 15px; border-bottom: 1px solid #eee; vertical-align: middle; }
.members-table tr:hover td { background: #fafafa; }

.user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; margin-right: 12px; vertical-align: middle; }
.user-name { font-weight: 600; color: #333; text-decoration: none; font-size: 15px; }
.user-name:hover { color: var(--primary-color); }

.role-badge { 
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.role-admin { background: #fee2e2; color: #991b1b; }
.role-editor { background: #dbeafe; color: #1e40af; }
.role-member { background: #f3f4f6; color: #374151; }

.btn-add-member {
    float: right; font-size: 13px; background: var(--primary-color); color: white; 
    padding: 6px 12px; border-radius: 4px; text-decoration: none; display: flex; align-items: center; gap: 5px;
}
.btn-add-member:hover { background: var(--primary-hover); color: white; text-decoration: none; }

/* =========================================
    ACTIVITY STREAM
    ========================================= */
.activity-filter-bar {
    background: #f8f9fa; border: 1px solid #eee; border-radius: 6px;
    padding: 10px 15px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 15px;
}
.activity-filter-bar label { margin: 0; font-weight: 600; font-size: 14px; color: #555; }
.activity-filter-bar select {
    padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px;
    font-size: 14px; color: #333; outline: none; background: white; cursor: pointer;
}

.activity-stream { padding-left: 0; list-style: none; margin-top: 10px; }

/* CKAN Default classes overrides */
.activity-stream .activity {
    position: relative;
    padding: 0 0 25px 50px; /* Ruang kiri untuk icon timeline */
    margin-bottom: 0; border-bottom: none; min-height: 60px;
}

.activity-wrapper { display: block; }

/* Garis Vertikal Timeline */
.activity-stream .activity::before {
    content: ''; position: absolute; left: 19px; top: 40px; bottom: -20px;
    width: 2px; background: #e5e7eb; z-index: 1;
}
.activity-stream .activity-wrapper:last-child .activity::before { display: none; }

/* Icon / Avatar container adjustment */
.activity-stream .activity .gravatar {
    position: absolute; left: 0; top: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    z-index: 2; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.activity-stream .activity p { margin: 0; font-size: 14px; line-height: 1.5; color: #444; }
.activity-stream .activity .date { font-size: 12px; color: #888; display: block; margin-top: 4px; }
.activity-stream .activity .icon { display: none; } 

/* =========================================
    RESPONSIVE MEDIA QUERIES
    ========================================= */
@media (max-width: 992px) { 
    .ipb-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 768px) {
    .read-layout-wrapper { flex-direction: column-reverse; } 
    .read-sidebar { width: 100%; }
    .ipb-grid { grid-template-columns: 1fr; }
    
    /* Activity Stream Mobile */
    .activity-stream .activity { padding-left: 0; }
    .activity-stream .activity::before { display: none; }
    .activity-stream .activity .gravatar { position: relative; display: inline-block; margin-right: 10px; margin-bottom: 5px; }
}


/* =========================================
   VARIABLES & THEME
   ========================================= */
:root {
  --primary-color: #2D489C;
  --primary-hover: #1e3a8a;
  --bg-light: #F9FAFB;
  --border-color: #D1D5DB; /* Menggabungkan #D1D5DB dan #E5E7EB ke satu standar jika mirip, tapi saya ambil yang pertama */
  --text-dark: #333333;    /* Menggabungkan #333333 dan #1F2937 */
  --text-muted: #666666;   /* Menggabungkan #666666 dan #6B7280 */
  --accent-color: #0081A7; 
}

body { background-color: #FFFFFF !important; }

/* Reset Wrapper CKAN */
#content .wrapper {
  background: transparent !important; border: none !important;
  box-shadow: none !important; padding: 0 !important;
}
#content .container {
  width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important;
}

/* =========================================
   HERO SECTION
   ========================================= */
.ipb-hero-full {
  position: relative;
  color: #ffffff;
  padding: 4rem 0 4rem; /* Mengambil padding terbesar dari opsi yang ada */
  background-image: linear-gradient(90deg, rgba(38, 60, 146, 0.65) 0%, rgba(38, 60, 146, 0.65) 100%), url("/hero-gedung-ahn.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Menggabungkan style button add dataset dan item */
.btn-add-dataset,
.btn-add-item {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-add-dataset:hover,
.btn-add-item:hover {
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-2px);
}

/* SEARCH COMPONENTS */
.simple-search-wrapper {
    display: flex; background: white; border-radius: 8px; padding: 6px;
    width: 100%; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); align-items: center; margin-top: 30px;
}
.simple-input { flex: 1; border: none; padding: 12px 20px; font-size: 16px; outline: none; background: transparent; color: var(--text-dark); }

.btn-search-blue {
    background: var(--primary-color); color: white; border: none; padding: 10px 35px;
    border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; 
    gap: 8px; font-size: 15px; margin-right: 2px; transition: background 0.2s;
}
.btn-search-blue:hover { background: var(--primary-hover); }

/* ADVANCED SEARCH STYLES */
.search-panel-container { display: none; background: transparent; margin-top: 20px; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.adv-row { display: flex; align-items: center; background: white; border-radius: 4px; padding: 5px 10px; margin-bottom: 10px; gap: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.adv-input { flex: 1; border: none; font-size: 14px; padding: 10px; color: #333; outline: none; }
.logic-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #888; background: #f8f9fa; padding: 5px 10px; border-radius: 20px; border: 1px solid #eee; }
.switch { position: relative; display: inline-block; width: 36px; height: 18px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #2D489C; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #E0E0E0; } 
input:checked + .slider:before { transform: translateX(18px); }
.adv-select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; background: white; cursor: pointer; min-width: 140px; }
.adv-operator { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; background: white; cursor: pointer; width: 80px; }
.btn-remove { background: none; border: none; color: #999; font-size: 16px; cursor: pointer; padding: 0 10px; }
.btn-add-big { width: 100%; background-color: #dbeafe; border: 1px dashed #2D489C; color: #2D489C; padding: 12px; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; margin-bottom: 15px; }
.btn-add-big:hover { background-color: #bfdbfe; }
.adv-footer { display: flex; justify-content: space-between; align-items: center; color: white; font-size: 14px; }
.btn-adv-search { background: white; color: var(--primary-color); border: none; width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; transition: 0.2s; }

/* =========================================
   BREADCRUMB & CONTENT LAYOUT
   ========================================= */
.custom-breadcrumb {
    max-width: 1200px; margin: 0 auto; padding: 20px 20px 0 20px;
    font-size: 15px; color: #555; display: flex; align-items: center;
}
.custom-breadcrumb a { color: #0077b6; text-decoration: none; transition: color 0.2s; }
.custom-breadcrumb a:hover { text-decoration: underline; color: var(--primary-color); }
.custom-breadcrumb .separator { margin: 0 10px; color: #999; font-size: 12px; }
.custom-breadcrumb .current { color: #333; font-weight: 400; }

/* MAIN LAYOUT WRAPPER */
.read-layout-wrapper {
    display: flex; gap: 30px; margin-top: 20px; align-items: flex-start;
    max-width: 1200px; margin: 20px auto 60px auto; padding: 0 20px;
}
.main-content-wrapper {
    max-width: 1200px; margin: 20px auto 60px auto; padding: 0 20px;
}

/* SIDEBAR STYLING */
.read-sidebar { 
    width: 280px; flex-shrink: 0; 
    background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; padding: 20px;
}
.sidebar-widget { margin-bottom: 30px; }

.sidebar-heading { 
    font-weight: 700; color: #333; font-size: 15px; 
    border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 15px; display: block; 
}
.org-image-lg { width: 100%; border-radius: 6px; border: 1px solid #eee; padding: 5px; margin-bottom: 15px; }

/* --- FIXED FILTER CSS --- */
.filter-group { margin-bottom: 25px; }

.filter-group-title {
    font-size: 12px; font-weight: 700; color: #666;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 8px; display: block;
}

.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list li { border-bottom: 1px solid #f0f4f8; padding: 2px 0; }
.filter-list li:last-child { border-bottom: none; }

/* UPDATED LINK STYLES FOR ACTIVE/INACTIVE */
.filter-link {
    display: flex; justify-content: space-between; align-items: center;
    text-decoration: none; color: #333; font-size: 13px;
    padding: 6px 8px; border-radius: 4px; transition: all 0.2s;
}

.filter-link:hover {
    background-color: #f1f5f9; color: var(--primary-color); text-decoration: none;
}

.filter-link.active {
    background-color: #eff6ff; /* Biru muda */
    color: var(--primary-color); font-weight: 700;
    border-left: 3px solid var(--primary-color);
}

.filter-link.active:hover {
    background-color: #fee2e2; /* Merah muda saat hover untuk remove */
    color: #dc2626; border-left-color: #dc2626;
}

.filter-link.active .filter-count { display: none; }
.remove-icon { display: none; margin-right: 6px; }
.filter-link.active:hover .remove-icon { display: inline-block; }
.filter-link.active:hover .text-label { text-decoration: line-through; }

.filter-count {
    background-color: #F1F5F9; color: #475569;
    font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 12px;
    min-width: 24px; text-align: center;
}

/* MAIN CONTENT */
.read-content { flex-grow: 1; width: 100%; }

/* Menggabungkan dataset-content-card dan content-card */
.dataset-content-card,
.content-card {
    background: white; border: 1px solid #E0E0E0; border-radius: 8px; padding: 30px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); margin-bottom: 20px;
}

.org-main-title { font-size: 32px; font-weight: 700; color: #333; margin-bottom: 10px; line-height: 1.3; }

/* TOOLBAR STYLES */
.dataset-toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; border-bottom: 1px solid #eee; padding-bottom: 20px;}

.btn-action {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    background: #fff; border: 1px solid #ccc; color: #333; border-radius: 4px; 
    font-size: 13px; font-weight: 600; text-decoration: none; transition: 0.2s;
}
.btn-action:hover { background: #f8f9fa; border-color: #999; color: var(--primary-color); }

/* Active State */
.btn-action.active { 
    background: #e0f2fe; color: var(--primary-color); border-color: var(--primary-color); 
    pointer-events: none; /* Disable click on active */
}

/* COUNT BADGE STYLE */
.count-badge {
    background-color: #e0f2fe; 
    color: var(--primary-color);
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 12px;
    margin-left: 6px;
    border: 1px solid rgba(45, 72, 156, 0.2);
    vertical-align: middle;
}
.btn-action.active .count-badge { background-color: white; border-color: transparent; }

/* DATASET ITEM STYLES */
.dataset-item { display: flex; gap: 15px; padding: 20px 0; border-bottom: 1px solid #eee; transition: 0.2s; }
.dataset-item:last-child { border-bottom: none; }
.dataset-item:hover .ds-title { color: var(--primary-color); }

.ds-icon {
    width: 50px; height: 50px; background: #f0f4f8; border-radius: 6px; 
    display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-size: 20px; flex-shrink: 0;
}
.ds-content { flex: 1; }
.ds-title { font-size: 18px; font-weight: 700; color: #222; text-decoration: none; display: block; margin-bottom: 5px; }
.ds-desc { color: #666; font-size: 14px; line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-meta { display: flex; gap: 15px; font-size: 12px; color: #888; align-items: center; }
.format-badge { background: #E0E7FF; color: var(--primary-color); padding: 2px 8px; border-radius: 12px; font-weight: bold; font-size: 10px; text-transform: uppercase; }

/* MEMBERS TABLE STYLING */
.members-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.members-table th { text-align: left; padding: 15px; background: #f8f9fa; color: #555; font-weight: 700; border-bottom: 2px solid #eee; font-size: 14px; }
.members-table td { padding: 15px; border-bottom: 1px solid #eee; vertical-align: middle; }
.members-table tr:hover td { background: #fafafa; }

.user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid #ddd; margin-right: 12px; vertical-align: middle; }
.user-name { font-weight: 600; color: #333; text-decoration: none; font-size: 15px; }
.user-name:hover { color: var(--primary-color); }

.role-badge { 
    padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.role-admin { background: #fee2e2; color: #991b1b; }
.role-editor { background: #dbeafe; color: #1e40af; }
.role-member { background: #f3f4f6; color: #374151; }

.btn-add-member {
    float: right; font-size: 13px; background: var(--primary-color); color: white; 
    padding: 6px 12px; border-radius: 4px; text-decoration: none; display: flex; align-items: center; gap: 5px;
}
.btn-add-member:hover { background: var(--primary-hover); color: white; text-decoration: none; }

/* =========================================
   GRID & GROUP CARDS (CLICKABLE)
   ========================================= */
.ipb-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 24px; margin-top: 20px;
}

/* Link wrapper for the whole card */
.group-card {
    background: white; border: 1px solid #E0E0E0; border-radius: 8px; 
    overflow: hidden; display: flex; flex-direction: column; 
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none !important;
    color: inherit;
    cursor: pointer;
}

.group-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    border-color: var(--primary-color);
}

.card-img-wrapper {
    height: 140px; background: #F0F4FE; display: flex;
    align-items: center; justify-content: center; padding: 20px;
    border-bottom: 1px solid #eee;
}
.card-img-wrapper img { max-height: 100px; max-width: 100%; object-fit: contain; }

/* Icon default untuk Group beda dengan Org */
.placeholder-icon { font-size: 50px; color: #cbd5e1; }

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.group-title {
    margin: 0 0 10px 0; font-size: 16px; font-weight: 700; line-height: 1.4;
    color: var(--text-dark); transition: color 0.2s;
}
.group-card:hover .group-title { color: var(--primary-color); }

.group-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 15px; flex-grow: 1; }

.card-footer {
    padding-top: 15px; border-top: 1px solid #eee; margin-top: auto;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--text-muted);
}
.view-text { font-weight: 600; color: var(--primary-color); }
.badge-count { background: #E0E7FF; color: var(--primary-color); padding: 3px 10px; border-radius: 12px; font-weight: bold; }

/* =========================================
   ACTIVITY STREAM CUSTOM STYLES
   ========================================= */
/* Filter Bar Style */
.activity-filter-bar {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.activity-filter-bar label { margin: 0; font-weight: 600; font-size: 14px; color: #555; }
.activity-filter-bar select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    outline: none;
    background: white;
    cursor: pointer;
}

.activity-stream { padding-left: 0; list-style: none; margin-top: 10px; }

/* CKAN Default classes overrides */
.activity-stream .activity {
    position: relative;
    padding: 0 0 25px 50px; /* Ruang kiri untuk icon timeline */
    margin-bottom: 0;
    border-bottom: none;
    min-height: 60px;
}

/* Wrapper untuk memudahkan filtering */
.activity-wrapper { display: block; }

/* Garis Vertikal Timeline */
.activity-stream .activity::before {
    content: ''; position: absolute; left: 19px; top: 40px; bottom: -20px;
    width: 2px; background: #e5e7eb;
    z-index: 1;
}
.activity-stream .activity-wrapper:last-child .activity::before { display: none; }

/* Icon / Avatar container adjustment */
.activity-stream .activity .gravatar {
    position: absolute; left: 0; top: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    z-index: 2; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Content Text */
.activity-stream .activity p { margin: 0; font-size: 14px; line-height: 1.5; color: #444; }
.activity-stream .activity .date { font-size: 12px; color: #888; display: block; margin-top: 4px; }
.activity-stream .activity .icon { display: none; } 

/* =========================================
   GLOBAL MEDIA QUERIES
   ========================================= */
@media (max-width: 992px) { 
    .ipb-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 768px) {
    .read-layout-wrapper { flex-direction: column-reverse; } 
    .read-sidebar { width: 100%; }
    .ipb-grid { grid-template-columns: 1fr; }
    
    /* Activity Stream Mobile */
    .activity-stream .activity { padding-left: 0; }
    .activity-stream .activity::before { display: none; }
    .activity-stream .activity .gravatar { position: relative; display: inline-block; margin-right: 10px; margin-bottom: 5px; }
}