/* ==========================================================================
   STATISTIK DASAR - SATU DATA KABUPATEN BANGKA
   Theme: Official Red (Crimson) & Clean Modern Light / Slate Dark
   ========================================================================== */

:root {
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Light Mode Tokens */
    --bg-main: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-muted: #F4F4F5;
    --bg-subtle: #F9FAFB;
    
    --text-main: #18181B;
    --text-muted: #71717A;
    --text-subtle: #A1A1AA;

    /* Official Satu Data Bangka Red */
    --primary: #DC2626;
    --primary-hover: #B91C1C;
    --primary-light: #FEE2E2;
    --primary-glow: rgba(220, 38, 38, 0.15);

    --border: #E4E4E7;
    --border-light: #F4F4F5;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

    color-scheme: light;
}

html {
    color-scheme: light;
}

.dark, html.dark {
    --bg-main: #09090B;
    --bg-card: #18181B;
    --bg-muted: #27272A;
    --bg-subtle: #1F1F23;
    
    --text-main: #FAFAFA;
    --text-muted: #A1A1AA;
    --text-subtle: #71717A;

    --primary: #EF4444;
    --primary-hover: #F87171;
    --primary-light: rgba(239, 68, 68, 0.15);
    --primary-glow: rgba(239, 68, 68, 0.25);

    --border: #27272A;
    --border-light: #1F1F23;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);

    color-scheme: dark;
}

/* Fallback native select theme styling */
select, .filter-select {
    color-scheme: light;
}

.dark select, .dark .filter-select, html.dark select, html.dark .filter-select {
    color-scheme: dark;
}

select option, .filter-select option {
    background-color: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-sans);
}

.dark select option, .dark .filter-select option {
    background-color: #18181B;
    color: #FAFAFA;
}

/* Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.font-mono {
    font-family: var(--font-mono);
}

.hidden {
    display: none !important;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Ambient Glow Orbs */
.ambient-glows {
    position: fixed;
    inset: 0;
    z-index: -10;
    pointer-events: none;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.glow-orb-1 {
    top: -10%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: var(--primary-glow);
}

.glow-orb-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(225, 29, 72, 0.08);
}

.glow-orb-3 {
    top: 40%;
    left: 45%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: rgba(249, 115, 22, 0.04);
}

.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: -9;
    pointer-events: none;
    opacity: 0.02;
    background-image: 
        linear-gradient(to right, currentColor 1px, transparent 1px),
        linear-gradient(to bottom, currentColor 1px, transparent 1px);
    background-size: 64px 64px;
}

/* Icons */
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }

