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

:root {
    /* Color Palette - PAN Blue Government Theme */
    --primary-hsl: 214, 89%, 32%;   /* PAN Blue #0052A5 */
    --accent-hsl: 211, 100%, 44%;   /* PAN Accent Blue #0070E0 */
    --success-hsl: 142, 70%, 45%;   /* Green */
    --warning-hsl: 38, 92%, 50%;    /* Amber */
    --danger-hsl: 0, 72%, 51%;      /* Crimson */
    --dark-hsl: 215, 60%, 16%;      /* Deep Navy */
    --light-hsl: 210, 40%, 98%;     /* Off-White */
    
    --primary: hsl(var(--primary-hsl));
    --primary-light: hsla(var(--primary-hsl), 0.08);
    --accent: hsl(var(--accent-hsl));
    --accent-light: hsla(var(--accent-hsl), 0.08);
    --success: hsl(var(--success-hsl));
    --success-light: hsla(var(--success-hsl), 0.1);
    --warning: hsl(var(--warning-hsl));
    --warning-light: hsla(var(--warning-hsl), 0.1);
    --danger: hsl(var(--danger-hsl));
    --danger-light: hsla(var(--danger-hsl), 0.1);
    --dark: hsl(var(--dark-hsl));
    --light: hsl(var(--light-hsl));
    
    /* Light Theme Core Backgrounds */
    --bg-main: #f4f6f9;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --text-main: #334155;       /* Slate 700 */
    --text-light: #ffffff;
    --text-muted: #64748b;      /* Slate 500 */
    --border-color: #e2e8f0;    /* Gray 200 */
    --border-hover: rgba(0, 82, 165, 0.25);
    
    /* Layout Tokens */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.03);
    
    --transition: all 0.25s ease-in-out;
}

/* Base Styles & Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.019em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent);
}

/* Card Panels */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-panel:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

/* Green Header Banner (PAN style) */
.header-gradient {
    background: linear-gradient(135deg, #0052A5 0%, #003580 100%);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #e8f0fe; /* PAN accent stripe */
}

.header-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

/* Public Portal Components */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 5%;
    background: rgba(0, 82, 165, 0.95); /* PAN Blue dengan sedikit transparansi */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Border tipis transparan */
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.02em;
}

.nav-logo svg {
    color: #ffffff !important;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    position: relative;
    padding: 0.5rem 0.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #ffffff);
    border-radius: 2px;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.nav-link.active {
    color: #ffffff;
}

.nav-link.active::after {
    width: 100%;
    left: 0;
    background: #ffffff;
}

/* Burger Button for Public Header Mobile */
.public-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    outline: none;
}

@media (max-width: 1024px) {
    .public-nav-toggle {
        display: block; /* Tampilkan burger di mobile & tablet */
    }
    
    .nav-links {
        display: none; /* Sembunyikan menu bawaan */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 82, 165, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        padding: 1.5rem;
        gap: 1.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        z-index: 101;
    }
    
    .nav-links.active {
        display: flex; /* Tampilkan menu saat active */
        animation: slideDown 0.3s ease forwards;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
        font-size: 1rem;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links .btn {
        width: 100%;
        box-sizing: border-box;
        margin-top: 0.5rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Green Government Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    outline: none;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: #0052A5;
    color: var(--text-light);
}
.btn-primary:hover {
    background: #003580;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 82, 165, 0.20);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-light);
}
.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}

/* Home Layout Grids */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 2.5rem auto;
}

.home-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2.5rem;
}

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

/* Highlight Post Card */
.highlight-card {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
    transition: var(--transition);
}

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

.highlight-img {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
}

.highlight-body {
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .highlight-card {
        grid-template-columns: 1fr;
    }
    .highlight-img {
        height: 230px;
        min-height: auto;
    }
    .highlight-body {
        padding: 1.5rem;
    }
}

/* Sector Tabs and Filtering */
.filter-tabs-wrapper {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.filter-tabs-wrapper::before,
.filter-tabs-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filter-tabs-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-main) 0%, transparent 100%);
    opacity: var(--fade-left, 0);
}

.filter-tabs-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-main) 0%, transparent 100%);
    opacity: var(--fade-right, 1);
}

.filter-tabs-container {
    overflow: hidden;
    width: 100%;
}

.filter-tabs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    scroll-behavior: smooth;
}

.filter-tabs::-webkit-scrollbar {
    display: none; /* WebKit */
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.35rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50px; /* Rounded pill style */
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.88rem;
    box-shadow: var(--shadow-sm);
}

.filter-tab:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card);
    border-color: rgba(0, 82, 165, 0.3);
    color: #0052A5;
}

