/* 运输调度指挥看板样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 顶部标题栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
    position: relative;
    z-index: 100;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.company-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header-center h1 {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    color: #ffffff;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    text-align: center;
    font-style: italic;
}

.header-right {
    text-align: right;
}

.datetime {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.dispatch-status {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

.status-online {
    color: #10b981;
    font-weight: bold;
    text-shadow: 0 0 10px #10b981;
}

/* 主要内容区域 */
.main-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 120px);
}

/* 行布局 */
.row-1, .row-2, .row-3, .row-4 {
    display: flex;
    gap: 20px;
    height: auto;
    min-height: 300px;
}

.row-1 { min-height: 350px; }
.row-2 { min-height: 400px; }
.row-3 { min-height: 300px; }
.row-4 { min-height: 280px; }

/* 面板通用样式 */
.panel {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.05) 100%);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f59e0b, transparent);
    animation: scan 4s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.panel:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.2);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.panel-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* 第一行：车辆总览和实时调度 */
.vehicle-overview {
    flex: 1.2;
}

.real-time-dispatch {
    flex: 0.8;
}

.panel-tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 8px 16px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tab.active, .tab:hover {
    background: rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.vehicle-stats {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 20px;
}

.stat-circle {
    position: relative;
}

.circle-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#f59e0b 0deg 306deg, rgba(245, 158, 11, 0.2) 306deg 360deg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.circle-inner {
    width: 80px;
    height: 80px;
    background: rgba(26, 26, 46, 0.9);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(245, 158, 11, 0.3);
}

.circle-value {
    font-size: 24px;
    font-weight: bold;
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.circle-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.vehicle-numbers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    flex: 1;
}

