* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.dashboard-header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.connected {
    background: #27ae60;
    color: white;
}

.status-badge.COMPLIANT,
.status-badge.DEFAULT,
.status-badge.APPROACHING {
    background: #27ae60;
    color: white;
}

.status-badge.NON_COMPLIANT {
    background: #e74c3c;
    color: white;
}

.dashboard-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.asset-panel,
.journey-panel {
    width: 300px;
    background: white;
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.asset-panel h2,
.journey-panel h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.asset-list,
.journey-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.asset-item,
.journey-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.asset-item:hover,
.journey-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.asset-item.selected,
.journey-item.selected {
    border-color: #3498db;
    background: #ebf5fb;
}

.asset-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.asset-id {
    font-weight: 600;
    font-size: 1rem;
}

.asset-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.asset-status.green {
    background: #27ae60;
}

.asset-status.red {
    background: #e74c3c;
}

.asset-info {
    font-size: 0.875rem;
    color: #666;
}

.journey-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.journey-id {
    font-weight: 600;
    color: #2c3e50;
}

.journey-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.journey-badge.active {
    background: #3498db;
    color: white;
}

.journey-badge.completed {
    background: #95a5a6;
    color: white;
}

.journey-info {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.journey-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.mapboxgl-popup-content {
    padding: 1rem;
    min-width: 200px;
}

.popup-header {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.popup-info {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.timeline-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.timeline-container.hidden {
    display: none;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.timeline-header h3 {
    font-size: 1rem;
    color: #2c3e50;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: #333;
}

.timeline-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-control {
    width: 40px;
    height: 40px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-control:hover {
    background: #2980b9;
}

.timeline-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    background: #ddd;
    cursor: pointer;
    pointer-events: auto;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.timeline-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
}

.timeline-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
}

.loading,
.info-message {
    text-align: center;
    padding: 2rem;
    color: #666;
}

@media (max-width: 1200px) {
    .asset-panel,
    .journey-panel {
        width: 250px;
    }
}

/* Location Details Panel */
.location-details-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.location-details-panel h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.location-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.detail-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 500;
}

.detail-value {
    font-size: 0.75rem;
    color: #2c3e50;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.detail-placeholder {
    text-align: center;
    padding: 1rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .dashboard-content {
        flex-direction: column;
    }
    
    .asset-panel,
    .journey-panel {
        width: 100%;
        height: 200px;
    }
    
    .location-details {
        grid-template-columns: 1fr;
    }
}

