/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Nav Items */
.nav-item {
    color: #6b7280;
}

.nav-item:hover {
    background: #f3f4f6;
    color: #374151;
}

.nav-item.active {
    background: #eff6ff;
    color: #2563eb;
}

.nav-item.active i {
    color: #2563eb;
}

/* Card Hover Effects */
.stat-card {
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

/* Table Row Hover */
.table-row {
    transition: background-color 0.15s ease;
}

.table-row:hover {
    background-color: #f9fafb;
}

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

.fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.fade-in-up:nth-child(3) { animation-delay: 0.15s; }
.fade-in-up:nth-child(4) { animation-delay: 0.2s; }
.fade-in-up:nth-child(5) { animation-delay: 0.25s; }
.fade-in-up:nth-child(6) { animation-delay: 0.3s; }

/* Pulse Animation */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Slide In */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Toast Animation */
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.toast-enter {
    animation: toastIn 0.3s ease forwards;
}

.toast-exit {
    animation: toastOut 0.3s ease forwards;
}

/* Chart Container */
.chart-container {
    position: relative;
    width: 100%;
    max-height: 300px;
}

/* Badge Pulse */
@keyframes badge-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge-pulse {
    animation: badge-pulse 2s infinite;
}

/* Modal Animation */
@keyframes modalBgIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalContentIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-bg {
    animation: modalBgIn 0.2s ease forwards;
}

.modal-content {
    animation: modalContentIn 0.3s ease forwards;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from { width: 0%; }
}

.progress-fill {
    animation: progressFill 1s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .stat-card {
        padding: 1rem !important;
    }
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Print styles */
@media print {
    #sidebar, header, #toastContainer, #modalContainer {
        display: none !important;
    }
    #mainContent {
        overflow: visible !important;
    }
}