.text-primary { color: var(--primary) !important; }
.text-emerald-600 { color: #10B981 !important; }
.text-rose-600 { color: #F43F5E !important; }

/* 1. HERO SECTION */
.hero-section {
    padding: 2.5rem 0 3.5rem;
    background: linear-gradient(180deg, var(--primary-light) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.hero-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    text-align: center;
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-sep {
    opacity: 0.5;
}

.breadcrumb-current {
    font-weight: 600;
    color: var(--primary);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 3.25rem;
    }
}

.hero-highlight {
    display: block;
    color: var(--primary);
}

.hero-description {
    max-width: 680px;
    margin: 0 auto 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Filter Toolbar */
.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-pill:hover,
.filter-pill:focus-within,
.filter-pill.is-open {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Fallback visible filter-select */
.filter-select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

/* ==========================================================================
   THEME-AWARE CUSTOM DROPDOWN (Tahun & Wilayah)
   ========================================================================== */
.theme-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.theme-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.15rem 0.2rem;
    border-radius: var(--radius-sm);
    outline: none;
    transition: color 0.15s ease;
}

.theme-dropdown-trigger:hover {
    color: var(--primary);
}

.theme-dropdown-trigger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dropdown-trigger-label {
    white-space: nowrap;
}

.dropdown-chevron {
    color: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.theme-dropdown.is-open .dropdown-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Floating Dropdown Menu */
.theme-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.35rem;
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.theme-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.theme-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.theme-dropdown-menu.menu-wide {
    min-width: 220px;
}

.theme-dropdown.is-open .theme-dropdown-menu {
    display: flex;
    animation: themeDropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes themeDropdownPop {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown Option Items */
.theme-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.theme-dropdown-item .item-label-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.theme-dropdown-item.is-active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.theme-dropdown-item .item-check-icon {
    color: var(--primary);
    flex-shrink: 0;
}

/* Hidden Fallback Select for Screen Readers / Forms */
.filter-select-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-icon {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.45rem;
    box-shadow: var(--shadow-sm);
}

.btn-icon:hover {
    color: var(--primary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* Active Wilayah Info Banner */
.active-wilayah-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--primary-light);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: var(--radius-md);
    margin: 0 auto 1.75rem;
    max-width: 780px;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease;
}

@media (min-width: 640px) {
    .active-wilayah-banner {
        flex-direction: row;
    }
}

.active-wilayah-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-main);
}

.btn-reset-wilayah {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-reset-wilayah:hover {
    background: var(--primary);
    color: #FFFFFF;
}

/* 4 KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
}

@media (min-width: 640px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.kpi-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kpi-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
}

.kpi-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.kpi-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.btn-info {
    background: transparent;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-info:hover {
    color: var(--primary);
    background: var(--bg-muted);
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.kpi-number {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.kpi-unit {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.kpi-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.trend-positive {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.dark .trend-positive {
    color: #34D399;
}

.trend-negative {
    background: rgba(244, 63, 94, 0.12);
    color: #E11D48;
}

.dark .trend-negative {
    color: #FB7185;
}

.kpi-year-label {
    font-size: 0.7rem;
    color: var(--text-subtle);
}

.kpi-sparkline-wrap {
    height: 38px;
    width: 100%;
}

.kpi-sparkline {
    width: 100% !important;
    height: 38px !important;
}

/* 2. RUANG KERJA STATISTIK SEKTORAL */
.sektoral-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.chart-controls-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.chart-order-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.2rem;
    box-shadow: var(--shadow-sm);
}

.order-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.order-btn.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.chart-mode-group {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.2rem;
    box-shadow: var(--shadow-sm);
}

.chart-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.chart-mode-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.chart-mode-btn:hover:not(.active) {
    color: var(--text-main);
}

/* Sektoral Controls Bar (Sektor & Tahun Side-by-Side + Mode Switcher) */
.sektoral-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.sektoral-filters-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .sektoral-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .sektoral-filters-group {
        width: 100%;
    }

    .chart-mode-group {
        align-self: flex-start;
    }
}

/* Chart Card */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.chart-card-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
    .chart-card-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.chart-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.chart-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chart-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pill-highlight {
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.chart-canvas-container {
    height: 320px;
    position: relative;
    padding: 1.25rem 0 0.5rem;
}

.analysis-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.analysis-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 3. MATRIKS 8 KECAMATAN */
.kecamatan-section {
    padding: 3rem 0;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-card-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
    .table-card-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.table-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-wrap {
    position: relative;
    width: 200px;
}

.search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.4rem 0.75rem 0.4rem 2rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    background: var(--bg-muted);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.th-sortable {
    cursor: pointer;
    user-select: none;
}

.th-sortable:hover {
    color: var(--primary);
}

.th-content {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.th-content-right {
    justify-content: flex-end;
}

.th-center, .td-center { text-align: center; }
.th-right, .td-right { text-align: right; }
.th-rank { width: 70px; }
.th-bar { width: 32%; }
.th-area { width: 110px; }

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.data-table tbody tr {
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background-color: var(--bg-muted);
}

/* Row Selected Highlight */
.row-selected-highlight {
    background-color: var(--primary-light) !important;
    border-left: 3px solid var(--primary);
}

.kecamatan-identity {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.kecamatan-name-stack {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.badge-fokus-wilayah {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: var(--primary);
    color: #FFFFFF;
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 700;
    width: fit-content;
}

.kecamatan-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-main);
    font-size: 0.65rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.kecamatan-badge.badge-active {
    background: var(--primary);
    color: #FFFFFF;
}

.td-unit {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
}

.proportion-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.proportion-bar-track {
    flex: 1;
    height: 7px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.proportion-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #EF4444 0%, #DC2626 100%);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.proportion-bar-fill.fill-active {
    background: linear-gradient(90deg, #DC2626 0%, #991B1B 100%);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.proportion-pct {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 32px;
}

/* 4. DATASET TERKAIT */
.dataset-section {
    padding: 3rem 0 4rem;
}

.dataset-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

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

.dataset-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.dataset-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.dataset-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dataset-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.dataset-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

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

.badge-tag {
    padding: 0.15rem 0.5rem;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.dataset-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.dataset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.tag-pill {
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
}

.dataset-footer {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.dataset-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-live-api {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    color: #10B981;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.dataset-actions-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.btn-dataset-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    color: var(--text-main);
}

.btn-dataset-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-dataset-primary {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-dataset-primary:hover {
    background: var(--primary);
    color: #FFFFFF;
}

.badge-format {
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-format-csv {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-format-xlsx {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-format-pdf {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 5. METADATA MODAL / DRAWER */
.metadata-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: flex-end;
}

.metadata-modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-drawer {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 1;
    animation: slideInRight 0.3s ease;
}

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

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-close-modal:hover {
    color: var(--primary);
    background: var(--bg-muted);
}

.modal-indicator-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

.modal-indicator-stat {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.modal-details-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.detail-box {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.detail-box-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.detail-box-value {
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.5;
}

.detail-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.35rem;
    text-align: center;
    margin-top: 0.35rem;
}

.history-cell {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.35rem;
}

.history-year {
    font-size: 0.65rem;
    color: var(--text-subtle);
}

.history-val {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ==========================================================================
   6. HALAMAN PUBLIKASI (Berita, Artikel, Infografis, Sektoral OPD, Sektoral Kab)
   ========================================================================== */

.publikasi-page {
    min-height: 100vh;
    padding-bottom: 5rem;
}

/* Hero Section */
.pub-hero {
    padding: 2.25rem 0 2rem;
    background: linear-gradient(180deg, var(--primary-light) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
}

.pub-hero-text {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.pub-hero-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.pub-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-main);
    line-height: 1.2;
}

@media (min-width: 640px) {
    .pub-hero-title {
        font-size: 2.25rem;
    }
}

.pub-hero-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.55;
    max-width: 720px;
}

/* Breadcrumb subtle */
.breadcrumb-link.text-muted {
    color: var(--text-muted);
}

/* Sub-Navigasi 5 Halaman Publikasi */
.pub-subnav-container {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 40;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.pub-subnav-scroll {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pub-subnav-scroll::-webkit-scrollbar {
    display: none;
}

.pub-subnav-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.pub-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.pub-subnav-link:hover {
    color: var(--text-main);
    background: var(--bg-muted);
}

.pub-subnav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    border-color: rgba(220, 38, 38, 0.2);
}

.dark .pub-subnav-link.active {
    border-color: rgba(239, 68, 68, 0.3);
}

.pub-subnav-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    background: var(--bg-muted);
    color: var(--text-muted);
}

.pub-subnav-link.active .pub-subnav-badge {
    background: rgba(220, 38, 38, 0.15);
    color: var(--primary);
}

/* Content Section */
.pub-content {
    padding: 2rem 0 4rem;
}

/* Headline / Berita Utama Card */
.pub-headline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    border-left: 5px solid var(--primary);
    transition: all 0.25s ease;
}

.pub-headline-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.pub-headline-badge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.pub-badge-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--primary);
    text-transform: uppercase;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.pub-headline-date {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: var(--text-subtle);
}

.pub-headline-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
}

@media (min-width: 900px) {
    .pub-headline-content {
        grid-template-columns: 1fr 260px;
        align-items: center;
    }
}

.pub-headline-meta-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pub-headline-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    letter-spacing: -0.015em;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .pub-headline-title {
        font-size: 1.6rem;
    }
}

.pub-headline-excerpt {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.pub-headline-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.pub-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    background: var(--bg-muted);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.pub-headline-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pub-headline-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.headline-graphic-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 2.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-muted) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.graphic-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.graphic-source {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Controls Bar (Filter Pills & Search) */
.pub-controls-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .pub-controls-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.pub-filter-pills {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.pub-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pub-pill-btn:hover {
    color: var(--text-main);
    background: var(--bg-subtle);
    border-color: var(--text-subtle);
}

.pub-pill-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.pub-pill-bookmark {
    border-style: dashed;
}

.badge-saved-count {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.1);
}

.pub-pill-btn.active .badge-saved-count {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

.pub-search-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pub-search-box {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    min-width: 240px;
    max-width: 320px;
}

.pub-search-box .search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--text-subtle);
    pointer-events: none;
}

.pub-search-input {
    width: 100%;
    padding: 0.48rem 2.2rem 0.48rem 2.25rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.2s ease;
}

.pub-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-clear-btn {
    position: absolute;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear-btn:hover {
    color: var(--text-main);
}

.pub-sort-select {
    padding: 0.48rem 0.85rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}

.pub-sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

.pub-result-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* KPI Metrik Bar */
.pub-kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
    .pub-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .pub-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.pub-kpi-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.pub-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--text-subtle);
}

.kpi-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.kpi-body {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-mono);
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 500;
}

/* Buttons */
.btn-primary-pub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary-pub:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary-pub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary-pub:hover {
    background: var(--bg-muted);
    border-color: var(--text-subtle);
}

.btn-text-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: gap 0.2s ease;
}

.btn-text-action:hover {
    gap: 0.55rem;
    text-decoration: underline;
}

.btn-icon-subtle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-subtle:hover {
    color: var(--text-main);
    background: var(--bg-subtle);
    border-color: var(--primary);
}

.btn-icon-bookmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-bookmark:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.btn-icon-bookmark.bookmarked {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
}

/* Card General */
.pub-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.pub-grid {
    display: grid;
    gap: 1.25rem;
}

.pub-grid-2 {
    grid-template-columns: 1fr;
}

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

.pub-grid-3 {
    grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
    .pub-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pub-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.pub-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.pub-card-horizontal {
    flex-direction: row;
    align-items: stretch;
}

.pub-card-accent {
    width: 4px;
    flex-shrink: 0;
}

.pub-card-body {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.pub-card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pub-card-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.pub-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.6rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pub-badge-blue {
    background: rgba(59, 130, 246, 0.12);
    color: #3B82F6;
}

.dark .pub-badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.pub-badge-neutral {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    background: var(--bg-muted);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid var(--border);
}

.pub-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.74rem;
    color: var(--text-subtle);
    font-weight: 500;
}

.pub-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.pub-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Article Highlight Box */
.pub-card-highlight-box {
    background: var(--bg-subtle);
    border-left: 3px solid #3B82F6;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.6rem 0.75rem;
    margin: 0.25rem 0;
}

.highlight-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #3B82F6;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.highlight-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.pub-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-light);
}

.pub-source,
.pub-author {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: var(--text-subtle);
    font-weight: 600;
}

.pub-card-actions-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card Dropdown Menu for Downloads */
.pub-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.pub-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg, 0 10px 25px -5px rgba(0, 0, 0, 0.25));
    min-width: 200px;
    z-index: 50;
    padding: 0.35rem;
    flex-direction: column;
    gap: 0.2rem;
    animation: pubDropdownFade 0.15s ease-out forwards;
}

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

.pub-dropdown-wrap.is-open .pub-dropdown-menu {
    display: flex;
}

.pub-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pub-dropdown-item:hover {
    background: var(--bg-muted);
    color: var(--primary);
}

.pub-dropdown-item i,
.pub-dropdown-item svg {
    flex-shrink: 0;
}

/* Author wrap in article */
.pub-author-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-author-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-muted);
    color: var(--text-muted);
}

.pub-author-info {
    display: flex;
    flex-direction: column;
}

.pub-author-name {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.pub-author-date {
    font-size: 0.68rem;
    color: var(--text-subtle);
}

/* Infografis Card */
.pub-infografis-visual-panel {
    position: relative;
    padding: 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.visual-panel-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.visual-top-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.visual-date {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-subtle);
}

.visual-stat-showcase {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.stat-number-box {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-big-number {
    font-size: 2.25rem;
    font-weight: 900;
    font-family: var(--font-mono);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-big-unit {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
}

.visual-mini-points {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    z-index: 1;
    background: var(--bg-muted);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.mini-point-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
}

.mini-point-label {
    color: var(--text-subtle);
}

.mini-point-val {
    color: var(--text-main);
}

/* OPD Card Details */
.pub-opd-header {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.pub-opd-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.pub-opd-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pub-opd-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-opd-meta-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.opd-detail-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.pub-opd-datasets-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.datasets-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-subtle);
    font-weight: 600;
}

.preview-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-main);
}

.pub-dataset-count,
.pub-indicator-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
}

.datasets-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dataset-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
}

.dataset-name {
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sektor Kabupaten Accordion & Table */
.pub-section-header-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .pub-section-header-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.pub-action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pub-sectors-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pub-sector-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.pub-sector-panel:hover {
    border-color: var(--text-subtle);
}

.sector-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: var(--bg-card);
    transition: background 0.2s ease;
    user-select: none;
}

.sector-panel-header:hover {
    background: var(--bg-subtle);
}

.sector-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sector-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.sector-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sector-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.sector-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.45;
}

.sector-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sector-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-subtle);
    transition: transform 0.25s ease;
}

.pub-sector-panel.collapsed .sector-toggle-icon {
    transform: rotate(-90deg);
}

.pub-sector-panel.collapsed .sector-panel-body {
    display: none;
}

.sector-panel-body {
    border-top: 1px solid var(--border);
    padding: 0;
    background: var(--bg-card);
}

.pub-table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.pub-indicator-table th {
    background: var(--bg-muted);
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pub-indicator-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    vertical-align: middle;
}

.pub-indicator-table tr:hover td {
    background: var(--bg-subtle);
}

.indicator-cell-val .val-bold {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--text-main);
}

