/* Dashboard Specific Styles */

/* Gradient Backgrounds for KPI Cards - EXACT abc.md colors */
.bg-gradient-end-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-gradient-end-2 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.bg-gradient-end-3 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.bg-gradient-end-4 {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

.bg-gradient-end-5 {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
}

.bg-gradient-end-6 {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

/* Additional color utilities */
.bg-yellow {
    background-color: #f59e0b !important;
}

.bg-purple {
    background-color: #8b5cf6 !important;
}

.bg-pink {
    background-color: #ec4899 !important;
}

.bg-cyan {
    background-color: #06b6d4 !important;
}

.bg-orange {
    background-color: #f97316 !important;
}

.bg-indigo {
    background-color: #6366f1 !important;
}

/* KPI Card Styles */
.mini-chart-container {
    width: 80px;
    height: 40px;
}

.mini-chart {
    max-width: 100%;
    max-height: 100%;
}

/* Card Shadows and Hover Effects */
.shadow-2 {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

/* Trend Indicators */
.bg-success-focus {
    background-color: rgba(34, 197, 94, 0.1);
}

.bg-danger-focus {
    background-color: rgba(239, 68, 68, 0.1);
}

.bg-warning-focus {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-info-focus {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Group Item Hover Effects */
.group-item {
    transition: all 0.3s ease;
}

.group-item:hover {
    border-color: var(--bs-primary) !important;
}

.group-item:hover .group-hover\:bg-primary-600 {
    background-color: var(--bs-primary) !important;
}

.group-item:hover .group-hover\:text-white {
    color: white !important;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .col-xxl-4,
    .col-xxl-6,
    .col-xxl-8 {
        width: 100%;
    }
    
    .mini-chart-container {
        width: 60px;
        height: 30px;
    }
}

@media (min-width: 768px) and (max-width: 1200px) {
    .col-xxl-4 {
        width: 50%;
    }
    
    .col-xxl-8 {
        width: 100%;
    }
}

/* Chart Containers */
.barChart,
#revenue-chart,
#donutChart,
#paymentStatusChart {
    min-height: 250px;
}

/* Table Responsive */
.scroll-sm {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-sm::-webkit-scrollbar {
    height: 6px;
}

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

.scroll-sm::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.scroll-sm::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Progress Bars */
.progress-sm {
    height: 6px;
}

/* Bordered Tab */
.bordered-tab .nav-link {
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.bordered-tab .nav-link.active {
    border-bottom-color: var(--bs-primary);
    color: var(--bs-primary);
    background-color: transparent;
}

.bordered-tab .nav-link:hover {
    color: var(--bs-primary);
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.5s ease-in-out;
}

/* Smooth Transitions */
.card,
.btn,
.form-select,
.progress-bar {
    transition: all 0.3s ease;
}

/* Focus Indicators for Accessibility */
.form-select:focus,
.btn:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .shadow-2 {
        border: 2px solid currentColor;
    }
    
    .bg-gradient-end-1,
    .bg-gradient-end-2,
    .bg-gradient-end-3,
    .bg-gradient-end-4,
    .bg-gradient-end-5,
    .bg-gradient-end-6 {
        background: var(--bs-primary);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .shadow-2 {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .bg-gradient-end-1,
    .bg-gradient-end-2,
    .bg-gradient-end-3,
    .bg-gradient-end-4,
    .bg-gradient-end-5,
    .bg-gradient-end-6 {
        background: white !important;
        color: black !important;
    }
    
    .mini-chart-container {
        display: none;
    }
}