.filter-tab.active {
    background: #0052A5;
    color: #ffffff;
    border-color: #0052A5;
    box-shadow: 0 4px 12px rgba(0, 82, 165, 0.2);
}

/* Sliding Buttons */
.slide-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    color: #0052A5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    position: absolute;
    outline: none;
}

.slide-btn:hover {
    background: #0052A5;
    color: #ffffff;
    border-color: #0052A5;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 82, 165, 0.25);
}

.slide-btn.left {
    left: -20px;
}

.slide-btn.right {
    right: -20px;
}

/* News Cards Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}

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

.news-cover {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #f1f5f9;
}

.news-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.category-tag {
    background: #eff6ff;
    color: #0052A5;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid #dcfce7;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--dark);
}

.news-excerpt {
    font-size: 0.88rem;
    color: var(--text-main);
    flex-grow: 1;
    opacity: 0.9;
}

/* Sidebar Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.widget-title {
    font-size: 1.15rem;
    border-bottom: 2px solid #0052A5;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    list-style: none;
}

.announcement-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.85rem;
}
.announcement-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.announcement-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.4;
}

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

/* Agenda Widget */
.agenda-widget-item {
    background: var(--bg-main);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid #0052A5;
}

.agenda-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0052A5;
}

/* Search Box */
.search-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
}

.form-control {
    flex-grow: 1;
    padding: 0.7rem 1rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--dark);
    transition: var(--transition);
}

.form-control:focus {
    border-color: #0052A5;
    box-shadow: 0 0 0 3px rgba(0, 82, 165, 0.15);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-draft {
    background: #f1f5f9;
    color: #475569;
}

.badge-pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.badge-published {
    background: #eff6ff;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.badge-rejected {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Detail Page Elements */
.detail-header {
    margin-bottom: 2rem;
}

.detail-cover {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 2.25rem;
    box-shadow: var(--shadow-sm);
}

.detail-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 3.5rem;
}

.detail-content p {
    margin-bottom: 1.5rem;
}

/* Content Workflow Trail (Audit Logs UI) */
.timeline {
    margin-top: 3.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.timeline-title {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.timeline-items {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -2.05rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid #ffffff;
}

.timeline-item.approved .timeline-dot {
    background: var(--success);
}

.timeline-item.rejected .timeline-dot {
    background: var(--danger);
}

.timeline-item.submitted .timeline-dot {
    background: var(--warning);
}

.timeline-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.timeline-content {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.timeline-action {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

/* Attachment download banner */
.attachment-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: #eff6ff;
    border: 1px solid #dcfce7;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

/* Agenda Calendar Page styling */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.agenda-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid #0052A5;
    transition: var(--transition);
}

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

.agenda-time-badge {
    background: #eff6ff;
    color: #0052A5;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
    border: 1px solid #dcfce7;
}

/* Backoffice Dashboard Portal Structure */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

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

.dashboard-sidebar {
    background: #001b3f; /* PAN Dark Blue admin sidebar */
    color: #e2e8f0;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

@media (max-width: 1024px) {
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%); /* Sembunyikan sidebar */
    }
    
    .dashboard-sidebar.active {
        transform: translateX(0); /* Tampilkan sidebar */
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
    }
    
    #mobile-sidebar-toggle {
        display: inline-flex !important; /* Tampilkan tombol hamburger */
    }
}

.sidebar-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.dashboard-main {
    padding: 2.5rem;
    overflow-y: auto;
    background-color: var(--bg-main);
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 1.5rem;
    }
}

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

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #eff6ff;
    color: #0052A5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    border: 1px solid #dcfce7;
}

/* Dashboard Metrics Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-info h3 {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.metric-icon-wrap {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #eff6ff;
    color: #0052A5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dcfce7;
}

/* Forms styling in Dashboard */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--dark);
    transition: var(--transition);
}
.form-select:focus {
    border-color: #0052A5;
    box-shadow: 0 0 0 3px rgba(0, 82, 165, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Table styling for CRUD lists */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background: #f8fafc;
    color: var(--dark);
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.05em;
}

.table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.95rem;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: #f8fafc;
}

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

/* WYSIWYG Content Area simulation */
.content-preview {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    background: #f8fafc;
    color: var(--text-main);
    max-height: 400px;
    overflow-y: auto;
    margin: 1rem 0;
}

/* Alert Notification UI component */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #eff6ff;
    color: #15803d;
    border-color: #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* Footer Section */
