/* Additional CSS fixes for Enhanced Sanitasi Stats */

/* Enhanced Colorful Stats Cards */
.stats-card-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 20%, rgba(255, 255, 255, 0.95) 100%) !important;
    border: 3px solid #0ea5e9 !important;
    border-left: 8px solid #0ea5e9 !important;
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.2), 0 8px 16px rgba(14, 165, 233, 0.15) !important;
}

.stats-card-info:hover {
    background: linear-gradient(135deg, #b3e5fc 0%, #81d4fa 30%, rgba(255, 255, 255, 0.98) 100%) !important;
    border-color: #0284c7 !important;
    border-left-color: #0284c7 !important;
    box-shadow: 0 32px 64px rgba(14, 165, 233, 0.25), 0 16px 32px rgba(14, 165, 233, 0.2) !important;
}

.stats-card-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 20%, rgba(255, 255, 255, 0.95) 100%) !important;
    border: 3px solid #f59e0b !important;
    border-left: 8px solid #f59e0b !important;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2), 0 8px 16px rgba(245, 158, 11, 0.15) !important;
}

.stats-card-warning:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 30%, rgba(255, 255, 255, 0.98) 100%) !important;
    border-color: #d97706 !important;
    border-left-color: #d97706 !important;
    box-shadow: 0 32px 64px rgba(245, 158, 11, 0.25), 0 16px 32px rgba(245, 158, 11, 0.2) !important;
}

.stats-card-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 20%, rgba(255, 255, 255, 0.95) 100%) !important;
    border: 3px solid #ef4444 !important;
    border-left: 8px solid #ef4444 !important;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.2), 0 8px 16px rgba(239, 68, 68, 0.15) !important;
}

.stats-card-danger:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 30%, rgba(255, 255, 255, 0.98) 100%) !important;
    border-color: #dc2626 !important;
    border-left-color: #dc2626 !important;
    box-shadow: 0 32px 64px rgba(239, 68, 68, 0.25), 0 16px 32px rgba(239, 68, 68, 0.2) !important;
}

.stats-card-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #bbf7d0 20%, rgba(255, 255, 255, 0.95) 100%) !important;
    border: 3px solid #10b981 !important;
    border-left: 8px solid #10b981 !important;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2), 0 8px 16px rgba(16, 185, 129, 0.15) !important;
}

.stats-card-success:hover {
    background: linear-gradient(135deg, #bbf7d0 0%, #86efac 30%, rgba(255, 255, 255, 0.98) 100%) !important;
    border-color: #059669 !important;
    border-left-color: #059669 !important;
    box-shadow: 0 32px 64px rgba(16, 185, 129, 0.25), 0 16px 32px rgba(16, 185, 129, 0.2) !important;
}

/* Fix untuk title di section header */
.stats-section-clear .stats-title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.95) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.stats-subtitle {
    font-size: 1.2rem !important;
    color: rgba(255, 255, 255, 0.95) !important;
    max-width: 700px;
    line-height: 1.7;
    font-weight: 500 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.trend-stable {
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.2);
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(107, 114, 128, 0.05));
}

/* Enhanced Card Body */
.stats-card-body {
    margin-bottom: 2rem;
}

.stats-number-section {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 1.2rem;
}

