/* 零部件供应链看板样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 50%, #0d1b2a 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 #10b981;
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 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: #10b981;
}

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

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

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

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

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

.jit-status {
    font-size: 14px;
    color: #6ee7b7;
}

.status-active {
    color: #10b981;
    font-weight: bold;
}

/* 主要内容区域 */
.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: 300px;
}

.row-2 {
    height: 280px;
}

.row-3 {
    height: 250px;
}

.row-4 {
    height: 220px;
}

/* 面板样式 */
.panel {
    background: linear-gradient(135deg, #1b263b 0%, #2d3748 100%);
    border: 1px solid #10b981;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.panel-header {
    background: linear-gradient(90deg, #2d5aa0 0%, #1e3a5f 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #10b981;
    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 #10b981;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6ee7b7;
}

.tab.active {
    background: #10b981;
    color: #1b263b;
}

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

/* 供应商总览面板 */
.supplier-overview {
    flex: 2;
}

.supplier-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    position: relative;
}

.stat-label {
    font-size: 12px;
    color: #6ee7b7;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 5px;
}

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

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

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

.supplier-chart {
    height: 120px;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
}

/* 供应商排行面板 */
.supplier-ranking {
    flex: 1;
}

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

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

.ranking-item.top {
    border-left: 4px solid #10b981;
}

.ranking-item.good {
    border-left: 4px solid #f59e0b;
}

.ranking-item.warning {
    border-left: 4px solid #ef4444;
}

.rank {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ffffff;
}

.supplier-info {
    flex: 1;
}

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

.supplier-category {
    font-size: 12px;
    color: #6ee7b7;
}

.performance-score {
    font-size: 16px;
    font-weight: bold;
    color: #10b981;
    margin-right: 10px;
}

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

.status.excellent {
    background: #10b981;
    color: #ffffff;
}

.status.good {
    background: #f59e0b;
    color: #ffffff;
}

.status.warning {
    background: #ef4444;
    color: #ffffff;
}

/* JIT配送监控面板 */
.jit-delivery {
    flex: 1.5;
}

.jit-overview {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.jit-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

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

.item-icon {
    font-size: 24px;
}

.item-info {
    flex: 1;
}

.item-label {
    font-size: 12px;
    color: #6ee7b7;
    margin-bottom: 5px;
}

.item-value {
    font-size: 18px;
    font-weight: bold;
    color: #10b981;
}

.delivery-timeline {
    flex: 1;
}

.delivery-timeline h4 {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 15px;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.timeline-item.completed {
    border-left: 4px solid #10b981;
}

.timeline-item.in-progress {
    border-left: 4px solid #f59e0b;
}

.timeline-item.pending {
    border-left: 4px solid #6b7280;
}

.timeline-time {
    font-size: 12px;
    color: #6ee7b7;
    min-width: 50px;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 13px;
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 3px;
}

.timeline-desc {
    font-size: 11px;
    color: #6ee7b7;
}

.timeline-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

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

.timeline-item.in-progress .timeline-status {
    background: #f59e0b;
    color: #ffffff;
}

.timeline-item.pending .timeline-status {
    background: #6b7280;
    color: #ffffff;
}

/* 库存监控面板 */
.inventory-monitor {
    flex: 1;
}

.inventory-overview {
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

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

.summary-label {
    font-size: 11px;
    color: #6ee7b7;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 16px;
    font-weight: bold;
    color: #10b981;
}

.inventory-categories {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.category-name {
    font-size: 12px;
    color: #ffffff;
    min-width: 80px;
}

.category-level {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

.category-level.safe {
    background: #10b981;
    color: #ffffff;
}

.category-level.warning {
    background: #f59e0b;
    color: #ffffff;
}

.category-level.critical {
    background: #ef4444;
    color: #ffffff;
}

.category-days {
    font-size: 12px;
    color: #10b981;
    min-width: 40px;
}

.category-progress {
    flex: 1;
    height: 6px;
    background: #2d3748;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #10b981;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-bar.warning {
    background: #f59e0b;
}

.progress-bar.critical {
    background: #ef4444;
}

/* 采购订单管理面板 */
.order-management {
    flex: 1.5;
}

.order-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

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

.kpi-title {
    font-size: 12px;
    color: #6ee7b7;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 20px;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 3px;
}

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

.order-chart {
    height: 100px;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
}

/* 质量监控面板 */
.quality-monitor {
    flex: 1;
}

.quality-overview {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quality-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.quality-item {
    flex: 1;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
    padding: 10px;
    text-align: center;
    position: relative;
}

.quality-label {
    font-size: 11px;
    color: #6ee7b7;
    margin-bottom: 5px;
}

.quality-value {
    font-size: 16px;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 3px;
}

.quality-trend {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    padding: 1px 3px;
    border-radius: 3px;
}

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

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

.quality-issues {
    flex: 1;
}

.quality-issues h4 {
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 10px;
}

.issue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.issue-item.high {
    border-left: 3px solid #ef4444;
}

.issue-item.medium {
    border-left: 3px solid #f59e0b;
}

.issue-item.low {
    border-left: 3px solid #10b981;
}

.issue-priority {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #ffffff;
}

.issue-item.high .issue-priority {
    background: #ef4444;
}

.issue-item.medium .issue-priority {
    background: #f59e0b;
}

.issue-item.low .issue-priority {
    background: #10b981;
}

.issue-content {
    flex: 1;
}

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

.issue-supplier {
    font-size: 10px;
    color: #6ee7b7;
}

.issue-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #2d3748;
    color: #ffffff;
}

/* 供应链预警面板 */
.supply-alerts {
    flex: 2;
}

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

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

.alert-count {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

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

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

.alert-type.info .alert-count {
    color: #10b981;
}

.alert-label {
    font-size: 12px;
    color: #6ee7b7;
}

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

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

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

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

.alert-item.info {
    border-left-color: #10b981;
}

.alert-time {
    font-size: 12px;
    color: #6ee7b7;
    min-width: 50px;
}

.alert-content {
    flex: 1;
}

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

.alert-desc {
    font-size: 12px;
    color: #6ee7b7;
}

.alert-action {
    min-width: 80px;
}

.btn-urgent {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #ef4444;
    border-radius: 4px;
    background: #ef4444;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-handle {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #10b981;
    border-radius: 4px;
    background: transparent;
    color: #10b981;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-handle:hover {
    background: #10b981;
    color: #1b263b;
}

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

.cost-overview {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cost-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

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

.cost-label {
    font-size: 12px;
    color: #6ee7b7;
}

.cost-value {
    font-size: 14px;
    font-weight: bold;
    color: #10b981;
}

.cost-change {
    font-size: 11px;
    padding: 2px 4px;
    border-radius: 3px;
}

.cost-change.up {
    background: #10b981;
    color: #ffffff;
}

.cost-change.down {
    background: #ef4444;
    color: #ffffff;
}

.cost-chart {
    flex: 1;
    background: #0f1419;
    border: 1px solid #2d3748;
    border-radius: 4px;
}

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

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .header-center h1 {
        font-size: 20px;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .supplier-stats,
    .jit-stats,
    .order-stats,
    .quality-stats {
        flex-direction: column;
    }
}

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

.stat-value,
.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: #1b263b;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}