/* Custom Styles for Traccar Web */

:root {
    --primary-color: #0d6efd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Login Page Styles */
.min-vh-100 {
    min-height: 100vh;
}

.card {
    border-radius: 10px;
}

.card-body {
    border-radius: 10px;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

/* Map Styles */
#map, #routeMap {
    width: 100%;
    border-radius: 0 0 10px 10px;
}

.leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

/* Device List */
.device-item {
    transition: background-color 0.2s;
    cursor: pointer;
}

.device-item:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* DataTables */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_filter input {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_length select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
}

table.dataTable thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 5px;
}

.input-group-text {
    border-radius: 5px 0 0 5px;
}

/* Stats Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning,
.card.bg-info,
.card.bg-danger {
    border: none;
}

/* Alerts */
.alert {
    border-radius: 5px;
    border: none;
}

/* Modal */
.modal-content {
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Table Responsive */
.table-responsive {
    border-radius: 5px;
}

/* Custom Marker */
.custom-marker {
    background: transparent;
    border: none;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    #map, #routeMap {
        height: 300px !important;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_info,
    .dataTables_paginate {
        display: none !important;
    }
}
