/*
 * TLO Dashboard Theme
 * Modern, clean design with subtle glassmorphism and micro-animations.
 */

/* ─── Widget entrance animation ─── */
.fi-wi-widget {
    animation: fadeSlideUp 0.4s ease-out both;
}

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

/* Stagger widget entrance */
.fi-wi-widget:nth-child(1) { animation-delay: 0ms; }
.fi-wi-widget:nth-child(2) { animation-delay: 60ms; }
.fi-wi-widget:nth-child(3) { animation-delay: 120ms; }
.fi-wi-widget:nth-child(4) { animation-delay: 180ms; }
.fi-wi-widget:nth-child(5) { animation-delay: 240ms; }
.fi-wi-widget:nth-child(6) { animation-delay: 300ms; }
.fi-wi-widget:nth-child(7) { animation-delay: 360ms; }

/* ─── Stat cards: glassmorphism + hover lift ─── */
.fi-wi-stats-overview-stat {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 24px rgba(0, 0, 0, 0.06);
}

/* Sparkline chart area opacity */
.fi-wi-stats-overview-stat-chart {
    opacity: 0.7;
}

/* ─── Dark mode: stat cards ─── */
.dark .fi-wi-stats-overview-stat {
    background: rgba(17, 24, 39, 0.85);
    border-color: rgba(55, 65, 81, 0.5);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark .fi-wi-stats-overview-stat:hover {
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.25),
        0 10px 24px rgba(0, 0, 0, 0.2);
}

/* Subtle color glow on stat cards in dark mode */
.dark .fi-wi-stats-overview-stat[style*="--color-success"] {
    border-color: rgba(16, 185, 129, 0.15);
}

.dark .fi-wi-stats-overview-stat[style*="--color-danger"] {
    border-color: rgba(239, 68, 68, 0.15);
}

/* ─── Chart containers ─── */
.fi-wi-chart {
    border-radius: 1rem;
    border: 1px solid rgba(229, 231, 235, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

.fi-wi-chart:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dark .fi-wi-chart {
    border-color: rgba(55, 65, 81, 0.5);
}

.dark .fi-wi-chart:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ─── Section containers (for custom widgets) ─── */
.fi-section {
    border-radius: 1rem;
    transition: box-shadow 0.3s ease;
}

/* ─── Smooth value transitions ─── */
.fi-wi-stats-overview-stat-value {
    transition: color 0.5s ease;
}

/* ─── Dark mode: softer background ─── */
.dark .fi-body {
    background-color: rgb(3, 7, 18);
}

/* ─── Custom scrollbar (subtle) ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.4);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.6);
}
