/* 机务管理 · 轮胎管理（2026-10-07 王总）
   主色 #1890ff，复用 xh/theme.css 令牌；零 CDN、零框架 */

.tire-wrap { padding: 0; }

/* ---------------- 工具条 ---------------- */
.tire-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid #e4e7ec;
}
.tire-bar .sel { min-width: 190px; }
.tire-bar .sep { flex: 1; }
.tire-plate-sub { font-size: 12px; color: #98a2b3; margin-left: 6px; }

/* ---------------- KPI ---------------- */
.tire-kpis { display: flex; gap: 12px; padding: 14px 14px 0; flex-wrap: wrap; }
.tire-kpi {
  flex: 1; min-width: 130px; background: #fff; border: 1px solid #e4e7ec;
  border-radius: 8px; padding: 11px 13px;
}
.tire-kpi .n { font-size: 21px; font-weight: 600; color: #14395e; line-height: 1.25; }
.tire-kpi .l { font-size: 12px; color: #98a2b3; margin-top: 2px; }
.tire-kpi.is-on .n { color: #1890ff; }
.tire-kpi.is-gap .n { color: #fa8c16; }
.tire-kpi.is-warn .n { color: #f5222d; }
.tire-kpi.is-scrap .n { color: #8c8c8c; }

/* ---------------- 主体两栏 ---------------- */
.tire-main { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.tire-panel {
  background: #fff; border: 1px solid #e4e7ec; border-radius: 8px; padding: 13px;
}
.tire-panel-h {
  font-size: 13px; font-weight: 600; color: #14395e;
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.tire-vpanel { width: 440px; flex: 0 0 auto; }
.tire-lpanel { flex: 1; min-width: 0; }

/* 车头/挂车 切换 */
.tire-seg {
  display: inline-flex; border: 1px solid #e4e7ec; border-radius: 6px;
  overflow: hidden; margin-left: auto;
}
.tire-seg button {
  border: 0; background: #fff; padding: 4px 13px; font-size: 12px;
  cursor: pointer; font-family: inherit; color: #475467; transition: .15s;
}
.tire-seg button.on { background: #1890ff; color: #fff; }
.tire-seg button:not(.on):hover { color: #1890ff; }

/* ---------------- 俯视图 ---------------- */
.tire-svg { display: block; width: 100%; }
.tire-cell { cursor: pointer; }
.tire-cell rect { transition: stroke-width .15s, fill .15s; }
.tire-cell:hover rect { stroke-width: 2.5; }
.tire-cell:hover .pos-name { text-decoration: underline; }
.tire-cell.st-mounted rect { fill: #e6f4ff; stroke: #1890ff; }
.tire-cell.st-empty rect { fill: #fff7e6; stroke: #fa8c16; stroke-dasharray: 4 3; }
.tire-cell.st-na rect { fill: #fafafa; stroke: #d9d9d9; }
.tire-cell.st-warn rect { fill: #fff1f0; stroke: #f5222d; }
.tire-cell text { pointer-events: none; }
.pos-name { font-size: 9.5px; font-weight: 600; fill: #14395e; }
.st-empty .pos-name { fill: #ad4e00; }
.st-warn .pos-name { fill: #a8071a; }
.tire-tno { font-size: 9px; fill: #1890ff; }
.st-empty .tire-tno { fill: #d46b08; }
.st-warn .tire-tno { fill: #cf1322; }
.axle-lb { font-size: 10px; fill: #98a2b3; text-anchor: middle; }
.grp-lb { font-size: 11.5px; fill: #1890ff; font-weight: 600; text-anchor: middle; }
.na-lb { font-size: 12px; fill: #bfbfbf; text-anchor: middle; }

/* 图例 */
.tire-legend {
  display: flex; gap: 13px; flex-wrap: wrap; font-size: 11.5px;
  color: #475467; margin-top: 9px; padding-top: 9px; border-top: 1px dashed #e4e7ec;
}
.tire-legend i {
  display: inline-block; width: 11px; height: 11px; border-radius: 2px;
  vertical-align: -1px; margin-right: 4px; border: 1.5px solid;
}
.lg-on { background: #e6f4ff; border-color: #1890ff; }
.lg-empty { background: #fff7e6; border-color: #fa8c16; }
.lg-warn { background: #fff1f0; border-color: #f5222d; }
.lg-na { background: #fafafa; border-color: #d9d9d9; }

/* ---------------- 清单表 ---------------- */
.tire-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tire-tbl th {
  background: #f0f4f9; color: #14395e; font-weight: 500; font-size: 12px;
  padding: 8px 7px; text-align: left; border-bottom: 1px solid #e4e7ec;
  position: sticky; top: 0; z-index: 2;
}
.tire-tbl td { padding: 7px; border-bottom: 1px solid #f2f4f7; color: #475467; }
.tire-tbl tbody tr:hover td { background: #fafcff; }
.tire-tbl .pos-cell { font-weight: 600; color: #14395e; }
.tire-tbl .tno-cell { color: #1890ff; font-family: Consolas, Monaco, monospace; letter-spacing: .3px; }
.tire-tbl .warn-txt { color: #f5222d; font-weight: 600; }
.tire-tbl .empty-txt { color: #bfbfbf; }
.tire-tbl-wrap { max-height: 560px; overflow: auto; }

.tire-tag {
  display: inline-block; padding: 1px 7px; border-radius: 9px;
  font-size: 11px; line-height: 1.65;
}
.tag-on { background: #e6f4ff; color: #1890ff; }
.tag-empty { background: #fff7e6; color: #d46b08; }
.tag-warn { background: #fff1f0; color: #cf1322; }
.tag-stock { background: #f6ffed; color: #52c41a; }
.tag-repair { background: #fff7e6; color: #d46b08; }
.tag-scrap { background: #f5f5f5; color: #8c8c8c; }

/* ---------------- 换胎弹窗 ---------------- */
.tire-dlg { width: 560px; max-width: 94vw; }
.tire-dlg .cur-box {
  background: #f6faff; border: 1px solid #d6e9ff; border-radius: 8px;
  padding: 11px 13px; margin-bottom: 14px; font-size: 12.5px;
}
.tire-dlg .cur-title { font-weight: 600; color: #14395e; margin-bottom: 7px; }
.tire-dlg .cur-row {
  display: flex; justify-content: space-between; padding: 3px 0; color: #475467;
}
.tire-dlg .cur-row b { color: #1f2937; font-weight: 500; }
.tire-dlg .cur-note {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d6e9ff;
  color: #fa8c16; font-size: 12px;
}
.tire-dlg .cur-empty { color: #d46b08; font-weight: 600; }
.tire-fg { margin-bottom: 12px; }
.tire-fg label { display: block; font-size: 12.5px; color: #475467; margin-bottom: 5px; }
.tire-fg label i { color: #f5222d; font-style: normal; }
.tire-fg input, .tire-fg select {
  width: 100%; border: 1px solid #e4e7ec; border-radius: 6px;
  padding: 8px 10px; font-size: 13px; font-family: inherit; box-sizing: border-box;
  color: #1f2937; background: #fff;
}
.tire-fg input:focus, .tire-fg select:focus {
  outline: 0; border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.12);
}
.tire-fg input[readonly] { background: #f7f8fa; color: #98a2b3; }
.tire-fg .hint { font-size: 11.5px; color: #98a2b3; margin-top: 4px; }
.tire-fg .err { font-size: 11.5px; color: #f5222d; margin-top: 4px; }
.tire-row2 { display: flex; gap: 12px; }
.tire-row2 .tire-fg { flex: 1; }
.tire-row2 .tire-fg.mid { flex: 0 0 130px; }

/* 新胎现场建档折叠区 */
.tire-newbox { background: #fafcff; border: 1px dashed #d6e9ff; border-radius: 8px; padding: 11px 12px; }
.tire-newbox-t { font-size: 12px; color: #1890ff; font-weight: 600; margin-bottom: 9px; }

/* ---------------- 空态 ---------------- */
.tire-empty { text-align: center; padding: 44px 16px; color: #98a2b3; font-size: 13px; }
.tire-empty .ic { font-size: 30px; color: #d9d9d9; margin-bottom: 10px; }
