/* Dashboard Styles */
.dashboard-container {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Force Bootstrap Grid System */
.row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.row > * {
    flex-shrink: 0 !important;
    padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
    padding-left: calc(var(--bs-gutter-x) * 0.5) !important;
}

/* Responsive Grid Classes */
@media (min-width: 1200px) {
    .col-xl-3 {
        flex: 0 0 auto !important;
        width: 25% !important;
    }
}

@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 auto !important;
        width: 25% !important;
    }
    .col-lg-4 {
        flex: 0 0 auto !important;
        width: 33.333333% !important;
    }
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 auto !important;
        width: 50% !important;
    }
}

.col-12 {
    flex: 0 0 auto !important;
    width: 100% !important;
}

/* Card Enhancements */
.hover-shadow {
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

/* Gradient Header */
.gradient-header {
    background: linear-gradient(135deg, #5C9840 0%, #285414 100%);
    border-radius: 0.375rem;
    position: relative;
    overflow: hidden;
}

.gradient-header::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%);
    pointer-events: none;
}

/* Circular Progress Charts */
.circular-progress {
    position: relative;
    display: inline-block;
}

.circular-chart {
    transform: rotate(-90deg);
    border-radius: 50%;
}

.circle-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 4;
}

.circle-progress {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s ease-in-out;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.1));
}

.percentage {
    font-weight: bold;
    font-size: 10px;
    transform: rotate(90deg);
    text-anchor: middle;
}

/* Enhanced Badges */
.badge-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    border: none;
}

.badge-info {
    background: linear-gradient(135deg, #17a2b8, #6f42c1) !important;
    color: white !important;
    border: none;
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
    color: #212529 !important;
    border: none;
}

.badge-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c) !important;
    color: white !important;
    border: none;
}

.badge-secondary {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    color: white !important;
    border: none;
}

/* Custom Progress Bars */
.progress {
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.8s ease-in-out;
}

.bg-success {
    background: linear-gradient(90deg, #28a745, #20c997) !important;
}

.bg-info {
    background: linear-gradient(90deg, #17a2b8, #6f42c1) !important;
}

.bg-warning {
    background: linear-gradient(90deg, #ffc107, #fd7e14) !important;
}

.bg-danger {
    background: linear-gradient(90deg, #dc3545, #e83e8c) !important;
}

.bg-secondary {
    background: linear-gradient(90deg, #6c757d, #495057) !important;
}

/* Stat Cards */
.stat-card {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0.7;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.15) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out;
    animation-fill-mode: both;
}

/* Stagger animations for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
    .circular-progress {
        display: none;
    }
    
    .gradient-header .row {
        text-align: center;
    }
    
    .gradient-header img {
        margin-top: 1rem;
        max-height: 80px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dashboard-container {
        background-color: #1a1d23;
    }
    
    .card {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .text-dark {
        color: #e2e8f0 !important;
    }
    
    .text-muted {
        color: #a0aec0 !important;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #5C9840, #285414);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #285414, #5C9840);
}
