/* Custom Dashboard Styles */

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Card hover effects */
.bg-white.rounded-xl {
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.bg-white.rounded-xl:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Table row hover */
tbody tr:hover {
    background-color: #f8fafc;
}

/* Status indicator pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Progress bar animation */
@keyframes progress {
    0% {
        width: 0%;
    }
}

.progress-bar {
    animation: progress 1s ease-out;
}

/* Sidebar active state */
nav a.bg-gray-700 {
    border-left: 3px solid #3b82f6;
}

/* Code blocks */
code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 50;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

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

/* Chart container */
canvas {
    max-width: 100%;
}

/* Responsive table */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

/* Mobile menu */
@media (max-width: 768px) {
    aside {
        position: fixed;
        z-index: 40;
        transform: translateX(-100%);
    }

    aside.open {
        transform: translateX(0);
    }
}

/* Print styles */
@media print {
    aside {
        display: none;
    }

    main {
        margin-left: 0;
    }

    .no-print {
        display: none;
    }
}

/* Health status colors */
.status-healthy {
    color: #16a34a;
    background-color: #dcfce7;
}

.status-warning {
    color: #d97706;
    background-color: #fef3c7;
}

.status-critical {
    color: #dc2626;
    background-color: #fee2e2;
}

/* Gauge chart styling */
.gauge-container {
    position: relative;
    width: 150px;
    height: 75px;
    overflow: hidden;
}

.gauge-background {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(#e5e7eb 0deg, #e5e7eb 180deg, transparent 180deg);
}

.gauge-fill {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(#3b82f6 0deg, #3b82f6 var(--fill-angle), transparent var(--fill-angle));
}

/* Metric value styling */
.metric-value {
    font-variant-numeric: tabular-nums;
}

/* Blinking indicator for critical states */
.blink-critical {
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}