.unit-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text-muted);
    font-weight: 600;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.trend-badge.trend-baik {
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
}

.dark .trend-badge.trend-baik {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.period-text,
.opd-text {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* Modals & Dialogs */
.pub-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.pub-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.pub-modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.pub-modal-container.pub-modal-large {
    max-width: 820px;
}

.pub-modal-backdrop.active .pub-modal-container {
    transform: scale(1) translateY(0);
}

.pub-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.pub-modal-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.pub-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-muted);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pub-modal-close:hover {
    color: var(--text-main);
    background: var(--border);
}

.pub-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.pub-modal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.pub-modal-desc-subtle {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.pub-modal-source {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
    font-weight: 600;
}

.pub-modal-author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.pub-meta-subtle {
    font-size: 0.68rem;
    color: var(--text-subtle);
}

.pub-modal-views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}

.pub-modal-text {
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.75;
    white-space: pre-line;
}

.pub-modal-tags {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.pub-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    flex-wrap: wrap;
}

.modal-footer-left,
.modal-footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Article Modal Boxes */
.article-insights-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-md);
    padding: 1.15rem;
}

.insights-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.insights-header h3 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #3B82F6;
    letter-spacing: -0.01em;
}

.insights-list {
    margin: 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.84rem;
    color: var(--text-main);
    line-height: 1.5;
}