.stats-number {
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* Colored numbers based on card type */
.stats-card-info .stats-number {
    color: #0284c7 !important;
    text-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.stats-card-warning .stats-number {
    color: #d97706 !important;
    text-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.stats-card-danger .stats-number {
    color: #dc2626 !important;
    text-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.stats-card-success .stats-number {
    color: #059669 !important;
    text-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.stats-card:hover .stats-number {
    transform: scale(1.05);
}

.stats-unit {
    font-size: 1.1rem !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-card .stats-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.stats-description {
    font-size: 0.95rem !important;
    color: #4b5563 !important;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

/* Enhanced Card Footer */
.stats-card-footer {
    border-top: 2px solid rgba(0,0,0,0.06) !important;
    padding-top: 1.5rem !important;
    margin-top: auto;
}

.stats-progress-bar {
    background: linear-gradient(135deg, rgba(0,0,0,0.08), rgba(0,0,0,0.04)) !important;
    border-radius: 12px !important;
    height: 8px !important;
    margin-bottom: 1.2rem !important;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100% !important;
    border-radius: 12px !important;
    transition: width 2.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

/* Colored progress bars */
.stats-card-info .progress-fill {
    background: linear-gradient(135deg, #0ea5e9, #0284c7, #0369a1) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.stats-card-warning .progress-fill {
    background: linear-gradient(135deg, #f59e0b, #d97706, #b45309) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.stats-card-danger .progress-fill {
    background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.stats-card-success .progress-fill {
    background: linear-gradient(135deg, #10b981, #059669, #047857) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Colored badges for each card type */
.stats-card-info .stats-badge {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(14, 165, 233, 0.1)) !important;
    color: #0284c7 !important;
    border: 2px solid rgba(14, 165, 233, 0.3) !important;
}

.stats-card-warning .stats-badge {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.1)) !important;
    color: #d97706 !important;
    border: 2px solid rgba(245, 158, 11, 0.3) !important;
}

.stats-card-danger .stats-badge {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.1)) !important;
    color: #dc2626 !important;
    border: 2px solid rgba(239, 68, 68, 0.3) !important;
}

.stats-card-success .stats-badge {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.1)) !important;
    color: #059669 !important;
    border: 2px solid rgba(16, 185, 129, 0.3) !important;
}

.stats-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-badge {
    background: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(0,0,0,0.02)) !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    border: 1px solid rgba(0,0,0,0.08);
}

.stats-completed {
    font-size: 0.85rem !important;
    color: #6b7280 !important;
    font-weight: 500;
}

/* Enhanced Performance Summary */
.stats-summary {
    margin-top: 4rem;
}

.summary-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 24px !important;
    padding: 3rem !important;
    box-shadow:
        0 24px 48px rgba(0,0,0,0.1),
        0 12px 24px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

.summary-title {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.summary-title i {
    color: #10b981 !important;
    margin-right: 12px;
}

.summary-stat {
    text-align: center;
    padding: 1rem;
}

.summary-number {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-label {
    color: #6b7280 !important;
    font-weight: 600 !important;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-chart {
    position: relative;
}

.chart-circle {
    position: relative;
    display: inline-block;
}

.chart-circle svg {
    transform: rotate(-90deg);
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.1));
}

.chart-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-number {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: #111827 !important;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-text {
    font-size: 0.9rem !important;
    color: #6b7280 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced card animations and glow effects */
.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    border-radius: 26px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-card-info::after {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.stats-card-warning::after {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stats-card-danger::after {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stats-card-success::after {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stats-card:hover::after {
    opacity: 0.3;
}

/* Pulsing animation for numbers */
.stats-card:hover .stats-number {
    animation: numberPulse 2s ease-in-out infinite;
}

@keyframes numberPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Card title colors */
.stats-card-info .stats-title {
    color: #0284c7 !important;
}

.stats-card-warning .stats-title {
    color: #d97706 !important;
}

.stats-card-danger .stats-title {
    color: #dc2626 !important;
}

.stats-card-success .stats-title {
    color: #059669 !important;
}

/* Progress bar shine effect */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced badge styling */
.stats-badge {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15)) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    padding: 14px 28px !important;
    border-radius: 50px !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .stats-section-clear .stats-title {
        font-size: 2.2rem !important;
    }

    .stats-card {
        padding: 2rem !important;
    }

    .stats-number {
        font-size: 2.2rem !important;
    }

    .summary-card {
        padding: 2rem !important;
    }

    .summary-number {
        font-size: 1.8rem !important;
    }

    .chart-circle svg {
        width: 100px !important;
        height: 100px !important;
    }

    .chart-number {
        font-size: 1.5rem !important;
    }
}
