/* Custom styles for Asset Dashboard */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

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

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Chart container */
#chartContainer canvas {
    max-height: 500px;
}

/* Checkbox focus styles */
input[type="checkbox"]:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Button hover effect */
button {
    transition: all 0.15s ease-in-out;
}

button:active {
    transform: scale(0.98);
}

/* Alert animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#alertContainer > div {
    animation: slideDown 0.3s ease-out;
}

/* Stats card hover */
#statsGrid > div {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#statsGrid > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.5rem;
    }

    #statsGrid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* Sticky sidebar */
@media (min-width: 1024px) {
    .sticky {
        position: sticky;
        top: 2rem;
    }
}

/* Chart.js time adapter fix */
canvas {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}
