.recorrido-filters-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recorrido-filter-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.recorrido-filter-group {
    flex: 1;
    min-width: 200px;
}

.recorrido-datetime-row {
    gap: 12px;
}

.recorrido-datetime-group {
    display: flex;
    flex-direction: column;
    min-width: 280px;
    flex-shrink: 0;
}

.recorrido-datetime-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.recorrido-date-input {
    flex: 1;
    min-width: 140px;
}

.recorrido-time-input {
    flex: 0 0 100px;
    min-width: 100px;
}

.recorrido-search-group {
    flex: 0 0 auto;
    min-width: auto;
    display: flex;
    align-items: end;
    gap: 10px;
}

.recorrido-filter-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    font-size: 14px;
}

.recorrido-filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.recorrido-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.recorrido-filter-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.recorrido-filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.recorrido-search-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recorrido-search-btn:hover {
    background: #2563eb;
}

.recorrido-action-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recorrido-action-btn:hover {
    background: #059669;
}

.recorrido-action-btn.warning {
    background: #f59e0b;
}

.recorrido-action-btn.warning:hover {
    background: #d97706;
}

.recorrido-stats-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recorrido-stats-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 15px;
}

.recorrido-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.recorrido-stat-card {
    background: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
}

.recorrido-stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recorrido-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-top: 5px;
}

.recorrido-map-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.recorrido-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.recorrido-map-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.recorrido-map-controls {
    display: flex;
    gap: 10px;
}

.recorrido-map-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.recorrido-map-btn:hover {
    background: #4b5563;
}

#map_canvas {
    width: 100%;
    height: 500px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.recorrido-results-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.recorrido-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.recorrido-table-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.recorrido-table-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.records-per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.records-per-page-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.records-per-page-label i {
    color: #3b82f6;
}

.records-per-page-select {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 32px;
}

.records-per-page-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.records-per-page-select:hover {
    border-color: #9ca3af;
}

.recorrido-table-scrollable {
    max-height: 460px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
}

.recorrido-table-scrollable::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.recorrido-table-scrollable::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.recorrido-table-scrollable::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.recorrido-table-scrollable::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

.recorrido-table-scrollable {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #f1f5f9;
}

.recorrido-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.recorrido-table th {
    background: #f9fafb;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 13px;
}

.recorrido-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
}

.recorrido-table tr:hover {
    background: #f9fafb;
}

.recorrido-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6b7280;
}

.recorrido-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

.recorrido-empty-state {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.recorrido-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #d1d5db;
}

.recorrido-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.recorrido-empty-state p {
    font-size: 14px;
    color: #6b7280;
}

.pagination-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
}

.pagination-info {
    font-size: 14px;
    color: #6b7280;
}

.pagination-info strong {
    color: #111827;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 5px;
}

.pagination-number {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    min-width: 40px;
    transition: all 0.2s ease;
}

.pagination-number:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-number.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.page-title {
    margin-bottom: 20px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

@media (max-width: 768px) {
    .recorrido-filter-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .recorrido-filter-group {
        min-width: 100%;
    }
    
    .recorrido-datetime-group {
        min-width: 100%;
    }
    
    .recorrido-datetime-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .recorrido-date-input,
    .recorrido-time-input {
        width: 100%;
        min-width: 100%;
    }
    
    .recorrido-search-group {
        width: 100%;
    }
    
    .recorrido-search-btn,
    .recorrido-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .recorrido-table {
        font-size: 12px;
    }
    
    .recorrido-table th,
    .recorrido-table td {
        padding: 8px 4px;
    }
    
    #map_canvas {
        height: 300px;
    }
    
    .recorrido-stats-grid {
        grid-template-columns: 1fr;
    }
}

[data-theme="dark"] .recorrido-filters-container,
[data-theme="dark"] .recorrido-results-container,
[data-theme="dark"] .recorrido-map-container,
[data-theme="dark"] .recorrido-stats-container {
    background: #20232a;
    border-color: #374151;
}

[data-theme="dark"] .recorrido-filter-label,
[data-theme="dark"] .recorrido-table-title,
[data-theme="dark"] .recorrido-map-title,
[data-theme="dark"] .recorrido-stats-title {
    color: #f9fafb;
}

[data-theme="dark"] .recorrido-filter-select,
[data-theme="dark"] .recorrido-filter-input {
    background: #20232a;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .recorrido-table th {
    background: #20232a;
    color: #f9fafb;
    border-bottom-color: #4b5563;
}

[data-theme="dark"] .recorrido-table td {
    color: #d1d5db;
    border-bottom-color: #20232a;
}

[data-theme="dark"] .recorrido-table tr:hover {
    background: #20232a;
}

[data-theme="dark"] .recorrido-stat-card {
    background: #20232a;
}

[data-theme="dark"] .recorrido-stat-label {
    color: #9ca3af;
}

[data-theme="dark"] .recorrido-stat-value {
    color: #f9fafb;
}

[data-theme="dark"] .recorrido-map-btn {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

[data-theme="dark"] .recorrido-map-btn:hover {
    background: #4b5563;
}

[data-theme="dark"] .records-per-page-label {
    color: #d1d5db;
}

[data-theme="dark"] .records-per-page-select {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f9fafb' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .records-per-page-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .records-per-page-select:hover {
    border-color: #6b7280;
}

[data-theme="dark"] .recorrido-table-scrollable::-webkit-scrollbar-track {
    background: #1f2937;
}

[data-theme="dark"] .recorrido-table-scrollable::-webkit-scrollbar-thumb {
    background: #3b82f6;
}

[data-theme="dark"] .recorrido-table-scrollable::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

[data-theme="dark"] .recorrido-table-scrollable {
    scrollbar-color: #3b82f6 #1f2937;
}

[data-theme="dark"] .pagination-container {
    background: #20232a;
}

[data-theme="dark"] .pagination-info {
    color: #9ca3af;
}

[data-theme="dark"] .pagination-info strong {
    color: #f9fafb;
}

[data-theme="dark"] .pagination-btn {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
    background: #4b5563;
    border-color: #6b7280;
}

[data-theme="dark"] .pagination-number {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

[data-theme="dark"] .pagination-number:hover {
    background: #4b5563;
    border-color: #6b7280;
}

[data-theme="dark"] .pagination-number.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}