/* 客户管理与产品报价局部样式，不影响合同或预览。 */
#view-proj .project-table-scroll { width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }
#view-proj .project-table-scroll > table { table-layout: fixed; min-width: 900px; }
#view-proj #projTableTech { min-width: 1060px; }
#view-proj table th:last-child { width: 220px !important; }
#view-proj table td:last-child, #view-proj table th:last-child { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -3px 0 4px #1735520a; white-space: nowrap; }
#view-proj table th:last-child { z-index: 2; background: #f6f9fd; }
#view-proj table td { vertical-align: middle; overflow-wrap: anywhere; }
#view-proj .p-name { display: block; width: 100%; min-width: 0; min-height: 54px; max-height: 140px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; font: inherit; color: var(--ink); background: white; line-height: 1.5; overflow-wrap: anywhere; }
#view-proj table input { min-width: 0; }
#view-proj table td:last-child .btn { margin: 2px; }
#view-client .client-archive-tools > .hint { margin: 0 0 12px; }
#view-client .client-manual summary { cursor: pointer; font-weight: 600; color: var(--brand); }
#view-client .client-add-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; padding: 10px 0 18px; }
#view-client .client-add-form label { margin: 0; }
#view-client .client-add-form input { margin-top: 5px; }
#view-client .client-name-field { grid-column: 1 / -1; }
#view-client .client-name-field .hint { margin-left: 12px; }
#view-client .client-import-drop { display: flex; flex-direction: column; gap: 4px; padding: 22px; margin: 16px 0 10px; text-align: center; border: 1.5px dashed #9bb3cb; border-radius: 10px; background: #f8fbff; cursor: pointer; }
#view-client .client-import-drop span { color: #596d81; font-size: 12px; }
#view-client .client-import-drop.is-over { border-color: var(--brand); background: #eaf2fc; }
#view-client .client-import-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; }
#view-client .client-import-toolbar label { margin: 0; display: flex; align-items: center; gap: 5px; }
#view-client .client-import-toolbar label[hidden] { display: none; }
#view-client .client-import-toolbar > input[type=search] { width: auto; min-width: 180px; flex: 1; }
#view-client .client-import-toolbar select { width: auto; max-width: 240px; }
#view-client .client-import-toolbar input[type=checkbox], #view-client .client-import-table input[type=checkbox] { width: 17px; height: 17px; }
#view-client .client-import-mapping { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
#view-client .client-import-mapping label { margin: 8px 0; }
#view-client .client-import-mapping select { margin-top: 5px; }
#view-client .client-import-table { min-width: 1000px; }
#view-client .client-import-table td { max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
#view-client .client-import-table .client-row-skipped td { background: #f7f7f8; color: #677587; }
#view-client .client-import-table .client-row-invalid td { background: #fff2ef; }
#view-client .client-import-preview[hidden] { display: none; }
@media (max-width: 760px) {
  #view-client .client-add-form { grid-template-columns: 1fr; }
  #view-client .client-import-mapping { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-client .client-add-form input { font-size: 16px; }
  #view-client .client-name-field .hint { display: block; margin: 8px 0 0; }
}