.article-policy-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    padding: 1.15rem;
}

.policy-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.policy-header h3 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #F59E0B;
}

.article-policy-box p {
    font-size: 0.84rem;
    color: var(--text-main);
    line-height: 1.55;
    margin: 0;
}

/* Infografis Sheet (Lightbox Detail) */
.infografis-sheet {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.sheet-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.75rem;
    background: linear-gradient(180deg, var(--bg-muted) 0%, var(--bg-subtle) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.sheet-stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.sheet-category-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--primary);
    text-transform: uppercase;
}

.sheet-badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #10B981;
}

.sheet-big-metric {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.metric-number-display {
    font-size: 3rem;
    font-weight: 900;
    font-family: var(--font-mono);
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.03em;
}

.metric-unit-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.sheet-submetric-pill {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.25rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.sheet-breakdown-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sheet-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-main);
}

.sheet-grid-points {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .sheet-grid-points {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sheet-point-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.sheet-point-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--primary);
    flex-shrink: 0;
}

.sheet-point-body {
    display: flex;
    flex-direction: column;
}

.sheet-point-label {
    font-size: 0.74rem;
    color: var(--text-subtle);
}

.sheet-point-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.sheet-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.76rem;
    color: var(--text-subtle);
}

.sheet-source-info {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.sheet-watermark {
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.68rem;
}

/* OPD Modal Catalog */
.opd-modal-profile {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    padding: 1rem;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.opd-modal-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--primary);
    flex-shrink: 0;
}

