.repair-modal { width: min(1180px, 96vw); max-height: 94vh; }
.repair-form { padding: 12px; }
.repair-section { border: 1px solid var(--line); margin-bottom: 10px; background: #fff; }
.repair-section > h4, .section-title { margin: 0; padding: 8px 10px; background: #f6f8fb; border-bottom: 1px solid var(--line); }
.repair-section h4 { margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; }
.section-title small { display: block; color: var(--muted); font-weight: 400; }
.repair-grid { display: grid; grid-template-columns: repeat(3, minmax(210px, 1fr)); gap: 10px 16px; padding: 12px; }
.repair-grid label span, .repair-bottom label > span { display: block; color: #475467; margin-bottom: 4px; }
.repair-grid .full { grid-column: 1 / -1; }
.repair-table { min-height: 105px; max-height: 210px; overflow: auto; }
.repair-table table { table-layout: fixed; }
.repair-table th:nth-child(1) { width: 22%; }
.repair-table th:nth-child(2) { width: 38%; }
.repair-table th:nth-child(3), .repair-table th:nth-child(4), .repair-table th:nth-child(5) { width: 10%; }
.repair-table th:last-child { width: 10%; }
.repair-table input { border: 0; border-radius: 0; background: transparent; }
.repair-bottom { display: grid; grid-template-columns: 220px 1fr 360px; gap: 14px; border: 1px solid var(--line); padding: 12px; background: #fff; }
.repair-money { display: grid; gap: 9px; }
.repair-note textarea { min-height: 102px; resize: vertical; }
.repair-upload { border-left: 1px solid var(--line); padding-left: 13px; }
.upload-button { display: inline-block; border: 1px solid var(--blue); background: var(--blue); color: #fff; padding: 6px 13px; cursor: pointer; }
.image-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 9px; max-height: 150px; overflow: auto; }
.image-tile { min-width: 0; border: 1px solid var(--line); padding: 4px; background: #fafbfc; }
.image-tile img, .image-placeholder { width: 100%; height: 62px; object-fit: cover; background: #edf2f7; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.image-tile span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; margin: 3px 0; }
.image-tile button { width: 100%; padding: 2px; font-size: 11px; color: var(--danger); }
@media (max-width: 950px) {
  .repair-grid { grid-template-columns: repeat(2, 1fr); }
  .repair-bottom { grid-template-columns: 1fr; }
  .repair-upload { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
}

.repair-v2 { width: min(1320px, 98vw); max-width: 98vw; max-height: 98vh; overflow: hidden; }
.repair-v2 .modal-head { height: 46px; }
.repair-sheet { position: relative; padding: 10px 14px 12px; }
.repair-number { margin: 0 0 8px 82px; color: #344054; }
.repair-info-grid { display: grid; grid-template-columns: 1.05fr 1.1fr .9fr .9fr 1.55fr; gap: 10px 16px; border: 1px solid var(--line); padding: 12px; }
.repair-info-grid label > span { display: block; margin-bottom: 4px; color: #344054; }
.repair-info-grid .wide-cell { grid-column: span 1; }
.repair-info-grid .full { grid-column: 1 / -1; }
.customer-choice button { width: 100%; height: 37px; color: var(--blue); border-color: #91b4ee; }
.sheet-block { margin-top: 9px; }
.sheet-toolbar { display: flex; gap: 8px; align-items: center; min-height: 39px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.sheet-toolbar b { margin-right: 25px; }
.sheet-toolbar button { padding: 5px 13px; }
.sheet-table { height: 106px; overflow: auto; border: 1px solid var(--line); border-top: 0; }
.sheet-table table { table-layout: fixed; }
.sheet-table th:nth-child(1) { width: 25%; }
.sheet-table th:nth-child(2) { width: 40%; }
.sheet-table th:nth-child(3), .sheet-table th:nth-child(4) { width: 17.5%; }
.sheet-table input { border: 0; border-radius: 0; background: transparent; }
.sheet-table tbody tr.selected { background: #dbeafe; }
.parts-table th:nth-child(1) { width: 24%; }
.parts-table th:nth-child(2) { width: 34%; }
.parts-table th:nth-child(3), .parts-table th:nth-child(4), .parts-table th:nth-child(5) { width: 14%; }
.repair-sheet-bottom { display: grid; grid-template-columns: 220px 370px 1fr; gap: 14px; margin-top: 9px; align-items: stretch; }
.debt-summary { display: grid; gap: 5px; padding: 8px; }
.debt-summary label { display: grid; grid-template-columns: auto 92px; align-items: center; }
.debt-summary input { padding: 4px 7px; }
.debt-summary label { order: 1; }
.debt-summary > div:first-child { order: 2; }
.debt-summary > div:nth-of-type(2) { order: 3; }
.debt-summary > div:nth-of-type(3) { order: 4; }
.debt-summary b { display: inline-block; min-width: 98px; padding: 3px 7px; background: #fff; border: 1px solid #b9c3d2; color: #172033; font-variant-numeric: tabular-nums; }
.paid-area { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 8px; }
.paid-area > label:first-child { width: 100%; display: grid; grid-template-columns: auto 150px; align-items: center; justify-content: start; gap: 8px; }
.paid-area label:not(:first-child) { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.paid-area input[type="checkbox"] { width: auto; }
.internal-area { border: 1px solid var(--line); padding: 8px; }
.internal-area span { display: block; margin-bottom: 4px; }
.internal-area textarea { min-height: 66px; resize: none; }
.image-panel { display: grid; grid-template-columns: 100px 170px 1fr; align-items: start; gap: 9px; margin-top: 8px; }
.image-panel .image-list { margin: 0; grid-template-columns: repeat(6, minmax(80px, 1fr)); max-height: 70px; overflow: auto; }
.sheet-actions { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding-top: 9px; margin-top: 9px; }
.sheet-actions .grow { flex: 1; }
.repair-picker { position: absolute; inset: 0; z-index: 5; background: #10182855; display: grid; place-items: center; }
.picker-card { width: min(720px, 80%); max-height: 520px; overflow: hidden; background: #fff; border: 1px solid #aeb8c6; box-shadow: 0 12px 38px #17203345; }
.picker-list { max-height: 450px; overflow: auto; padding: 8px; }
.picker-list > button { display: grid; grid-template-columns: 130px 1fr; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #edf0f4; }
.picker-list > button:hover { background: #e8f1ff; }
.repair-info-grid input[type="datetime-local"]::-webkit-calendar-picker-indicator { display: none; }
.repair-info-grid input[type="datetime-local"] { cursor: pointer; }
.picker-wide { width: min(900px, 88%); }
.picker-search { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.picker-search input { flex: 1; }
.picker-search span { color: var(--muted); white-space: nowrap; }
.customer-picker-tools { display: flex; gap: 8px; flex: 0 0 auto; }
.customer-picker-tools button { padding: 7px 13px; white-space: nowrap; }
.customer-editor-overlay { z-index: 8; }
.customer-editor-card { width: min(620px, 72%); }
.customer-editor-form { display: grid; grid-template-columns: 160px minmax(150px, 1fr) minmax(180px, 1fr); gap: 12px 16px; padding: 16px; }
.customer-editor-form label > span { display: block; margin-bottom: 5px; color: #344054; }
.customer-editor-form .full { grid-column: 1 / -1; }
.customer-editor-form textarea { min-height: 72px; }
.customer-picker-body { position: relative; display: grid; grid-template-columns: 155px 1fr; min-height: 330px; }
.customer-category-list { border-right: 1px solid var(--line); padding: 8px 8px 46px; overflow: auto; }
.customer-category-list button { display: block; width: 100%; border: 0; text-align: left; padding: 8px; }
.customer-category-list button.active { background: var(--blue); color: #fff; }
.customer-category-tools { position: absolute; left: 0; bottom: 0; width: 155px; display: flex; gap: 2px; padding: 7px 5px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: #fff; }
.customer-category-tools button { flex: 1; padding: 5px 2px; font-size: 12px; }
#repair-customer-list > button.selected { background: #dbeafe; box-shadow: inset 3px 0 var(--blue); }
.category-editor-card { width: 360px; }
.category-editor-card form { padding: 16px; }
.category-editor-card label > span { display: block; margin-bottom: 6px; }
.category-editor-card .actions { margin-top: 15px; }
.phone-model-toolbar input { min-width: 260px; }
.phone-model-picker-body { display: grid; grid-template-columns: 220px 1fr; min-height: 390px; }
.phone-category-panel { position: relative; border-right: 1px solid var(--line); padding-bottom: 45px; min-width: 0; }
.phone-category-tree { height: 390px; overflow: auto; padding: 7px; }
.phone-category-tree button { display: block; width: 100%; border: 0; padding: 7px 9px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-category-tree button.active { color: #fff; background: var(--blue); }
.phone-category-tools { position: absolute; inset: auto 0 0 0; display: flex; gap: 3px; padding: 7px; border-top: 1px solid var(--line); background: #fff; }
.phone-category-tools button { flex: 1; padding: 5px 2px; font-size: 12px; }
.phone-model-list { max-height: 435px; padding: 7px 12px; }
.phone-model-list > button { grid-template-columns: 1fr; padding: 9px 7px; }
.phone-model-list > button.selected { background: #dbeafe; box-shadow: inset 3px 0 var(--blue); }
.phone-editor-card { width: 480px; }
.phone-editor-card form { display: grid; gap: 12px; padding: 16px; }
.phone-editor-card label > span { display: block; margin-bottom: 5px; }
.nav-group { display: flex; align-items: center; justify-content: space-between; font-weight: 600; border-top: 1px solid #edf0f4; margin-top: 5px; }
.nav-children { padding-left: 14px; }
.nav-children .nav-btn { padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
.nav-children .nav-btn:before { content: "·"; margin-right: 7px; color: #98a2b3; }
.nav-children .nav-btn.active:before { color: #fff; }
.customer-page-layout, .phone-page-layout { display: grid; min-height: 560px; }
/* 客户分类名称以六个常用汉字为主要显示目标，把更多横向空间留给会员资料列。 */
.customer-page-layout { grid-template-columns: 120px minmax(0, 1fr); }
.phone-page-layout { grid-template-columns: 220px minmax(0, 1fr); }
.page-category-panel { position: relative; background: #fff; border: 1px solid var(--line); border-right: 0; padding-bottom: 48px; min-width: 0; }
.page-category-list { height: 510px; overflow: auto; padding: 8px; }
.page-category-list button { display: block; width: 100%; border: 0; text-align: left; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-category-list button.active { background: var(--blue); color: #fff; }
.page-category-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 3px; padding: 7px; border-top: 1px solid var(--line); background: #fff; }
.page-category-tools button { flex: 1; padding: 6px 2px; font-size: 12px; }
.customer-page-layout .table-wrap, .phone-page-layout .table-wrap { min-height: 560px; }
.customer-page-toolbar input { flex: 0 1 320px; width: 320px; min-width: 220px; max-width: 320px; }
.customer-page-toolbar #customer-level-filter { flex: 0 0 150px; width: 150px; }
.customer-page-form { display: grid; grid-template-columns: 160px minmax(160px, 1fr) minmax(180px, 1fr); gap: 13px 16px; }
.customer-page-form label > span { display: block; margin-bottom: 5px; }
.customer-page-form .full { grid-column: 1 / -1; }
.customer-page-form textarea { min-height: 90px; }
.tree-levels button { padding-top: 7px; padding-bottom: 7px; }
.phone-model-tree-manager{height:min(650px,72vh)}.phone-model-tree-manager .categorized-toolbar{gap:8px;flex-wrap:nowrap}.phone-model-tree-manager .categorized-toolbar input{width:320px;min-width:320px;max-width:320px;flex:0 0 320px}.phone-model-tree-manager .categorized-toolbar button{flex:none;white-space:nowrap}.phone-model-tree-manager [data-role="sync-count"]{color:#e11d48;font-size:15px;font-weight:700}.phone-model-tree-manager .categorized-layout{grid-template-columns:210px minmax(0,1fr);gap:0;border:1px solid var(--line);overflow:hidden}.phone-model-tree-manager .categorized-sidebar{width:auto;border:0;border-right:1px solid var(--line);border-radius:0}.phone-model-tree-manager .categorized-categories.tree-levels{height:calc(100% - 43px);padding:6px}.phone-model-tree-manager .categorized-categories.tree-levels .tree-item{position:relative;height:28px;min-height:28px;margin:0;padding-top:4px;padding-bottom:4px;padding-left:calc(8px + var(--connected-depth,0)*18px);line-height:20px;border:0;border-radius:2px;background:transparent;color:var(--text);font-weight:400}.phone-model-tree-manager .categorized-categories .tree-item.active:not(.root-category){background:transparent;color:var(--blue)}.phone-model-tree-manager .categorized-categories .root-category.active{background:#edf4ff;color:#1d4ed8}.phone-model-tree-manager .inventory-folder-icon{margin-right:6px}.phone-model-tree-manager .categorized-category-actions{height:43px}.phone-model-table-panel{display:flex;min-width:0;min-height:0;flex-direction:column}.phone-model-table-panel .table-wrap{flex:1;min-height:0}.phone-model-table-panel table{width:100%;min-width:100%;table-layout:fixed}.phone-model-table-panel th,.phone-model-table-panel td{height:29px;padding:4px 8px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-right:1px solid var(--line)}.phone-model-table-panel th:last-child,.phone-model-table-panel td:last-child{border-right:0}.phone-model-table-panel .phone-col-check{width:0}.phone-model-table-panel .phone-col-category{width:9em}.phone-model-table-panel .phone-col-model{width:16em}.phone-model-table-panel .phone-col-code{width:10em}.phone-model-table-panel .phone-col-sort{width:6em}.phone-model-table-panel .phone-model-remark{text-align:left}.phone-model-table-panel .phone-check-cell{width:0!important;padding-left:0!important;padding-right:0!important;border-right:0!important}.phone-model-table-panel .phone-check-cell input{display:none;width:14px;height:14px;margin:0;vertical-align:middle}.phone-model-table-panel.batch-mode .phone-col-check{width:38px}.phone-model-table-panel.batch-mode .phone-check-cell{width:38px!important;padding-left:8px!important;padding-right:8px!important;border-right:1px solid var(--line)!important}.phone-model-table-panel.batch-mode .phone-check-cell input{display:inline-block}.phone-model-batch-tools{display:flex;align-items:center;gap:10px;height:42px;padding:5px 8px;border-bottom:1px solid var(--line);background:#f8fafc}.phone-model-batch-tools[hidden]{display:none!important}.phone-model-batch-tools>span{min-width:70px;color:#475467}.phone-model-batch-tools label{display:flex;align-items:center;gap:6px}.phone-model-batch-tools select{width:190px;height:30px;padding:3px 7px;border:1px solid #b8c4d6}.phone-model-batch-tools button{height:30px;padding:4px 12px}.phone-model-form label>span{width:52px}.phone-model-sync-form{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:420px}.sync-select-actions{display:flex;justify-content:space-between;padding:6px 2px 10px}.phone-model-sync-list{max-height:440px;overflow:auto;border:1px solid var(--line);background:#fff}.phone-model-sync-list .phone-model-sync-category{position:sticky;top:0;z-index:1;padding:7px 10px;color:#1d4ed8;background:#eef4ff;border-bottom:1px solid #cdd9eb;font-weight:600}.phone-model-sync-list label{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;min-height:30px;padding:4px 12px 4px 28px;border-bottom:1px solid var(--line);font-weight:400}.phone-model-sync-list label b{font-weight:400}.phone-model-sync-list input{width:auto;height:auto}
.phone-model-table-panel{position:relative}.phone-model-loading{position:absolute;z-index:5;inset:29px 0 39px;display:grid;place-items:center;background:#fff;color:#667085;font-size:15px}.phone-model-loading[hidden]{display:none}
.customer-manager-overlay .tenant-phone-model-dialog{position:relative;width:min(1050px,92vw);max-width:none;height:min(720px,86vh);padding:16px;display:block;overflow:hidden;background:#fff;border:0;border-radius:12px}.tenant-phone-model-dialog>.data-window-close{position:absolute;z-index:2;top:12px;right:14px;width:38px;height:38px;border:0;background:transparent;font-size:24px}.tenant-phone-model-content{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);background:#fff}.tenant-phone-model-content>h2{margin:0 42px 12px 0;font-size:20px;line-height:30px;background:#fff}.tenant-phone-model-host{min-height:0;background:#fff}.tenant-phone-model-dialog .phone-model-tree-manager{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);background:#fff}.tenant-phone-model-dialog .categorized-toolbar{height:34px;margin:0 0 8px;padding:0;gap:5px;background:#fff}.tenant-phone-model-dialog .categorized-toolbar input{height:32px;padding:4px 8px}.tenant-phone-model-dialog .categorized-toolbar button{height:32px;padding:4px 10px;border-radius:4px}.tenant-phone-model-dialog .categorized-layout{height:100%;min-height:0;background:#fff}.tenant-phone-model-dialog .categorized-sidebar{height:100%;min-height:0;padding:7px;display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:hidden;background:#fff}.tenant-phone-model-dialog .categorized-categories.tree-levels{height:auto;min-height:0;overflow:auto;padding:0}.tenant-phone-model-dialog .categorized-category-actions{height:auto;display:flex;gap:4px;padding-top:7px;border-top:1px solid #e0e6ef;background:#fff}.tenant-phone-model-dialog .categorized-category-actions button{flex:1;width:auto;height:28px;margin:0;padding:4px 8px;border-radius:3px;text-align:center}.tenant-phone-model-dialog .phone-model-table-panel{height:100%;overflow:auto;background:#fff}.tenant-phone-model-dialog .phone-model-table-panel .table-wrap{height:auto;overflow:visible;border:0;background:#fff}.tenant-phone-model-dialog .phone-model-table-panel tr.selected td{background:#d9eaff}
.phone-model-tree-manager .categorized-toolbar input{width:270px;min-width:270px;max-width:270px;flex:0 0 270px;line-height:22px}.tenant-phone-model-dialog .phone-model-table-panel td{background:#fff!important}.tenant-phone-model-dialog .phone-model-table-panel tr.selected td{color:inherit!important;background:#d9eaff!important;box-shadow:inset 0 1px #b9d5fb,inset 0 -1px #b9d5fb!important}
.tenant-phone-model-dialog .phone-model-table-panel tbody tr:not(.selected),.tenant-phone-model-dialog .phone-model-table-panel tbody tr:not(.selected):hover,.tenant-phone-model-dialog .phone-model-table-panel tbody tr:not(.selected) td,.tenant-phone-model-dialog .phone-model-table-panel tbody tr:not(.selected):hover td{background-color:#fff!important;background-image:none!important}
.tenant-phone-model-dialog .phone-model-table-panel thead th{position:sticky;z-index:2;top:0;background:#f6f8fb}.tenant-phone-model-dialog .phone-model-table-panel.batch-mode thead th{top:42px}
.phone-model-pagination{position:sticky;z-index:4;bottom:0;display:flex;align-items:center;justify-content:flex-end;gap:8px;height:39px;min-height:39px;padding:4px 8px;background:#fff;border-top:1px solid var(--line)}.phone-model-pagination label{display:flex;align-items:center;gap:5px;white-space:nowrap}.phone-model-pagination button,.phone-model-pagination select,.phone-model-pagination input{height:30px;min-height:30px;padding:3px 9px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;color:#172033}.phone-model-pagination select{width:82px}.phone-model-pagination input{width:58px;text-align:center}.phone-model-pagination button:disabled{color:#98a2b3;background:#f5f6f7;cursor:not-allowed}
.progress-row { display: grid; grid-template-columns: 1fr 76px; gap: 8px; border-bottom: 1px solid #edf0f4; }
.progress-row button:first-child { border: 0; text-align: left; }
.data-settings-grid { width: min(940px, 94%); margin: 48px auto; display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 18px; }
.data-settings-card { min-height: 118px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 18px; padding: 22px; text-align: left; background: #fff; border: 1px solid #d8dee8; border-radius: 8px; box-shadow: 0 3px 12px #1d29390d; }
.data-settings-card:hover { border-color: #86aef5; background: #f8fbff; box-shadow: 0 6px 18px #2563eb14; }
.data-settings-icon { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid #9eb9e8; border-radius: 7px; color: #2563eb; background: #eef4ff; font-size: 20px; font-weight: 700; }
.data-settings-card b { display: block; margin-bottom: 8px; color: #1f2937; font-size: 16px; }
.data-settings-card small { display: block; color: #667085; font-size: 13px; line-height: 1.5; }
.data-settings-card i { color: #2563eb; font-size: 12px; font-style: normal; }
.reference-tip { margin-top: 12px; padding: 10px 12px; color: #667085; background: #f8fafc; border: 1px solid #e4e7ec; }
.check-label { display: flex; align-items: center; gap: 8px; padding-top: 24px; }
.check-label input { width: auto; }
.home-actions { margin: 18px 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.home-actions h3 { margin: 0 0 15px; }
.home-action-grid { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 13px; }
.home-action-card { min-height: 96px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 15px; text-align: left; background: #fff; border: 1px solid #d8dee8; border-radius: 6px; }
.home-action-card:hover { border-color: #86aef5; background: #f8fbff; }
.home-action-card > span { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; color: #2563eb; background: #eef4ff; border: 1px solid #b8c9e8; border-radius: 6px; font-weight: 700; }
.home-action-card b { align-self: end; color: #1f2937; }
.home-action-card small { align-self: start; margin-top: 4px; color: #667085; line-height: 1.4; }
.cloud-note { margin-top: 16px; }
.work-queue-footer { margin-top: 12px; }
.data-window-overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 32px; background: #18223066; }
.data-window-overlay ~ .modal, body > .modal { z-index: 60; }
.toast { z-index: 80; }
.data-window { width: min(1080px, calc(100vw - 64px)); height: min(720px, calc(100vh - 64px)); display: grid; grid-template-rows: 58px minmax(0, 1fr); overflow: hidden; background: #fff; border: 1px solid #aeb8c6; border-radius: 7px; box-shadow: 0 18px 55px #10182842; }
.data-window > header { display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: #f8fafc; border-bottom: 1px solid #d8dee8; }
.data-window > header b { display: block; color: #1f2937; font-size: 16px; }
.data-window > header small { display: block; margin-top: 3px; color: #667085; }
.data-window-close { width: 38px; height: 34px; padding: 0; color: #344054; background: #fff; border: 1px solid #cbd5e1; font-size: 19px; line-height: 1; }
.data-window-close:hover { color: #fff; background: #2563eb; border-color: #2563eb; }
.data-window-body { min-height: 0; overflow: auto; padding: 14px; background: #fff; }
.data-window-body .customer-page-layout, .data-window-body .phone-page-layout { min-height: 0; height: calc(100% - 58px); }
.data-window-body .page-category-list { height: calc(100% - 2px); }
.data-window-body .customer-page-layout .table-wrap, .data-window-body .phone-page-layout .table-wrap { min-height: 0; height: 100%; }
.feature-business-window { width: min(1320px, calc(100vw - 40px)); height: min(840px, calc(100vh - 40px)); }
.feature-window-overlay { padding: 20px; }
.feature-window-body { min-height: 0; overflow: auto; }
.supplier-page { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; }
.supplier-toolbar { margin: 0; }
.supplier-toolbar input { max-width: 300px; }
.supplier-table { min-height: 0; height: 100%; overflow: auto; }
.supplier-pagination { display: flex; align-items: center; gap: 8px; min-height: 38px; color: #475467; }
.supplier-pagination button { padding: 7px 11px; }
.supplier-pagination label { display: flex; align-items: center; gap: 5px; }
.supplier-pagination select { width: 74px; }
.supplier-pagination input { width: 62px; padding: 7px; }

/* 维修单紧凑头部：标签在左、控件在右，减少无意义的空白。 */
.compact-repair-info {
  grid-template-columns: 225px minmax(260px, 1.35fr) 150px 180px 190px;
  gap: 9px 14px;
  padding: 10px 12px;
}
.compact-repair-info .inline-field {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.compact-repair-info .inline-field > span { display: inline; margin: 0; white-space: nowrap; }
.compact-repair-info input,
.compact-repair-info select,
.compact-repair-info button { height: 34px; padding: 5px 9px; }
.compact-repair-info .full { grid-column: 1 / -1; }
.compact-repair-info > label:nth-child(1) { order: 1; }
.compact-repair-info > label:nth-child(2) { order: 2; }
.compact-repair-info > label:nth-child(3) { order: 3; }
.compact-repair-info > label:nth-child(6) { order: 4; }
.compact-repair-info > label:nth-child(7) { order: 5; }
.compact-repair-info > label:nth-child(4) { order: 6; grid-column: span 2; }
.compact-repair-info > label:nth-child(5) { order: 7; grid-column: span 2; }
.compact-repair-info > label:nth-child(8) { order: 8; }
.compact-customer { grid-column: auto; }
.compact-customer > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.compact-customer button,
.compact-model button { width: auto; min-width: 78px; max-width: 108px; color: #fff; background: var(--blue); border-color: var(--blue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-customer button { flex: 0 0 92px; }
.compact-customer button:hover,
.compact-model button:hover { color: #fff; background: var(--blue-dark); }
.compact-customer em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; font-style: normal; }
.date-picker-field { position: relative; min-width: 0; }
.date-picker-field input { padding-right: 31px; cursor: default; }
.date-picker-field i { position: absolute; right: 1px; top: 1px; width: 30px; height: 32px; display: grid; place-items: center; color: var(--blue); background: #fff; border-left: 1px solid #b9c3d2; pointer-events: none; font-style: normal; }
@media (max-width: 1050px) {
  .compact-repair-info { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .compact-customer { grid-column: span 1; }
}

/* 维修单最终紧凑排版：两行资料区，不依赖字段内容长度撑开窗口。 */
.repair-v2 .repair-number { margin-left: 72px; color: #111827; }
.repair-v2 .repair-number b,
.repair-v2 .repair-number span { color: #111827; font-weight: 700; }
.repair-v2 .compact-repair-info {
  grid-template-columns: 250px minmax(285px, 1.35fr) minmax(215px, .95fr) 180px 170px;
}
.repair-v2 .compact-repair-info > label:nth-child(4),
.repair-v2 .compact-repair-info > label:nth-child(5) { grid-column: auto; }
.repair-v2 .compact-repair-info .repair-description { order: 6; grid-column: 1; }
.repair-v2 .compact-repair-info .repair-serial { order: 7; grid-column: 2; }
.repair-v2 .compact-repair-info .repair-public-note { order: 8; grid-column: 3 / -1; }
.repair-v2 .compact-model {
  display: grid;
  grid-template-columns: max-content 82px minmax(0, 1fr);
}
.repair-v2 .compact-model button { width: 82px; min-width: 82px; max-width: 82px; }
#repair-model-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; font-style: normal; }
.repair-v2 .repair-date-field { min-width: 250px; }
.repair-v2 #repair-service-at { min-width: 168px; font-variant-numeric: tabular-nums; }
.repair-v2 .sheet-actions label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.repair-v2 .sheet-actions input[type="checkbox"] { width: auto; }
.repair-v2 .paid-area label:not(:first-child) { display: none; }
.repair-v2 .sheet-table { height: 124px; }
.repair-v2 .repair-sheet-bottom { display: grid; grid-template-columns: 1fr; gap: 7px; }
.repair-v2 .debt-summary {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 5px 8px;
  white-space: nowrap;
}
.repair-v2 .debt-summary > div,
.repair-v2 .debt-summary > label { display: inline-flex; align-items: center; gap: 5px; }
.repair-v2 .debt-summary > div:first-child { order: 1; }
.repair-v2 .debt-summary > label:not(:last-child) { order: 2; }
.repair-v2 .debt-summary > div:nth-of-type(3) { order: 3; }
.repair-v2 .debt-summary > div:nth-of-type(2) { order: 4; }
.repair-v2 .debt-summary > label:last-child { order: 5; }
.repair-v2 .debt-summary input,
.repair-v2 .debt-summary b { width: 96px; min-width: 96px; height: 34px; }
.repair-v2 .paid-area { display: none; }
.repair-v2 .internal-area { display: grid; grid-template-columns: max-content 1fr; align-items: center; gap: 8px; padding: 5px 8px; }
.repair-v2 .internal-area span { margin: 0; }
.repair-v2 .internal-area textarea { min-height: 46px; height: 46px; }

/* 维修单顶部最终排版：单号、进度和维修人员同排，其余资料保持两行。 */
.repair-v2 .repair-number {
  margin: 0 14px;
  min-height: 40px;
  display: grid;
  grid-template-columns: max-content minmax(180px, 1fr) 190px 190px;
  align-items: center;
  gap: 14px;
}
.repair-v2 .repair-number > label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin: 0;
}
.repair-v2 .repair-number > label > span { margin: 0; white-space: nowrap; }
.repair-v2 .repair-number button,
.repair-v2 .repair-number select { height: 34px; min-width: 0; }
.repair-v2 .compact-repair-info {
  grid-template-columns: 280px minmax(360px, 1.15fr) minmax(390px, 1.25fr);
  gap: 9px 16px;
}
.repair-v2 .compact-repair-info .repair-description { order: 4; grid-column: 1; }
.repair-v2 .compact-repair-info .repair-serial { order: 5; grid-column: 2; }
.repair-v2 .compact-repair-info .repair-public-note { order: 6; grid-column: 3; }
.repair-v2 .compact-customer em,
#repair-model-summary {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  color: #111827;
  font-style: normal;
  font-weight: 700;
}
.repair-v2 .compact-model { grid-template-columns: max-content 82px minmax(max-content, 1fr); }
.repair-v2 .repair-date-field { min-width: 280px; }
.repair-v2 #repair-service-at { min-width: 196px; }
.repair-v2 .internal-area textarea {
  min-height: 40px;
  height: 40px;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-y: auto;
}

/* 维修项目与库存配件选择窗口。 */
.repair-reference-picker .picker-card { width: min(980px, calc(100vw - 70px)); height: min(650px, calc(100vh - 70px)); }
.reference-picker-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.reference-picker-toolbar input { width: 330px; }
.reference-picker-toolbar span { color: #667085; }
.reference-picker-body { min-height: 0; flex: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr); border: 1px solid #d8dee8; }
.reference-picker-body aside { padding: 7px; overflow: auto; border-right: 1px solid #d8dee8; background: #f8fafc; }
.reference-picker-body aside button { display: block; width: 100%; margin-bottom: 3px; padding: 8px 9px; text-align: left; background: transparent; border-color: transparent; }
.reference-picker-body aside button.active { color: #fff; background: #2563eb; border-color: #2563eb; }
.reference-picker-body .table-wrap { min-height: 0; height: 100%; border: 0; }
.reference-picker-body tr.selected td { color: #153e75; background: #dce9f8; }

/* 维修单引用字段均为只读展示，主数据只能在对应资料管理中修改。 */
.repair-v2 .compact-repair-info { grid-template-columns: 280px minmax(570px, 1.6fr) minmax(340px, .9fr); }
.repair-v2 .repair-customer-reference {
  display: grid;
  grid-template-columns: 82px max-content minmax(90px, 1fr) max-content minmax(125px, 1fr);
  align-items: center;
  gap: 6px;
}
.repair-v2 .repair-customer-reference #choose-repair-customer { width: 82px; min-width: 82px; }
.repair-v2 .reference-label { color: #344054; white-space: nowrap; }
.repair-v2 #repair-nickname-display,
.repair-v2 #repair-name-display,
.repair-v2 #repair-phone-display,
.repair-v2 #repair-model-display {
  min-width: 0;
  height: 34px;
  color: #111827;
  background: #f8fafc;
  font-weight: 700;
  cursor: default;
}
.repair-v2 .compact-model { grid-template-columns: max-content 82px minmax(190px, 1fr); }
.repair-v2 #select-repair-job,
.repair-v2 #select-repair-part {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
.repair-v2 #select-repair-job:hover,
.repair-v2 #select-repair-part:hover { background: var(--blue-dark); }
.repair-v2 .repair-public-note textarea {
  min-height: 34px;
  height: 34px;
  padding: 6px 9px;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-y: auto;
}

/* 弹出的项目/配件窗口必须高于维修单主弹窗。 */
.repair-reference-picker { position: fixed; z-index: 90; }
.master-data-picker { position: fixed; z-index: 100; }
.master-data-card { width: min(980px, calc(100vw - 70px)); height: min(650px, calc(100vh - 70px)); }
.master-data-card .section-title > div { display: flex; flex-direction: column; gap: 2px; }
.master-data-card .section-title small { color: #667085; font-weight: 400; }
.master-data-toolbar { display: flex; align-items: center; gap: 9px; padding: 10px 0; }
.master-data-toolbar input { width: 360px; }
.master-data-toolbar span { color: #667085; }
.master-data-body { min-height: 0; flex: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr); border: 1px solid #d8dee8; }
.master-data-body aside { min-height: 0; display: grid; grid-template-rows: 1fr auto; padding: 7px; border-right: 1px solid #d8dee8; background: #f8fafc; }
.master-category-list { min-height: 0; overflow: auto; }
.master-category-list button { display: block; width: 100%; margin-bottom: 3px; padding: 8px 9px; text-align: left; background: transparent; border-color: transparent; }
.master-category-list button.active { color: #fff; background: #2563eb; border-color: #2563eb; }
.master-category-actions { display: flex; gap: 4px; padding-top: 7px; border-top: 1px solid #d8dee8; }
.master-category-actions button { flex: 1; padding: 6px 3px; }
.master-data-body .table-wrap { min-height: 0; height: 100%; border: 0; }
.master-data-body tr.selected td { color: #153e75; background: #dce9f8; }
.master-reference-field { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
.master-reference-field input[readonly] { color: #111827; background: #f8fafc; font-weight: 700; }
.master-editor-layer { position: fixed; }
.master-editor-card { width: min(620px, calc(100vw - 100px)); height: auto; min-height: 0; }
.customer-manager-overlay { position: fixed; z-index: 100; padding: 24px; }
.customer-manager-overlay.picker-preparing { visibility: hidden; }
.customer-manager-overlay .data-window { width: min(1080px, calc(100vw - 48px)); height: min(720px, calc(100vh - 48px)); }
.customer-manager-shared { height: 100%; display: flex; flex-direction: column; }
.customer-manager-shared .customer-page-layout { flex: 1; min-height: 0; }
.customer-manager-shared .customer-page-table { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.customer-manager-shared .customer-page-table table { table-layout: fixed; width: 100%; min-width: 0; }
.customer-manager-shared .customer-page-table thead th { position: sticky; top: 0; z-index: 1; background: #f4f6fa; }
.customer-manager-shared .customer-page-table td { overflow: hidden; text-overflow: ellipsis; }
.customer-manager-shared .customer-page-toolbar, .customer-manager-shared .customer-page-pagination { flex: 0 0 auto; }
.customer-manager-overlay .data-window-body { min-height: 0; overflow: hidden; }
.customer-manager-overlay[data-mode="manage"] .customer-page-actions { display: none; }
.customer-page-actions { flex: 0 0 auto; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #d7deea; }
.repair-part-quick { position: relative; width: 300px; }
.repair-part-quick > input { width: 100%; height: 34px; }
.repair-part-results { position: absolute; z-index: 20; top: 38px; left: 0; right: 0; max-height: 240px; overflow: auto; padding: 4px; background: #fff; border: 1px solid #b9c3d2; box-shadow: 0 8px 18px rgba(31,41,55,.15); }
.repair-part-results button { display: flex; width: 100%; justify-content: space-between; gap: 8px; padding: 7px 9px; text-align: left; background: #fff; border: 0; }
.repair-part-results button:hover { background: #eef4ff; }
.serial-picker-card { width: min(760px, calc(100vw - 70px)); max-height: min(560px, calc(100vh - 70px)); }
.customer-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: block; margin: auto; }
.customer-account { width: min(1180px, 92vw); padding: 16px; }
.account-summary-detail { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; padding: 10px 12px; }
.account-summary-detail > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.account-summary-detail .account-asset { gap: 8px; margin-left: 24px; }
.account-summary-detail > .account-asset:nth-last-child(2) { margin-left: auto; }
.account-summary-detail .account-asset button { min-width: 48px; height: 28px; min-height: 28px; padding: 3px 9px; }
.customer-account .account-ledger { margin-top: 12px; }
.customer-account .account-ledger h4 { margin: 0 0 6px; }
.customer-account .account-ledger-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.customer-account .account-ledger-head h4 { margin: 0; }
.customer-account .account-ledger-head label { display: inline-flex; align-items: center; gap: 5px; }
.customer-account .account-ledger-head select { width: 92px; height: 28px; min-height: 28px; padding: 2px 24px 2px 8px; }
.account-ledger-tabs { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-bottom: 6px; }
.account-ledger-tabs > button { min-width: 88px; background: #fff; color: #1f2937; }
.account-ledger-tabs > button.active { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 700; }
.account-ledger-tabs label { display: inline-flex; align-items: center; gap: 5px; }
.account-ledger-tabs select { width: 92px; height: 28px; min-height: 28px; padding: 2px 24px 2px 8px; }
.customer-account .account-ledger .table-wrap { height: 150px; overflow: auto; }
.customer-account .account-ledger table { width: 100%; table-layout: fixed; }
.customer-account .ledger-time { width: 20%; }
.customer-account .ledger-action { width: 8%; }
.customer-account .ledger-change,
.customer-account .ledger-after { width: 12%; }
.customer-account .ledger-operator { width: 11%; }
.customer-account .ledger-source { width: 17%; }
.customer-account .ledger-remark { width: 20%; }
.customer-account td.account-action-recharge { color: #15803d; font-weight: 700; }
.customer-account td.account-action-redeem { color: #dc2626; font-weight: 700; }
.account-adjust-button { display: inline-grid; place-items: center; width: 32px; min-width: 32px !important; height: 30px !important; min-height: 30px !important; padding: 0 !important; border: 0; color: #fff; font-size: 28px; font-weight: 900; line-height: .8; }
.account-adjust-button.is-recharge { background: #2563eb; }
.account-adjust-button.is-redeem { background: #dc2626; }
.account-order-link { padding: 2px 6px; color: #1d4ed8; background: #fff; border-color: #93b4ef; white-space: nowrap; }
.customer-record-overlay { position: fixed; inset: 0; z-index: 10020; display: grid; place-items: center; padding: 28px; background: rgba(15,23,42,.46); }
.customer-record-card { display: flex; flex-direction: column; width: min(840px, calc(100% - 32px)); max-height: min(620px, calc(100% - 32px)); background: #fff; border: 1px solid #d8dee8; box-shadow: 0 18px 44px rgba(15,23,42,.25); }
.customer-account-layer-card { position: relative; width: min(1210px, calc(100vw - 56px)); max-height: calc(100vh - 56px); overflow: hidden; }
.customer-account-layer-card > .customer-account { width: auto; overflow: auto; }
.customer-record-card > header { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid #d8dee8; }
.customer-record-card > header small { display: block; margin-top: 2px; color: #667085; }
.customer-record-card > header button { width: 34px; padding: 4px; font-size: 20px; }
.customer-record-card > footer { padding: 12px 14px; text-align: right; border-top: 1px solid #d8dee8; }
.customer-order-summary { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 10px 14px; background: #f8fafc; }
.customer-record-table { flex: 1; min-height: 180px; overflow: auto; border-left: 0; border-right: 0; }
.customer-order-record-card { width: min(1460px, calc(100vw - 56px)); height: min(720px, calc(100vh - 56px)); max-height: calc(100vh - 56px); overflow: hidden; }
.customer-order-record-card .customer-record-table { min-height: 0; }
.customer-order-record-card table { min-width: 1850px; }
.customer-order-record-card th,
.customer-order-record-card td { height: 28px; padding: 4px 7px; font-size: 13px; line-height: 20px; text-align: center; white-space: nowrap; }
.customer-order-record-card thead th { position: sticky; top: 0; z-index: 1; }
.customer-order-number { height: 24px; min-height: 24px; padding: 1px 5px; color: #1d4ed8; font-size: 13px; line-height: 20px; background: transparent; border: 0; text-decoration: underline; cursor: pointer; }
.customer-record-remark { padding: 10px 14px; }
.customer-record-remark p { margin: 5px 0 0; white-space: pre-wrap; }
.customer-audit-card { width: min(980px, calc(100% - 32px)); }
.customer-audit-filters { display: flex; gap: 12px; padding: 10px 14px; }
.customer-audit-filters label { display: inline-flex; align-items: center; gap: 6px; }
.customer-audit-filters select { width: 130px; height: 30px; min-height: 30px; padding: 2px 24px 2px 7px; }
.account-change-overlay { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(15,23,42,.42); }
.account-change-card { width: min(500px, calc(100% - 40px)); background: #fff; border: 1px solid #d9e1ec; box-shadow: 0 16px 40px rgba(15,23,42,.24); }
.account-change-card > header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e1e6ee; }
.account-change-card > header button { width: 32px; min-width: 32px; padding: 0; font-size: 22px; }
.account-change-card form { padding: 16px; }
.account-change-card form > label { display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; gap: 10px; margin-bottom: 12px; }
.account-change-card form > label > span { text-align: right; white-space: nowrap; }
.account-change-card form > label > span .required-mark { margin-right: 3px; color: #dc2626; font-style: normal; font-weight: 700; }
.account-change-card form > label > input { height: 36px; min-height: 36px; }
.account-change-card textarea { min-height: 76px; resize: vertical; }
.account-change-card .actions { padding-top: 4px; }
.list-text-layer-card { width: min(560px, calc(100% - 40px)); }
.list-text-layer-content { padding: 16px; }
.list-text-layer-content textarea { min-height: 150px; resize: vertical; }
.list-text-layer-card > .actions { margin: 0; padding: 0 16px 16px; border-top: 0; }
.account-summary { display: flex; gap: 28px; padding: 12px 14px; background: #f5f7fb; border: 1px solid #d8dee9; }
.account-summary b { color: #1d4ed8; }
.account-change-form { display: flex; align-items: end; gap: 10px; margin: 14px 0; }
.account-change-form label { min-width: 130px; }
.account-change-form label.grow { flex: 1; }
.account-change-form label span { display: block; margin-bottom: 5px; color: #475467; }
.account-ledger { margin-top: 14px; }
.account-ledger h4 { margin: 0 0 6px; }
.account-ledger .table-wrap { min-height: 120px; max-height: 210px; }
.account-ledger .positive { color: #16803c; }
.account-ledger .negative { color: #d92d20; }
.global-customer-search { padding: 16px 18px; }
.global-customer-search h3 { margin: 0; }
.global-customer-search p { margin: 3px 0 12px; }
.global-search-bar { display: flex; gap: 8px; max-width: 720px; }
.global-customer-candidates { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-top: 12px; }
.global-customer-candidates button { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.global-customer-candidates span, .global-profile span { color: #667085; font-size: 12px; }
.global-profile { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 12px; background: #f5f7fb; border: 1px solid #d8dee9; }
.global-profile > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.global-assets, .global-order-counts { display: flex; gap: 18px; }
.global-assets b { color: #1d4ed8; }
.global-order-counts { padding: 10px 2px; }
.global-order-table { min-height: 120px; max-height: 300px; }
.global-film { padding: 10px 2px 0; }
.customer-more { padding: 4px 9px; color: #1d4ed8; white-space: nowrap; }
.customer-manager-shared .customer-page-table th,
.customer-manager-shared .customer-page-table td { text-align: center; }
.customer-manager-shared .customer-page-table th:nth-child(5),
.customer-manager-shared .customer-page-table td:nth-child(5) { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.customer-manager-shared .customer-page-table .customer-more { padding: 2px 6px; }
.customer-stat-link { border: 0; background: transparent; color: #1d4ed8; padding: 0 3px; font: inherit; cursor: pointer; }
.customer-stat-link:hover { text-decoration: underline; }
.customer-coupon-identity { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 10px 14px; border-bottom: 1px solid #dbe3f5; font-size: 13px; }
.customer-detail { width: min(1080px, 88vw); padding: 16px; }
.customer-detail section { margin-bottom: 16px; }
.customer-detail h4 { margin: 0 0 7px; }
.customer-detail-summary { padding: 14px; border: 1px solid #d8dee9; background: #f8fafc; }
.customer-detail-summary > div:first-child { display: flex; align-items: center; gap: 12px; }
.customer-detail-summary > div:first-child span { color: #667085; }
.customer-detail-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.customer-detail-summary dl { display: grid; grid-template-columns: 75px 1fr 75px 1fr; gap: 7px 12px; margin: 14px 0; }
.customer-detail-summary dt { color: #667085; }
.customer-detail-summary dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.customer-detail-assets { display: flex; gap: 28px; border-top: 1px solid #e1e6ee; padding-top: 11px; }
.customer-detail-assets b { color: #1d4ed8; }
.customer-asset-link { min-width: 0; min-height: 0; padding: 0 2px; color: #1d4ed8; font-weight: 700; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 2px; }
.customer-asset-card { position: relative; width: min(1060px, calc(100vw - 56px)); height: min(790px, calc(100vh - 56px)); max-height: calc(100vh - 56px); overflow: hidden; }
.customer-asset-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 16px; background: #f7f9fc; border-bottom: 1px solid #d9e1ec; }
.customer-asset-summary > span { font-size: 15px; }
.customer-asset-summary > span b { color: #1d4ed8; font-size: 18px; }
.customer-asset-identity { display: flex; align-items: center; gap: 10px 22px; min-width: 0; }
.customer-asset-identity span { white-space: nowrap; }
.customer-asset-identity b { color: #1d4ed8; }
.customer-asset-total { margin-left: auto; white-space: nowrap; }
.customer-asset-actions { display: flex; gap: 10px; }
.customer-asset-summary button { min-width: 64px; }
.customer-asset-toolbar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.customer-asset-toolbar label { display: inline-flex; align-items: center; gap: 8px; }
.customer-asset-toolbar select { width: 110px; }
.customer-asset-date-filter { display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: auto; margin-right: 10px; white-space: nowrap; }
.customer-asset-date-filter > span:first-child { display: none; }
.customer-asset-date-filter > button { min-width: 50px; height: 30px; min-height: 30px; padding: 3px 8px; }
.customer-asset-date-filter > button.active { color: #fff; font-weight: 700; background: #2563eb; border-color: #2563eb; }
.customer-asset-date-filter label { gap: 4px; }
.customer-asset-date-filter input { width: 132px; height: 30px; min-height: 30px; padding: 3px 6px; }
.customer-asset-card .customer-record-table { flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto; }
.customer-asset-card .customer-record-table thead th { position: sticky; top: 0; z-index: 1; }
.customer-asset-card .customer-record-table tbody tr { height: 32px; }
.customer-asset-card .customer-record-table th,
.customer-asset-card .customer-record-table td { height: 32px; padding-top: 4px; padding-bottom: 4px; line-height: 20px; text-align: center; }
.list-text-layer-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; padding: 10px 16px; color: #475569; background: #f8fafc; border-bottom: 1px solid #d8dee8; }
.list-text-layer-meta b { color: #172033; font-weight: 600; }
.customer-coupon-card { width: min(920px, calc(100vw - 56px)); }
/* Reserve every fixed area before a coupon search returns. Only results scroll. */
.customer-coupon-search-card { position:relative; height:min(620px,calc(100dvh - 56px)); max-height:min(620px,calc(100dvh - 56px)); overflow:hidden; }
.customer-coupon-search-card>header { flex:0 0 76px; box-sizing:border-box; }
.customer-coupon-search-card>.home-coupon-inline-search { flex:0 0 104px; height:104px; min-height:104px; box-sizing:border-box; align-content:flex-start; margin:0; }
.customer-coupon-search-card .home-coupon-profile { flex-basis:100%; height:40px; min-height:40px; max-height:40px; overflow:auto; align-content:flex-start; line-height:20px; gap:0 12px; scrollbar-gutter:stable; }
.customer-coupon-search-card .home-coupon-profile span { min-width:0; max-width:100%; }
.customer-coupon-search-card .home-coupon-profile em { flex-shrink:0; }
.customer-coupon-search-card .home-coupon-profile b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-coupon-search-card>.customer-coupon-tabs { flex:0 0 52px; height:52px; box-sizing:border-box; overflow:auto; }
.customer-coupon-search-card>.customer-record-table { flex:1 1 0; min-height:0; overflow:auto; scrollbar-gutter:stable; }
.customer-coupon-search-card>.customer-record-table thead th { position:sticky; top:0; z-index:1; background:#f3f5f9; }
.customer-coupon-search-card>footer { flex:0 0 64px; height:64px; box-sizing:border-box; }
.customer-coupon-search-card>.home-coupon-matches { position:absolute; top:180px; left:16px; right:16px; max-height:160px; margin:0; z-index:3; background:#fff; border:1px solid #d8dee8; box-shadow:0 6px 16px rgba(15,23,42,.16); }
.customer-coupon-card .customer-record-table th,
.customer-coupon-card .customer-record-table td { height: 28px; padding: 4px 8px; line-height: 20px; text-align: center; font-weight: 400; }
.customer-coupon-card .customer-record-table th { font-weight: 600; }
.customer-coupon-card .customer-record-table { overflow-x: hidden; }
.customer-coupon-card .customer-record-table table { table-layout: fixed; }
.customer-coupon-card .customer-coupon-name-cell { width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-coupon-card .customer-record-table th:nth-child(2),
.customer-coupon-card .customer-record-table th:nth-child(3) { width: 7%; }
.customer-coupon-card .customer-record-table th:nth-child(4),
.customer-coupon-card .customer-record-table th:nth-child(5) { width: 19%; }
.customer-coupon-card .customer-record-table th:nth-child(6),
.customer-coupon-card .customer-record-table th:nth-child(7) { width: 9%; }
.customer-coupon-card .customer-record-table td:nth-child(4),
.customer-coupon-card .customer-record-table td:nth-child(5) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.customer-coupon-card .customer-coupon-remaining-cell { color: #2563eb; font-weight: 700; }
.customer-coupon-history-button { padding: 2px 8px; line-height: 20px; color: #2563eb; white-space: nowrap; }
.customer-coupon-tabs { display: flex; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #d8dee8; }
.customer-coupon-tabs > span { display: flex; gap: 8px; }
.customer-coupon-tabs button { min-width: 96px; background: #fff; }
.customer-coupon-tabs > button { min-width: auto; }
.customer-coupon-tabs > button.primary { color: #fff; background: #2563eb; border-color: #2563eb; }
.customer-coupon-tabs button.active { color: #fff; font-weight: 700; background: #2563eb; border-color: #2563eb; }
.customer-coupon-tabs button b { margin-left: 4px; }
.customer-coupon-search-card [data-status-tabs] > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-block: 0;
  line-height: 1.2;
  white-space: nowrap;
}
.customer-coupon-search-card [data-status-tabs] > button > b { margin-left: 0; }
.customer-coupon-card tbody tr[data-coupon] { cursor: pointer; }
.customer-coupon-card tbody tr.selected td,
.customer-coupon-template-table tbody tr.selected td { background: #dbeafe; }
.customer-coupon-child { z-index: 8; }
.customer-coupon-child-card { display: flex; flex-direction: column; width: min(820px, calc(100% - 40px)); max-height: calc(100% - 40px); overflow: hidden; }
.customer-coupon-history-card { width: min(920px, calc(100% - 40px)); height: min(610px, calc(100% - 40px)); }
.customer-coupon-card:has(> .customer-coupon-child > .customer-coupon-history-card) {
  background: transparent; border-color: transparent; box-shadow: none; overflow: visible;
}
.customer-coupon-card:has(> .customer-coupon-child > .customer-coupon-history-card) > :not(.customer-coupon-child) { visibility: hidden; }
.customer-coupon-child:has(> .customer-coupon-history-card) { background: transparent; }
.customer-coupon-history-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 16px; max-height: 48%; overflow: auto; padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid #d8dee8; font-size: 13px; line-height: 20px; }
.customer-coupon-history-summary span { min-width: 0; overflow-wrap: anywhere; }
.customer-coupon-history-wide { grid-column: 1 / -1; }
.customer-coupon-history-card .customer-coupon-transaction-table th,
.customer-coupon-history-card .customer-coupon-transaction-table td { height: 24px !important; padding: 2px 8px !important; line-height: 20px; text-align: center; }
.customer-coupon-history-card .customer-coupon-transaction-table tbody tr { height: 24px !important; }
.customer-coupon-transaction-table .customer-coupon-redeem-row > td:nth-child(3),
.customer-coupon-transaction-table .customer-coupon-revoke-row > td:nth-child(3),
.customer-coupon-transaction-table .customer-coupon-balance { color: #172033; font-weight: 400; }
.customer-coupon-transaction-table button { height: 24px !important; min-height: 24px !important; padding: 1px 8px !important; line-height: 20px; }
.customer-coupon-revoke-button { color: #dc2626; white-space: nowrap; }
.customer-coupon-revoke-button:disabled { color: #98a2b3; border-color: #d8dee8; background: #f2f4f7; cursor: not-allowed; }
.customer-coupon-history-card .customer-coupon-redeem-form { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 12px; flex: 0 0 auto; padding: 10px 16px 0; border-top: 1px solid #d8dee8; }
.customer-coupon-history-card .customer-coupon-redeem-form > label { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 8px; align-items: center; min-width: 0; margin: 0; }
.customer-coupon-history-card .customer-coupon-redeem-form > label > span { text-align: right; white-space: nowrap; }
.customer-coupon-history-card .customer-coupon-redeem-form .required-mark { margin-right: 3px; color: #dc2626; font-style: normal; font-weight: 700; }
.customer-coupon-history-card .customer-coupon-redeem-form input { box-sizing: border-box; height: 34px; }
.customer-coupon-history-card .customer-coupon-redeem-form input[name="uses"] { width: 72px; text-align: center; }
.customer-coupon-history-card .customer-coupon-redeem-form input[name="remark"] { width: 100%; min-width: 0; }
.customer-coupon-history-card .customer-coupon-redeem-form > label.field-invalid > span { color: #172033; font-weight: 400; }
.customer-coupon-history-card .customer-coupon-redeem-form > label.field-invalid input { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 2px rgba(37,99,235,.14); }
.customer-coupon-history-card .customer-coupon-redeem-form > footer { display: flex; justify-content: flex-end; gap: 8px; grid-column: 1 / -1; margin: 0 -16px; padding: 12px 16px; border-top: 1px solid #d8dee8; }
@media (max-width: 650px) { .customer-coupon-history-card .customer-coupon-redeem-form { grid-template-columns: 1fr; } }
.customer-coupon-child-card > header small { display: block; margin-top: 2px; color: #667085; }
.customer-coupon-child-card > footer,
.customer-coupon-operation-form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #d8dee8; }
.customer-coupon-issue-card { width: min(860px, calc(100% - 40px)); height: min(610px, calc(100% - 40px)); }
.customer-coupon-issue-identity { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 10px 16px; border-bottom: 1px solid #d8dee8; background: #f8fafc; }
.customer-coupon-issue-identity span { white-space: nowrap; }
.customer-coupon-issue-form { display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; flex: 1; min-height: 0; }
.customer-coupon-issue-picker-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.customer-coupon-issue-picker-row > span { width: 78px; text-align: right; white-space: nowrap; }
.customer-coupon-issue-picker-row > button { height: 34px; padding: 5px 14px; }
.customer-coupon-issue-picker-row > em { min-width: 0; overflow: hidden; color: #64748b; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.customer-coupon-issue-selected { min-height: 0; margin: 0 16px 10px; }
.customer-coupon-issue-selected th,
.customer-coupon-issue-selected td { height: 29px; padding: 2px 8px; line-height: 20px; text-align: center; }
.customer-coupon-issue-selected th:nth-child(1) { width: 48%; }
.customer-coupon-issue-selected th:nth-child(2),
.customer-coupon-issue-selected th:nth-child(3) { width: 15%; }
.customer-coupon-issue-selected th:nth-child(4) { width: 22%; }
.customer-coupon-issue-selected input { width: 72px; height: 28px; padding: 3px 6px; text-align: center; }
.customer-coupon-issue-remark { display: grid; grid-template-columns: 94px minmax(0,1fr); align-items: center; gap: 8px; padding: 0 16px 10px; }
.customer-coupon-issue-remark > span { text-align: right; white-space: nowrap; }
.customer-coupon-issue-remark .required-mark { margin-right: 3px; color: #dc2626; font-style: normal; font-weight: 700; }
.customer-coupon-issue-remark input { height: 34px; }
.customer-coupon-issue-form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #d8dee8; }
.customer-coupon-picker-card { width: min(760px, calc(100% - 80px)); height: min(520px, calc(100% - 80px)); }
.customer-coupon-picker-card .customer-coupon-template-table { flex: 1; min-height: 0; }
.customer-coupon-picker-card .customer-coupon-template-table th,
.customer-coupon-picker-card .customer-coupon-template-table td { text-align: center; }
.customer-coupon-picker-card tbody tr { cursor: pointer; }
.customer-coupon-child-card > h4 { margin: 12px 16px 6px; }
.customer-coupon-transaction-table,
.customer-coupon-template-table { flex: 1 1 auto; min-height: 0; overflow: auto; margin: 0 16px 12px; border: 1px solid #d8dee8; }
.customer-coupon-operation-form { padding: 12px 16px 0 !important; border-top: 1px solid #d8dee8; }
.customer-coupon-operation-form > footer { margin: 0 -16px; }
.coupon-status-unused { color: #15803d; font-weight: 700; }
.coupon-status-used { color: #475569; }
.coupon-status-expired { color: #dc2626; }
.detail-table { min-height: 90px; max-height: 190px; }
.detail-table .empty { padding: 28px; }
.customer-tag-options { min-height: 38px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 7px 10px; border: 1px solid #b9c3d2; background: #fff; }
.customer-tag-options label { display: inline-flex; align-items: center; gap: 5px; margin: 0; }
.customer-tag-options input { width: auto; }
@media (max-width: 1050px) {
  .repair-info-grid { grid-template-columns: repeat(3, 1fr); }
  .repair-sheet-bottom { grid-template-columns: 1fr 1fr; }
  .internal-area { grid-column: 1 / -1; }
  .data-settings-grid { grid-template-columns: 1fr; margin-top: 35px; }
  .home-action-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
  .data-window-overlay { padding: 18px; }
  .data-window { width: calc(100vw - 36px); height: calc(100vh - 36px); }
}

/* 维修单顶部按实际录入长度分配空间：客户字段紧凑，机型和备注优先。 */
.repair-v2 .compact-repair-info {
  grid-template-columns: 250px 280px 260px minmax(360px, 1fr);
}
.repair-v2 .compact-repair-info > label:nth-child(1) { grid-column: 1; }
.repair-v2 .compact-repair-info > label:nth-child(2) { grid-column: 2 / 4; }
.repair-v2 .compact-repair-info > label:nth-child(3) { grid-column: 4; }
.repair-v2 .compact-repair-info .repair-description { grid-column: 1; }
.repair-v2 .compact-repair-info .repair-serial { grid-column: 2; }
.repair-v2 .compact-repair-info .repair-public-note { grid-column: 3 / -1; }
.repair-v2 .repair-customer-reference {
  grid-template-columns: 82px max-content 125px max-content 165px;
}
.repair-v2 .compact-model { grid-template-columns: max-content 82px minmax(250px, 1fr); }
.repair-v2 #choose-repair-progress,
.repair-v2 #repair-assignee {
  text-align: center;
  text-align-last: center;
}

/* 维修项目关联配件子行：只呈现开单需要的库存快照，成本和批次仍在后台保存。 */
.repair-v2 .sheet-block:has(#repair-job-body) th:nth-child(1) { width: 12%; }
.repair-v2 .sheet-block:has(#repair-job-body) th:nth-child(2) { width: 20%; }
.repair-v2 .sheet-block:has(#repair-job-body) th:nth-child(3) { width: 22%; }
.repair-v2 .sheet-block:has(#repair-job-body) th:nth-child(4) { width: 10%; }
.repair-v2 .sheet-block:has(#repair-job-body) th:nth-child(5) { width: 10%; }
.repair-v2 .sheet-block:has(#repair-job-body) th,
.repair-v2 .repair-job-row td,
.repair-v2 .repair-job-row input { text-align: center; }
.repair-v2 .repair-job-row [data-k="name"][readonly] {
  color: #172033 !important;
  -webkit-text-fill-color: #172033;
  opacity: 1;
}
.repair-v2 .repair-job-row [data-k="unit_price"] { border: 1px solid #b9c3d2; border-radius: 2px; background: #fff; }
.repair-v2 .repair-project-parts { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }

.shared-reference-manager .repair-project-delete-head,
.shared-reference-manager .repair-project-delete-cell {
  width: 42px;
  min-width: 42px;
  padding: 2px 4px !important;
  text-align: center;
}
.shared-reference-manager .repair-project-row-delete,
button.list-row-delete {
  display: inline-grid;
  place-items: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent !important;
}
.shared-reference-manager .repair-project-row-delete svg,
button.list-row-delete svg {
  display: block;
  width: 24px;
  height: 24px;
}
.shared-reference-manager .repair-project-row-delete circle,
button.list-row-delete circle { fill: #e53935; }
.shared-reference-manager .repair-project-row-delete path,
button.list-row-delete path {
  fill: none;
  stroke: #fff;
  stroke-width: 3.4;
  stroke-linecap: round;
}
.shared-reference-manager .repair-project-row-delete:focus-visible,
button.list-row-delete:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
button.list-row-delete { border: 0 !important; color: transparent !important; font-size: 0 !important; }
.repair-v2 .repair-linked-parts { display: grid; gap: 3px; flex: 1; min-width: 0; }
.repair-v2 .repair-add-cost { flex: none; padding: 3px 6px; white-space: nowrap; }
.repair-v2 .repair-linked-part {
  display: grid;
  grid-template-columns: 110px minmax(150px,1fr) minmax(130px,1fr) 105px 56px;
  gap: 10px;
  align-items: center;
  min-height: 28px;
  padding: 1px 0 1px 10px;
  color: #344054;
  border-left: 3px solid #9bbcf3;
}
.repair-v2 .repair-linked-part b { color: #667085; font-weight: 500; }
.repair-v2 .repair-linked-part label { display: flex; align-items: center; gap: 6px; }
.repair-v2 .repair-linked-part input { width: 54px; height: 24px; padding: 2px 5px; border: 1px solid #b9c3d2; border-radius: 3px; background: #fff; text-align: center; }
.repair-v2 .repair-linked-part button { padding: 5px 10px; }
.repair-v2 .repair-linked-other-cost { grid-template-columns:minmax(150px,1fr) 130px minmax(170px,1.2fr) 56px; border-left-color:#f0ad4e; }
.repair-v2 .repair-linked-other-cost label { min-width:0; }
.repair-v2 .repair-linked-other-cost input { width:100%; min-width:0; text-align:left; }
.repair-cost-dialog { z-index: 10060; }
.repair-cost-choice-card {
  display: flex;
  flex-direction: column;
  width: min(680px, calc(100vw - 40px));
  height: min(480px, calc(100vh - 80px));
}
.repair-cost-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px; }
.repair-cost-choice.repair-product-choice { grid-template-columns: 1fr; }
.repair-cost-choice.repair-product-choice { display: flex; justify-content: flex-start; padding: 12px 18px; }
.repair-cost-choice.repair-product-choice button { width: auto; min-width: 78px; height: 30px; min-height: 30px; padding: 3px 10px; background: #2563eb; border-color: #2563eb; color: #fff; font-size: 14px; white-space: nowrap; }
.repair-v2 #repair-other-cost { margin-left: auto; }
.repair-cost-choice button { height: 44px; font-size: 15px; }
.repair-cost-list { flex: 1; min-height: 0; margin: 0 18px 12px; overflow: auto; }
.repair-cost-choice-card > .actions { flex: none; margin-top: auto; padding: 10px 18px; border-top: 1px solid #e4e9f1; }
.repair-cost-delete {
  width: 26px;
  min-width: 26px;
  height: 24px;
  padding: 0;
  border: 1px solid #f2b8b5;
  border-radius: 3px;
  background: #fff;
  color: #d93025;
  font-size: 15px;
  line-height: 22px;
}
.repair-other-cost-card { width: min(860px, calc(100vw - 40px)); }
.repair-other-cost-card .form-grid { padding: 12px 14px; }
.repair-other-cost-card .repair-other-cost-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px 10px; }
.repair-other-cost-card .repair-other-cost-grid label { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 6px; margin: 0; min-width: 0; }
.repair-other-cost-card .repair-other-cost-grid label > span { margin: 0; white-space: nowrap; }
.repair-other-cost-card .repair-other-cost-grid :is(input, select, button) { width: 100%; min-width: 0; height: 32px; min-height: 32px; padding-top: 3px; padding-bottom: 3px; }
.repair-other-cost-card .repair-other-cost-grid label > div { min-width: 0; }
.repair-other-cost-card .repair-other-cost-grid [data-choose-supplier] { width: 96px; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.repair-other-cost-card .repair-cost-supplier-field { grid-column: span 3; }
.repair-other-cost-card .repair-cost-supplier-name-field,
.repair-other-cost-card .repair-cost-contact-field,
.repair-other-cost-card .repair-cost-phone-field { grid-column: span 3; }
.repair-other-cost-card .repair-cost-name-field { grid-column: span 6; }
.repair-other-cost-card .repair-cost-amount-field,
.repair-other-cost-card .repair-cost-payment-field { grid-column: span 3; }
.repair-other-cost-card .repair-other-cost-grid textarea { width: 100%; min-width: 0; height: 54px; min-height: 54px; resize: vertical; }
.repair-other-cost-card .repair-other-cost-grid .span3 { grid-column: 1 / -1; }
.repair-other-cost-card > .actions { padding: 10px 14px 14px; }

/* 避免送修时间控件覆盖“客户”标签，并让顶部状态控件文字垂直居中。 */
.repair-v2 .compact-repair-info {
  grid-template-columns: 280px 260px 250px minmax(360px, 1fr);
}
.repair-v2 .repair-date-field { min-width: 0; }
.repair-v2 #repair-service-at { min-width: 0; width: 100%; }
.repair-v2 .repair-customer-reference {
  grid-template-columns: 82px max-content 105px max-content 145px;
}
.repair-v2 #choose-repair-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}
.repair-v2 #repair-assignee {
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 34px;
}

/* 进货商品选择器与库存资料保持同一套分类 + 商品列表结构。 */
.purchase-product-picker { position: fixed; z-index: 100; }
.purchase-product-window { width: min(1050px, 92vw); height: min(720px, 88vh); display: flex; flex-direction: column; }
.purchase-picker-toolbar { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.purchase-picker-toolbar input { width: 330px; }
.purchase-picker-body { display: grid; grid-template-columns: 180px 1fr; min-height: 0; flex: 1; padding: 0 16px; }
.purchase-picker-body aside { border-right: 1px solid var(--line); padding: 10px 8px; overflow: auto; }
.purchase-picker-body aside button { display: block; width: 100%; border: 0; background: #fff; text-align: left; padding: 8px 10px; color: var(--text); }
.purchase-picker-body aside button.active { background: #2864dc; color: #fff; }
.purchase-picker-body .table-wrap { overflow: auto; }
.purchase-product-window > .actions { padding: 12px 16px; border-top: 1px solid var(--line); }
.purchase-child-picker { z-index: 10030; }
.purchase-child-card { width: min(620px, 88vw); }
.purchase-subtotal { display: block; text-align: center; font-weight: 600; }

/* 单号后的业务字段靠左同排；寄修时快递信息直接接在维修类型后。 */
.repair-v2 .repair-number {
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding-right: 100px;
  grid-template-columns: max-content 125px 170px 170px 135px 225px 230px;
  justify-content: start;
  gap: 10px;
}
.repair-v2 .repair-number-progress button,
.repair-v2 .repair-number-technician button,
.repair-v2 .repair-number-delivery select { height: 34px; text-align: center; text-align-last: center; }
.repair-v2 .repair-number-delivery select { min-width: 0; }
.repair-v2 .repair-mail-fields { display: contents; }
.repair-v2 .repair-mail-fields label { display: grid; grid-template-columns: max-content minmax(0,1fr); align-items: center; gap: 8px; }
.repair-v2 .repair-mail-fields label span { margin: 0; }
.repair-v2 .repair-mail-fields input { height: 34px; }
.repair-v2 .repair-mail-fields label:first-child input { min-width: 145px; }
.repair-v2 .repair-number-creator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  height: 34px;
  white-space: nowrap;
  color: #26354a;
}
.repair-v2 .repair-number-creator strong { display:inline!important;margin-left:0;white-space:nowrap; }

/* 新增维修单采用紧凑票据字号；维修项目区一次完整容纳十条记录。 */
.repair-v2 { font-size: 12px; }
.repair-v2 .modal-head,
.repair-v2 .sheet-toolbar b { font-size: 14px; }
.repair-v2 .sheet-table th,
.repair-v2 .sheet-table td { height: 26px; padding: 2px 8px; font-size: 12px; line-height: 18px; }
.repair-v2 .sheet-table thead th {
  height: 28px;
  background: #f1f2f4;
  color: #202733;
  font-weight: 600;
}
.repair-v2 .sheet-table input { height: 24px; min-height: 24px; padding: 2px 6px; line-height: 18px; }
.repair-v2 .sheet-table .repair-link-part { height: 26px; min-height: 26px; padding: 2px 8px; line-height: 18px; }
.repair-v2 .sheet-table tbody td { background: #fff; }
.repair-v2 .sheet-table tbody tr.selected td { background: #e7e9ec; }
.repair-v2 .sheet-block:has(#repair-job-body) .sheet-table {
  height: 288px;
  min-height: 288px;
  overflow-x: auto;
  overflow-y: hidden;
}

/* 维修配件选择复用库存管理主视图：上方商品、下方完整入库批次。 */
.inventory-select-overlay { z-index: 10040; padding: 18px; }
.inventory-select-window { width: min(1500px, 97vw); height: min(880px, 95vh); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.inventory-select-body { min-height: 0; padding: 12px; overflow: hidden; }
.inventory-select-body.inventory-page { min-height: 0; }
.inventory-select-body .inventory-layout { height: 100%; min-height: 0; grid-template-columns: 155px minmax(0, 1fr); }
.inventory-select-body .inventory-category { min-height: 0; }
.inventory-select-body .inventory-tree { height: calc(100% - 26px); }
.inventory-select-body .inventory-main { min-height: 0; grid-template-rows: minmax(220px, 43%) minmax(260px, 57%); }
.inventory-select-body .inventory-products .table-wrap,
.inventory-select-body .inventory-detail .table-wrap { min-height: 0; overflow: auto; }
.inventory-select-body .inventory-products table { min-width: 1700px; }
.inventory-select-body .inventory-detail table { min-width: 1300px; }
.inventory-select-body tr.selected td { background: #dbeafe; color: #1d4ed8; }
.inventory-select-window > .actions { padding: 10px 14px; border-top: 1px solid var(--line); }
.inventory-master-select-window { height: min(760px, 90vh); }
.inventory-master-select-body .inventory-main { grid-template-rows: minmax(0, 1fr); }
.inventory-master-select-body .inventory-products table { min-width: 1700px; }
.inventory-purchase-master-select-window .inventory-select-body>.shared-inventory-workspace{display:flex;height:100%;min-height:0;flex-direction:column}
.inventory-purchase-master-select-window .shared-inventory-workspace>.inventory-layout{flex:1;height:auto;min-height:0}
.inventory-purchase-master-select-window .shared-inventory-workspace .inventory-main{height:100%;grid-template-rows:minmax(0,1fr)}
.inventory-purchase-master-select-window .shared-inventory-workspace .inventory-products{height:100%}
.inventory-purchase-master-select-window [data-inventory-product-pager]{flex:none;margin-top:auto}
.repair-print-frame { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; border: 0; }

/* 基础资料小窗口叠加显示，保留底层订单表单。 */
.simple-reference-overlay { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 24px; background: rgba(15,23,42,.36); }
.compact-reference { width: min(560px,92vw); min-height: 360px; max-height: min(620px,86vh); display: grid; grid-template-rows: auto auto minmax(220px,1fr) auto; overflow: hidden; background: #fff; border: 1px solid #d7deea; border-radius: 8px; box-shadow: 0 18px 50px rgba(15,23,42,.22); }
.compact-reference > header { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 16px; border-bottom: 1px solid #e4e9f1; }
.compact-reference > header button { border: 0; background: transparent; font-size: 20px; }
.compact-reference .toolbar { padding: 12px 16px; }
.compact-reference .toolbar input { flex: 1; min-width: 0; }
.compact-reference .table-wrap { margin: 0 16px; border: 1px solid #dfe5ee; overflow: auto; }
.compact-reference tr.selected td { background: #dbeafe; color: #1d4ed8; }
.compact-reference .actions { padding: 12px 16px; border-top: 1px solid #e4e9f1; }
.repair-list-progress-filter{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;color:#334155}
.repair-list-progress-filter select{width:128px;height:32px;padding:0 28px 0 9px;border:1px solid #cbd5e1;border-radius:3px;background:#fff;color:#0f172a}
@keyframes tenant-refresh-spin{to{transform:rotate(360deg)}}button[aria-busy="true"] .tool-icon.refresh{display:inline-block;animation:tenant-refresh-spin .65s linear infinite}
.tenant-phone-model-dialog .phone-model-pagination>span:first-child{margin-right:auto;white-space:nowrap}

/* 机型管理仅允许分类树和型号列表内部滚动，主弹窗保持固定。 */
.tenant-phone-model-overlay{overflow:hidden!important}
.customer-manager-overlay .tenant-phone-model-dialog{overflow:hidden!important}
.tenant-phone-model-dialog .tenant-phone-model-content,
.tenant-phone-model-dialog .tenant-phone-model-host,
.tenant-phone-model-dialog .phone-model-tree-manager,
.tenant-phone-model-dialog .categorized-layout{min-height:0;overflow:hidden}
.tenant-phone-model-dialog .categorized-layout{height:auto}

/* 型号表格单独滚动，分页栏固定在右侧面板底部。 */
.tenant-phone-model-dialog .phone-model-table-panel{display:flex;height:100%;min-height:0;flex-direction:column;overflow:hidden}
.tenant-phone-model-dialog .phone-model-table-panel .table-wrap{flex:1;min-height:0;height:auto;overflow:auto}
.tenant-phone-model-dialog .phone-model-batch-tools,
.tenant-phone-model-dialog .phone-model-pagination{position:static;flex:none}
.tenant-phone-model-dialog .phone-model-table-panel.batch-mode thead th{top:0}
.tenant-phone-model-dialog .phone-model-table-panel .table-wrap thead{position:sticky;z-index:3;top:0;background:#f6f8fb}
.tenant-phone-model-dialog .phone-model-table-panel .table-wrap thead th{position:static;background:#f6f8fb}
.tenant-phone-model-overlay{position:fixed;inset:0;overflow:clip!important}
.customer-manager-overlay .tenant-phone-model-dialog{display:grid!important;grid-template-rows:minmax(0,1fr);box-sizing:border-box;overflow:clip!important}
.tenant-phone-model-dialog .tenant-phone-model-content{height:auto;max-height:100%;overflow:clip}
.tenant-phone-model-dialog .tenant-phone-model-host,
.tenant-phone-model-dialog .phone-model-tree-manager{height:auto;max-height:100%;overflow:clip}

/* Both entry points mount the same coupon center, including customer totals. */
.customer-coupon-search-card>.customer-record-table table{min-width:860px}
.customer-coupon-search-card>.home-coupon-inline-search{position:relative;display:grid;grid-template-columns:minmax(260px,42%) 1fr;grid-template-rows:40px 1fr;gap:8px 20px;flex-basis:142px;height:142px;min-height:142px;padding:12px 16px;align-content:stretch}
.customer-coupon-search-card>.home-coupon-inline-search>label{grid-column:1;display:flex;align-items:center;gap:8px;padding-right:66px;min-width:0}
.customer-coupon-search-card>.home-coupon-inline-search>label input{min-width:0;width:100%;flex:1}
.customer-coupon-search-card>.home-coupon-inline-search>button{position:absolute;left:calc(42% - 48px);top:12px;height:38px}
.customer-coupon-search-card .home-coupon-profile{grid-column:1;grid-row:2;display:flex;flex-wrap:wrap;gap:4px 12px;height:auto;min-height:0;max-height:none;align-content:start;overflow:auto;line-height:20px}
.customer-coupon-search-card .home-coupon-profile span{display:inline-flex;gap:2px;white-space:normal}
.customer-coupon-search-card .coupon-center-grade{background:#eaf0ff;color:#1847a0;border:1px solid #adc3ef;padding:3px 10px;border-radius:5px;font-weight:700}
.customer-coupon-search-card .coupon-center-customer-stats{grid-column:2;grid-row:1/3;min-width:0;overflow:auto;border-left:1px solid #e1e7ef;padding-left:16px}
.coupon-center-totals{display:flex;gap:24px;padding-bottom:8px;line-height:20px}
.coupon-center-totals span{color:#66758b}.coupon-center-totals b{font-size:16px;color:#172b4d;margin-left:4px}
.coupon-center-details{display:flex;flex-wrap:wrap;gap:4px 16px;line-height:20px;overflow-wrap:anywhere}
.coupon-center-details span:nth-child(n+3){width:100%}.coupon-center-details em{font-style:normal;color:#66758b}.coupon-center-details b{font-weight:400}
.customer-coupon-search-card>.home-coupon-matches{top:218px}
@media(max-width:720px){.customer-coupon-search-card>.home-coupon-inline-search{grid-template-columns:1fr;grid-template-rows:40px auto auto;flex-basis:225px;height:225px;min-height:225px;gap:4px}.customer-coupon-search-card>.home-coupon-inline-search>button{left:auto;right:16px}.customer-coupon-search-card .coupon-center-customer-stats{grid-column:1;grid-row:3;border-left:0;padding-left:0}.customer-coupon-search-card>.home-coupon-matches{top:301px}}
