/* 一汽物流管理看板样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background: linear-gradient(135deg, #0c1426 0%, #1a2332 50%, #0c1426 100%);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 顶部标题栏 */
.header {
    height: 80px;
    background: linear-gradient(90deg, #1e3a5f 0%, #2d5aa0 50%, #1e3a5f 100%);
    border-bottom: 2px solid #00d4ff;
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.company-name {
    font-size: 18px;
    font-weight: bold;
    color: #00d4ff;
}

.header-center {
    flex: 2;
    text-align: center;
}

.header-center h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #00d4ff, #ffffff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 14px;
    color: #a0c4ff;
    opacity: 0.8;
}

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

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

.weather {
    font-size: 14px;
    color: #a0c4ff;
}

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

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

.row-1 {
    height: 120px;
}

.row-2 {
    height: 300px;
}

.row-3 {
    height: 250px;
}

.row-4 {
    height: 200px;
}

/* KPI卡片 */
.kpi-card {
    flex: 1;
    background: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
    border: 1px solid #00d4ff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.kpi-title {
    font-size: 14px;
    color: #a0c4ff;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 32px;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 5px;
}

.kpi-unit {
    font-size: 12px;
    color: #ffffff;
    opacity: 0.7;
}

.kpi-trend {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
}

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

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

/* 面板样式 */
.panel {
    background: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
    border: 1px solid #00d4ff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.panel-header {
    background: linear-gradient(90deg, #2d5aa0 0%, #1e3a5f 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #00d4ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 16px;
    color: #ffffff;
    font-weight: bold;
}

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

.tab {
    padding: 5px 12px;
    font-size: 12px;
    border: 1px solid #00d4ff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #a0c4ff;
}

.tab.active {
    background: #00d4ff;
    color: #1a2332;
}

.panel-content {
    padding: 20px;
    height: calc(100% - 60px);
}

/* 整车物流监控 */
.vehicle-logistics {
    flex: 2;
}

.logistics-map {
    width: 100%;
    height: 100%;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
    position: relative;
    background-image: 
        radial-gradient(circle at 20% 30%, #00d4ff 2px, transparent 2px),
        radial-gradient(circle at 60% 70%, #10b981 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, #f59e0b 2px, transparent 2px);
}

.map-legend {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(26, 35, 50, 0.9);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #2d3748;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #a0c4ff;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot.loading {
    background: #f59e0b;
}

.dot.transit {
    background: #00d4ff;
}

.dot.arrived {
    background: #10b981;
}

/* 供应链状态 */
.supply-chain {
    flex: 1;
}

.supply-status {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.supplier-item {
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.supplier-name {
    font-size: 14px;
    color: #ffffff;
    font-weight: bold;
}

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

.supplier-status.normal {
    background: #10b981;
    color: #ffffff;
}

.supplier-status.warning {
    background: #f59e0b;
    color: #ffffff;
}

.supplier-delivery {
    font-size: 12px;
    color: #a0c4ff;
}

/* 图表容器 */
.chart-container {
    width: 100%;
    height: 100%;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
}

/* 运输效率分析 */
.transport-efficiency {
    flex: 1;
}

/* 成本分析 */
.cost-analysis {
    flex: 1;
}

/* 库存管理 */
.inventory-management {
    flex: 1;
}

.inventory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    height: 100%;
}

.inventory-item {
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.item-name {
    font-size: 14px;
    color: #a0c4ff;
    margin-bottom: 8px;
}

.item-stock {
    font-size: 24px;
    font-weight: bold;
    color: #00d4ff;
    margin-bottom: 5px;
}

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

.item-status.safe {
    background: #10b981;
    color: #ffffff;
}

.item-status.warning {
    background: #f59e0b;
    color: #ffffff;
}

/* 异常预警 */
.alerts {
    flex: 2;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    background: #0f1419;
    border-left: 4px solid;
    border-radius: 4px;
    padding: 15px;
}

.alert-item.high {
    border-left-color: #ef4444;
}

.alert-item.medium {
    border-left-color: #f59e0b;
}

.alert-item.low {
    border-left-color: #00d4ff;
}

.alert-icon {
    font-size: 20px;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.alert-content {
    flex: 1;
}

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

.alert-desc {
    font-size: 12px;
    color: #a0c4ff;
    margin-bottom: 5px;
}

.alert-time {
    font-size: 11px;
    color: #6b7280;
}

/* 绩效排行 */
.performance {
    flex: 1;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
    padding: 12px;
}

.rank {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #00d4ff, #2d5aa0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ffffff;
    margin-right: 15px;
}

.dept-name {
    flex: 1;
    font-size: 14px;
    color: #ffffff;
}

.score {
    font-size: 16px;
    font-weight: bold;
    color: #00d4ff;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .row-2, .row-3, .row-4 {
        flex-direction: column;
        height: auto;
    }
    
    .panel {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .row-1 {
        flex-direction: column;
        height: auto;
    }
    
    .kpi-card {
        margin-bottom: 10px;
    }
    
    .header {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .header-center h1 {
        font-size: 20px;
    }
    
    .main-content {
        padding: 10px;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-item {
    animation: slideIn 0.5s ease-out;
}

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

::-webkit-scrollbar-track {
    background: #1a2332;
}

::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0099cc;
}