.modal-dataset-search-bar {
    margin: 0.25rem 0;
}

.modal-dataset-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dataset-row-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.dataset-row-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
    .dataset-row-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.dataset-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.dataset-row-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.dataset-row-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.72rem;
    color: var(--text-subtle);
    flex-wrap: wrap;
}

.dataset-row-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

/* Empty State */
.pub-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.empty-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-muted);
    color: var(--text-subtle);
    margin-bottom: 0.25rem;
}

.pub-empty-state h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.pub-empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 0 0.5rem;
}

/* Toast Notifications */
.pub-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.84rem;
    font-weight: 600;
    transform: translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pub-toast.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pub-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10B981;
}

@media (max-width: 640px) {
    .pub-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        justify-content: center;
    }
}


/* ==========================================================================
   TOPBAR NAVIGATION (SDI KABUPATEN BANGKA)
   ========================================================================== */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.dark .top-navbar {
    background: rgba(9, 9, 11, 0.9);
    border-bottom: 1px solid var(--border);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 64px;
    padding: 0 1.5rem;
}

/* Centered Topbar Pill Menu */
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: var(--bg-muted);
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.dark .nav-menu {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
}

.nav-link:hover {
    color: var(--text-main);
    background: var(--bg-card);
}

.nav-link.is-active {
    color: var(--primary) !important;
    background: var(--bg-card) !important;
    border-color: rgba(220, 38, 38, 0.2) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    font-weight: 700;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-caret {
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-caret,
.nav-dropdown.is-open .dropdown-caret {
    transform: rotate(180deg);
}

.dropdown-menu-mega {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 440px;
    max-width: 92vw;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.12);
    padding: 0.65rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 120;
}

.nav-dropdown:hover .dropdown-menu-mega,
.nav-dropdown.is-open .dropdown-menu-mega {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-mega-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dropdown-mega-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.15s ease;
    color: var(--text-main);
}

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

.dropdown-mega-item.item-active {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Mega Item Icon with high contrast & crisp visibility */
.mega-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.2s ease;
}

.mega-item-icon i,
.mega-item-icon svg,
.mega-item-icon svg * {
    color: var(--primary) !important;
    stroke: var(--primary) !important;
}

.dropdown-mega-item:hover .mega-item-icon {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.dropdown-mega-item:hover .mega-item-icon i,
.dropdown-mega-item:hover .mega-item-icon svg,
.dropdown-mega-item:hover .mega-item-icon svg * {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

.dropdown-mega-item.item-active .mega-item-icon {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

.dropdown-mega-item.item-active .mega-item-icon i,
.dropdown-mega-item.item-active .mega-item-icon svg,
.dropdown-mega-item.item-active .mega-item-icon svg * {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
}

.mega-item-body {
    display: flex;
    flex-direction: column;
}

.mega-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.dropdown-mega-item.item-active .mega-item-title {
    color: var(--primary);
}

.dropdown-mega-item:hover .mega-item-title {
    color: var(--primary);
}

.mega-item-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-top: 2px;
}

/* Nav Actions (Positioned on Right Edge) */
.nav-actions {
    position: absolute;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon-topbar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-topbar:hover {
    background: var(--bg-muted);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Mobile Drawer */
.mobile-menu-drawer {
    display: none;
}

.btn-mobile-menu {
    display: none !important;
}

@media (max-width: 600px) {
    .navbar-container {
        padding: 0 1rem;
    }

    .nav-actions {
        right: 1rem;
    }

    .nav-link {
        padding: 0.38rem 0.9rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .nav-menu {
        gap: 0.15rem;
        padding: 0.25rem 0.3rem;
    }

    .nav-link {
        padding: 0.32rem 0.7rem;
        font-size: 0.75rem;
    }
}

/* Hub Grid */
.pub-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.25rem;
}

.pub-hub-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.pub-hub-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.pub-hub-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.pub-hub-card:hover .pub-hub-card-icon {
    transform: scale(1.08);
}

.pub-hub-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pub-hub-card-meta {
    margin-bottom: 0.5rem;
}

.pub-hub-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.pub-hub-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.pub-hub-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
    transition: gap 0.2s ease;
}

.pub-hub-card:hover .pub-hub-card-action {
    gap: 0.55rem;
}

/* =========================================================================
   ARTIKEL DETAIL PAGE (STANDALONE READING EXPERIENCE)
   ========================================================================= */
.artikel-detail-page {
    background: linear-gradient(180deg, var(--primary-light) 0%, transparent 380px);
}

.artikel-detail-hero {
    padding-top: 1.75rem;
    margin-bottom: 2rem;
    border-bottom: none;
}

.artikel-detail-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
    max-width: 920px;
}

.artikel-meta-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.artikel-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
}

.artikel-detail-title {
    font-size: 2.15rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .artikel-detail-title {
        font-size: 1.6rem;
    }
}

.artikel-detail-excerpt {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.65;
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin: 0;
}

.artikel-author-hero-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.9rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.artikel-action-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.artikel-reading-section {
    padding: 0 0 4.5rem;
}

.artikel-reading-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .artikel-reading-layout {
        grid-template-columns: 1fr;
    }
}

.artikel-main-column {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
    .artikel-main-column {
        padding: 1.25rem;
    }
}

.artikel-body-text {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.85;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    margin: 1.75rem 0;
}

.artikel-body-text p {
    margin: 0;
    text-align: justify;
}

.mb-6 {
    margin-bottom: 1.75rem;
}

.mt-6 {
    margin-top: 1.75rem;
}

.artikel-bottom-nav {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: transform 0.2s ease;
}

.btn-back-to-list:hover {
    transform: translateX(-3px);
}

.artikel-bottom-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share-icon:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Sidebar Styling */
.artikel-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 5.5rem;
}

.artikel-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-meta-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-meta-row {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-meta-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
    font-weight: 700;
}

.sidebar-meta-val {
    font-size: 0.84rem;
    color: var(--text-main);
    font-weight: 600;
}

.sidebar-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.related-article-item {
    display: block;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.related-article-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xs);
}

.related-category {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.related-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin: 0 0 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Toast Copy Link */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0f172a;
    color: #f8fafc;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.pub-card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pub-card-title-link:hover {
    color: var(--primary);
}

.berita-detail-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

/* Print Styling */
@media print {
    .site-header,
    .site-footer,
    .pub-subnav-container,
    .breadcrumb,
    .artikel-action-tools,
    .artikel-bottom-nav,
    .artikel-sidebar,
    .copy-toast {
        display: none !important;
    }

    .artikel-detail-hero {
        padding: 0 !important;
        background: none !important;
    }

    .artikel-reading-layout {
        display: block !important;
    }

    .artikel-main-column {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
    }
}
