
*{box-sizing:border-box}
body{margin:0;background:#f3f6fa;font-family:Microsoft YaHei;color:#1f2937;padding:24px}
.layout{max-width:1480px;margin:0 auto}
header,.card{background:#fff;border:1px solid #e7edf4;border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 4px 14px rgba(30,55,90,.04)}
header{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:18px 24px}
header h1{margin:0;font-size:28px;letter-spacing:0;color:#102a43;white-space:nowrap}
button{padding:10px 18px;border:0;border-radius:8px;background:#1677ff;color:white;margin-right:8px}
nav{display:flex;align-items:stretch;gap:28px;height:42px}
nav button{position:relative;padding:11px 0 10px;margin:0;border:0;border-radius:0;background:transparent;color:#52606d;font-size:14px;font-weight:500;white-space:nowrap}
nav button:hover{color:#1677ff;background:transparent}
nav button.active{color:#102a43;background:transparent;font-weight:700}
nav button.active::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:#1677ff;border-radius:2px}
.active{background:#0b4fc6}
.filter{display:flex;align-items:flex-end;flex-wrap:nowrap;gap:14px 12px;overflow-x:auto;padding-bottom:6px}
.filter label{display:flex;flex-direction:column;gap:7px;color:#52606d;font-size:13px;font-weight:600}
.filter label,.filter > button{flex:0 0 auto}
.filter label select,.filter label input{min-width:150px}
.filter label:first-child{min-width:325px}
.cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.cards.overview-metrics{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
.cards.space-metrics{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.accuracy-metrics-group{display:contents}
.cards .accuracy-metric{min-width:0}
.accuracy-metric > span{display:block;white-space:nowrap;font-size:14px}
.scope-filter{display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px 12px}
.scope-filter label{display:flex;flex-direction:column;gap:7px;color:#52606d;font-size:13px;font-weight:600}
.scope-filter select{min-width:170px}
.scope-filter .date-range{min-width:325px}
.error-filter{display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px 12px}
.error-filter label{display:flex;flex-direction:column;gap:7px;color:#52606d;font-size:13px;font-weight:600}
.error-filter .date-range{min-width:325px}
.cards div{background:#f8fafc;padding:18px;border-radius:12px}
.cards div{border:1px solid #edf1f5}
.cards h2{color:#1677ff;margin:12px 0 0;font-size:30px}
.cards h2.warn{color:#dc2626}
.cards h2.metric-positive{color:#16a34a}
.cards h2.metric-negative{color:#dc2626}
.two{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.error-overview-row{display:grid;grid-template-columns:minmax(280px,3fr) repeat(3,minmax(130px,1fr));gap:14px;margin-bottom:20px;align-items:start}
.error-category-card{min-width:0;margin:0;padding:18px}
.error-category-card h3,.error-trend-card h3{margin:0;color:#102a43}
.error-category-card .chart-box{height:250px;min-height:250px;margin-top:8px;padding:0}
.error-kpi-card{display:flex;flex-direction:column;align-items:center;justify-content:center;align-self:center;min-width:0;min-height:112px;padding:18px;border:1px solid #edf1f5;border-radius:12px;background:#f8fafc;text-align:center}
.error-kpi-card h2{margin:12px 0 0;color:#1677ff;font-size:30px}
.error-kpi-card h2.metric-negative{color:#dc2626}
.error-trend-card{min-width:0}
.error-trend-card .chart-box{height:360px;min-height:360px}
#trend,#rank,#spacePie,#spaceTrend,#errorPie,#errorTrend{height:280px}
.form{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.filter-actions{display:flex;align-items:center;gap:10px;margin-left:auto;white-space:nowrap}
.filter-actions button{margin:0}
input,select{height:36px;border:1px solid #ddd;border-radius:6px;padding:0 10px}
table{width:100%;border-collapse:collapse}
th,td{padding:12px;border-bottom:1px solid #eee;text-align:center}
.green{color:#16a34a}
.orange{color:#d97706}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.section-head h3{margin:0}
.trend-card .section-head{align-items:center}
.muted{color:#64748b;font-size:13px}
.status{display:inline-block;padding:4px 8px;border-radius:4px;font-size:12px}
.status.processing{color:#0369a1;background:#e0f2fe}
.export-btn,.report-btn{background:#0f766e}
.reset-btn{background:#eef2f7;color:#52606d}
.keyword-input{min-width:220px}
.date-range{display:inline-flex;align-items:center;height:36px;border:1px solid #ddd;border-radius:6px;background:#fff;overflow:hidden}
.date-control{position:relative;display:inline-flex;width:138px;height:34px;min-width:0}
.date-range input{width:100%;height:34px;border:0;border-radius:0;padding:0 8px}
.date-control .date-input{min-width:0}
.date-control:not(.has-value) .date-input{color:transparent}
.date-control:not(.has-value) .date-input::-webkit-datetime-edit{color:transparent}
.date-placeholder{position:absolute;left:8px;top:50%;z-index:1;transform:translateY(-50%);color:#64748b;font-size:13px;line-height:1;pointer-events:none}
.date-control.has-value .date-placeholder{display:none}
.date-range span{color:#64748b;white-space:nowrap}
.date-range .date-separator{position:relative;z-index:2;display:inline-flex;flex:0 0 28px;align-items:center;justify-content:center;background:#fff;font-weight:600}
.compact-table{font-size:13px}
.task-filter-card h2,.task-list-head h2{margin:0;color:#102a43;font-size:22px}
.task-filter-card h2{margin-bottom:16px}
.task-list-head{align-items:flex-start}
.task-list-head > div:first-child{display:flex;flex-direction:column;gap:5px}
.task-list-head .export-btn{margin:0;white-space:nowrap}
.task-list-head .export-btn:disabled{cursor:not-allowed;opacity:.45}
.task-quick-filters{display:flex;align-items:center;gap:8px;margin:18px 0 12px;padding-bottom:2px;overflow-x:auto}
.task-quick-filters button{flex:0 0 auto;margin:0;padding:7px 13px;border:1px solid #e2e8f0;background:#f8fafc;color:#52606d;font-size:13px}
.task-quick-filters button:hover{border-color:#b9cdf5;color:#1677ff}
.task-quick-filters button.active{border-color:#cfe0ff;background:#eaf2ff;color:#0b5ed7;font-weight:600}
.task-table-wrap{width:100%;overflow-x:auto}
.task-table-wrap:focus-visible{outline:2px solid #1677ff;outline-offset:2px}
.task-table{min-width:1320px;font-size:14px}
.task-table th,.task-table td{text-align:left}
.task-table th{padding-top:11px;padding-bottom:11px;background:#f8fafc;color:#52606d;font-size:13px;font-weight:600;white-space:nowrap}
.task-table th:first-child{border-radius:8px 0 0 8px}
.task-table th:last-child{border-radius:0 8px 8px 0}
.task-table th:nth-child(5),.task-table th:nth-child(6),.task-table th:nth-child(8),.task-table th:nth-child(9),
.task-table td:nth-child(5),.task-table td:nth-child(6),.task-table td:nth-child(8),.task-table td:nth-child(9){text-align:center}
.task-row{transition:background .2s}
.task-row:hover,.task-row.is-expanded{background:#f8fbff}
.task-id{color:#155fc0;font-size:13px;white-space:nowrap}
.file-name{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#102a43;font-weight:600}
.cell-stack{display:flex;flex-direction:column;gap:3px;white-space:nowrap}
.cell-stack strong{color:#334e68;font-size:13px;font-weight:600}
.cell-stack small{color:#64748b;font-size:12px}
.file-category{display:inline-block;padding:3px 8px;border-radius:999px;background:#eaf2ff;color:#155fc0;font-size:12px;white-space:nowrap}
.file-type{display:inline-block;padding:3px 7px;border-radius:4px;background:#edf2f7;color:#52606d;font-size:11px;font-weight:700;letter-spacing:.04em}
.status.success{color:#15803d;background:#dcfce7}
.status.failed{color:#b91c1c;background:#fee2e2}
.running-time{color:#b45309;white-space:nowrap}
.task-detail-btn{margin:0;padding:6px 10px;border:1px solid #cfe0ff;background:#fff;color:#0b5ed7;font-size:12px;white-space:nowrap}
.task-detail-btn:hover{background:#eaf2ff}
.task-detail-row > td{padding:0 12px 14px;background:#f8fbff;border-bottom:1px solid #dce8f5}
.task-detail-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 18px;padding:14px 18px;border:1px solid #e1ebf5;border-radius:8px;background:#fff}
.task-detail-panel > div{display:flex;flex-direction:column;gap:5px;min-width:0}
.task-detail-panel span{color:#64748b;font-size:12px}
.task-detail-panel strong{color:#334e68;font-size:13px;font-weight:600;word-break:break-word}
.task-empty-row td{padding:34px;text-align:center;color:#64748b}
.toast{position:fixed;right:24px;bottom:24px;z-index:10;padding:12px 18px;color:#fff;background:#0f766e;border-radius:8px;box-shadow:0 8px 24px rgba(15,118,110,.25)}
.hide{display:none}

.chart-box{
 height:280px;
 width:100%;
 margin-top:15px;
}


/* V7.1.1 空间异常视觉增强 */
.chart-box{
    height:360px;
    width:100%;
    padding:10px;
}

/* 分析卡片 */
.analysis-panel{
    background:linear-gradient(180deg,#ffffff,#f8fbff);
    border-radius:18px;
    padding:20px;
}

/* 图表标题 */
.analysis-title{
    font-size:18px;
    font-weight:600;
    margin-bottom:12px;
}

/* KPI卡片 */
.metric-card{
    border-radius:16px;
    box-shadow:0 8px 24px rgba(30,80,150,.08);
    transition:.3s;
}
.metric-card:hover{
    transform:translateY(-3px);
}

/* 环形图外围 */
.pie-wrapper{
    display:flex;
    align-items:center;
    justify-content:center;
}

/* 图例优化 */
.chart-box canvas{
    border-radius:12px;
}

/* 空间/异常双栏 */
.analysis-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

/* V7.1.1 图表布局修复 */
.chart-box{
    width:100%;
    height:380px;
    min-height:380px;
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:center;
}

.chart-box > div{
    width:100%;
    height:100%;
}

.analysis-card,
.card{
    overflow:hidden;
}

@media (max-width: 900px){
    body{padding:14px}
    header{align-items:flex-start;flex-direction:column}
    header h1{font-size:24px}
    nav{display:flex;flex-wrap:wrap;gap:8px}
    nav button{margin:0}
    .filter{align-items:stretch;flex-wrap:wrap;overflow-x:visible}
    .filter label,.filter label:first-child{min-width:100%;}
    .filter label select,.filter label input,.filter .date-range{width:100%}
    .filter .date-range .date-control{width:auto;min-width:0;flex:1}
    .scope-filter{align-items:stretch}
    .scope-filter label,.scope-filter label select,.scope-filter .date-range{width:100%}
    .scope-filter .date-range .date-control{width:auto;min-width:0;flex:1}
    .error-filter{align-items:stretch}
    .error-filter label,.error-filter .date-range{width:100%}
    .error-filter .date-range .date-control{width:auto;min-width:0;flex:1}
    .filter-actions{width:100%;margin-left:0}
    .task-filter-form > input,.task-filter-form > select,.task-filter-form > .date-range{width:100%;min-width:0}
    .task-filter-form .date-range .date-control{width:auto;min-width:0;flex:1}
    .task-list-head{align-items:stretch;flex-direction:column;gap:16px}
    .task-list-head .export-btn{align-self:flex-start}
    .task-detail-panel{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:14px}
    .cards,.cards.overview-metrics{grid-template-columns:repeat(2,1fr)}
    .accuracy-metric > span{font-size:13px}
    .two{grid-template-columns:1fr}
    .error-overview-row{grid-template-columns:repeat(2,minmax(0,1fr))}
    .error-category-card{grid-column:1/-1}
    .error-category-card .chart-box{height:300px;min-height:300px}
    .card{overflow-x:auto}
    table{min-width:760px}
}
