:root {
    /* === BASE COLORS === */
    --primary-color: #3a7bd5;
    --secondary-color: #6a11cb;
    --accent-color: #04921c;
    --accent-hover: #FF5252;
    --accent-secondary: #4ECDC4;
    --warning-color: #FFD93D;
    --danger-color: #FF6B6B;
    --success-color: #6BCF7F;
    --dark-color: #2C3E50;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --text-color: #2C3E50;
    --text-light: #7b92a9;
    --text-white: #ffffff;

    /* === GRADIENTS === */
    --primary-gradient: linear-gradient(to right, #8cc166 0%, #0d757a 100%);
    --secondary-gradient: linear-gradient(45deg, var(--primary-color), #007bff);
    --gradient-primary: linear-gradient(135deg, #036865 0%, #0d757a 50%, #4ECDC4 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --section-title: linear-gradient(135deg, #0a3a81, #489df1);
    --bg-color-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --bg-color-button: linear-gradient();
    /* kosong → mungkin bisa dihapus atau diisi */

    /* === SHADOWS === */
    --shadow-primary: 0 10px 40px rgba(102, 126, 234, 0.3);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 12px 48px rgba(0, 0, 0, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.15);

    /* === GLASSMORPHISM === */
    --glass-bg: rgba(179, 255, 0, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --overlay-color: rgba(42, 62, 80, 0.9);

    /* === BORDER & RADIUS === */
    --border-radius: 20px;
    --border-radius-small: 15px;

    /* === TRANSITIONS === */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-speed: 0.3s;
}

.chart-container {
    max-height: 800px;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: white;
    padding: 20px;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: primary-gradient;
    border-bottom: none;
    font-weight: 600;
    color: #333;
}

.section-description {
    color: #6c757d;
    margin-bottom: 20px;
}

.info-box {
    padding: 15px;
    background-color: #e9f7e9;
    border-left: 4px solid #28a745;
    margin-bottom: 20px;
    border-radius: 4px;
}


.progress {
    height: 25px;
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #28a745;
    transition: width .6s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.figure-caption {
    color: #6c757d;
    text-align: center;
    margin-top: 10px;
}

.dropdown-hover-wrapper {
    display: flex;
    gap: 1rem;
    position: relative;
}

.dropdown-hover {
    position: relative;
}

.dropdown-hover-wrapper {
    display: flex;
    gap: 1rem;
    position: relative;
}

.dropdown-hover {
    position: relative;
}

.dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem;
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    z-index: 1000;
    display: none;
    min-width: 200px;

}

.dropdown-hover:hover>.dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}

.dropdown-menu li:hover {
    background: #f0f0f0;
}



.dropdown-hover:hover>.dropdown-menu {
    display: block;
}

.dropdown-menu li {
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}

.dropdown-menu li:hover {
    background: #f0f0f0;
}

/* == Pemetaan Permasalahan Style == */

.loading-state {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.loading-state::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* Shimmer Loading Effect */
.loading-shimmer {
    position: relative;
    overflow: hidden;
}

.loading-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Notification Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.notification-alert {
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 8px;
    animation: slideInRight 0.3s ease-out;
}

.notification-alert i {
    margin-right: 8px;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Filter Card Enhancements */
.filter-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Form Control Enhancements */
.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23667eea' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Button Enhancements */
.btn-custom {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s;
}

.btn-custom:hover::before {
    left: 100%;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* Trend Statistics */
.trend-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 15px;
}

.trend-stat-item {
    text-align: center;
    min-width: 80px;
}

.trend-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
}

.trend-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.trend-change {
    font-size: 0.75rem;
    font-weight: 500;
}

.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

.trend-neutral {
    color: #6c757d;
}

/* Loading Overlay */
#loadingOverlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

#loadingOverlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .notification-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .trend-stats {
        flex-direction: column;
        align-items: center;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Date Range Selector */
.date-range-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-range-selector input {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.date-range-selector .btn {
    padding: 5px 15px;
}

/* Time Period Toggle */
.time-period-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Error States */
.chart-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
}

.chart-error i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Success States */
.success-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    z-index: 10000;
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Enhanced Statistics Cards */
.stat-card {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 0px;
    box-shadow: var(--shadow-primary);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-success {
    background: var(--success-gradient);
    box-shadow: 0 10px 40px rgba(17, 153, 142, 0.3);
}

.stat-card-success:hover {
    box-shadow: 0 20px 60px rgba(17, 153, 142, 0.4);
}

.stat-card-warning {
    background: var(--warning-gradient);
    box-shadow: 0 10px 40px rgba(240, 147, 251, 0.3);
}

.stat-card-warning:hover {
    box-shadow: 0 20px 60px rgba(240, 147, 251, 0.4);
}

.stat-card-info {
    background: var(--info-gradient);
    box-shadow: 0 10px 40px rgba(79, 172, 254, 0.3);
}

.stat-card-info:hover {
    box-shadow: 0 20px 60px rgba(79, 172, 254, 0.4);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    opacity: 0.6;
    transform: scale(1.1);
}

/* Enhanced Chart Containers */
.chart-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-medium);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: translateX(-100%);
    transition: var(--transition);
}

.chart-container:hover::before {
    transform: translateX(0);
}

.chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Enhanced Filter Card */
.filter-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 20px;
}

/* Enhanced Buttons */
.btn-custom {
    border-radius: 30px;
    padding: 12px 24px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.btn-custom:hover::before {
    left: 100%;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-primary.btn-custom {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-success.btn-custom {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.btn-info.btn-custom {
    background: var(--info-gradient);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

/* Enhanced Page Header */
.page-header {
    color: blue;
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="grad" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(255,255,255,0);stop-opacity:0" /></radialGradient></defs><circle cx="20" cy="10" r="10" fill="url(%23grad)"/><circle cx="80" cy="10" r="10" fill="url(%23grad)"/></svg>') repeat;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.page-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Enhanced Form Controls */
.form-select,
.form-control {
    border-radius: var(--border-radius-small);
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-select:focus,
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    background: white;
}

/* Loading Overlay Enhancement */
#loadingOverlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    border-color: #667eea;
    border-right-color: transparent;
}

/* Chart Title Styling */
.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.chart-title i {
    margin-right: 10px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
}

/* Time Period Toggle Styles */
.time-period-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.period-buttons {
    display: flex;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 30px;
    padding: 4px;
    gap: 2px;
}

.period-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    border-radius: 26px;
    font-weight: 500;
    font-size: 0.875rem;
    color: #667eea;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.period-btn:hover {
    background: rgba(102, 126, 234, 0.15);
}

.period-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.date-range-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.date-range-selector input[type="date"] {
    padding: 8px 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 0.875rem;
    transition: var(--transition);
}

.date-range-selector input[type="date"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.trend-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.trend-stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.trend-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.trend-stat-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.trend-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 5px;
}

.trend-up {
    color: #11998e;
}

.trend-down {
    color: #f5576c;
}

.trend-neutral {
    color: #666;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .stat-card {
        margin-bottom: 20px;
    }

    .chart-container {
        padding: 20px;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-group .btn {
        width: 100%;
    }

    .time-period-toggle {
        flex-direction: column;
        align-items: stretch;
    }

    .period-buttons {
        justify-content: center;
    }

    .date-range-selector {
        justify-content: center;
    }

    .trend-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}