/* ========================================
   GPS MONITORING PLATFORM - PIXEL PERFECT
   Réplica exacta de la imagen proporcionada
   ======================================== */

/* Container principal */
.gps-monitoring-platform {
    display: flex;
    height: 100%;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== SIDEBAR ========== */
.gps-sidebar {
    width: 60px;
    background: linear-gradient(180deg, #1e3a52 0%, #0d1f2d 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 2000;
}

.gps-sidebar::-webkit-scrollbar {
    width: 4px;
}

.gps-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Logo Header */
.gps-logo-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hamburger-menu {
    display: none;
}

.gps-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gps-logo-icon {
    width: 32px;
    height: 32px;
    background: #00bcd4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.gps-logo-text {
    display: none;
}

.gps-accent {
    color: #00bcd4;
}

/* User Info */
.gps-user-info {
    display: none;
}

/* Navigation Menu */
.gps-nav-menu {
    display: flex;
    flex-direction: column;
}

.gps-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    cursor: default;
}

.gps-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.gps-nav-item.active {
    background: #1a8ba4;
    color: #fff;
    border-left: 3px solid #00bcd4;
}

.gps-nav-item i {
    width: 18px;
    font-size: 16px;
    text-align: center;
}

.gps-nav-item span {
    display: none;
}

.gps-nav-item.has-alert .gps-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.gps-nav-item.has-info .gps-info-badge {
    margin-left: auto;
    background: #00bcd4;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== MAP CONTAINER ========== */
.gps-map-container {
    flex: 1;
    position: relative;
    background: #f5f5f5;
}

.gps-map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Custom Vehicle Marker */
.custom-vehicle-marker {
    background: none;
    border: none;
}

.vehicle-marker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.vehicle-location-pin {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #e74c3c;
    border-radius: 50% 50% 50% 0;
    transform: translateX(-50%) rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.vehicle-location-pin i {
    transform: rotate(45deg);
    color: #fff;
    font-size: 20px;
}

.vehicle-label {
    background: #e74c3c;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 4px;
}

.vehicle-pin {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #e74c3c;
}

/* ========== VEHICLE INFO PANEL ========== */
.gps-vehicle-panel {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 280px;
    max-height: calc(100% - 24px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    z-index: 500;
}

.gps-vehicle-panel::-webkit-scrollbar {
    width: 6px;
}

.gps-vehicle-panel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* Panel Header */
.gps-panel-header {
    padding: 16px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #fff;
}

.gps-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.gps-panel-title h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.gps-panel-actions {
    display: flex;
    gap: 8px;
}

.gps-panel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.gps-panel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gps-vehicle-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gps-speed {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.speed-value {
    font-weight: 600;
}

.gps-online-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Street View */
.gps-street-view {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.gps-street-view img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.street-view-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

/* Panel Sections */
.gps-panel-sections {
    padding: 0;
}

.gps-section {
    border-bottom: 1px solid #e0e0e0;
}

.gps-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s ease;
}

.gps-section-header:hover {
    background: #f9f9f9;
}

.gps-section-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.gps-section-header i {
    color: #999;
    font-size: 12px;
}

.gps-section.collapsed .gps-section-content {
    display: none;
}

.gps-section-content {
    padding: 0 16px 16px;
    background: #fafafa;
}

/* Location */
.gps-location {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.gps-location i {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 2px;
}

.gps-location p {
    margin: 0;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.gps-coordinates {
    font-size: 11px;
    color: #999;
    margin: 8px 0 0 0;
}

/* Status Row */
.gps-status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.gps-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5e9;
}

.gps-status-icon.active {
    background: #e8f5e9;
    color: #2ecc71;
}

.gps-status-icon i {
    font-size: 12px;
}

.gps-status-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 12px;
    color: #666;
}

.status-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.gps-status-row > .far {
    color: #ccc;
    font-size: 16px;
}

.gps-direction {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    margin-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.gps-direction i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    color: #2196f3;
    font-size: 14px;
}

.gps-direction > div {
    display: flex;
    flex-direction: column;
}

.direction-label {
    font-size: 12px;
    color: #666;
}

.direction-value {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

/* GPS Device Rows */
.gps-device-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.gps-device-row:last-child {
    border-bottom: none;
}

.device-status,
.device-battery,
.device-signal,
.device-gps {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.device-status.online {
    background: #e8f5e9;
    color: #2ecc71;
}

.device-battery {
    background: #fff3e0;
    color: #ff9800;
}

.device-signal {
    background: #e8f5e9;
    color: #2ecc71;
}

.device-gps {
    background: #e8f5e9;
    color: #2ecc71;
}

.device-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.device-label {
    font-size: 11px;
    color: #999;
}

.device-value {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.signal-status {
    font-size: 11px;
    color: #666;
    margin-left: 4px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .gps-monitoring-platform {
        height: 600px;
    }
    
    .gps-sidebar {
        width: 200px;
    }
    
    .gps-vehicle-panel {
        width: 260px;
    }
}

@media (max-width: 992px) {
    .gps-monitoring-platform {
        flex-direction: column;
        height: auto;
    }
    
    .gps-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .gps-map-container {
        height: 500px;
        position: relative;
    }
    
    .gps-vehicle-panel {
        position: static;
        width: 100%;
        max-height: none;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .gps-monitoring-platform {
        border-radius: 0;
        margin-left: -20px;
        margin-right: -20px;
    }
    
    .gps-map-container {
        height: 400px;
    }
}
