/* 客户运维 · 维保计划（后台 + 前台设备维保） */

/* ---------- 前台：计划列表 ---------- */
.sp-panel .sp-stats{margin-bottom:12px}
.sp-stats>div.alert b{color:#ef7523}
.sp-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.sp-card{border:1px solid #edf0f2;border-radius:10px;padding:13px 15px;background:#fff}
.sp-card.is-pending{border-color:#f7d9c2;background:#fffdfb}
.sp-card.is-off{opacity:.62}
.sp-card-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:9px}
.sp-card-head b{font-size:13.5px;color:#1f2b33;font-weight:600}
.sp-type{font-size:12px;line-height:1;padding:4px 7px;border-radius:4px;background:#f4f7f8;color:#5f6d76;border:1px solid #e8edf0;white-space:nowrap}
.sp-status{margin-left:auto;font-size:12px;line-height:1;padding:4px 8px;border-radius:20px;white-space:nowrap}
.sp-status.pending{background:#fff3e8;color:#ef7523;border:1px solid #f7d9c2}
.sp-status.confirmed{background:#eef5fb;color:#2f6f9f;border:1px solid #d6e6f4}
.sp-status.serving{background:#eaf6f1;color:#166534;border:1px solid #cfe9df}
.sp-status.done{background:#f2f6f3;color:#4f6b5d;border:1px solid #dde8e1}
.sp-status.cancelled{background:#f4f6f7;color:#5f6b76;border:1px solid #e8ecef}
.sp-card-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px 16px;font-size:12px;color:#4c5960}
.sp-card-meta span{display:flex;gap:6px;align-items:baseline;min-width:0}
.sp-card-meta i{font-style:normal;color:#5f6b76;font-size:12px;flex:none}
.sp-card-meta span:nth-child(1){grid-column:1/-1}
.sp-card-note{margin:9px 0 0;padding:7px 10px;background:#fafbfc;border-radius:6px;font-size:12px;color:#5f6d76;line-height:1.7}
.sp-card-tip{margin:9px 0 0;font-size:12px;color:#ef7523}
.sp-card-ops{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:11px}
.sp-card-ops .primary,.sp-card-ops .outline{font-size:12px;padding:6px 14px;border-radius:6px;cursor:pointer}
.sp-card-ops .primary{background:#ef7523;border:1px solid #ef7523;color:#fff}
.sp-card-ops .outline{background:#fff;border:1px solid #e2e7ea;color:#4c5960}
.sp-link{border:0;background:none;color:#5f6b76;font-size:12px;cursor:pointer;padding:4px 2px;text-decoration:underline}
.sp-link:hover{color:#ef7523}

/* 评价展示 */
.sp-rating{margin-top:10px;padding:10px 12px;border:1px dashed #f0dcc9;border-radius:8px;background:#fffdfa}
.sp-rating-head{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:6px}
.sp-stars{color:#ef7523;letter-spacing:1.5px;font-size:13px;line-height:1}
.sp-rating-head span{font-size:12px;color:#ef7523;font-weight:600}
.sp-rating-head em{font-style:normal;font-size:12px;color:#5f6b76;margin-left:auto}
.sp-rating p{margin:0;font-size:12px;color:#3d4a52;line-height:1.75;white-space:pre-wrap}
.sp-rating-imgs{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
.sp-rating-imgs img{width:74px;height:74px;object-fit:cover;border-radius:6px;border:1px solid #edf0f2;display:block}

/* 配件更换提醒区块 */
.sp-parts{margin-top:22px;padding-top:18px;border-top:1px solid #f0f3f5}
.sp-parts-head{margin-bottom:10px}
.sp-parts-head h3{margin:0 0 4px;font-size:13px;color:#2f3a42;font-weight:600}
.sp-parts-head .fc-dev-hint{margin:0}

/* ---------- 弹窗表单 ---------- */
.sp-field{display:block;margin-top:12px}
.sp-field .fc-label{display:block;margin-bottom:5px}
.sp-field textarea,.sp-field input{width:100%;box-sizing:border-box}
#sp-plan-form .note{margin:12px 0 0;line-height:1.7}
.sp-rate-title{margin:0 0 3px;font-size:13.5px;color:#1f2b33;font-weight:600}
.sp-rate-sub{margin:0 0 14px;font-size:12px;color:#5f6b76}
.sp-rate-stars{border:1px solid #edf0f2;border-radius:8px;padding:12px 14px;background:#fafbfc}
.sp-star-row{display:flex;gap:4px;margin:8px 0 4px}
.sp-star-btn{border:0;background:none;font-size:26px;line-height:1;color:#e3e8ec;cursor:pointer;padding:0 2px;transition:color .12s,transform .12s}
.sp-star-btn:hover{transform:translateY(-2px)}
.sp-star-btn.on{color:#ef7523}
.sp-star-tip{font-style:normal;font-size:12px;color:#ef7523}
.sp-rate-imgs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.sp-rate-img{position:relative;width:76px;height:76px;border-radius:6px;overflow:hidden;border:1px solid #edf0f2}
.sp-rate-img img{width:100%;height:100%;object-fit:cover;display:block}
.sp-rate-img button{position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;border:0;background:rgba(30,40,48,.66);color:#fff;font-size:12px;line-height:1;cursor:pointer;padding:0}
.sp-upload{display:inline-flex;align-items:center;gap:6px;border:1px dashed #dfe5e9;border-radius:6px;padding:7px 12px;font-size:12px;color:#5f6d76;cursor:pointer;background:#fff}
.sp-upload:hover{border-color:#ef7523;color:#ef7523}
.sp-upload-tip{display:block;font-size:12px;color:#5f6b76;margin-top:6px}

/* ---------- 后台：维保计划面板 ---------- */
.sp-admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.sp-admin-stats>div{border:1px solid #edf0f2;border-radius:10px;padding:12px 14px;background:#fff}
.sp-admin-stats b{display:block;font-size:20px;color:#1f2b33;line-height:1.2}
.sp-admin-stats span{font-size:12px;color:#5f6b76}
.sp-admin-stats>div.is-alert{border-color:#f7d9c2;background:#fffaf5}
.sp-admin-stats>div.is-alert b{color:#ef7523}
.sp-table{min-width:0}
.sp-table td{vertical-align:top}
.sp-table td:nth-child(1){min-width:190px}
.sp-table td:nth-child(2){min-width:140px}
.sp-table td:nth-child(5),.sp-table td:nth-child(6){white-space:nowrap}
.sp-table .sp-ops{min-width:118px}
.sp-code{display:block;font-size:12px;color:#5f6b76;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:500}
.sp-cell-main{display:block;font-size:12.5px;color:#243038;font-weight:600;margin:3px 0 2px;line-height:1.5}
.sp-tag{display:inline-block;font-size:12px;line-height:1;padding:4px 8px;border-radius:20px;white-space:nowrap}
.sp-tag.pending{background:#fff3e8;color:#ef7523;border:1px solid #f7d9c2}
.sp-tag.confirmed{background:#eef5fb;color:#2f6f9f;border:1px solid #d6e6f4}
.sp-tag.serving{background:#eaf6f1;color:#166534;border:1px solid #cfe9df}
.sp-tag.done{background:#f2f6f3;color:#4f6b5d;border:1px solid #dde8e1}
.sp-tag.cancelled{background:#f4f6f7;color:#5f6b76;border:1px solid #e8ecef}
.sp-score{display:inline-block;font-size:12px;color:#ef7523;font-weight:600;white-space:nowrap}
.sp-wait{font-size:12px;color:#5f6b76}
.sp-ops{white-space:nowrap}
.sp-ops button{border:0;background:none;color:#2f6f9f;font-size:12px;cursor:pointer;padding:2px 6px}
.sp-ops button:hover{text-decoration:underline}
.sp-ops button.sp-danger{color:#b4453a}
.sp-admin-rating{margin-top:14px;padding:11px 13px;border:1px dashed #f0dcc9;border-radius:8px;background:#fffdfa}
.sp-rating-dialog .sp-rate-title{margin-bottom:2px}

@media (max-width:1100px){
  .sp-admin-stats{grid-template-columns:repeat(2,1fr)}
  .sp-card-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .sp-admin-stats{gap:8px}
  .sp-admin-stats b{font-size:17px}
  .sp-card-meta{grid-template-columns:1fr}
  .sp-card-meta span:nth-child(1){grid-column:auto}
  .sp-star-btn{font-size:23px}
  .sp-rating-imgs img,.sp-rate-img{width:64px;height:64px}
}

/* ---------- 弹窗排版：与前台「修改维保计划」一致 ---------- */
.sp-form .fc-label,.sp-form .mg-field>span{font-size:12px;color:#5f6b76;font-weight:500;letter-spacing:.01em}
.sp-form .mg-field{font-size:12px;font-weight:500;color:#5f6b76;margin:0 0 14px;line-height:1.6}
.sp-form .mg-field>span{display:block;margin-bottom:6px}
.sp-form .mg-field>b{color:#ef7523;font-size:12px}
.sp-form .fc-form-grid{gap:12px 16px;margin-bottom:12px}
.sp-form .fc-form-grid label{gap:6px}
.sp-form .mg-field>input,.sp-form .mg-field>select,.sp-form .mg-field>textarea{display:block;width:100%;box-sizing:border-box;border:1px solid #e2e7ea;border-radius:8px;padding:10px 12px;font-size:14px;color:#33414a;background:#fff;margin-top:0;line-height:1.5}
.sp-form .fc-form-grid input,.sp-form .fc-form-grid select{border:1px solid #e2e7ea;border-radius:8px;padding:10px 12px;font-size:14px;color:#33414a;background:#fff}
.sp-form .mg-field textarea{min-height:84px;resize:vertical}
.sp-form .mg-field input:focus,.sp-form .mg-field select:focus,.sp-form .mg-field textarea:focus,
.sp-form .fc-form-grid input:focus,.sp-form .fc-form-grid select:focus{border-color:#f0b183;outline:0;box-shadow:0 0 0 3px rgba(239,117,35,.08)}
.sp-form .note{margin:12px 0 0;font-size:12px;line-height:1.7}
.sp-form .fc-dialog-actions{margin-top:16px}
.sp-form .fc-dialog-actions .primary,.sp-form .fc-dialog-actions .outline{font-size:13px;padding:9px 18px;border-radius:8px}

/* ---------- 工程师：多选标签 ---------- */
.sp-eng-list{display:inline-flex;flex-direction:column;gap:2px;min-width:0}
.sp-eng-line{display:inline-flex;align-items:baseline;gap:5px;font-size:12px;color:#3d4a52;flex-wrap:wrap}
.sp-eng-line.sub{color:#6b7880}
.sp-eng-line a{color:#2f6f9f;text-decoration:none;font-variant-numeric:tabular-nums}
.sp-eng-line a:hover{text-decoration:underline}
.sp-eng-line i{font-style:normal;font-size:12px;line-height:1;padding:2px 5px;border-radius:3px;background:#f4f7f8;color:#5f6b76;border:1px solid #e8edf0}
.sp-eng-line i.main{background:#fff3e8;color:#ef7523;border-color:#f7d9c2}
.sp-eng-cell{grid-column:1/-1}
.sp-eng-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.sp-eng-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid #e2e7ea;border-radius:20px;padding:5px 11px;font-size:12px;color:#4c5960;cursor:pointer;background:#fff}
.sp-eng-chip input{width:13px;height:13px;margin:0;accent-color:#ef7523}
.sp-eng-chip small{font-size:12px;color:#5f6b76}
.sp-eng-chip:has(input:checked){border-color:#f6b98c;background:#fff8f2;color:#ef7523}
.sp-empty-inline{margin:6px 0 0;font-size:12px;color:#5f6b76}

/* ---------- 上门记录 ---------- */
.sp-visits{list-style:none;margin:10px 0 0;padding:10px 12px;background:#fafbfc;border:1px solid #f0f3f5;border-radius:8px;display:flex;flex-direction:column;gap:8px}
.sp-visits li{display:flex;gap:9px;align-items:flex-start;font-size:12px;color:#4c5960}
.sp-visits li+li{padding-top:8px;border-top:1px dashed #e8edf0}
.sp-visit-dot{width:7px;height:7px;border-radius:50%;background:#f0b183;margin-top:5px;flex:none}
.sp-visits li.done .sp-visit-dot{background:#59a889}
.sp-visits li div{min-width:0;flex:1}
.sp-visits b{display:block;font-size:12px;color:#2f3a42;font-weight:600}
.sp-visits em{font-style:normal;color:#5f6b76;font-size:12px;margin-left:8px}
.sp-visits p{margin:2px 0 0;font-size:12px;color:#5f6d76;line-height:1.6}
.sp-visit-tag{flex:none;font-size:12px;line-height:1;padding:3px 6px;border-radius:20px;background:#fff3e8;color:#ef7523;border:1px solid #f7d9c2}
.sp-visit-tag.done{background:#eaf6f1;color:#166534;border-color:#cfe9df}
.sp-visits.compact{margin-top:9px;padding:9px 10px}
.sp-summary{margin-top:10px;padding:9px 12px;border-radius:8px;background:#f6f9f7;border:1px solid #e4eee8}
.sp-summary b{display:block;font-size:12px;color:#3f6b57;margin-bottom:3px}
.sp-summary p{margin:0;font-size:12px;color:#4c5960;line-height:1.7;white-space:pre-wrap}

/* 后台编辑上门记录 */
.sp-visits-edit{margin:4px 0 14px;border:1px solid #eef1f3;border-radius:10px;padding:12px 13px;background:#fafbfc}
.sp-visits-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sp-visits-head>span{font-size:12px;color:#4b565c;font-weight:600}
.sp-visits-head .sp-hint{display:block;font-size:12px;color:#5f6b76;font-weight:400;margin-top:3px}
.sp-visits-head .outline{font-size:12px;padding:5px 12px;border-radius:16px;border:1px solid #dfe5e9;background:#fff;color:#4c5960;cursor:pointer}
.sp-visits-head .outline:hover{border-color:#f0b183;color:#ef7523}
.sp-visit-rows{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.sp-visit-row{display:grid;grid-template-columns:140px 1fr 92px 26px;gap:8px;align-items:center}
.sp-visit-row input,.sp-visit-row select{border:1px solid #e2e7ea;border-radius:7px;padding:8px 10px;font-size:12.5px;color:#33414a;background:#fff;min-width:0;width:100%;box-sizing:border-box}
.sp-visit-row .sp-visit-del{border:0;background:none;color:#b4453a;font-size:16px;line-height:1;cursor:pointer;padding:2px}
.sp-visit-empty{margin:9px 0 0;font-size:12px;color:#5f6b76}

/* ---------- 后台：服务工程师名单 ---------- */
.se-table td{vertical-align:top}
.se-name{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:#243038;font-weight:600}
.se-dot{width:6px;height:6px;border-radius:50%;background:#59a889;display:inline-block}
.se-dot.off{background:#c2c9cd}
.se-nowrap{white-space:nowrap;font-variant-numeric:tabular-nums}
.se-count{color:#ef7523;font-size:13px}
.se-muted{color:#5f6b76;font-size:12px}
.se-account{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:#2f6f9f}
.se-table td small{display:block;font-size:12px;color:#5f6b76;margin-top:3px;line-height:1.5}

/* ---------- 工程师工作台 ---------- */
.eg-shell{background:#f4f6f8;border-radius:14px;overflow:hidden;border:1px solid #e9edf0}
.eg-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:13px 22px;background:#1f2b33;color:#fff}
.eg-brand{display:flex;align-items:center;gap:10px}
.eg-mark{width:30px;height:30px;border-radius:8px;background:#ef7523;display:grid;place-items:center;font-weight:700;font-size:14px;color:#fff}
.eg-brand b{display:block;font-size:13.5px;letter-spacing:.01em}
.eg-brand small{display:block;font-size:12px;letter-spacing:.16em;color:#5f6b76;margin-top:2px}
.eg-user{display:flex;align-items:center;gap:14px}
.eg-user b{font-size:13px}
.eg-user small{display:block;font-size:12px;color:#5f6b76;margin-top:2px}
.eg-logout{border:1px solid rgba(255,255,255,.22);background:none;color:#fff;font-size:12px;padding:5px 13px;border-radius:16px;cursor:pointer}
.eg-logout:hover{background:rgba(255,255,255,.12)}
.eg-body{padding:20px 22px 28px}
.eg-hero{background:linear-gradient(135deg,#fff 0%,#fff8f2 100%);border:1px solid #f3e2d4;border-radius:12px;padding:18px 20px;display:flex;gap:22px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.eg-kicker{font-size:12px;letter-spacing:.14em;color:#ef7523}
.eg-hero h1{margin:5px 0 5px;font-size:19px;color:#1f2b33;font-weight:650}
.eg-hero p{margin:0;font-size:12px;color:#5f6b76;line-height:1.6}
.eg-stats{display:grid;grid-template-columns:repeat(4,minmax(78px,1fr));gap:9px}
.eg-stats>div{background:#fff;border:1px solid #edf0f2;border-radius:10px;padding:9px 12px;text-align:center}
.eg-stats b{display:block;font-size:19px;color:#1f2b33;line-height:1.2}
.eg-stats span{font-size:12px;color:#5f6b76}
.eg-stats>div.alert{border-color:#f7d9c2;background:#fffaf5}
.eg-stats>div.alert b{color:#ef7523}
.eg-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 12px}
.eg-tabs button{border:1px solid #e6eaed;background:#fff;color:#4c5960;font-size:12px;padding:7px 15px;border-radius:20px;cursor:pointer}
.eg-tabs button.on{background:#ef7523;border-color:#ef7523;color:#fff}
.eg-tabs b{font-weight:600;opacity:.85;margin-left:3px}
.eg-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
.eg-card{background:#fff;border:1px solid #edf0f2;border-radius:12px;padding:14px 15px;display:flex;flex-direction:column}
.eg-card.is-overdue{border-color:#f2c9b8;box-shadow:0 2px 12px rgba(217,116,45,.09)}
.eg-card-top{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:8px}
.eg-card-top b{font-size:12px;color:#5f6b76;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.eg-role{font-style:normal;font-size:12px;line-height:1;padding:3px 6px;border-radius:3px;background:#fff3e8;color:#ef7523;border:1px solid #f7d9c2}
.eg-role.sub{background:#f4f7f8;color:#5f6b76;border-color:#e8edf0}
.eg-card-top .sp-status{margin-left:auto}
.eg-card h3{margin:0 0 9px;font-size:14px;color:#1f2b33;font-weight:600;line-height:1.55}
.eg-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px;font-size:12px;color:#4c5960}
.eg-meta span{display:flex;gap:6px;min-width:0;align-items:baseline}
.eg-meta i{font-style:normal;color:#5f6b76;font-size:12px;flex:none}
.eg-meta em{font-style:normal}
.eg-over{color:#c0392b;font-size:12px;font-weight:600}
.eg-note{margin:9px 0 0;font-size:12px;color:#5f6d76;line-height:1.65}
.eg-ops{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;padding-top:12px}
.eg-ops button{font-size:12px;padding:7px 14px;border-radius:7px;cursor:pointer;border:1px solid #e2e7ea;background:#fff;color:#4c5960}
.eg-ops button.primary{background:#ef7523;border-color:#ef7523;color:#fff}
.eg-ops button:hover{opacity:.9}
.eg-empty{grid-column:1/-1;padding:40px 0;text-align:center;font-size:12px;color:#5f6b76;background:#fff;border:1px dashed #e6eaed;border-radius:12px}
.eg-foot{margin:16px 0 0;font-size:12px;color:#5f6b76;text-align:center}
.eg-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
.eg-detail-grid span{display:block;font-size:12px;color:#5f6b76;margin-bottom:3px}
.eg-detail-grid b{font-size:12.5px;color:#243038;font-weight:500}

@media (max-width:960px){
  .eg-list{grid-template-columns:1fr}
  .sp-visit-row{grid-template-columns:1fr 1fr;grid-template-areas:'date status' 'content content' 'del del'}
  .sp-visit-row .sp-visit-date{grid-area:date}
  .sp-visit-row .sp-visit-content{grid-area:content}
  .sp-visit-row .sp-visit-status{grid-area:status}
  .sp-visit-row .sp-visit-del{grid-area:del;justify-self:end}
}
@media (max-width:760px){
  .sp-form .mg-field input,.sp-form .mg-field select,.sp-form .mg-field textarea,
  .sp-form .fc-form-grid input,.sp-form .fc-form-grid select{font-size:16px}
  .eg-body{padding:14px 13px 22px}
  .eg-stats{grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  .eg-meta{grid-template-columns:1fr}
  .eg-detail-grid{grid-template-columns:1fr}
  .sp-eng-cell{grid-column:auto}
}

/* ---------- 可搜索设备选择器 ---------- */
.sp-pick{position:relative;min-width:0}
.sp-pick-value{display:none!important}
.sp-pick-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;box-sizing:border-box;text-align:left;font-family:inherit;background:#fff;border:1px solid #e2e7ea;border-radius:8px;padding:10px 12px;font-size:14px;line-height:1.4;color:#33414a;cursor:pointer}
.sp-pick-btn>span{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-pick-btn>i{flex:0 0 auto;font-style:normal;font-size:12px;color:#5f6b76;transition:transform .16s ease}
.sp-pick-btn:hover{border-color:#d7dde1}
.sp-pick.open .sp-pick-btn{border-color:#f0b183;box-shadow:0 0 0 3px rgba(239,117,35,.08)}
.sp-pick.open .sp-pick-btn>i{transform:rotate(180deg);color:#ef7523}
.sp-pick-pop{position:absolute;z-index:60;left:0;top:calc(100% + 6px);width:max(100%,320px);display:flex;flex-direction:column;gap:6px;padding:8px;background:#fff;border:1px solid #e6eaed;border-radius:10px;box-shadow:0 18px 44px rgba(16,32,44,.16);max-height:min(360px,52vh)}
.sp-pick.up .sp-pick-pop{top:auto;bottom:calc(100% + 6px)}
.sp-pick-pop[hidden]{display:none}
.sp-pick-search{flex:0 0 auto}
.sp-pick-search input{width:100%;box-sizing:border-box;margin:0;border:1px solid #e2e7ea;border-radius:7px;padding:8px 10px;font-size:13px;line-height:1.4;color:#33414a;background:#fafbfb;font-family:inherit}
.sp-pick-search input:focus{outline:0;border-color:#f0b183;background:#fff}
.sp-pick-list{flex:1 1 auto;overflow:auto;overscroll-behavior:contain;list-style:none;margin:0;padding:2px 0 4px;max-height:240px}
.sp-pick-list li[hidden]{display:none}
.sp-pick-list li{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border-radius:7px;font-size:13px;color:#33414a;cursor:pointer}
.sp-pick-list li b{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-pick-list li small{font-size:12px;line-height:1.4;color:#5f6b76;overflow:hidden;text-overflow:ellipsis}
.sp-pick-list li:hover,.sp-pick-list li.cur{background:#fff5ec}
.sp-pick-list li.on{background:#ef7523;color:#fff}
.sp-pick-list li.on small{color:rgba(255,255,255,.88)}
.sp-pick-empty{margin:2px 0;padding:10px 4px;font-size:12px;text-align:center;color:#5f6b76}
.sp-pick-empty[hidden]{display:none}
.sp-pick-foot{flex:0 0 auto;margin:0 2px 2px;font-size:12px;line-height:1.5;color:#5f6b76}
.fc-form-grid .fc-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.mg-field.sp-pick-field{display:block}
.mg-field .sp-pick{margin-top:8px}
.mg-field .sp-pick-btn{border-color:#dde2e5;border-radius:5px;padding:11px 12px;font-size:13px}
@media(max-width:640px){
  .sp-pick-pop{max-height:min(320px,46vh);width:100%}
  .sp-pick-list{max-height:200px}
}


/* ---------- 表单控件统一：原生下拉与设备选择器同高 / 同字号 / 同箭头 ---------- */
.sp-form .sp-pick-btn{
  box-sizing:border-box;width:100%;min-width:0;margin:0;
  height:42px;padding:0 12px;
  font-family:inherit;font-size:14px;font-weight:400;line-height:1.4;
  color:#33414a;background-color:#fff;border:1px solid #e2e7ea;border-radius:8px;
}
.sp-form .mg-field>select,
.sp-form .fc-form-grid select{
  box-sizing:border-box;width:100%;min-width:0;margin:0;
  height:42px;padding:0 36px 0 12px;
  font-family:inherit;font-size:14px;font-weight:400;line-height:normal;
  color:#33414a;background-color:#fff;border:1px solid #e2e7ea;border-radius:8px;
  -webkit-appearance:none;appearance:none;cursor:pointer;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239aa4aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;
  background-position:right 12px center;background-size:12px 8px;
}
.sp-form .mg-field>select:focus,
.sp-form .fc-form-grid select:focus{border-color:#f0b183;outline:0;box-shadow:0 0 0 3px rgba(239,117,35,.08)}
.sp-pick-btn>i{
  flex:0 0 auto;width:12px;height:8px;font-size:0;line-height:0;color:transparent;
  background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%239aa4aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/12px 8px;transition:transform .16s ease;
}
.sp-pick.open .sp-pick-btn>i{transform:rotate(180deg)}

/* 多行文本域与服务内容保持同一套控件样式 */
.sp-form .sp-field textarea{
  display:block;width:100%;box-sizing:border-box;margin:0;padding:10px 12px;
  min-height:84px;border:1px solid #e2e7ea;border-radius:8px;background:#fff;
  font-family:inherit;font-size:14px;line-height:1.7;color:#33414a;resize:vertical;
}
.sp-form .sp-field textarea:focus{border-color:#f0b183;outline:0;box-shadow:0 0 0 3px rgba(239,117,35,.08)}

/* 文本框与日期框同步到同一高度，避免与下拉错位 2px */
.sp-form .fc-form-grid input,
.sp-form .mg-field>input{
  box-sizing:border-box;height:42px;padding:0 12px;
  font-size:14px;line-height:normal;
}

@media(max-width:760px){
  .sp-form .sp-pick-btn,
  .sp-form .mg-field>select,
  .sp-form .fc-form-grid select,
  .sp-form .fc-form-grid input,
  .sp-form .mg-field>input{height:46px;font-size:16px}
  .sp-form .sp-field textarea{font-size:16px}
}

/* ---------- 工程师工作台嵌入后台内容区（左侧导航 + 右侧工作台） ---------- */
.management-main .eg-body{padding:0}
.management-main .eg-body>.eg-hero{border-radius:10px}
.management-main .eg-list{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))}
@media(max-width:760px){
  .management-main .eg-body{padding:0}
  .management-main .eg-list{grid-template-columns:1fr}
}

/* ---------- 服务工程师：后台权限勾选 ---------- */
.se-perms{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.se-perm{position:relative;display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border:1px solid #e2e7ea;border-radius:16px;background:#fff;font-size:12px;line-height:1.5;color:#4c5960;cursor:pointer;user-select:none}
.se-perm input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.se-perm:hover{border-color:#f0c9ac}
.se-perm:has(input:checked){background:#fff3e8;border-color:#ef7523;color:#ef7523}
.se-perm:has(input:focus-visible){box-shadow:0 0 0 3px rgba(239,117,35,.14)}
.se-perms-note{margin:9px 0 0;font-size:12px;line-height:1.7;color:#5f6b76}

/* 服务工单关联采购与实际用件 */
.sp-lifecycle form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 24px;
}
.sp-lifecycle form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  color: #52616b;
}
.sp-lifecycle form input,
.sp-lifecycle form select,
.sp-lifecycle form textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #dfe5e9;
  border-radius: 7px;
  background: #fff;
  color: #33414b;
  font: inherit;
}
.sp-lifecycle form textarea { min-height: 88px; resize: vertical; }
.sp-lifecycle form label:has(textarea) { grid-column: 1 / -1; }
.sp-lifecycle form button { align-self: end; justify-self: start; min-height: 42px; }
.sp-lifecycle h4 { margin: 24px 0 12px; }
.sp-lifecycle p { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .sp-lifecycle form { grid-template-columns: minmax(0, 1fr); }
  .sp-lifecycle form input,
  .sp-lifecycle form select,
  .sp-lifecycle form textarea { font-size: 16px; }
}

/* 服务确认：关联故障恢复 */
.sp-recovery{border:1px solid #ffe0c7;background:#fff8f1;border-radius:8px;padding:12px 14px;margin-bottom:12px}
.sp-recovery>b{display:block;font-size:12.5px;color:#ef7523}
.sp-recovery>small{display:block;margin-top:4px;font-size:12px;color:#ef7523}
.sp-recovery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}
.sp-recovery-grid label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#5f6b76}
.sp-recovery-grid select,.sp-recovery-grid input{height:32px;border:1px solid #e0e5e8;border-radius:6px;padding:0 8px;font-size:12px;background:#fff}
.sp-recovery-pending{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;margin-top:10px;font-size:12px;color:#8a6a52}
.sp-recovery-pending input{width:15px;height:15px;accent-color:#ef7523}
@media(max-width:640px){.sp-recovery-grid{grid-template-columns:1fr}}

/* PR4 工单列表与四类详情，原生单一模态保留焦点管理。 */
.sp-filter-nav{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 20px}.sp-filter-nav b{font-variant-numeric:tabular-nums}.sp-pr4-card{padding:18px}.sp-pr4-card.is-off{opacity:1;background:#f8f9fa}.sp-pr4-card .sp-card-head{margin-bottom:10px}.sp-pr4-card .sp-status{margin-left:0;margin-right:auto;font-size:12px;line-height:1.5}.sp-pr4-card h3{margin:8px 0 14px}.sp-pr4-card h3 button{text-align:left;font-size:17px;line-height:1.5;font-weight:600;color:#202426}.sp-pr4-card .sp-card-meta{font-size:13px;gap:12px 24px}.sp-pr4-card .sp-card-meta i{font-size:12px;color:#5f6b76}.sp-pr4-card button{min-height:44px}.sp-pagination{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:20px 0;font-size:13px;color:#5f6b76}.sp-pagination a{min-height:44px;display:inline-flex;align-items:center;color:#ef7523}.sp-empty-state{padding:28px 16px;color:#5f6b76;line-height:1.7}.sp-warning{padding:14px;background:#fff4e9;color:#873c16;border:1px solid #eec9a9;border-radius:8px;line-height:1.7}.sp-warning button{margin:6px 8px 0 0}
dialog:has(.sp-detail){width:min(960px,calc(100vw - 48px));max-width:960px;max-height:calc(100dvh - 48px);padding:0;overflow:hidden}dialog:has(.sp-detail) #detail-content{padding:0;max-height:calc(100dvh - 48px);display:flex;flex-direction:column;overflow:hidden}dialog:has(.sp-detail) .dialog-head{padding:18px 24px;margin:0;flex-shrink:0}.sp-detail{display:flex;flex-direction:column;min-height:0;flex:1;color:#202426}.sp-detail-summary{padding:0 24px 20px;border-bottom:1px solid #e2e6ea;flex-shrink:0}.sp-detail-summary h3{font-size:21px;line-height:1.5;margin:8px 0;overflow-wrap:anywhere}.sp-detail-summary p,.sp-detail-summary span{font-size:13px;color:#5f6b76;margin:0}.sp-detail-tabs{display:flex;gap:20px;padding:0 24px;flex-shrink:0;overflow:auto;border-bottom:1px solid #e2e6ea}.sp-detail-tabs button{border:0;border-bottom:3px solid transparent;padding:14px 4px;min-height:48px;background:#fff;font-size:14px;white-space:nowrap;color:#5f6b76}.sp-detail-tabs button[aria-pressed=true]{color:#ef7523;border-bottom-color:#ef7523}.sp-detail-body{padding:24px;overflow:auto;overscroll-behavior:contain;min-height:160px;flex:1}.sp-detail-body [hidden]{display:none!important}.sp-detail-body p{font-size:14px;color:#43515f;line-height:1.75;overflow-wrap:anywhere}.sp-detail-body h4{font-size:16px;margin:20px 0 12px}.sp-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 28px;margin:0}.sp-detail-grid div{min-width:0}.sp-detail-grid dt{font-size:13px;color:#5f6b76;margin-bottom:6px}.sp-detail-grid dd{font-size:14px;margin:0;overflow-wrap:anywhere}.sp-detail-links{display:grid;gap:10px}.sp-detail-links a{color:#ef7523;min-height:32px;display:flex;align-items:center}.sp-detail-body form{border-top:1px solid #e2e6ea;padding:20px 0;margin:16px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.sp-detail-body form label{display:grid;gap:7px;font-size:13px;color:#5f6b76}.sp-detail-body form :is(h4,p,button){grid-column:1/-1}.sp-detail-body form button{justify-self:start}.sp-detail-body input,.sp-detail-body select,.sp-detail-body textarea{width:100%;min-width:0;min-height:44px;border:1px solid #dce2e8;border-radius:6px;padding:8px;font-size:14px;background:#fff}.sp-detail-body textarea{min-height:90px}.sp-detail-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;padding:16px 24px;border-top:1px solid #e2e6ea;background:#fff;flex-shrink:0}.sp-detail button,.sp-detail-actions button{min-height:44px}.sp-detail .sp-visits b,.sp-detail .sp-visits p{font-size:14px}.sp-detail .sp-visits em{font-size:13px;color:#5f6b76}.sp-detail .sp-visit-tag{font-size:12px}.sp-detail .form-error,.sp-form .form-error{color:#ad2d22}.sp-usage{padding:14px 0;border-bottom:1px solid #e2e6ea;font-size:14px}.sp-detail :is(button,a,input,textarea,select):focus-visible,.sp-filter-nav a:focus-visible{outline:3px solid #2258ad;outline-offset:2px}
@media(max-width:767px){.sp-filter-nav{flex-wrap:nowrap;overflow:auto;padding-bottom:8px}.sp-filter-nav a{flex-shrink:0}.sp-pr4-card{padding:14px}.sp-pr4-card .sp-card-meta{grid-template-columns:minmax(0,1fr)}.sp-pr4-card .sp-card-meta span{flex-wrap:wrap}.sp-pr4-card .sp-card-meta .sp-eng-list{display:grid}.sp-pr4-card .sp-status{white-space:normal}.sp-pr4-card h3 button{font-size:16px}body dialog:has(.sp-detail),body.hm-mobile dialog:has(.sp-detail){width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;padding:0!important;box-sizing:border-box}dialog:has(.sp-detail) #detail-content{height:100dvh;max-height:100dvh}dialog:has(.sp-detail) .dialog-head{padding:14px 16px}.sp-detail-summary{padding:0 16px 14px}.sp-detail-summary h3{font-size:18px;margin:6px 0}.sp-detail-tabs{padding:0 16px;gap:18px}.sp-detail-tabs button{font-size:13px}.sp-detail-body{padding:18px 16px}.sp-detail-grid{grid-template-columns:minmax(0,1fr);gap:16px}.sp-detail-body form{grid-template-columns:minmax(0,1fr)}.sp-detail-body input,.sp-detail-body select,.sp-detail-body textarea{font-size:16px}.sp-detail-actions{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.sp-detail-actions button{flex:1 1 auto}.sp-detail-body .sp-visits li{flex-wrap:wrap}.sp-detail-body .sp-visits li>div{min-width:0;flex:1}.sp-warning{font-size:13px}}

/* PR5 评分的键盘状态与可见焦点。 */
.sp-star-row .sp-star-btn { min-width:24px; min-height:44px; color:#66717b; }
.sp-star-row .sp-star-btn.on { color:#ef7523; }
.sp-star-row .sp-star-btn:focus-visible { outline:3px solid #2258ad; outline-offset:1px; }
.sp-detail,.sp-form { --orange:#ef7523; }

.eg-body .eg-tabs button.on,
.eg-body .eg-ops button.primary { background:#ef7523; border-color:#ef7523; color:#fff; }
.eg-body :is(button,a):focus-visible { outline:3px solid #2258ad; outline-offset:2px; }
