/* ============================================================
   视图层样式：页面头 / 分段 / 阶段泳道 / 表单 / 详情卡
   ============================================================ */

/* ---------------- 页面头 ---------------- */
.pg { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.pg-h { flex: 1; min-width: 240px; }
.pg-h h2 { font-size: 19px; letter-spacing: -.5px; }
.pg-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.pg-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pg-stamp { font-size: 10.5px; color: var(--muted); opacity: .85; letter-spacing: .2px; white-space: nowrap; cursor: default; }

/* ---------------- 分段控件 ---------------- */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-2); transition: .14s; white-space: nowrap;
}
.seg button:hover { background: var(--gray-soft); }
.seg button.on { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(131,91,59, .28); }
.seg button .n { font-size: 10.5px; opacity: .68; margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg button.on .n { opacity: .9; }

/* ---------------- 筛选控件 ---------------- */
.fsel, .fin {
  height: 31px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 12.5px; color: var(--text-2); outline: none; transition: .14s;
}
.fsel:focus, .fin:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px rgba(131,91,59, .08); }
.fin::placeholder { color: var(--faint); }
.fsel { padding-right: 6px; cursor: pointer; }

/* ---------------- 统计条 ---------------- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.strip .it { background: #fff; padding: 11px 14px; }
.strip .it .l { font-size: 11px; color: var(--muted); }
.strip .it .v { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.4px; margin-top: 1px; }
.strip .it .v small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.strip .it.red .v { color: var(--danger); }
.strip .it.amber .v { color: var(--warn); }
.strip .it.green .v { color: var(--ok); }

/* ---------------- 阶段泳道（履约跟单） ---------------- */
.lanes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.lane { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-height: 96px; }
.lane-h { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); background: #FDFCFB; }
.lane-h .n { font-size: 10.5px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-h .c { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.4px; line-height: 1.2; }
.lane-b { padding: 4px 0; flex: 1; }
.lane-b .li { display: flex; align-items: center; gap: 5px; padding: 4px 9px; font-size: 10.5px; color: var(--text-2); cursor: pointer; }
.lane-b .li:hover { background: #FDFBF8; }
.lane-b .li .d { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); flex: 0 0 auto; }
.lane-b .li .d.warn { background: var(--warn); }
.lane-b .li .d.bad { background: var(--danger); }
.lane-b .li .q { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-act { border-top: 1px solid var(--line-soft); }
.lane-act::before { content: ""; }
.lane.warn { border-top: 2px solid var(--warn); }
.lane.bad { border-top: 2px solid var(--danger); }
.lane.ok { border-top: 2px solid var(--ok); }

/* ---------------- 多段进度（PO 批次推进） ---------------- */
.mseg { display: flex; gap: 2px; min-width: 62px; }
.mseg i { flex: 1; height: 5px; border-radius: 1px; background: var(--line); }
.mseg i.done { background: var(--ok); }
.mseg i.now { background: var(--brand); }
.mseg i.bad { background: var(--danger); }
.mseg i.warn { background: var(--warn); }

/* ---------------- 进度条 ---------------- */
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; }
.prog > i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .3s; }
.prog > i.ok { background: var(--ok); }
.prog > i.warn { background: var(--warn); }
.prog > i.danger { background: var(--danger); }
.prog-row { display: flex; align-items: center; gap: 8px; }
.prog-row .prog { flex: 1; }
.prog-row .pv { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }

