:root {
    --apb-primary: #19c37d;
    --apb-secondary: #0f8ee0;
    --apb-accent: #f97316;
    --apb-bg: #020b16;
    --apb-card-bg: rgba(0, 0, 0, 0.3);
    --text-dark: #e6f4ff;
    --text-muted: rgba(230, 244, 255, 0.7);
    --border-light: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
}

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

body.has-global-sidebars {
    background: var(--apb-bg) !important;
}

.dp-main {
    background: var(--apb-bg) !important;
}

.dp-body {
    background: var(--apb-bg) !important;
}

.dp-container {
    background: transparent !important;
}

.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-apb {
    background: linear-gradient(135deg, rgba(15, 142, 224, 0.15), rgba(25, 195, 125, 0.15)), #020b16;
    color: white;
    padding: 100px 0 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-apb .container {
    max-width: 1200px;
    margin: auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.hero-apb h1 {
    margin: 0 0 16px;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    color: var(--text-dark);
}

.hero-apb p {
    color: var(--text-muted);
}

.apb-content {
    max-width: 1200px;
    margin: -40px auto 60px;
    padding: 0 24px;
    width: 100%;
}

/* Override dp-container untuk apb-content */
body.has-global-sidebars .apb-content .dp-container {
    width: min(1100px, 88vw) !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    display: block;
}

body.has-global-sidebars .apb-content .dp-container.section-card {
    width: min(1100px, 88vw) !important;
    max-width: 1100px !important;
    margin: 0 auto 24px auto !important;
    padding: 30px !important;
    box-sizing: border-box !important;
}

/* Desktop tanpa sidebar adjustment */
.apb-content .dp-container {
    width: min(1100px, 88vw) !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    display: block;
}

.apb-content .dp-container.section-card {
    width: min(1100px, 88vw) !important;
    max-width: 1100px !important;
    margin: 0 auto 24px auto !important;
    padding: 30px !important;
    box-sizing: border-box !important;
}

.section-card {
    background: var(--apb-card-bg);
    border: 1px solid var(--border-light);
    border-radius: 26px;
    padding: 30px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-card h2 {
    margin-top: 0;
    color: var(--text-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
    justify-items: stretch;
    align-items: stretch;
}

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

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

.stat-card {
    background: var(--apb-card-bg);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 18px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--apb-primary);
    box-shadow: 0 8px 24px rgba(25, 195, 125, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-card .meta {
    color: var(--text-muted);
}

.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--apb-card-bg);
}

.tab.active {
    background: linear-gradient(135deg, rgba(25, 195, 125, 0.25), rgba(15, 142, 224, 0.25));
    border: 1px solid rgba(25, 195, 125, 0.4);
    color: #19c37d;
    box-shadow: 0 12px 30px rgba(25, 195, 125, 0.2);
}

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

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

.apb-table th,
.apb-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    text-align: left;
    color: var(--text-dark);
}

.apb-table th {
    background: rgba(25, 195, 125, 0.1);
    border: 1px solid rgba(25, 195, 125, 0.2);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #19c37d;
}

.apb-table tbody tr:hover {
    background: rgba(25, 195, 125, 0.05);
}

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

.badge-belanja { 
    background: rgba(239, 68, 68, 0.2); 
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171; 
}
.badge-pendapatan { 
    background: rgba(25, 195, 125, 0.2); 
    border: 1px solid rgba(25, 195, 125, 0.3);
    color: #19c37d; 
}
.badge-pembiayaan { 
    background: rgba(15, 142, 224, 0.2); 
    border: 1px solid rgba(15, 142, 224, 0.3);
    color: #0f8ee0; 
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 20px 0;
}

/* Form input styling */
input[type="number"] {
    background: var(--apb-card-bg) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-dark) !important;
}

input[type="number"]:focus {
    border-color: var(--apb-primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 195, 125, 0.1);
}

/* Override any gray backgrounds */
.apb-content {
    background: transparent !important;
}

/* Ensure proper alignment */
.apb-content .section-card {
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .section-card {
        padding: 24px;
    }

    .apb-content {
        padding: 0 16px;
    }
}