.footer {
    background: #0b1a10; /* deep forest green footer background */
    color: #94a3b8;
    padding: 4.5rem 5% 2.5rem 5%;
    margin-top: 5rem;
    border-top: 3px solid #e8f0fe; /* yellow stripe */
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

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

.footer-brand h2 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.footer-title {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    font-family: 'Outfit', sans-serif;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: #94a3b8;
}
.footer-link:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Panoramic Hero Section & Weather Widget */
.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('../logo/konawe_hero.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    padding: 6rem 5%;
    position: relative;
    border-bottom: 3px solid #e8f0fe;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 3rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.hero-content {
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-search {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 0.35rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    margin-top: 1rem;
}

.hero-search input {
    flex-grow: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #1e293b;
}

.hero-search-select {
    border: none;
    outline: none;
    background: transparent;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: #475569;
    border-left: 1px solid #cbd5e1;
    font-weight: 600;
    max-width: 180px;
}

.hero-search button {
    background: #0052A5;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.hero-search button:hover {
    background: #003580;
}

.popular-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.popular-pill {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: var(--transition);
}

.popular-pill:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

/* Weather Widget */
.weather-card {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    color: #ffffff;
    box-shadow: var(--shadow-lg);
}

/* Share Bar & Share Buttons */
.share-bar {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
}
.share-btn svg {
    fill: currentColor;
    display: block;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: #ffffff;
}
.share-wa {
    background-color: #25D366;
}
.share-wa:hover {
    background-color: #128C7E;
}
.share-fb {
    background-color: #1877F2;
}
.share-fb:hover {
    background-color: #0E5AED;
}
.share-tw {
    background-color: #000000;
}
.share-tw:hover {
    background-color: #1A1A1A;
}
.share-tg {
    background-color: #0088cc;
}
.share-tg:hover {
    background-color: #006699;
}
.share-link {
    background-color: #64748b;
    color: #ffffff;
}
.share-link:hover {
    background-color: #475569;
}
.share-link svg {
    stroke: currentColor;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    /* Attachment banner flex stack */
    .attachment-banner {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }
    .attachment-banner .btn {
        width: 100%;
    }
    
    /* Detail page elements scaling */
    .detail-header h1 {
        font-size: 1.75rem !important;
    }
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    /* Search form card structure on hero banner */
    .hero-search {
        flex-direction: column;
        border-radius: var(--radius-md);
        padding: 0.75rem;
        gap: 0.75rem;
        background: rgba(255, 255, 255, 0.95);
        align-items: stretch;
    }
    .hero-search svg {
        display: none;
    }
    .hero-search input {
        width: 100%;
        padding: 0.5rem 0.25rem;
        border-bottom: 1px solid var(--border-color);
    }
    .hero-search-select {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        max-width: 100%;
        width: 100%;
        padding: 0.5rem 0.25rem;
    }
    .hero-search button {
        width: 100%;
        border-radius: var(--radius-sm);
        padding: 0.75rem;
    }
    
    /* Header typography */
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
}

/* Pinned Posts Slider Animations */
.pinned-slide {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}
.pinned-slide.active {
    opacity: 1;
}
.slider-dot.active {
    background: #0052A5 !important;
    width: 24px !important;
    border-radius: 5px !important;
}

/* Social link hover styling in Hero Header */
.social-link-item:hover {
    color: #e8f0fe !important;
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

/* Premium Instagram Feed Widget Styling */
.instagram-feed-section {
    margin-top: 3.5rem;
    margin-bottom: 2.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

.instagram-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.instagram-feed-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--dark);
}

.instagram-feed-title span.title-bar {
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(to bottom, #8a3ab9, #e95950, #fccc63);
    display: inline-block;
    border-radius: 2px;
}

.instagram-username-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(220, 39, 67, 0.2);
    transition: var(--transition);
}

.instagram-username-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(220, 39, 67, 0.35);
    color: #ffffff;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}

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

@media (max-width: 640px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.instagram-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #e2e8f0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.instagram-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.instagram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.15rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
}

.instagram-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(220, 39, 67, 0.25);
}

.instagram-card:hover img {
    transform: scale(1.08);
}

.instagram-card:hover .instagram-overlay {
    opacity: 1;
}

.instagram-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.9;
}

.instagram-overlay-caption {
    font-size: 0.8rem;
    line-height: 1.5;
    font-weight: 500;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    margin: auto 0;
    text-align: left;
}

.instagram-overlay-footer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #e8f0fe;
}

/* Skeleton Loaders */
.instagram-skeleton {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, #e2e8f0 25%, #edf2f7 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: loadingSkeleton 1.5s infinite;
}