/* ---------------- 表格增强 ---------------- */
table.t thead th { position: sticky; top: 0; z-index: 1; background: #FCFAF7; }
.tbl-scroll { max-height: 640px; overflow: auto; }
.tbl-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.tbl-scroll::-webkit-scrollbar-thumb { background: #E8DFD5; border-radius: 5px; }
.tbl-scroll::-webkit-scrollbar-track { background: #FBF8F4; }
.cell-t2 { font-size: 11px; color: var(--muted); margin-top: 1px; }
.cell-strong { font-weight: 600; color: var(--text); }
.mono-s { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: -.2px; }
.badge-n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px;
  padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 600;
}
.badge-n.gray { background: var(--gray-soft); color: var(--muted); }

/* ---------------- 抽屉内区块 ---------------- */
.dsec { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.dsec:last-child { border-bottom: 0; }
.dsec-t { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dsec-t h4 { font-size: 12.5px; }
.dsec-t .sp { flex: 1; }
.hero-num { display: flex; align-items: baseline; gap: 8px; }
.hero-num .v { font-size: 26px; font-weight: 660; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.hero-num .u { font-size: 12px; color: var(--muted); }

/* ---------------- 表单 ---------------- */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; }
.fgrid.one { grid-template-columns: 1fr; }
.fi { display: flex; flex-direction: column; gap: 5px; }
.fi > label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.fi > label .req { color: var(--danger); margin-left: 2px; }
.fi input, .fi select, .fi textarea {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 12.5px; outline: none; transition: .14s; width: 100%;
}
.fi textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 64px; line-height: 1.5; }
.fi input:focus, .fi select:focus, .fi textarea:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px rgba(131,91,59, .08); }
.fi .hint { font-size: 10.5px; color: var(--faint); }
.fi .hint.warn { color: var(--warn); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.checks input { accent-color: var(--brand); }

/* ---------------- 供应商 / 品类卡 ---------------- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)); gap: 12px; }
.scard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; cursor: pointer; transition: .16s; }
.scard:hover { border-color: var(--brand-line); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(47,33,21, .05), 0 12px 28px -18px rgba(47,33,21, .3); }
.scard .s-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.scard .s-av { width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 14px; flex: 0 0 auto; }
.scard .s-n { flex: 1; min-width: 0; }
.scard .s-n .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .s-n .m { font-size: 10.5px; color: var(--muted); }
.scard .s-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.scard .s-metrics > div { text-align: center; }
.scard .s-metrics .l { font-size: 10px; color: var(--muted); }
.scard .s-metrics .v { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scard .s-flags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }

/* ---------------- 提示条 ---------------- */
.note { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 9px; padding: 10px 12px; font-size: 11.8px; color: #64462D; line-height: 1.6; margin-bottom: 14px; }
.note code { background: rgba(255, 255, 255, .8); padding: 1px 5px; border-radius: 4px; font-family: var(--f-mono); font-size: 11px; }
.note.warn { background: var(--warn-soft); border-color: #F0DDBB; color: #7A5210; }

/* ---------------- 空态 / 载入 ---------------- */
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty .e-t { font-size: 12.5px; font-weight: 500; }
.empty .e-h { font-size: 11px; color: var(--faint); margin-top: 3px; }

/* ---------------- 供应商风险矩阵图例 ---------------- */
.risk-lg { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); padding: 8px 2px 0; }
.risk-lg span { display: inline-flex; align-items: center; gap: 5px; }
.risk-lg i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------------- 分栏 ---------------- */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.split.right-wide { grid-template-columns: 1fr 340px; }

@media (max-width: 1400px) {
  .lanes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.right-wide { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .lanes { grid-template-columns: 1fr; }
  .pg-h h2 { font-size: 17px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   场景库（馋小兔融合）：矩阵 / 覆盖条 / 路线 / 溯源条
   ============================================================ */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.filters .fin { min-width: 240px; flex: 0 1 300px; }
.lnk { color: var(--brand-2); text-decoration: none; font-size: 12px; }
.lnk:hover { text-decoration: underline; }

/* 业态 / 批次标签 */
.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; margin-right: 4px;
  border-radius: 5px; background: var(--gray-soft); color: var(--text-2); font-size: 11px; white-space: nowrap; }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.ph { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 5px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .2px; }
.ph.P0 { background: #FCEDEB; color: var(--danger); }
.ph.P1 { background: var(--brand-soft); color: var(--brand); }
.ph.P2 { background: var(--gray-soft); color: var(--muted); }

/* 矩阵图例 */
.mx-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.mx-legend .sw { display: inline-block; width: 14px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.dg { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dg.ok { background: var(--ok); } .dg.warn { background: var(--warn); } .dg.gray { background: var(--faint); }
.mx-legend .dg { margin: 0 3px 0 6px; }
.rm-row .dg { margin-left: 2px; }

/* 版本节奏 */
.phase-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pl-row { display: grid; grid-template-columns: 30px 66px 1fr 62px; align-items: center; gap: 8px; font-size: 11.5px; }
.pl-n { color: var(--text-2); }
.pl-v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-b .prog { height: 6px; }

/* 业务域两段覆盖条 */
.cov-row { display: grid; grid-template-columns: 92px 1fr 92px; align-items: center; gap: 10px; padding: 5px 0; }
.cov-name { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cov-track { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: #FAF6F1; }
.cov-full { background: var(--brand); }
.cov-part { background: var(--brand-line); }
.cov-val { text-align: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cov-val b { color: var(--text); font-weight: 650; }

/* P0 缺口行 */
.gap-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.gap-row:last-child { border-bottom: 0; }
.gap-row:hover { background: #FFFAF4; }
.gr-l { min-width: 0; flex: 1; }
.gr-l .t1 { font-size: 12.5px; font-weight: 600; color: var(--text); }
.gr-l .t2 { font-size: 11px; color: var(--muted); margin-top: 2px; }
.gr-r { display: flex; align-items: center; gap: 6px; color: var(--faint); }

/* 我的规划 */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; transition: .14s; background: #fff; }
.plan-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.pc-h { display: flex; align-items: center; justify-content: space-between; }
.pc-t { font-size: 12.5px; font-weight: 600; margin: 7px 0 8px; line-height: 1.35; }
.pc-f { display: flex; align-items: center; gap: 6px; }

/* 交付路线三列 */
.rm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.rm-col { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.rm-h { padding: 13px 14px 12px; border-bottom: 1px solid var(--line-soft); background: #FEFDFB; }
.rm-h.brand { box-shadow: inset 3px 0 0 var(--brand); }
.rm-h.teal { box-shadow: inset 3px 0 0 var(--ok); }
.rm-h.amber { box-shadow: inset 3px 0 0 var(--warn); }
.rm-t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; }
.rm-d { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.rm-n { font-size: 11.5px; color: var(--text-2); margin-top: 7px; }
.rm-n b { color: var(--text); }
.rm-b { padding: 12px 14px; }
.rm-b .prog { height: 6px; margin-bottom: 10px; }
.rm-rows { display: flex; flex-direction: column; gap: 2px; }
.rm-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); cursor: pointer; }
.rm-row:last-child { border-bottom: 0; }
.rm-row:hover .rm-nm { color: var(--brand); }
.rm-id { color: var(--faint); font-family: var(--f-mono); font-size: 10.5px; }
.rm-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* 模块溯源条 */
.trace { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 8px 13px; margin-bottom: 12px;
  background: linear-gradient(90deg, #FDFBF9, #FEFEFE); border: 1px solid var(--brand-line); border-radius: var(--radius-sm); }
.tr-ic { color: var(--brand); display: inline-flex; }
.tr-tx { font-size: 12px; color: var(--text-2); }
.tr-tx b { color: var(--brand); font-weight: 650; }
.tr-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.tr-chips .tag { margin-right: 0; }

/* 场景抽屉 */
.sd-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sd-cell { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; background: #FFFCF8; }
.sd-cell .l { font-size: 11px; color: var(--muted); }
.sd-cell .v { font-size: 12.5px; font-weight: 600; margin-top: 4px; color: var(--text); }
.sd-sec { padding: 11px 0; border-top: 1px dashed var(--line-soft); }
.sd-sec h4 { font-size: 12px; font-weight: 650; color: var(--text); margin-bottom: 5px; }
.sd-sec p { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }
.sd-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.sd-sib { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 1180px) {
  .rm-grid { grid-template-columns: 1fr; }
  .sd-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cov-row { grid-template-columns: 76px 1fr 78px; }
  .filters .fin { flex: 1 1 100%; min-width: 0; }
  .sd-top { grid-template-columns: 1fr 1fr; }
}

/* 自绘矩阵 */
.mx { display: grid; gap: 4px; align-items: center; }
.mx-h { font-size: 11px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.mx .mx-h:first-child { text-align: left; }
.mx-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.mx-row:hover { color: var(--brand); }
.mx-row .dg { flex: 0 0 auto; }
.mx-c { height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-variant-numeric: tabular-nums; cursor: pointer; transition: .12s; }
.mx-c:hover { outline: 2px solid var(--brand-line); outline-offset: -1px; }

/* 覆盖条：外层 wrap 撑长度，内层两段按结构分 */
.cov-wrap { min-width: 0; }
.cov-track { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #FAF6F1; transition: .2s; }
.cov-row:hover .cov-track { box-shadow: 0 0 0 2px rgba(131,91,59,.10); }
.cov-val em { font-style: normal; color: var(--text-2); }

/* 场景抽屉：规格表 + 承接卡 */
.sd-spec { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sp-row { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); }
.sp-row:last-child { border-bottom: 0; }
.sp-row:nth-child(odd) { background: #FDFCFB; }
.sp-k { font-size: 11.5px; color: var(--muted); }
.sp-v { font-size: 12.5px; color: var(--text); line-height: 1.55; }
.sd-takeover { margin-top: 12px; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.st-h { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--brand-dark); }
.st-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.st-note { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-top: 6px; }

/* 双列等分（app.css 原缺 g-1-1） */
.g-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .g-1-1 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .mx { grid-template-columns: 96px repeat(5, minmax(30px, 1fr)) !important; }
  .mx-h { font-size: 10px; }
  .mx-row { font-size: 10.5px; }
  .mx-c { height: 21px; font-size: 10px; }
}
.obj-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.ob-h { font-size: 11.5px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.ob-h .tiny { font-weight: 400; }
#scSum { display: flex; gap: 12px; align-items: center; }
#scSum b { color: var(--brand); font-weight: 650; }

/* ============================================================
   工作台
   ============================================================ */
.home-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 14px; border-radius: var(--radius);
  background: linear-gradient(100deg, #FFF8F3 0%, #FEFDFC 58%, #FDFBF8 100%);
  border: 1px solid var(--accent-line); }
.hh-greet { font-size: 19px; font-weight: 680; letter-spacing: -.3px; color: var(--text); }
.hh-sub { font-size: 12px; color: var(--text-2); margin-top: 5px; }
.hh-sub b { color: var(--accent); font-weight: 700; }
.hh-r { display: flex; gap: 8px; }

.todo-list { display: flex; flex-direction: column; gap: 2px; }
.td-row { display: grid; grid-template-columns: 46px 1fr 18px; align-items: center; gap: 12px;
  padding: 11px 10px; border-radius: 9px; cursor: pointer; transition: .14s; }
.td-row:hover { background: #FDFBF9; }
.td-n { font-size: 19px; font-weight: 680; font-variant-numeric: tabular-nums; color: var(--brand); text-align: right; }
.td-row.danger .td-n { color: var(--danger); }
.td-row.warn .td-n { color: var(--warn); }
.td-row.purple .td-n { color: var(--purple); }
.td-row.info .td-n { color: var(--brand-2); }
.td-m .t1 { font-size: 12.5px; font-weight: 600; color: var(--text); }
.td-m .t2 { font-size: 11px; color: var(--muted); margin-top: 2px; }
.td-a { color: var(--faint); display: flex; justify-content: flex-end; }
.td-row:hover .td-a { color: var(--brand); }

.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tg { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #FFFCF8; }
.tg .l { font-size: 11px; color: var(--muted); }
.tg .v { font-size: 20px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.5px; margin-top: 2px; }
.tg .v.warn { color: var(--warn); }
.tg .u { font-size: 10px; color: var(--faint); }
.month-bar { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.mb-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--text-2); margin-bottom: 6px; }
.mb-h b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.month-bar .prog { height: 8px; }
.mb-f { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 6px; }

.quick-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
@media (max-width: 1400px) { .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qk { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; text-decoration: none; transition: .14s; }
.qk:hover { border-color: var(--brand-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.qk-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.qk-ic .ic { width: 16px; height: 16px; }
.qk .t1 { font-size: 12.5px; font-weight: 620; color: var(--text); }
.qk .t2 { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.sysbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 9px 13px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #FEFEFD;
  font-size: 11px; color: var(--muted); }
.sysbar b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================
   系统设置
   ============================================================ */
.set-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.set-tabs .st { padding: 7px 13px; border-radius: 8px; font-size: 12.5px; color: var(--text-2);
  background: #fff; border: 1px solid var(--line); text-decoration: none; transition: .14s; }
.set-tabs .st:hover { border-color: var(--brand-line); color: var(--brand); }
.set-tabs .st.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.set-sec { padding: 4px 0 16px; border-bottom: 1px dashed var(--line-soft); margin-bottom: 14px; }
.set-sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }
.ss-h { font-size: 13px; font-weight: 650; color: var(--text); }
.ss-d { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin: 5px 0 12px; max-width: 780px; }
.set-sec .fgrid { max-width: 640px; }
.set-sec .fi > span:first-child { font-size: 11.5px; color: var(--muted); }
.set-sec .fi .hint { font-size: 10.5px; }

.route-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.route-preview .rp { display: flex; align-items: center; gap: 8px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 8px; background: #FFFCF8; }

.perm-tbl th { font-size: 10.5px; }
.perm-tbl td { padding: 7px 10px; }
.perm-on, .perm-off { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.perm-on { background: var(--ok); }
.perm-off { background: #F1EBE3; }

.about-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #FEFEFD; }
.ac-t { font-size: 15px; font-weight: 680; color: var(--text); letter-spacing: -.2px; }
.ac-d { font-size: 12px; color: var(--text-2); line-height: 1.7; margin-top: 6px; max-width: 720px; }
.ac-m { display: flex; gap: 18px; margin-top: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.ac-m b { color: var(--text); font-weight: 620; }
.about-list { margin: 8px 0 0 0; padding-left: 18px; }
.about-list li { font-size: 11.5px; color: var(--text-2); line-height: 1.9; }
.about-list b { color: var(--text); }

@media (max-width: 900px) {
  .today-grid { grid-template-columns: 1fr 1fr; }
  .home-hero { flex-direction: column; align-items: flex-start; }
  .set-sec .fgrid { max-width: none; }
}

/* ============================================================
   视觉升级 v2：KPI 卡片 / 待办占比 / 场景条形 / 图表容器
   ============================================================ */

/* ---- KPI 卡片：渐变底 + 悬浮 + 内嵌可视化 ---- */
.kpi-row { gap: 14px; }
.kpi {
  border-radius: 14px; padding: 14px 16px 13px; min-height: 96px;
  border: 1px solid #F5EDE4;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(131,91,59,.075), transparent 62%),
    linear-gradient(180deg, #FFFFFF 0%, #FEFDFB 100%);
  box-shadow: 0 1px 2px rgba(62,43,28,.045), 0 10px 22px -16px rgba(62,43,28,.4);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.kpi:hover { transform: translateY(-2px); border-color: #EFE2D3; box-shadow: 0 2px 4px rgba(62,43,28,.05), 0 16px 30px -18px rgba(62,43,28,.42); }
.kpi::before { width: 0; }
.kpi.ok { background: radial-gradient(120% 100% at 100% 0%, rgba(14,143,126,.1), transparent 62%), linear-gradient(180deg,#fff,#F8FDFB); }
.kpi.warn { background: radial-gradient(120% 100% at 100% 0%, rgba(199,123,20,.1), transparent 62%), linear-gradient(180deg,#fff,#FFFCF7); }
.kpi.danger { background: radial-gradient(120% 100% at 100% 0%, rgba(192,57,43,.09), transparent 62%), linear-gradient(180deg,#fff,#FFFAF9); }
.kpi.purple { background: radial-gradient(120% 100% at 100% 0%, rgba(107,79,168,.1), transparent 62%), linear-gradient(180deg,#fff,#FBF9FF); }

.kpi .k-label { font-size: 11.5px; color: #A08B7A; letter-spacing: .2px; }
.kpi .k-ic {
  width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); opacity: 1;
}
.kpi.ok .k-ic { background: var(--ok-soft); color: var(--ok); }
.kpi.warn .k-ic { background: var(--warn-soft); color: var(--warn); }
.kpi.danger .k-ic { background: var(--danger-soft); color: var(--danger); }
.kpi.purple .k-ic { background: #F1ECFB; color: var(--purple); }
.kpi .k-ic svg { width: 13px; height: 13px; }
.kpi .k-val { font-size: 26px; font-weight: 690; letter-spacing: -.9px; color: #38291F; margin-top: 2px; }
.kpi .k-val small { font-size: 11px; color: #AC9A8B; }
.kpi .k-bot { min-height: 18px; }
.kpi .k-sub { font-size: 10.8px; color: #A89484; }
.kpi .k-spark { position: absolute; right: 14px; bottom: 10px; opacity: .85; pointer-events: none; }
/* 进度环放在原图标位（右上角），四张卡的右上视觉对齐 */
.kpi .k-ring { position: absolute; right: 12px; top: 10px; }
.kpi .k-ring text { font-size: 11px !important; font-weight: 660; }
.kpi.has-ring .k-val { padding-right: 46px; }
.k-bar { height: 4px; border-radius: 3px; background: #F0E6DA; overflow: hidden; margin-top: 10px; }
.k-bar > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg,#6B4FA8,#8C6FD1); transition: width .5s ease; }

/* ---- 图表容器 ---- */
.home-charts { margin-bottom: 14px; }
.chartwrap { padding: 6px 10px 8px; }
.chartwrap .chart { width: 100%; height: auto; }

/* ---- 待办：占比条 ---- */
.td-row { grid-template-columns: 48px 1fr 34px 16px; gap: 12px; padding: 12px 10px; }
.td-n { font-size: 21px; }
.td-m { min-width: 0; }
.td-bar { height: 3px; border-radius: 2px; background: #F8F4EE; margin-top: 7px; overflow: hidden; }
.td-bar > i { display: block; height: 100%; border-radius: 2px; background: var(--brand); transition: width .5s ease; }
.td-bar > i.danger { background: #E05B4A; }
.td-bar > i.warn { background: #E0A03A; }
.td-bar > i.purple { background: #8C6FD1; }
.td-bar > i.info { background: var(--brand-2); }
.td-pct { font-size: 11px; color: #B8A997; text-align: right; font-variant-numeric: tabular-nums; }
.td-row:hover .td-pct { color: var(--brand); }

/* ---- 场景域条形 ---- */
.hs-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 22px; }
.hs-b {
  display: grid; grid-template-columns: 84px 1fr 26px; align-items: center; gap: 9px;
  padding: 5px 6px; border-radius: 6px; text-decoration: none; transition: .14s;
}
.hs-b:hover { background: #FDFBF8; }
.hs-bn { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-bt { height: 8px; border-radius: 5px; background: #F9F5EF; overflow: hidden; }
.hs-bt > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #C58C5E, #CA602B); transition: width .5s ease; }
.hs-b:hover .hs-bt > i { background: linear-gradient(90deg, #E8590C, #F08A3C); }
.hs-bv { font-size: 11px; color: var(--brand); text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* KPI v2 修正：走势图改为底部通栏，避免压住说明文字 */
.kpi { display: flex; flex-direction: column; }
.kpi .k-bot { margin-top: auto; }
.kpi .k-spark { position: static; display: block; margin: 7px 0 -2px; opacity: .9; pointer-events: none; }
.kpi .k-spark svg { width: 100% !important; height: 24px !important; }
.kpi-row { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }

/* 队列行占比条 */
.qi-m { min-width: 0; flex: 1; }
.qi-bar { height: 3px; border-radius: 2px; background: #F8F4EE; margin-top: 6px; overflow: hidden; max-width: 220px; }
.qi-bar > i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg,#E08B4A,#D3713A); transition: width .45s ease; }
.qcard.info .qi-bar > i { background: linear-gradient(90deg,#D0AA7B,#CA602B); }
.qcard.danger .qi-bar > i { background: linear-gradient(90deg,#E0786A,#C0392B); }
.qi:hover .qi-bar > i { filter: saturate(1.15); }

/* KPI 进度条：放在数值正下方，读作进度而不是分隔线 */
.kpi .k-bar { height: 5px; margin: 6px 0 2px; background: #F7F1E9; }
.kpi .k-bar > i { background: linear-gradient(90deg,#8C6FD1,#B79CE8); }

/* 列表页数据条 v2 */
.strip { border-radius: 12px; box-shadow: 0 1px 2px rgba(62,43,28,.045), 0 10px 22px -18px rgba(62,43,28,.4); }
.strip .it { position: relative; padding: 12px 14px 13px 16px; transition: background .14s; }
.strip .it:hover { background: #FEFDFB; }
.strip .it::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
  background: #F2E8DC; opacity: 0; transition: opacity .14s;
}
.strip .it.red::before { background: #DE6B5B; opacity: 1; }
.strip .it.amber::before { background: #E0A03A; opacity: 1; }
.strip .it.green::before { background: #2FA98D; opacity: 1; }
.strip .it .l { letter-spacing: .2px; }
.strip .it .v { font-size: 19px; letter-spacing: -.5px; }

/* 异常中心优先显示待处理清单。 */
.ex-filters { display: flex; flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.ex-filters .seg { flex-wrap: wrap; }
.ex-filters select { max-width: 180px; }
.ex-analytics { margin-top: 14px; }
.ex-analytics summary { cursor: pointer; padding: 12px 16px; font-weight: 650; }
.ex-analytics .ex-analysis-body { padding: 0 12px 12px; }
.ex-order-link { display: inline-flex; align-items: center; gap: 3px; }
.exception-title { text-align: left; max-width: 100%; }
