body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.map-container {
    height: 500px;
    width: 100%;
}

.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    border-bottom: none;
}

.table-responsive {
    max-height: 400px;
    overflow-y: auto;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.statistics-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.statistics-label {
    font-weight: 600;
}

.statistics-value {
    color: #0d6efd;
}

.device-info-item {
    display: flex;
    margin-bottom: 0.5rem;
}

.device-info-label {
    font-weight: 600;
    min-width: 120px;
}

.device-info-value {
    color: #495057;
}

.maps-link {
    color: #0d6efd;
    text-decoration: none;
}

.maps-link:hover {
    text-decoration: underline;
}

.alert {
    border: none;
    border-radius: 0.5rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Custom scrollbar for table */
.table-responsive::-webkit-scrollbar {
    width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-container {
        height: 300px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        max-height: 300px;
    }
}

/* Animation for data loading */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Custom marker popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.leaflet-popup-content {
    margin: 12px 16px;
    line-height: 1.4;
}

.popup-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #0d6efd;
}

.popup-info {
    margin-bottom: 4px;
}

.popup-info strong {
    display: inline-block;
    min-width: 80px;
}

/* Custom marker icon styling */
.custom-div-icon {
    background: transparent;
    border: none;
}

.custom-div-icon i {
    display: block;
    text-align: center;
    line-height: 24px;
}