:root {
    /* Palet Granodiorit Lebak - sama dengan profil */
    --apb-primary: #6B7280;   /* Granodiorit Grey */
    --apb-secondary: #3B5E4A; /* Moss Green Geosite */
    --apb-accent: #D97706;    /* Andesine Bronze */
    --apb-bg: #F2F4F5;       /* Quartz White */
    --text-dark: #1F2937;    /* Biotite Black */
    --text-muted: #6B7280;   /* Granodiorit Grey */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: var(--apb-bg);
    color: var(--text-dark);
}

.apb-nav {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 10;
    backdrop-filter: blur(8px);
}

.apb-nav .container {
    max-width: 1200px;
    margin: auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--apb-primary), #60a5fa);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    gap: 18px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Hero menggunakan styling dari profil.css */
.hero-apb {
    /* Background gambar hero dari assets/images */
    background-image: url('../images/gambar-hero.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-apb::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Overlay gelap untuk kontras teks - menggunakan Biotite Black */
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.75) 0%, rgba(107, 114, 128, 0.65) 100%);
    z-index: 1;
}

.hero-apb .container {
    max-width: var(--saphira-content-width, calc(100vw - 400px));
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.section-card {
    background: var(--apb-bg);
    border-radius: 0;
    padding: 32px;
    border: 1px solid rgba(107, 114, 128, 0.15);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.08);
    margin-bottom: 28px;
}

.section-card h2 {
    margin-top: 0;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--apb-secondary);
}

.section-card h2 i {
    color: var(--apb-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stats-slider-wrapper {
    position: relative;
    margin-top: 24px;
}

.stats-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0;
}

.stats-slider::-webkit-scrollbar {
    display: none;
}

.stats-slider .stat-card {
    min-width: 280px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.stats-slider .stat-card[data-animate] {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.stats-slider .stat-card[data-animate]:nth-child(1) {
    animation-delay: 0.1s;
}

.stats-slider .stat-card[data-animate]:nth-child(2) {
    animation-delay: 0.2s;
}

.stats-slider .stat-card[data-animate]:nth-child(3) {
    animation-delay: 0.3s;
}

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

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 2px solid;
    transition: transform 0.3s ease;
    font-size: 1.5rem;
}

.stats-slider .stat-card:hover .stat-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
    }
}

.progress-bar-mini {
    width: 100%;
    height: 6px;
    background: rgba(107, 114, 128, 0.15);
    border-radius: 0;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    border-radius: 0;
    transition: width 0.8s ease;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--apb-secondary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.2);
}

.slider-btn:hover {
    background: #2d4a3a;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-btn-prev {
    left: 10px;
}

.slider-btn-next {
    right: 10px;
}

@media (max-width: 768px) {
    .slider-btn {
        display: none;
    }
    
    .stats-slider .stat-card {
        min-width: 250px;
    }
}

.stat-card {
    background: #ffffff;
    border-radius: 0;
    padding: 24px;
    border: 1px solid rgba(107, 114, 128, 0.15);
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.stats-slider .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.15);
    border-color: var(--apb-secondary);
}

.stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 8px 0;
    line-height: 1.2;
}

.filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.filter-form input {
    padding: 12px 16px;
    border-radius: 0;
    border: 1px solid rgba(107, 114, 128, 0.2);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.filter-form input:focus {
    outline: none;
    border-color: var(--apb-secondary);
    box-shadow: 0 0 0 3px rgba(59, 94, 74, 0.1);
}

.btn-primary {
    border: none;
    padding: 12px 24px;
    border-radius: 0;
    background: var(--apb-secondary);
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background: #2d4a3a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 94, 74, 0.3);
}

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

.apb-table {
    width: 100%;
    border-collapse: collapse;
}

.apb-table th,
.apb-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    text-align: left;
}

.apb-table th {
    background: var(--apb-bg);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dark);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 0;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid;
}

.badge-belanja { 
    background: rgba(220, 38, 38, 0.1); 
    color: #dc2626; 
    border-color: rgba(220, 38, 38, 0.3);
}
.badge-pendapatan { 
    background: rgba(59, 94, 74, 0.1); 
    color: #3B5E4A; 
    border-color: rgba(59, 94, 74, 0.3);
}
.badge-pembiayaan { 
    background: rgba(217, 119, 6, 0.1); 
    color: #D97706; 
    border-color: rgba(217, 119, 6, 0.3);
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 40px;
    background: #ffffff;
    border: 1px solid rgba(107, 114, 128, 0.15);
    border-radius: 0;
}

.stat-card .meta {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .hero-apb .container,
    .profil-content {
        max-width: 100%;
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    /* Hero layout jadi column di mobile */
    .hero-apb .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .hero-content {
        width: 100%;
    }

    .section-card {
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form input,
    .btn-primary {
        width: 100%;
    }
    
    .apb-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .apb-table th,
    .apb-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

