/* 生产控制中心 - 移动端优兆 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 顶部标题 */
.header {
    background: linear-gradient(135deg, #4472C4 0%, #2E5BAC 100%);
    color: white;
    padding: 20px 16px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 12px;
    opacity: 0.9;
}

/* 容器 */
.container {
    padding: 12px;
    max-width: 800px;
    margin: 0 auto;
}

/* 快捷入口 */
.quick-actions {
    margin-bottom: 12px;
}

.action-btn {
    display: block;
    width: 100%;
    padding: 14px;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.action-primary {
    background: linear-gradient(135deg, #4472C4 0%, #2E5BAC 100%);
    color: white;
}

.action-primary:active {
    background: #2E5BAC;
}

/* 汇总卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    color: #4472C4;
    line-height: 1.2;
}

.card-label {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* 区块 */
.section {
    margin-bottom: 16px;
}

.section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid #4472C4;
}

/* 制令单卡片 */
.order-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    overflow: hidden;
}

.order-header {
    padding: 12px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.order-no {
    font-size: 15px;
    font-weight: 700;
    color: #2E5BAC;
}

.workshop-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.workshop-五金 { background: #e3f2fd; color: #1565c0; }
.workshop-钀焊 { background: #fff3e0; color: #e65100; }
.workshop-喷涂 { background: #f3e5f5; color: #7b1fa2; }

.material-tag {
    font-size: 11px;
    color: #666;
    background: #eee;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 表格 */
.process-list {
    padding: 8px;
    overflow-x: auto;
}

.process-list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.process-list thead th {
    background: #4472C4;
    color: white;
    padding: 8px 6px;
    text-align: center;
    font-weight: 500;
    font-size: 12px;
    position: sticky;
    top: 0;
}

.process-list tbody td {
    padding: 8px 6px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.process-name {
    text-align: left !important;
    font-weight: 500;
    color: #444;
    max-width: 100px;
    word-break: break-all;
}

.num {
    font-variant-numeric: tabular-nums;
}

/* 进度条 */
.rate-bar {
    position: relative;
    height: 18px;
    background: #eee;
    border-radius: 9px;
    overflow: hidden;
    min-width: 60px;
}

.rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #4472C4, #5B8BD7);
    border-radius: 9px;
    transition: width 0.5s ease;
}

.rate-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-shadow: 0 0 2px rgba(255,255,255,0.8);
}

/* 状态标签 */
.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.status-✅ { background: #e8f5e9; color: #2e7d32; }
.status-🟡 { background: #fff8e1; color: #f9a825; }
.status-⚪ { background: #f5f5f5; color: #888; }

/* 最近更新 */
.recent-list {
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.recent-item {
    display: grid;
    grid-template-columns: 70px 1fr 50px 1fr 40px;
    gap: 6px;
    align-items: center;
    padding: 8px 6px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-date {
    color: #888;
    font-size: 11px;
}

.recent-order {
    font-weight: 500;
    color: #2E5BAC;
}

.recent-workshop {
    font-size: 11px;
    color: #666;
}

.recent-process {
    color: #555;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-qty {
    color: #e65100;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 11px;
}

/* 响应式 */
@media (min-width: 600px) {
    .stats-cards {
        grid-template-columns: repeat(4, 1fr);
    }
    .container {
        padding: 20px;
    }
}
