/* MPS可视化看板 - 作战室样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #0a0e17;
    color: #e0e0e0;
    min-height: 100vh;
}

.mps-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== 头部 ===== */
.mps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #1a1f2b 0%, #141820 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #2a2f3b;
}

.header-left h1 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 4px;
}

.header-subtitle {
    font-size: 13px;
    color: #888;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.upload-time {
    font-size: 12px;
    color: #666;
}

/* ===== 按钮 ===== */
.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}
.btn-primary:hover { background: #2563eb; }
.btn-primary:disabled { background: #374151; color: #666; cursor: not-allowed; }

.btn-outline {
    background: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}
.btn-outline:hover { background: #1e3a5f; }
.btn-outline:disabled { border-color: #374151; color: #666; cursor: not-allowed; }

.btn-outline-danger {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
}
.btn-outline-danger:hover { background: #3b1515; }
.btn-outline-danger:disabled { border-color: #374151; color: #666; cursor: not-allowed; }

.btn-back {
    background: #374151;
    color: #ccc;
}
.btn-back:hover { background: #4b5563; }

/* ===== 上传区 ===== */
.upload-section {
    margin-bottom: 20px;
}

.upload-card {
    background: #1a1f2b;
    border: 1px solid #2a2f3b;
    border-radius: 12px;
    padding: 24px;
}

.upload-card h3 {
    color: #fff;
    margin-bottom: 8px;
}

.upload-hint {
    color: #888;
    font-size: 13px;
    margin-bottom: 16px;
}

.upload-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.upload-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-field label {
    font-size: 13px;
    color: #aaa;
}

.upload-field .required {
    color: #ef4444;
}

.upload-field input[type="file"] {
    color: #ccc;
    padding: 6px 0;
}

.file-name {
    font-size: 11px;
    color: #3b82f6;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.upload-status {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.upload-status.loading { background: #1e3a5f; color: #3b82f6; }
.upload-status.success { background: #0d2818; color: #4caf50; }
.upload-status.error { background: #3b1515; color: #ef4444; }

/* ===== 汇总卡片 ===== */
.summary-cards {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-card {
    flex: 1;
    min-width: 160px;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    text-align: center;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.summary-card.active {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.15);
}

.black-card { background: #1a1a1a; border-color: #333; }
.red-card { background: #2b1010; border-color: #5c1a1a; }
.yellow-card { background: #2b2400; border-color: #5c4a00; }
.green-card { background: #0d2818; border-color: #1a5c30; }
.total-card { background: #1a1f2b; border-color: #2a2f3b; }

.card-count {
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.black-card .card-count { color: #fff; }
.red-card .card-count { color: #ff4444; }
.yellow-card .card-count { color: #ffd700; }
.green-card .card-count { color: #4caf50; }
.total-card .card-count { color: #3b82f6; }

.card-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 12px;
    color: #888;
}

/* ===== 筛选条 ===== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1a1f2b;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #2a2f3b;
}

.filter-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    color: #888;
    font-size: 13px;
}

.filter-tag {
    background: #3b82f6;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.filter-count {
    color: #666;
    font-size: 13px;
}

.filter-right input {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #2a2f3b;
    background: #11151c;
    color: #e0e0e0;
    width: 260px;
    font-size: 13px;
}

.filter-right input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* ===== 表格 ===== */
.table-section {
    background: #1a1f2b;
    border: 1px solid #2a2f3b;
    border-radius: 12px;
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

#dataTable thead {
    background: #141820;
    position: sticky;
    top: 0;
}

#dataTable th {
    padding: 12px 10px;
    text-align: left;
    color: #aaa;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid #2a2f3b;
}

#dataTable td {
    padding: 10px;
    border-bottom: 1px solid #1e2330;
    color: #ccc;
}

#dataTable tbody tr:hover {
    background: #1e2530;
}

/* 行颜色标识 */
.row-black { border-left: 4px solid #fff; }
.row-red { border-left: 4px solid #ff4444; }
.row-yellow { border-left: 4px solid #ffd700; }
.row-green { border-left: 4px solid #4caf50; }
.row-grey { border-left: 4px solid #666; }

/* 徽章 */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-black { background: #fff; color: #000; }
.badge-red { background: #ff4444; color: #fff; }
.badge-yellow { background: #ffd700; color: #000; }
.badge-green { background: #4caf50; color: #fff; }
.badge-grey { background: #666; color: #fff; }

.rate-cell strong {
    font-size: 14px;
}

.row-black .rate-cell strong { color: #fff; }
.row-red .rate-cell strong { color: #ff6666; }
.row-yellow .rate-cell strong { color: #ffe44d; }
.row-green .rate-cell strong { color: #66bb6a; }

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 14px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .summary-cards {
        flex-direction: column;
    }
    .summary-card {
        min-width: auto;
    }
    .filter-bar {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .filter-right input {
        width: 100%;
    }
}
