:root{--navy:#102b4e;--blue:#2765a8;--cyan:#19a7ae;--ink:#172234;--muted:#6b778a;--line:#dce5ef;--bg:#f3f6fa;--white:#fff;--good:#15836d;--warn:#b87912;--bad:#c34e4e;--shadow:0 12px 34px rgba(26,52,83,.08)}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif}
body.modal-open,body.detail-modal-open{overflow:hidden}
.topbar{display:flex;justify-content:space-between;gap:30px;align-items:flex-end;padding:34px max(28px,calc((100vw - 1500px)/2));color:#fff;background:linear-gradient(125deg,#0c2544,#174b78 68%,#15767e)}
.eyebrow{margin:0 0 8px;color:#91d8db;font-size:12px;font-weight:700;letter-spacing:2px}
.topbar h1{margin:0;font-size:32px;letter-spacing:1px}
.subtitle{margin:10px 0 0;color:#d9e8f4;font-size:14px}
.header-actions{display:flex;gap:10px;flex-wrap:wrap}
.button{display:inline-flex;align-items:center;border:0;border-radius:8px;padding:11px 17px;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;text-decoration:none}
.push-tip{font-size:12px;color:#d6f4ee;min-width:108px}
.button.primary{background:#fff;color:var(--navy)}
.button.ghost,.button.home{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.32)}
.button.range-primary{background:var(--blue);color:#fff}
.button.range-secondary{background:#eef4f8;color:var(--navy);border:1px solid #cfdeea}
main{max-width:1500px;margin:24px auto;padding:0 24px}
.panel{background:var(--white);border:1px solid #e4ebf2;border-radius:14px;box-shadow:var(--shadow);padding:24px;margin-bottom:20px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}
.section-heading>div:first-child{display:flex;align-items:center;gap:10px}
.section-heading h2{font-size:19px;margin:0}
.section-heading p{margin:0;color:var(--muted);font-size:13px}
.step{display:inline-grid;place-items:center;width:32px;height:24px;border-radius:5px;background:#e7f4f5;color:#12717a;font-size:11px;font-weight:800}
.import-launch{display:flex;align-items:center;width:100%;gap:16px;padding:17px 18px;border:1px solid #cdddea;border-radius:11px;background:linear-gradient(135deg,#f8fbfd,#f0f7fa);color:var(--ink);font-family:inherit;text-align:left;cursor:pointer;transition:border-color .2s,box-shadow .2s,transform .2s}
.import-launch:hover{border-color:#78a9cf;box-shadow:0 9px 24px rgba(31,75,116,.1);transform:translateY(-1px)}
.import-launch:focus-visible,.modal-close:focus-visible{outline:3px solid rgba(25,167,174,.3);outline-offset:2px}
.import-launch-icon{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:10px;background:#fff;color:var(--blue);box-shadow:0 5px 14px rgba(31,75,116,.1)}
.import-launch-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.import-launch-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
.import-launch-copy strong{font-size:16px}
.import-launch-copy small{overflow:hidden;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.import-launch-copy small.saved{color:var(--good);font-weight:700}
.import-progress{flex:0 0 auto;padding:6px 10px;border-radius:20px;background:#e7eff7;color:#315c86;font-size:12px;font-weight:700}
.import-progress.complete{background:#e4f5ee;color:var(--good)}
.import-launch-arrow{color:var(--blue);font-size:22px}
.import-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:24px}
.import-modal[hidden]{display:none}
.import-modal-backdrop{position:absolute;inset:0;background:rgba(8,26,47,.62);backdrop-filter:blur(4px)}
.import-modal-dialog{position:relative;width:min(1420px,100%);max-height:calc(100vh - 48px);overflow:auto;border:1px solid rgba(255,255,255,.7);border-radius:16px;background:var(--white);box-shadow:0 30px 90px rgba(6,22,41,.3)}
.import-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px 26px 19px;border-bottom:1px solid var(--line)}
.modal-eyebrow{margin:0 0 6px;color:var(--blue);font-size:11px;font-weight:800;letter-spacing:1.8px}
.import-modal-header h2{margin:0;font-size:23px}
.import-modal-header p:last-child{margin:8px 0 0;color:var(--muted);font-size:13px}
.modal-close{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border:1px solid var(--line);border-radius:9px;background:#f7f9fb;color:#526274;font-family:inherit;font-size:26px;line-height:1;cursor:pointer}
.modal-close:hover{border-color:#9bb7cf;background:#eef4f8;color:var(--navy)}
.import-modal-status{display:flex;align-items:center;gap:8px;margin:18px 26px 0;padding:11px 13px;border-radius:8px;background:#f2f7fa;color:var(--muted);font-size:12px}
.import-modal-status strong{color:var(--navy)}
.import-modal-status strong.complete{color:var(--good)}
.import-modal-status .saved{color:var(--good);font-weight:700}
.status-dot{width:8px;height:8px;border-radius:50%;background:var(--cyan)}
.modal-source-grid{padding:18px 26px 26px}
.source-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px}
.source-card{position:relative;min-height:128px;padding:16px;border:1px solid var(--line);border-radius:10px;background:#fbfcfe;transition:.2s}
.source-card:hover{border-color:#8db4d8;transform:translateY(-1px)}
.source-card:focus-within{border-color:#5c99c9;box-shadow:0 0 0 3px rgba(39,101,168,.13)}
.source-card.loaded{border-color:#83c6b5;background:#f5fbf8}
.source-card h3{margin:0 0 6px;font-size:15px}
.source-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}
.source-status{display:flex;align-items:center;gap:6px;margin-top:12px;font-size:12px;font-weight:700;color:#7b8795}
.source-card.loaded .source-status{color:var(--good)}
.dot{width:8px;height:8px;border-radius:50%;background:#aeb8c5}
.loaded .dot{background:var(--good)}
.file-input{position:absolute;inset:0;opacity:0;cursor:pointer}
.source-remove{position:absolute;z-index:3;right:10px;top:10px;border:1px solid #e4b7b2;border-radius:6px;background:#fff6f5;color:#a44b43;padding:4px 7px;font-family:inherit;font-size:11px;font-weight:700;cursor:pointer}
.source-card.loaded h3{padding-right:60px}
.route-import-section{margin:0 26px 20px;padding:16px;border:1px solid #89b6d4;border-radius:11px;background:linear-gradient(135deg,#eef7fc,#f8fbfd)}
.route-import-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px}
.route-import-heading>div{display:flex;align-items:center;gap:9px}
.route-import-heading h3{margin:0;color:var(--navy);font-size:16px}
.route-import-heading p{margin:0;color:#587087;font-size:12px}
.route-import-badge{padding:4px 7px;border-radius:14px;background:#1b6d9f;color:#fff;font-size:10px;font-weight:800}
.route-source-grid{display:grid;grid-template-columns:1fr}
.route-source-grid .source-card{min-height:112px;border-width:2px;border-color:#5f9fc8;background:#fff}
.route-source-grid .source-card h3{font-size:16px;color:#114f79}
.route-source-grid .source-card:before{content:"长短线专用";position:absolute;right:14px;bottom:13px;padding:4px 8px;border-radius:14px;background:#e5f2fa;color:#1b6d9f;font-size:10px;font-weight:800}
.route-source-grid .source-card.loaded:before{content:"已识别并保存";background:#e4f5ee;color:var(--good)}
.date-range-controls{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;padding:15px;border:1px solid var(--line);border-radius:10px;background:#f7fafc}
.date-range-controls label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:11px;font-weight:700}
.date-range-controls input{height:38px;border:1px solid #cad9e6;border-radius:7px;background:#fff;padding:0 10px;color:var(--ink);font-family:inherit}
.date-range-controls>span{align-self:center;margin-top:17px;color:var(--muted)}
.date-range-controls small{align-self:center;margin-left:auto;max-width:430px;color:var(--muted);line-height:1.55}
.import-date-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 26px 0;padding:13px 15px;border:1px solid #cfe0ec;border-radius:9px;background:#f7fbfd}
.import-date-bar label{display:flex;align-items:center;gap:12px;color:var(--navy);font-size:13px}
.import-date-bar input{height:36px;border:1px solid #bfcfdd;border-radius:7px;padding:0 10px;font-family:inherit;color:var(--ink)}
.import-date-bar span{color:var(--muted);font-size:12px}
.history-section{margin:0 26px 26px;border-top:1px solid var(--line);padding-top:18px}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:10px}
.history-heading h3{margin:0;color:var(--navy);font-size:15px}
.history-heading span{color:var(--muted);font-size:11px}
.history-list{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:8px;max-height:230px;overflow:auto}
.history-row{display:flex;align-items:stretch;border:1px solid var(--line);border-radius:8px;background:#fafcfd;overflow:hidden}
.history-date{display:flex;flex:1;min-width:0;align-items:center;gap:12px;border:0;background:transparent;padding:10px 12px;text-align:left;font-family:inherit;cursor:pointer}
.history-date:hover{background:#eef6fa}
.history-date strong{flex:0 0 auto;color:var(--navy);font-size:12px}
.history-date span{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.history-delete{flex:0 0 auto;border:0;border-left:1px solid #ead3d0;background:#fff7f6;color:#a44b43;padding:0 10px;font-family:inherit;font-size:11px;font-weight:700;cursor:pointer}
.history-empty{grid-column:1/-1;margin:0;padding:20px;border:1px dashed #cedae4;border-radius:8px;color:var(--muted);font-size:12px;text-align:center}
.range-trend-panel[hidden]{display:none}
.range-trend-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.range-trend-card{min-width:0;padding:15px;border:1px solid var(--line);border-radius:10px;background:#fbfcfe}
.range-trend-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.range-trend-head>div{display:flex;min-width:0;flex-direction:column;gap:5px}
.range-trend-head span{color:var(--muted);font-size:11px}
.range-trend-head strong{color:var(--navy);font-size:20px}
.range-trend-status{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-end;font-size:11px;font-weight:800}
.range-trend-status small{margin-top:3px;font-size:9px}
.range-line-chart{display:block;width:100%;height:126px;margin-top:8px;overflow:visible}
.range-line-chart line{stroke:#dbe5ed;stroke-width:1;stroke-dasharray:3 4}
.range-line-chart polyline{fill:none;stroke:#246b91;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.range-line-chart circle{fill:#fff;stroke:#246b91;stroke-width:2}
.range-trend-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:9px}
.range-trend-foot span:nth-child(2){font-weight:700}
.range-trend-empty{display:grid;min-height:126px;place-items:center;margin-top:8px;border-radius:8px;background:#f3f6f9;color:var(--muted);font-size:11px;text-align:center}
.kpi-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.kpi-card{padding:14px 13px;border-radius:10px;background:linear-gradient(180deg,#f9fbfd,#eef4f8);border-top:3px solid var(--cyan)}
.kpi-label{color:var(--muted);font-size:12px}
.kpi-value{margin-top:7px;font-size:21px;font-weight:800;color:var(--navy);white-space:nowrap}
.kpi-trend{margin-top:8px;padding-top:8px;border-top:1px solid #dce6ee}
.trend-cell{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:150px;vertical-align:middle}
.sparkline{width:76px;height:26px;overflow:visible}
.sparkline polyline{fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.trend-copy{display:flex;min-width:55px;flex-direction:column;text-align:left;line-height:1.15}
.trend-copy strong{font-size:10px;white-space:nowrap}
.trend-copy small{margin-top:3px;font-size:9px;white-space:nowrap}
.trend-good{color:var(--good)}
.trend-bad{color:var(--bad)}
.trend-neutral{color:#728094}
.trend-empty{color:var(--muted);font-size:11px}
.quality-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:10px;padding:5px;border-radius:10px;background:#edf3f8}
.quality-tab{min-height:42px;border:0;border-radius:7px;background:transparent;color:#607084;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:.2s}
.quality-tab:hover{background:rgba(255,255,255,.65);color:var(--navy)}
.quality-tab.active{background:#fff;color:var(--blue);box-shadow:0 4px 12px rgba(22,55,89,.1)}
.quality-tab:focus-visible{outline:3px solid rgba(39,101,168,.22);outline-offset:1px}
.handover-subtabs{display:flex;gap:8px;margin:0 0 14px;padding:4px;border:1px solid #d7e4ee;border-radius:9px;background:#f7fafc}
.handover-subtabs[hidden]{display:none}
.handover-subtab{flex:1;min-height:36px;border:0;border-radius:6px;background:transparent;color:#627286;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer}
.handover-subtab.active{background:#fff;color:var(--blue);box-shadow:0 3px 10px rgba(22,55,89,.1)}
.quality-meta{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px}
.quality-meta>div{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.quality-meta strong{font-size:14px;color:var(--navy)}
.quality-meta span:not(.sort-badge){color:var(--muted);font-size:12px}
.sort-badge{flex:0 0 auto;padding:5px 9px;border-radius:16px;background:#fff0e1;color:#9a5d09;font-size:11px;font-weight:800}
.drill-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-2px 0 12px;padding:10px 12px;border:1px solid #b9d8dc;border-radius:8px;background:#eef9f8;color:#145d65;font-size:12px;font-weight:700}
.drill-bar[hidden]{display:none}
.drill-bar button{border:1px solid #82b9bf;border-radius:6px;background:#fff;color:#145d65;padding:6px 10px;font-family:inherit;font-size:11px;font-weight:700;cursor:pointer}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:9px}
.detail-wrap{max-height:640px}
table{width:100%;border-collapse:separate;border-spacing:0;font-size:12px;white-space:nowrap}
th{position:sticky;top:0;z-index:2;padding:11px 10px;background:#2f67aa;color:#fff;text-align:center;font-weight:700}
.sort-header{display:inline-flex;align-items:center;justify-content:center;gap:5px}
.sort-controls{display:inline-flex;flex-direction:column;gap:1px}
.sort-button{display:grid;place-items:center;width:16px;height:12px;border:0;border-radius:3px;background:rgba(255,255,255,.16);color:#dcecff;padding:0;font-family:inherit;font-size:8px;line-height:1;cursor:pointer}
.sort-button:hover,.sort-button.active{background:#fff;color:#135187}
.leader-link,.network-link{border:0;background:transparent;color:#075f9d;padding:0;font-family:inherit;font-weight:800;text-decoration:underline;text-decoration-color:rgba(7,95,157,.25);text-underline-offset:3px;cursor:pointer}
.network-link{text-align:left}
td{padding:9px 10px;border-bottom:1px solid #e8eef4;text-align:right}
td.text{text-align:left}
tbody tr:nth-child(even){background:#f5f9fc}
tbody tr:hover{background:#e9f4f7}
.rate-good{color:var(--good);font-weight:700}
.rate-warn{color:var(--warn);font-weight:700}
.rate-bad{color:var(--bad);font-weight:700}
.tag{display:inline-block;padding:3px 8px;border-radius:12px;font-weight:700}
.tag.bad{color:#a53d3d;background:#fde9e7}
.tag.good{color:#176b58;background:#e5f6ef}
.filters{display:flex;gap:8px}
.filters input,.filters select{height:36px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 10px;color:var(--ink)}
.filters input{width:220px}
.filters select{min-width:130px}
.empty-state{text-align:center;padding:50px;color:var(--muted)}
footer{text-align:center;color:#7c8796;font-size:12px;padding:5px 20px 30px}
.report-footer{display:flex;align-items:center;justify-content:center;gap:24px;flex-wrap:wrap}
.report-footer a{display:inline-flex;align-items:center;gap:6px;color:#6c7b8a;text-decoration:none}
.report-footer img{width:18px;height:18px;object-fit:contain}
.toast{position:fixed;right:24px;bottom:24px;max-width:360px;padding:12px 16px;border-radius:8px;background:#152b46;color:#fff;box-shadow:var(--shadow);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}
.toast.show{opacity:1;transform:none}
.toast.error{background:#a63d3d}
.import-diagnostics{margin:0 26px 18px;padding:11px 13px;border:1px solid #cfe0ec;border-radius:8px;background:#f5f9fc;color:#526578;font-size:12px;line-height:1.6}
.import-diagnostics[hidden]{display:none}
.import-diagnostics strong{color:var(--navy)}
.network-detail-modal{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:24px}
.network-detail-modal[hidden]{display:none}
.network-detail-dialog{position:relative;width:min(1080px,100%);max-height:calc(100vh - 48px);overflow:auto;border-radius:16px;background:#fff;box-shadow:0 30px 90px rgba(6,22,41,.34)}
.network-detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:22px 24px 17px;border-bottom:1px solid var(--line)}
.network-detail-header h2{margin:0;font-size:21px}
.network-detail-header p:last-child{margin:7px 0 0;color:var(--muted);font-size:12px}
.network-detail-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;padding:18px 24px 0}
.network-detail-card{padding:12px;border-radius:8px;background:#f2f7fa;border-top:3px solid var(--cyan)}
.network-detail-card span{display:block;color:var(--muted);font-size:11px}
.network-detail-card strong{display:block;margin-top:5px;color:var(--navy);font-size:18px}
.network-detail-table-wrap{margin:18px 24px 24px;max-height:520px}
#networkDetailTable{min-width:720px}
#networkDetailTable .network-detail-groups th{top:0;background:#214f82}
#networkDetailTable .network-detail-columns th{top:37px}
#networkDetailTable .detail-date-col{position:sticky;left:0;z-index:4}
#networkDetailTable thead .detail-date-col{z-index:6;background:#214f82}
#networkDetailTable tbody .detail-date-col{z-index:1;background:#fff;font-weight:700;color:var(--navy)}
#networkDetailTable tbody tr:nth-child(even) .detail-date-col{background:#f5f9fc}
#networkDetailTable tbody tr:hover .detail-date-col{background:#e9f4f7}
.detail-source-status{display:flex;min-width:245px;max-width:320px;gap:4px;flex-wrap:wrap;white-space:normal}
.detail-source-tag{display:inline-flex;padding:3px 6px;border-radius:10px;font-size:10px;line-height:1.2}
.detail-source-tag.ready{background:#e5f6ef;color:#176b58}
.detail-source-tag.missing{background:#f0f3f6;color:#6d7a89}
.detail-source-tag.unmatched{background:#fff2dc;color:#95600a}

@media(max-width:1150px){.source-grid{grid-template-columns:repeat(3,1fr)}
.range-trend-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.kpi-grid{grid-template-columns:repeat(5,1fr)}
}
@media(max-width:720px){.topbar{align-items:flex-start;flex-direction:column}
.source-grid{grid-template-columns:1fr 1fr}
.range-trend-grid{grid-template-columns:1fr}
.kpi-grid{grid-template-columns:1fr 1fr}
.section-heading,.detail-heading{align-items:flex-start;flex-direction:column}
.quality-tabs{grid-template-columns:1fr 1fr}
.quality-meta{align-items:flex-start;flex-direction:column}
.import-launch{align-items:flex-start;flex-wrap:wrap}
.import-launch-copy{flex-basis:calc(100% - 64px)}
.import-launch-copy small{white-space:normal}
.import-progress{margin-left:60px}
.import-modal{padding:10px}
.import-modal-dialog{max-height:calc(100vh - 20px);border-radius:12px}
.import-modal-header{padding:19px 18px 16px}
.import-modal-status{align-items:flex-start;flex-wrap:wrap;margin:14px 18px 0}
.modal-source-grid{padding:14px 18px 20px}
.filters{width:100%;flex-wrap:wrap}
.filters input{width:100%}
.date-range-controls{align-items:stretch}
.date-range-controls label{flex:1 1 140px}
.date-range-controls>span{display:none}
.date-range-controls .button{justify-content:center;flex:1 1 130px}
.date-range-controls small{flex-basis:100%;margin-left:0}
.import-date-bar{align-items:flex-start;flex-direction:column;margin:14px 18px 0}
.import-date-bar label{align-items:flex-start;flex-direction:column}
.history-section{margin:0 18px 20px}
.history-heading{align-items:flex-start;flex-direction:column}
.history-list{grid-template-columns:1fr}
.route-import-section{margin:0 18px 18px}
.route-import-heading{align-items:flex-start;flex-direction:column}
.network-detail-modal{padding:10px}
.network-detail-dialog{max-height:calc(100vh - 20px);border-radius:12px}
.network-detail-header{padding:18px 16px 14px}
.network-detail-summary{grid-template-columns:1fr 1fr;padding:14px 16px 0}
.network-detail-table-wrap{margin:14px 16px 18px}
main{padding:0 12px}
.panel{padding:16px}
}
@media(max-width:440px){.source-grid{grid-template-columns:1fr}
.import-progress{margin-left:0}
.topbar h1{font-size:25px}
}
