/* Custom Dashboard Styles for DOMOBOI */

.dashboard-widget {
    transition: all 0.3s ease;
}

.dashboard-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.metric-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.metric-card .metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.device-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.device-status-indicator.active {
    background-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.device-status-indicator.inactive {
    background-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.recent-activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.recent-activity-item:hover {
    background-color: #f9fafb;
}

.recent-activity-item:last-child {
    border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .metric-card .metric-value {
        font-size: 1.5rem;
    }
}

/* Leaflet map: prevent Tailwind preflight (max-width:100%, height:auto on img) from
   breaking tile rendering. These overrides must be more specific than Tailwind's reset. */
.leaflet-container img.leaflet-tile,
.leaflet-container img {
    max-width: none !important;
    max-height: none !important;
    height: auto;
    width: auto;
    border: none;
    padding: 0;
    box-shadow: none;
}

.leaflet-container {
    position: relative;
}

/* Animation for loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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