/* 维保工作站模块样式（增量，不影响既有 styles.css） */
.svc-root { display: flex; flex-direction: column; gap: 12px; }
.svc-tabs { display: flex; gap: 8px; }
.svc-tab { border: 1px solid #d0d5dd; background: #fff; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.svc-tab.active { background: #2d6a24; border-color: #2d6a24; color: #fff; font-weight: 600; }
.svc-content { display: flex; flex-direction: column; gap: 12px; }
.svc-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.svc-toolbar .input { max-width: 280px; }
.svc-input-sm { max-width: 120px !important; }
.svc-crumb { font-size: 14px; color: #344054; font-weight: 600; }
.svc-pills { display: flex; gap: 6px; }
.svc-pill { border: 1px solid #d0d5dd; border-radius: 999px; background: #fff; padding: 5px 14px; font-size: 12px; cursor: pointer; }
.svc-pill.active { background: #2d6a24; border-color: #2d6a24; color: #fff; }
.svc-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; overflow: hidden; }
.svc-table th { text-align: left; font-size: 12px; color: #667085; font-weight: 600; padding: 9px 12px; border-bottom: 1px solid #e4e7ec; background: #f9fafb; }
.svc-table td { padding: 9px 12px; border-bottom: 1px solid #f2f4f7; vertical-align: top; }
.svc-table-sm th, .svc-table-sm td { padding: 5px 8px; font-size: 12px; }
.svc-row-link { cursor: pointer; }
.svc-row-link:hover td { background: #f6f9f5; }
.svc-empty { text-align: center; color: #98a2b3; padding: 18px; font-size: 13px; }
.svc-empty-sm { padding: 6px 0; font-size: 12px; }
.svc-muted { color: #667085; font-size: 12px; }
.svc-mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.svc-tag { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 600; background: #eef0f3; color: #475467; }
.svc-level-A { background: #eaf3e8; color: #2d6a24; }
.svc-level-B { background: #e8f0fe; color: #1a56db; }
.svc-level-C { background: #eef0f3; color: #667085; }
.svc-plan-active { background: #e8f0fe; color: #1a56db; }
.svc-plan-done { background: #eaf3e8; color: #2d6a24; }
.svc-plan-archived { background: #eef0f3; color: #667085; }
.svc-btn-sm { padding: 4px 10px; font-size: 12px; }
.svc-btn-xs { padding: 2px 8px; font-size: 11px; }
.svc-pager { display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 12px; color: #667085; }
.svc-card { border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; padding: 14px 16px; }
.svc-kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 20px; }
.svc-kv-grid span { display: block; font-size: 11px; color: #667085; }
.svc-kv-grid strong { font-size: 13px; font-weight: 600; }
.svc-h3 { margin: 6px 0 0; font-size: 14px; }
.svc-form-card { border: 1px solid #b7d3ae; border-radius: 10px; background: #fbfefb; padding: 14px 16px; }
.svc-form-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: #2d6a24; }
.svc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.svc-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475467; }
.svc-span-2 { grid-column: span 2; }
.svc-form-actions { display: flex; gap: 8px; margin-top: 12px; }
.svc-gps-row { flex-direction: row !important; align-items: center; gap: 8px; }
.svc-machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.svc-machine-card { border: 1px solid #e4e7ec; border-radius: 10px; overflow: hidden; background: #fff; }
.svc-machine-photo { height: 120px; background: #f2f4f7; display: flex; align-items: center; justify-content: center; }
.svc-machine-photo img { width: 100%; height: 100%; object-fit: cover; }
.svc-photo-ph { color: #98a2b3; font-size: 12px; }
.svc-machine-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.svc-machine-ops { display: flex; gap: 6px; margin-top: 6px; }
.svc-mf-results { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.svc-mf-item { text-align: left; border: 1px solid #e4e7ec; border-radius: 8px; background: #fff; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.svc-mf-item.active, .svc-mf-item:hover { border-color: #2d6a24; background: #f4f9f1; }
.svc-plan-head { padding: 10px 16px; }
.svc-watch-banner { border: 1px solid #fdb022; background: #fffaeb; color: #b54708; border-radius: 10px; padding: 9px 14px; font-size: 12px; }
.svc-watch-item { margin-right: 10px; white-space: nowrap; }
.svc-workspace { display: flex; gap: 12px; align-items: flex-start; }
.svc-tree-col { width: 280px; flex-shrink: 0; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; padding: 10px; max-height: 72vh; overflow-y: auto; }
.svc-tree-title { font-size: 12px; color: #667085; margin-bottom: 6px; }
.svc-tree-node { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.svc-tree-node:hover { background: #f6f9f5; }
.svc-tree-node.sel { background: #eaf3e8; color: #2d6a24; font-weight: 600; }
.svc-tree-arrow { width: 16px; text-align: center; color: #667085; flex-shrink: 0; }
.svc-tree-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-tree-other { border-top: 1px dashed #e4e7ec; margin-top: 6px; border-radius: 0 0 6px 6px; }
.svc-badge { background: #2d6a24; color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 7px; }
.svc-detail-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.svc-detail-hint { border: 1px dashed #d0d5dd; border-radius: 10px; padding: 40px; }
.svc-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.svc-detail-head h3 { margin: 0; font-size: 15px; }
.svc-drawing-wrap { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.svc-drawing-view { flex: 1; min-width: 300px; }
.svc-drawing-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #667085; font-size: 11px; }
.svc-drawing-tools > div { display: flex; gap: 4px; }
.svc-zoom-btn { width: 27px; height: 27px; padding: 0; }
.svc-drawing-stage { position: relative; height: 480px; overflow: hidden; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; cursor: grab; touch-action: none; }
.svc-drawing-stage.panning { cursor: grabbing; }
.svc-drawing-canvas { position: relative; width: 100%; transform-origin: center center; transition: transform 100ms ease-out; }
.svc-drawing-stage.panning .svc-drawing-canvas { transition: none; }
.svc-drawing-canvas .svc-drawing-img { user-select: none; -webkit-user-select: none; pointer-events: none; }
.svc-drawing-img-box { border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; overflow: auto; max-height: 480px; }
.svc-drawing-img { width: 100%; display: block; }
@media (max-width: 720px) { .svc-drawing-stage { height: 320px; } }
.svc-drawing-parts { width: 380px; flex-shrink: 1; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; padding: 10px; max-height: 480px; overflow-y: auto; }
.svc-parts-title { font-size: 12px; font-weight: 700; color: #344054; margin-bottom: 6px; }
.svc-part-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid #e4e7ec; }
.svc-record-form { border-color: #b7d3ae; }
.svc-parts-editor { margin-top: 10px; border-top: 1px dashed #e4e7ec; padding-top: 8px; }
.svc-parts-editor-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 600; color: #475467; margin-bottom: 6px; }
.svc-part-row { display: grid; grid-template-columns: 160px 1fr 70px 32px; gap: 6px; margin-bottom: 6px; }
.svc-records { display: flex; flex-direction: column; gap: 10px; }
.svc-record-card { border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; padding: 12px 14px; }
.svc-record-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.svc-status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.svc-gps-chip { background: #eef4ff; color: #175cd3; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.svc-record-memo { margin-top: 6px; font-size: 13px; white-space: pre-wrap; }
.svc-record-conc { margin-top: 4px; font-size: 12px; color: #2d6a24; }
.svc-record-parts { margin-top: 6px; font-size: 12px; color: #475467; }
.svc-record-media { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.svc-media-cell { border: 1px solid #e4e7ec; border-radius: 8px; }
.svc-media-img { width: 84px; height: 84px; object-fit: cover; cursor: zoom-in; }
.svc-media-img[data-annotated="1"] { outline: 2px solid #d92d20; }
a.svc-media-cell { display: inline-flex; align-items: center; padding: 6px 12px; font-size: 12px; color: #175cd3; text-decoration: none; }
.svc-media-wrap { position: relative; display: inline-block; }
.svc-media-del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: none; background: #d92d20; color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; z-index: 2; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.svc-media-del:hover { background: #b42318; }
.svc-overlay { position: fixed; inset: 0; background: rgba(16, 24, 40, 0.55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.svc-overlay-card { background: #fff; border-radius: 12px; max-width: 860px; width: 100%; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.svc-overlay-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e4e7ec; }
.svc-overlay-body { padding: 14px 16px; overflow-y: auto; }
.svc-history-item { border-bottom: 1px dashed #e4e7ec; padding: 8px 0; font-size: 13px; }
.svc-annotate-card { max-width: 980px; }
.svc-annotate-toolbar { display: flex; gap: 8px; align-items: center; padding: 8px 16px; border-bottom: 1px solid #e4e7ec; flex-wrap: wrap; }
.svc-tool { border: 1px solid #d0d5dd; background: #fff; border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; }
.svc-tool.active { border-color: #2d6a24; background: #eaf3e8; color: #2d6a24; font-weight: 600; }
.svc-annotate-stage { position: relative; overflow: auto; max-height: 70vh; background: #101828; display: flex; justify-content: center; }
.svc-annotate-stage img { max-width: 100%; display: block; }
.svc-annotate-stage canvas { position: absolute; top: 0; left: 50%; transform: translateX(-50%); touch-action: none; cursor: crosshair; }
.svc-report-card { max-width: 900px; }
.svc-report-actions { padding: 10px 16px; border-bottom: 1px solid #e4e7ec; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.svc-report-list { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-report-body { overflow-y: auto; padding: 0 16px 16px; }
.svc-report-toolbar { display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.svc-sign-img { height: 40px; border: 1px solid #e4e7ec; border-radius: 6px; }
.svc-sign-pad { margin-top: 10px; }
.svc-sign-pad canvas { border: 1px dashed #98a2b3; border-radius: 8px; background: #fff; touch-action: none; width: 100%; max-width: 480px; }
@media (max-width: 900px) {
  .svc-form-grid { grid-template-columns: 1fr; }
  .svc-span-2 { grid-column: span 1; }
  .svc-workspace { flex-direction: column; }
  .svc-tree-col { width: 100%; max-height: 300px; }
  .svc-drawing-parts { width: 100%; }
  .svc-part-row { grid-template-columns: 120px 1fr 60px 32px; }
}
/* 检修报告排版（快照 HTML 使用 .rpt 前缀，打印友好） */
.rpt { font-size: 13px; color: #1d2939; padding: 18px 4px; line-height: 1.7; word-break: break-word; overflow-wrap: anywhere; }
.rpt-head { text-align: center; border-bottom: 2px solid #2d6a24; padding-bottom: 10px; margin-bottom: 14px; }
.rpt-head h1 { font-size: 20px; color: #2d6a24; margin: 0 0 4px; }
.rpt-no { font-size: 12px; color: #667085; }
.rpt h2 { font-size: 14px; margin: 16px 0 6px; color: #344054; border-left: 3px solid #2d6a24; padding-left: 8px; }
.rpt-kv { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.rpt-kv td { border: 1px solid #e4e7ec; padding: 6px 10px; font-size: 12px; }
.rpt-kv .k { background: #f9fafb; color: #667085; width: 90px; white-space: nowrap; }
.rpt-summary { background: #f4f9f1; border: 1px solid #b7d3ae; border-radius: 8px; padding: 8px 12px; font-size: 12px; margin: 8px 0; }
.rpt-group { margin-bottom: 8px; }
.rpt-record { border: 1px solid #e4e7ec; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; page-break-inside: avoid; }
.rpt-record-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.rpt-status { border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; color: #fff; background: #667085; }
.rpt-status-green { background: #1a7f37; }
.rpt-status-yellow { background: #b54708; }
.rpt-status-orange { background: #c2410c; }
.rpt-status-blue { background: #175cd3; }
.rpt-status-red { background: #d92d20; }
.rpt-status-gray { background: #667085; }
.rpt-meta { font-size: 11px; color: #667085; }
.rpt-memo { font-size: 12px; margin: 4px 0; }
.rpt-conc { font-size: 12px; color: #2d6a24; }
.rpt-parts { font-size: 11px; color: #475467; margin-top: 4px; }
.rpt-media { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rpt-media img { width: 90px; height: 90px; object-fit: cover; border: 1px solid #e4e7ec; border-radius: 6px; }
.rpt-video { font-size: 11px; color: #175cd3; border: 1px solid #b2ddff; border-radius: 6px; padding: 4px 8px; }
.rpt-sign { display: flex; justify-content: space-between; margin-top: 24px; font-size: 12px; color: #475467; }
@page { size: A4; margin: 14mm 12mm; }
@media print {
  body { background: #fff !important; }
  body * { visibility: hidden; }
  .svc-report-body, .svc-report-body * { visibility: visible; }
  .svc-overlay { position: static !important; padding: 0 !important; background: none !important; backdrop-filter: none !important; }
  .svc-overlay-card { box-shadow: none !important; border: none !important; max-width: none !important; max-height: none !important; overflow: visible !important; border-radius: 0 !important; }
  .svc-overlay-head, .svc-report-actions { display: none !important; }
  .svc-report-body { position: absolute; left: 0; top: 0; width: 100%; padding: 0 !important; overflow: visible !important; }
  .no-print { display: none !important; }
  .rpt { padding: 0; }
  .rpt-record, .rpt-sign-table, .rpt-summary { page-break-inside: avoid; }
  .rpt-head { page-break-after: avoid; }
  .rpt h2 { page-break-after: avoid; }
  .rpt-media img { max-width: 32mm; max-height: 32mm; width: auto; height: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* v1.3.3 工单备注名 / 回收站 / 小时数预警 / 树搜索 */
.svc-nickname { color: #2d6a24; font-size: 12px; font-weight: 600; }
.svc-actions { white-space: nowrap; }
.svc-danger { color: #c0392b !important; border-color: #c0392b !important; }
.svc-hours-alert { color: #c0392b; }
.svc-alert-flag { color: #c0392b; font-size: 12px; font-weight: 600; }
.svc-machine-alert { border: 1.5px solid #c0392b !important; box-shadow: 0 0 0 2px rgba(192, 57, 43, .12); }
.svc-work-memo { margin-top: 8px; padding: 8px 10px; background: #fff8e1; border: 1px solid #f0e0a8; border-radius: 8px; font-size: 13px; white-space: pre-wrap; }
.svc-work-memo span { display: block; font-size: 11px; color: #999; margin-bottom: 2px; }
.svc-plan-head-actions { margin-top: 8px; }
.svc-tree-search { width: calc(100% - 8px); margin: 0 4px 6px; font-size: 13px; padding: 6px 10px; }
.svc-tree-hit { cursor: pointer; }
.svc-tree-hit:hover { background: #eef5ea; }
.svc-tree-path { font-size: 11px; margin-left: 6px; }

/* v1.4.0 报告分享 / 双签名 */
.svc-share-box { border: 1px solid #b2ddff; background: #f0f7ff; border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px; }
.svc-share-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.svc-share-row .k { color: #475467; white-space: nowrap; }
.svc-share-row input { flex: 1; padding: 6px 8px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 13px; background: #fff; }
.svc-sign-thumb { display: inline-flex; flex-direction: column; align-items: center; font-size: 11px; color: #667085; }
.svc-sign-table { page-break-inside: avoid; }

/* 全部记录总览：状态筛选 chips + 位置行 */
.svc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.svc-chip {
  border: 1px solid #d0d5dd;
  background: #fff;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #344054;
}
.svc-chip.on {
  background: #2d6a24;
  border-color: #2d6a24;
  color: #fff;
}
.svc-record-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #175cd3;
  margin-bottom: 4px;
}

.svc-price { color: #2d6a24; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.svc-part-search-input { width: 190px; padding: 6px 10px; border: 1px solid #cfdccb; border-radius: 8px; font-size: 13px; background: #fff; }
.svc-part-search-input:focus { outline: 2px solid #2d6a2433; border-color: #2d6a24; }
