:root{
  --navy:#1B4A6F; --deep:#0F2C42; --ink:#1A2330; --muted:#5B6B7C;
  --line:#DDE5ED; --bg:#F5F7FA; --soft:#E9EFF5; --green:#2E7D5B;
  --warn:#B4762A; --white:#fff;
  --shadow:0 1px 2px rgba(16,44,66,.06), 0 8px 24px rgba(16,44,66,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{
  font-family:"Microsoft YaHei","PingFang SC",system-ui,-apple-system,sans-serif;
  color:var(--ink); background:var(--bg); font-size:14px; line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
button{font-family:inherit;cursor:pointer}
input,select{font-family:inherit}
.hidden{display:none !important}

/* ---------- 登录 ---------- */
.login{display:flex;height:100vh;min-height:600px}
.l-brand{
  flex:1.15; background:linear-gradient(150deg,#12374F 0%, #1B4A6F 55%, #23587F 100%);
  color:#fff; display:flex; align-items:center; padding:0 72px; position:relative; overflow:hidden;
}
.l-brand::after{
  content:""; position:absolute; right:-160px; bottom:-200px; width:560px; height:560px;
  border-radius:50%; background:radial-gradient(circle,rgba(255,255,255,.08),transparent 65%);
}
.l-inner{position:relative; z-index:1; max-width:520px}
.l-logo{font-size:13px; letter-spacing:6px; color:#9FBACE; margin-bottom:26px}
.l-brand h1{font-size:42px; font-weight:700; margin:0 0 22px; letter-spacing:2px; line-height:1.25}
.l-brand p{font-size:15px; color:#C3D5E2; line-height:1.9; margin:0}
.l-rule{width:52px; height:2px; background:#5E93B4; margin:34px 0 18px}
.l-meta{font-size:12px; color:#8FADC2; letter-spacing:1px}

.l-card{
  width:440px; flex:none; background:#fff; display:flex; flex-direction:column;
  justify-content:center; padding:0 56px;
}
.l-card h2{font-size:24px; margin:0 0 6px; color:var(--ink)}
.l-sub{font-size:13px; color:var(--muted); margin-bottom:30px}
.l-card label{display:block; font-size:13px; color:var(--muted); margin-bottom:18px}
.l-card input{
  display:block; width:100%; margin-top:8px; padding:11px 13px; font-size:14px;
  border:1px solid var(--line); border-radius:6px; background:#FBFCFD; color:var(--ink);
  transition:border-color .15s, box-shadow .15s;
}
.l-card input:focus{outline:none; border-color:var(--navy); box-shadow:0 0 0 3px rgba(27,74,111,.08); background:#fff}
.btn-primary{
  width:100%; padding:12px; border:none; border-radius:6px; background:var(--navy);
  color:#fff; font-size:15px; font-weight:600; letter-spacing:1px; transition:background .15s;
}
.btn-primary:hover{background:#16405F}
.btn-primary.sm{width:auto; padding:8px 16px; font-size:13px}
.l-err{min-height:20px; margin-top:12px; font-size:13px; color:#B4453C}

/* ---------- 应用 ---------- */
.app{display:flex; flex-direction:column; height:100vh}
.topbar{
  height:56px; flex:none; background:#fff; border-bottom:1px solid var(--line);
  display:flex; align-items:center; padding:0 24px; gap:28px;
}
.brand{display:flex; align-items:center; gap:10px; flex:none}
.brand .mark{
  width:30px; height:30px; border-radius:6px; background:var(--navy); color:#fff;
  font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; letter-spacing:1px;
}
.brand .bt{font-size:15px; font-weight:600; color:var(--ink)}
.nav{display:flex; gap:2px; flex:1}
.nav button{
  border:none; background:transparent; padding:7px 14px; border-radius:6px;
  font-size:14px; color:var(--muted); transition:background .12s,color .12s;
}
.nav button:hover{background:var(--soft); color:var(--navy)}
.nav button.on{background:var(--soft); color:var(--navy); font-weight:600}
.right{display:flex; align-items:center; gap:8px; flex:none}
.pill{font-size:12px; color:var(--muted); background:var(--soft); padding:4px 10px; border-radius:20px}
.ghost{
  border:1px solid var(--line); background:#fff; color:var(--muted);
  padding:6px 12px; border-radius:6px; font-size:13px; transition:all .12s;
}
.ghost:hover{border-color:var(--navy); color:var(--navy)}

.wrap{flex:1; overflow:auto; padding:20px 24px 40px}
.view{max-width:1400px; margin:0 auto}
.page-head{margin-bottom:20px}
.page-head h2{font-size:22px; margin:0 0 6px; font-weight:700; color:var(--ink)}
.page-head p{margin:0; font-size:13px; color:var(--muted); max-width:860px}
.cards{grid-template-columns:repeat(4,1fr)}

.cards{display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px}
.card{
  background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px 16px;
  transition:box-shadow .15s;
}
.card:hover{box-shadow:var(--shadow)}
.card .c-city{font-size:17px; font-weight:700; color:var(--navy); margin-bottom:2px}
.card .c-region{font-size:12px; color:var(--muted); margin-bottom:10px}
.card .c-mix{display:flex; flex-wrap:wrap; gap:2px 10px; font-size:12.5px; font-weight:600; margin-top:2px}
.card .c-mix span{white-space:nowrap}
.card .c-tag{display:inline-block; font-size:11px; color:var(--green); background:#EAF4EF; padding:1px 7px; border-radius:3px; margin-top:8px}

.panel{background:#fff; border:1px solid var(--line); border-radius:8px; padding:18px 20px; margin-bottom:18px}
.panel-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:12px}
.panel-head h3{font-size:15px; margin:0; font-weight:600; color:var(--ink)}
.hint{font-size:12px; color:var(--muted)}
.chart{width:100%}
.chart-h280{height:280px}
.chart-h300{height:300px}
.chart-h320{height:320px}
.chart-h340{height:340px}
.chart-h360{height:360px}
.chart-h400{height:400px}
.chart-h420{height:420px}

.toolbar{display:flex; align-items:center; gap:14px; margin-bottom:14px; flex-wrap:wrap}
.seg{display:flex; background:var(--soft); border-radius:7px; padding:3px}
.seg button{
  border:none; background:transparent; padding:6px 16px; border-radius:5px;
  font-size:13px; color:var(--muted);
}
.seg button.on{background:#fff; color:var(--navy); font-weight:600; box-shadow:0 1px 3px rgba(16,44,66,.1)}

.table-wrap{overflow:auto; max-height:520px}
table.grid{width:100%; border-collapse:collapse; font-size:13px}
table.grid th,table.grid td{padding:8px 10px; text-align:right; border-bottom:1px solid var(--line); white-space:nowrap}
table.grid th{position:sticky; top:0; background:#F8FAFC; color:var(--muted); font-weight:600; font-size:12px; z-index:1}
table.grid td:first-child,table.grid th:first-child{text-align:left; position:sticky; left:0; background:#fff; z-index:1}
table.grid th:first-child{background:#F8FAFC}
table.grid tbody tr:hover td{background:#FAFCFE}
.num{font-variant-numeric:tabular-nums}

.inp{
  border:1px solid var(--line); border-radius:6px; padding:7px 10px; font-size:13px;
  background:#fff; color:var(--ink); min-width:110px;
}
.inp:focus{outline:none; border-color:var(--navy)}
.btn-danger{border:1px solid #E8CFCB; color:#B4453C; background:#fff; padding:4px 9px; border-radius:5px; font-size:12px}
.btn-danger:hover{background:#FBEFED}

.prose{font-size:14px; line-height:1.95; color:#2B3947; max-width:900px}
.prose h3{font-size:15px; margin:22px 0 8px; color:var(--navy)}
.prose h3:first-child{margin-top:0}
.prose p{margin:0 0 10px}
.prose ul{margin:0 0 12px; padding-left:20px}
.prose li{margin-bottom:5px}
.prose code{background:var(--soft); padding:1px 6px; border-radius:3px; font-size:12.5px}

/* ---------- 弹窗 ---------- */
.modal{position:fixed; inset:0; background:rgba(15,44,66,.42); display:flex; align-items:center; justify-content:center; z-index:50}
.modal-card{width:380px; background:#fff; border-radius:10px; padding:24px 26px; box-shadow:0 20px 60px rgba(0,0,0,.2)}
.modal-card h3{margin:0 0 18px; font-size:17px}
.modal-card label{display:block; font-size:13px; color:var(--muted); margin-bottom:14px}
.modal-card input{display:block; width:100%; margin-top:6px; padding:9px 11px; border:1px solid var(--line); border-radius:6px; font-size:14px}
.modal-card input:focus{outline:none; border-color:var(--navy)}
.modal-err{min-height:18px; font-size:12.5px; color:#B4453C}
.modal-foot{display:flex; justify-content:flex-end; gap:10px; margin-top:6px}

/* 滚动条 */
.wrap::-webkit-scrollbar,.table-wrap::-webkit-scrollbar{width:9px;height:9px}
.wrap::-webkit-scrollbar-thumb,.table-wrap::-webkit-scrollbar-thumb{background:#CBD8E3;border-radius:5px}
.wrap::-webkit-scrollbar-track{background:transparent}

@media (max-width:900px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .l-brand{display:none}
  .l-card{width:100%; padding:0 32px}
  .topbar{padding:0 14px; gap:12px}
  .nav{overflow-x:auto}
  .wrap{padding:18px 14px 50px}
}

/* 时需矩阵 */
.matrix-wrap{overflow:auto; max-height:calc(100vh - 205px); border:1px solid var(--line); border-radius:6px; background:#fff}
table.mx{border-collapse:separate; border-spacing:0; width:100%; table-layout:fixed; font-size:11.5px}
table.mx col.c-nm{width:170px}
table.mx col.c-l2{width:96px}
table.mx th,table.mx td{padding:0; height:29px; text-align:center; border-bottom:1px solid #F2F6F9; border-right:1px solid #F7FAFC; overflow:hidden}
table.mx th{position:sticky; top:0; background:#F7FAFC; font-size:10.5px; color:#93A6B1; font-weight:500; z-index:2; height:30px}
table.mx th.l2h{text-align:left; padding-left:8px; font-size:11px; color:#5B6B7C; border-right:1px solid #E5EDF3}
table.mx td.l2c{text-align:left; padding-left:8px; font-size:11.5px; color:#7C93A8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; border-right:1px solid #E5EDF3}
table.mx th.l3h{text-align:left; padding-left:10px; position:sticky; left:0; z-index:4; background:#F7FAFC; border-right:1px solid #E5EDF3; font-size:11px; color:#5B6B7C}
table.mx td.l3{position:sticky; left:0; background:#fff; text-align:left; padding-left:10px; font-size:12px; color:var(--ink); z-index:1; border-right:1px solid #E5EDF3; white-space:nowrap; text-overflow:ellipsis}
table.mx td.l3 small{color:#93A6B1; margin-left:8px; font-size:10px; font-variant-numeric:tabular-nums}
table.mx tr:hover td.l3{background:#F4F8FB}
table.mx td.r1{background:#146B45; color:#fff; font-weight:700}
table.mx td.r2{background:#2E8B5F; color:#fff}
table.mx td.r3{background:#7CBA9C; color:#0E3325}
table.mx td.r4{background:#C3E1D1; color:#1B4A3A}
table.mx td.r5{background:#F3E3B0; color:#6B4E12}
table.mx td.none{color:#DDE6ED}
table.mx td.r0{color:#C3CFD9; font-size:10px}

/* 全局筛选栏 */
.filterbar{display:flex; align-items:center; gap:14px; padding:10px 24px; background:#fff; border-bottom:1px solid var(--line); flex:none}
.fb-label{font-size:12px; color:var(--muted); letter-spacing:1px}
.fb-hint{font-size:12px; color:#93A6B1; margin-left:auto}
.filterbar .seg{background:#F1F5F9}
.filterbar .seg button{padding:5px 14px; font-size:13px}
.kpis{display:flex; gap:14px; margin-bottom:18px; flex-wrap:wrap}
.kpi{background:#fff; border:1px solid var(--line); border-radius:8px; padding:14px 18px; min-width:150px; flex:1}
.kpi .k-t{font-size:12px; color:var(--muted); margin-bottom:4px}
.kpi .k-v{font-size:22px; font-weight:700; color:var(--navy); font-variant-numeric:tabular-nums}
.kpi .k-v small{font-size:12px; font-weight:400; color:var(--muted); margin-left:4px}
