/* --- Custom Animations & Design Tokens --- */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Base custom resets & animations */
body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Stat Cards with Glassmorphism & Hover Glow */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgb(255 255 255);
    border-width: 1px;
    border-color: rgb(226 232 240);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

.dark .stat-card {
    background-color: rgba(30, 41, 59, 0.4);
    border-color: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

.dark .stat-card:hover {
    box-shadow: 0 10px 25px -10px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Subtle glow effect behind icons on hover */
.stat-card .group:hover div {
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}

/* Chart Container styling */
.chart-container {
    border-radius: 1rem;
    padding: 1.5rem;
    background-color: rgb(255 255 255);
    border-width: 1px;
    border-color: rgb(226 232 240);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .chart-container {
    background-color: rgba(30, 41, 59, 0.3);
    border-color: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.chart-container:hover {
    border-color: rgba(37, 99, 235, 0.2);
}

.dark .chart-container:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

/* Table Container Styling */
.table-container {
    border-radius: 1rem;
    background-color: rgb(255 255 255);
    border-width: 1px;
    border-color: rgb(226 232 240);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
    overflow: hidden;
}

.dark .table-container {
    background-color: rgba(30, 41, 59, 0.25);
    border-color: rgba(51, 65, 85, 0.5);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgb(203 213 225);
    border-radius: 9999px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgb(71 85 105);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgb(148 163 184);
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgb(100 116 139);
}

/* Additional utility classes */
.text-2xs {
    font-size: 0.65rem;
}

/* Subtle Table Row Hover effects */
tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.6);
}

.dark tbody tr:hover {
    background-color: rgba(51, 65, 85, 0.2);
}

/* Loading animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.animate-spin {
    animation: spin 0.8s linear infinite;
}