.client-transfer-dialog { width: min(580px, calc(100vw - 40px)); border: 0; border-radius: 16px; padding: 28px; box-shadow: 0 24px 80px #10243a40; color: #26364b; }
.client-transfer-dialog::backdrop { background: #14243e70; }
.client-transfer-dialog select { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #d9e1ec; border-radius: 8px; }
.client-transfer-actions { display: flex; gap: 12px; justify-content: flex-end; }
#clientTable [data-transfer] { margin: 4px; }

/* ---------- 审批中心：紧凑卡片 + 路径条 + 催办 ---------- */
.apv-item { padding: 10px 12px; }
.apv-meta { display: flex; flex-direction: column; gap: 3px; line-height: 1.6; }
.apv-amountline { font-weight: 600; color: #33415a; font-size: 12.5px; }
.apv-amountline b { color: #1f2d40; }
.apv-detailline { color: #7b869b; font-size: 12px; }
.apv-strip { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 10px 0 6px; }
.apv-chip { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #f8fafc; font-size: 11.5px; min-width: 86px; }
.apv-chip-role { color: #64748b; font-size: 11px; }
.apv-chip-people { display: flex; flex-wrap: wrap; gap: 4px 8px; color: #33415a; font-weight: 600; }
.apv-chip-start b, .apv-chip-end { color: #33415a; }
.apv-chip-approved { border-color: #bfe3d0; background: #f2faf5; }
.apv-chip-approved .apv-chip-role { color: #1a7f4b; }
.apv-chip-rejected { border-color: #efc4c4; background: #fdf4f4; }
.apv-chip-rejected .apv-chip-role { color: #b23b3b; }
.apv-chip-pending { border-color: #d3ab69; background: #fffcf5; }
.apv-chip-pending .apv-chip-role { color: #a8763a; }
.apv-chip-historical { border-color: #cbd5e1; background: #f1f5f9; }
.apv-chip-historical .apv-chip-role, .apv-person-historical, .apv-history-note { color: #64748b; }
.apv-history-note { font-size: 11px; font-weight: 400; }
.apv-chip-start, .apv-chip-end { border-style: dashed; background: transparent; }
.apv-arrow { align-self: center; color: #b3bccb; font-size: 12px; }
.apv-person-pending { color: #7b869b; font-weight: 500; }
.apv-person-approved { color: #1a7f4b; }
.apv-person-rejected { color: #b23b3b; }
.apv-stop { margin: 2px 0 8px; font-size: 12px; color: #a8763a; }
.apv-stop-done { color: #1a7f4b; }
.apv-stop-historical { color: #64748b; }
.apv-stop-rejected { color: #b23b3b; }
.apv-hurry-info { color: #7b869b; font-weight: 400; }
.apv-more { margin: 6px 0 2px; }
.apv-more summary { cursor: pointer; font-size: 12px; color: var(--brand); }
.apv-more[open] summary { margin-bottom: 8px; }

/* ---------- 编辑审批路径弹层 ---------- */
.route-dialog { width: min(640px, calc(100vw - 40px)); }
.route-hint { margin: 6px 0 0; font-size: 12.5px; color: #64748b; }
.route-hint.warn { color: #a8763a; }
.route-node { border: 1px solid #d9e1ec; border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: #f8fafc; }
.route-node-head { display: flex; gap: 8px; align-items: center; }
.route-node-no { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.route-node-head input.route-label { flex: 1 1 160px; min-width: 0; padding: 8px 10px; border: 1px solid #d9e1ec; border-radius: 8px; font: inherit; }
.route-node-head select.route-mode { width: auto; margin-top: 0; padding: 8px; flex: none; }
.route-members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.route-member { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; background: #e8eef7; color: #26364b; font-size: 12px; }
.route-member button { border: 0; background: none; cursor: pointer; color: #7b869b; font-size: 13px; padding: 0; line-height: 1; }
.route-member button:hover { color: #b23b3b; }
.route-add { flex: 1 1 180px; min-width: 140px; padding: 7px 10px; border: 1px dashed #c3cddd; border-radius: 999px; font: inherit; font-size: 12px; background: #fff; }
.route-suggest { position: absolute; z-index: 30; }
.route-node { position: relative; }
@media (max-width: 540px) { .route-node-head { flex-wrap: wrap; } }

/* Client contact tuples are edited together, including on narrow screens. */
#clientEditDialog .client-extra-section{margin:20px 0;padding:16px 0;border-top:1px solid #e3e8f1;border-bottom:1px solid #e3e8f1}
#clientEditDialog .client-extra-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
#clientEditDialog .client-extra-heading h4{margin:0}
#clientEditDialog .client-extra-row{margin:12px 0;padding:14px;border:1px solid #e3e8f1;border-radius:10px;background:#f8fafc}
#clientEditDialog .client-extra-row .client-edit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#clientEditDialog .client-extra-row input{box-sizing:border-box;width:100%;min-width:0}
#clientEditDialog .client-extra-row .btn{margin:0}
@media(max-width:520px){#clientEditDialog .client-extra-row .client-edit-grid{grid-template-columns:minmax(0,1fr)}}
