/* Custom Styles for Fleet Tracking System */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.075);
    font-weight: 600;
}

/* Map Styles */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content {
    margin: 10px;
    font-size: 13px;
}

/* Tables */
.table {
    font-size: 0.95rem;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Progress Bars */
.progress {
    border-radius: 4px;
}

/* Alert Styles */
.alert {
    border-radius: 4px;
    border: none;
}

/* List Groups */
.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.075);
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* 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 Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    #liveMap, #historyMap, #dashboardMap {
        height: 400px !important;
    }
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
}

/* Chart Containers */
canvas {
    max-width: 100%;
}

/* Status Indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--secondary-color);
}

.status-warning {
    color: var(--warning-color);
}

/* Custom Map Markers */
.custom-div-icon {
    background: transparent;
    border: none;
}

/* Footer */
footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Print Styles */
@media print {
    .navbar, .card-header button, .btn, footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}