@keyframes loadingSkeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Pagination / Pager Styling */
.pagination {
    display: inline-flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 2.5rem 0;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.pagination li {
    display: inline-block;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.pagination li > a, 
.pagination li > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    text-decoration: none;
}

/* Ensure inner spans do not get styled as outer boxes */
.pagination li a span {
    display: inline !important;
    min-width: auto !important;
    height: auto !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font-weight: inherit !important;
    font-size: inherit !important;
}

.pagination li > a:hover {
    background: var(--primary-light);
    border-color: #0052A5;
    color: #0052A5;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 82, 165, 0.1);
}

.pagination li.active > a, 
.pagination li.active > span {
    background: #0052A5;
    border-color: #0052A5;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 82, 165, 0.25);
    transform: translateY(-1px);
}

.pagination li.disabled > a,
.pagination li.disabled > span {
    background: #f8fafc;
    color: #94a3b8;
    border-color: var(--border-color);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.6;
}

/* Custom Flatpickr overrides for Konawe Hub Green theme */
.flatpickr-calendar {
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Inter', sans-serif !important;
}
.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, 
.flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, 
.flatpickr-day.startRange:hover, 
.flatpickr-day.endRange:hover, 
.flatpickr-day.prevMonthDay.selected, 
.flatpickr-day.nextMonthDay.selected {
    background: #0052A5 !important;
    border-color: #0052A5 !important;
    color: #fff !important;
}
.flatpickr-day.today {
    border-color: #e8f0fe !important;
}
.flatpickr-day.today:hover {
    background: #e8f0fe !important;
    color: #000 !important;
    border-color: #e8f0fe !important;
}
.flatpickr-day:hover {
    background: #eff6ff !important;
    border-color: #dcfce7 !important;
}
.flatpickr-months .flatpickr-month {
    background: #0052A5 !important;
    color: #fff !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
}
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: rgba(255, 255, 255, 0.9) !important;
}
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: rgba(255, 255, 255, 0.9) !important;
}
.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
    color: #fff !important;
    fill: #fff !important;
}
.flatpickr-months .flatpickr-prev-month:hover, 
.flatpickr-months .flatpickr-next-month:hover {
    color: #e8f0fe !important;
}
.flatpickr-months .flatpickr-prev-month:hover svg, 
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #e8f0fe !important;
}
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #0052A5 !important;
}

/* Agenda Filter Responsive Adjustments */
@media (max-width: 768px) {
    .agenda-filter-grid {
        grid-template-columns: 1fr !important;
    }
}
.btn-preset:hover {
    background: #0052A5 !important;
    color: #ffffff !important;
    border-color: #0052A5 !important;
    transform: translateY(-1px);
}

/* Avoid text overlapping with absolute calendar icon in datepicker inputs */
.datepicker,
.flatpickr-input {
    padding-left: 2.75rem !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE & MOBILE TABLE ADAPTATION (SMARTPHONE VIEWS)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Layout structural adaptations */
    .dashboard-layout {
        display: flex;
        flex-direction: column;
    }
    
    .home-grid, .agendas-grid, .settings-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    /* Padding adjustments */
    .widget, .agenda-card {
        padding: 1.25rem !important;
    }

    /* Force tables inside dashboard & views to behave like stacks / cards on mobile */
    .table-responsive {
        border: none !important;
        overflow-x: visible !important;
    }

    table.agenda-table, 
    .widget table {
        display: block;
        width: 100% !important;
    }

    table.agenda-table thead, 
    .widget table thead {
        display: none; /* Sembunyikan header kolom tabel biasa */
    }

    table.agenda-table tr, 
    .widget table tbody tr {
        display: block;
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: var(--shadow-sm);
        position: relative;
    }

    table.agenda-table td, 
    .widget table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0 !important;
        border-bottom: 1px dashed #f1f5f9;
        text-align: right;
        font-size: 0.85rem;
    }

    table.agenda-table td:last-child, 
    .widget table tbody td:last-child {
        border-bottom: none;
        justify-content: flex-end;
    }

    /* Tambahkan label dinamis menggunakan content attr data-label jika disediakan, atau fallback flex justify */
    table.agenda-table td::before, 
    .widget table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        text-align: left;
        margin-right: 1rem;
        font-size: 0.78rem;
        text-transform: uppercase;
    }

    /* Custom tweaks untuk baris agenda */
    .agenda-row td {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .agenda-row td:nth-child(1) {
        justify-content: center;
        background: #f8fafc;
        padding: 0.75rem !important;
        border-radius: var(--radius-sm);
        margin-bottom: 0.5rem;
    }

    /* Inline Edit Form spacing on mobile */
    tr[id^="edit-row-"] td {
        display: block !important;
        padding: 1rem 0 !important;
    }
    
    tr[id^="edit-row-"] form {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    tr[id^="edit-row-"] div {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* Floating map display size */
    .edit-geo-map, #geo-map {
        height: 180px !important;
    }

    /* Adjust button structures inside table stacks */
    td div[style*="justify-content: flex-end"] {
        width: 100%;
        justify-content: flex-start !important;
        margin-top: 0.5rem;
    }
}
