/* ============================================================
   ESTILOS DE MAPA Y DASHBOARD DE MONITOREO
   ============================================================ */

#map-container {
    width: 100%;
    height: 600px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    border: 1px solid #cbd5e1;
}

/* overlay panel sobre el mapa */
.map-overlay-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* marcadores Leaflet */
.leaflet-vehicle-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.marker-pin {
    width: 38px;
    height: 38px;
    border-radius: 50% 50% 50% 0;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -19px 0 0 -19px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-pin::after {
    content: '';
    width: 24px;
    height: 24px;
    margin: 7px 0 0 7px;
    background: #fff;
    position: absolute;
    border-radius: 50%;
}

.marker-pin.moving { background: #10b981; }
.marker-pin.stopped { background: #f59e0b; }
.marker-pin.offline { background: #64748b; }
.marker-pin.engine-off { background: #ef4444; }

.marker-icon {
    position: absolute;
    z-index: 10;
    color: #1e293b;
    font-size: 14px;
    transform: rotate(45deg);
}

/* Popup de vehículo */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    width: 280px !important;
}

.popup-vehicle-card {
    padding: 1rem;
}

.popup-vehicle-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.popup-vehicle-plate {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.popup-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.popup-info-item {
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 6px;
}

.popup-info-item label {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
}

.popup-info-item span {
    font-weight: 600;
}