.number-item {
    text-align: center;
    padding: 15px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.number-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.number-value {
    font-size: 24px;
    font-weight: bold;
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.vehicle-types {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.3s ease;
}

.type-item:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
}

.type-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.type-info {
    flex: 1;
}

.type-name {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.type-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.type-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.type-status.running {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.type-status.idle {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* 调度控制 */
.dispatch-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 16px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.control-btn.active, .control-btn:hover {
    background: rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.dispatch-queue h4 {
    color: #f59e0b;
    margin-bottom: 15px;
    font-size: 16px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.queue-item.urgent {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.queue-item.normal {
    border-left-color: #f59e0b;
}

.item-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.queue-item.urgent .item-priority {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.queue-item.normal .item-priority {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.item-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.item-vehicle {
    font-size: 14px;
    font-weight: bold;
    color: #f59e0b;
    min-width: 80px;
    text-align: center;
}

.btn-dispatch {
    padding: 6px 12px;
    background: linear-gradient(45deg, #f59e0b, #d97706);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-dispatch:hover {
    background: linear-gradient(45deg, #d97706, #b45309);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* 第二行：路线监控和GPS跟踪 */
.route-monitor {
    flex: 1.3;
}

.gps-tracking {
    flex: 0.7;
}

.route-map {
    height: 300px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

.route-stats {
    display: flex;
    gap: 20px;
}

.route-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stat-icon {
    font-size: 20px;
}

.stat-info {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #f59e0b;
}

.route-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.primary { background: #f59e0b; }
.legend-dot.secondary { background: #10b981; }
.legend-dot.congestion { background: #ef4444; }
.legend-dot.construction { background: #f97316; }

/* GPS跟踪 */
.tracking-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tracking-stats {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.tracking-item {
    text-align: center;
    padding: 15px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    flex: 1;
}

.tracking-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.tracking-value {
    font-size: 20px;
    font-weight: bold;
    color: #f59e0b;
    margin-bottom: 2px;
}

.tracking-rate {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.vehicle-list h4 {
    color: #f59e0b;
    margin-bottom: 15px;
    font-size: 16px;
}

.vehicle-tracking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.tracking-vehicle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.vehicle-id {
    font-size: 14px;
    font-weight: bold;
    color: #f59e0b;
    min-width: 80px;
}

.vehicle-route {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    min-width: 100px;
}

.progress-bar {
    height: 6px;
    background: #f59e0b;
    border-radius: 3px;
    position: relative;
    flex: 1;
    margin: 0 10px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 3px;
    width: 100%;
}

.vehicle-eta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    min-width: 80px;
    text-align: right;
}

/* 第三行：运输效率和成本分析 */
.efficiency-analysis {
    flex: 1;
}

.cost-analysis {
    flex: 1;
}

.efficiency-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.efficiency-kpis {
    display: flex;
    gap: 20px;
}

.kpi-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    flex: 1;
}

.kpi-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.kpi-info {
    flex: 1;
}

.kpi-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 20px;
    font-weight: bold;
    color: #f59e0b;
    margin-bottom: 2px;
}

.kpi-trend {
    font-size: 12px;
    font-weight: bold;
}

.kpi-trend.up {
    color: #10b981;
}

.kpi-trend.down {
    color: #ef4444;
}

.efficiency-chart {
    height: 150px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* 成本分析 */
.cost-overview {
    display: flex;
    gap: 20px;
    height: 100%;
}

.cost-breakdown {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.cost-category {
    font-size: 14px;
    color: #ffffff;
    font-weight: bold;
}

.cost-percentage {
    font-size: 16px;
    font-weight: bold;
    color: #f59e0b;
}

.cost-amount {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.cost-chart {
    flex: 1;
    height: 200px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* 第四行：异常监控和司机管理 */
.exception-monitor {
    flex: 1;
}

.driver-management {
    flex: 1;
}

.exception-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.exception-type {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid;
    flex: 1;
}

.exception-type.critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.exception-type.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.exception-type.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.exception-count {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.exception-type.critical .exception-count {
    color: #ef4444;
}

.exception-type.warning .exception-count {
    color: #f59e0b;
}

.exception-type.info .exception-count {
    color: #3b82f6;
}

.exception-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.exception-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
}

.exception-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 6px;
    border-left: 4px solid;
}

.exception-item.critical {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.exception-item.warning {
    border-left-color: #f59e0b;
}

.exception-item.info {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.exception-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 50px;
}

.exception-content {
    flex: 1;
}

.exception-title {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.exception-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.btn-emergency {
    padding: 6px 12px;
    background: linear-gradient(45deg, #ef4444, #dc2626);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-emergency:hover {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-handle {
    padding: 6px 12px;
    background: linear-gradient(45deg, #f59e0b, #d97706);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-handle:hover {
    background: linear-gradient(45deg, #d97706, #b45309);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* 司机管理 */
.driver-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.driver-stats {
    display: flex;
    gap: 20px;
}

.driver-stat {
    text-align: center;
    padding: 15px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #f59e0b;
}

.driver-performance h4 {
    color: #f59e0b;
    margin-bottom: 15px;
    font-size: 16px;
}

.performance-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.performance-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.driver-rank {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #f59e0b, #d97706);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

.driver-info {
    flex: 1;
}

.driver-name {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
}

.driver-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.driver-score {
    font-size: 16px;
    font-weight: bold;
    color: #f59e0b;
}

/* 响应式设计 */
@media (max-width: 1600px) {
    .row-1, .row-2, .row-3, .row-4 {
        flex-direction: column;
        height: auto;
    }
    
    .panel {
        margin-bottom: 20px;
    }
    
    .vehicle-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .efficiency-kpis {
        flex-direction: column;
    }
    
    .cost-overview {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-left, .header-right {
        justify-content: center;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .panel {
        padding: 15px;
    }
    
    .vehicle-numbers {
        grid-template-columns: 1fr;
    }
    
    .tracking-stats {
        flex-direction: column;
    }
    
    .driver-stats {
        flex-direction: column;
    }
    
    .exception-summary {
        flex-direction: column;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.7);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel {
    animation: fadeInUp 0.6s ease-out;
}

.panel:nth-child(1) { animation-delay: 0.1s; }
.panel:nth-child(2) { animation-delay: 0.2s; }
.panel:nth-child(3) { animation-delay: 0.3s; }
.panel:nth-child(4) { animation-delay: 0.4s; }

/* 数据更新动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.number-value, .tracking-value, .kpi-value {
    animation: pulse 2s infinite;
}