/* css/driver.css */
.driver-grid {
    display: grid;
    grid-template-columns: 2.4fr 1.4fr;
    gap: 36px;
    padding: 32px 48px;
    height: calc(100vh - 90px);
    overflow-y: auto;
}

.map-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

#main-map {
    height: 100%;
    width: 100%;
    background: var(--bg-dark);
    z-index: 1;
}

#routing-stats-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--surface);
    backdrop-filter: blur(12px);
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid var(--secondary);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    color: var(--secondary);
}

.dispatch-status-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--surface);
    backdrop-filter: blur(12px);
    padding: 12px 20px;
    border-radius: 30px;
    border: 2px solid var(--secondary);
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.dispatch-ready {
    color: #10b981;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.dispatch-ready:hover {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

.dispatch-unavailable {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.dispatch-unavailable:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.job-board {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(52, 152, 219, 0.1), inset 0 1px 1px rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.job-board:hover {
    border-color: rgba(52, 152, 219, 0.4);
    box-shadow: 0 12px 48px rgba(52, 152, 219, 0.15), inset 0 1px 1px rgba(255,255,255,0.1);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.05) 0%, transparent 100%);
    padding: 12px;
    margin: -20px -20px 20px -20px;
    padding: 12px 20px;
    border-radius: 12px 12px 0 0;
}

.panel-header h3 {
    margin: 0;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.95rem;
    font-weight: 700;
}

.scroll-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.scroll-list::-webkit-scrollbar {
    width: 6px;
}

.scroll-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
}

.scroll-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.itinerary-card {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(30, 41, 59, 0.4) 100%);
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.itinerary-card:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(30, 41, 59, 0.5) 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.4);
}

.itinerary-card h4 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 0.85rem;
}

.itinerary-card p {
    margin: 0 0 12px 0;
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
}

.driver-capacity-monitor {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--glass);
}

.cap-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, rgba(30, 41, 59, 0.3) 100%);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

#capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transition: width 0.5s ease;
}

.custom-marker-donor {
    animation: pulse-marker 2s infinite;
}

@keyframes pulse-marker {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.marker-pulse {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    position: relative;
}

.marker-label {
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

/* Driver Movement Indicator */
.driver-movement-active {
    animation: movementPulse 1.5s ease-in-out infinite;
}

@keyframes movementPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 20px rgba(46, 204, 113, 0.7);
        transform: scale(1.02);
    }
}

/* Driver Status Label */
.driver-status-label {
    position: absolute;
    top: 70px;
    left: 20px;
    z-index: 999;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.95), rgba(52, 152, 219, 0.95));
    backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid rgba(46, 204, 113, 0.5);
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    animation: statusFade 0.5s ease-in-out;
}

.driver-status-label.moving {
    animation: movementPulse 1.5s ease-in-out infinite;
}

.driver-status-label .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    animation: statusDotPulse 1.2s ease-in-out infinite;
}

@keyframes statusDotPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(46, 204, 113, 1);
    }
}

@keyframes statusFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .driver-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
}