/* ==================== 入职资料原件（电子合同第三子页签） ====================
   克制风格：白底、细边框 #e8eaef、单一强调色 #4f46e5，无渐变无光晕
   宿主约束：.card overflow:hidden → 内部严禁横向溢出 */

#econtractPhotoRoot { display: flex; flex-direction: column; padding: 18px 24px 24px; }

/* ---------- 状态条 ---------- */
.ph-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ph-bar-l { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ph-num { font-size: 21px; font-weight: 700; color: #0f172a; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ph-unit { font-size: 12.5px; color: #94a3b8; }
.ph-range { font-size: 12px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.ph-bar-r { display: flex; align-items: center; gap: 8px; }

/* ---------- 按钮 ---------- */
.ph-btn {
    appearance: none; border: 1px solid #e5e7eb; background: #fff; color: #475569;
    font-size: 12.5px; padding: 5px 12px; border-radius: 7px; cursor: pointer;
    transition: border-color .15s, color .15s; white-space: nowrap;
}
.ph-btn:hover { border-color: #4f46e5; color: #4f46e5; }
.ph-btn:disabled { opacity: .45; cursor: not-allowed; }
.ph-btn:disabled:hover { border-color: #e5e7eb; color: #475569; }
.ph-btn-primary { border-color: #c7d2fe; color: #4f46e5; background: #f8f9ff; }

/* ---------- 进度 ---------- */
.ph-prog {
    display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
    padding: 10px 14px; border: 1px solid #e8eaef; border-radius: 10px; background: #fafbfd;
}
.ph-prog-txt { font-size: 12.5px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%; }
.ph-prog-track { flex: 1; height: 3px; background: #e8eaef; border-radius: 2px; overflow: hidden; min-width: 60px; }
.ph-prog-fill { height: 100%; background: #4f46e5; transition: width .3s; }
.ph-prog-pct { font-size: 12px; color: #94a3b8; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ---------- 工具栏 ---------- */
.ph-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ph-search { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.ph-search input {
    width: 100%; box-sizing: border-box; border: 1px solid #e5e7eb; background: #fff;
    border-radius: 8px; padding: 7px 10px 7px 30px; font-size: 13px; color: #0f172a;
    outline: none; transition: border-color .15s;
}
.ph-search input:focus { border-color: #4f46e5; }
.ph-search input::placeholder { color: #b4b8c4; }
.ph-search-ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #b4b8c4; pointer-events: none; }

/* ---------- 自动同步 ---------- */
.ph-auto {
    display: flex; align-items: center; gap: 9px; margin-bottom: 12px;
    font-size: 12px; color: #94a3b8; min-height: 17px; flex-wrap: wrap;
}
.ph-auto:empty { display: none; }
.ph-dot { width: 6px; height: 6px; border-radius: 50%; background: #d3d7e0; flex-shrink: 0; }
.ph-dot-on { background: #4f46e5; }
.ph-auto-n { color: #b4b8c4; font-variant-numeric: tabular-nums; }
.ph-auto-btn {
    appearance: none; border: 1px solid #e5e7eb; background: #fff; color: #64748b;
    font-size: 11.5px; padding: 2px 9px; border-radius: 6px; cursor: pointer;
    transition: border-color .15s, color .15s; margin-left: auto;
}
.ph-auto-btn:hover { border-color: #4f46e5; color: #4f46e5; }
.ph-auto-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 已优化标记（长边 2400 瘦身后的条目） ---------- */
.ph-mini {
    display: inline-block; margin-left: 5px; font-size: 10px; line-height: 1.4;
    color: #94a3b8; border: 1px solid #e8eaef; border-radius: 3px; padding: 0 4px;
    vertical-align: 1px;
}

/* ---------- 表格 ---------- */
.ph-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.ph-table th {
    text-align: left; font-weight: 500; font-size: 12px; color: #94a3b8;
    padding: 0 10px 8px; border-bottom: 1px solid #e8eaef; white-space: nowrap;
}
.ph-table td {
    padding: 11px 10px; border-bottom: 1px solid #f1f2f6; color: #334155;
    vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ph-table tbody tr { cursor: pointer; transition: background .12s; }
.ph-table tbody tr:hover { background: #fafbfd; }
.ph-no { font-variant-numeric: tabular-nums; color: #64748b; font-size: 12.5px; }
/* 姓名固定宽度（4 字宽+余量），超长省略号 —— 保证工号纵向对齐 */
.ph-emp { display: inline-block; width: 4.5em; color: #0f172a; font-weight: 500;
          overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.ph-code { color: #94a3b8; font-size: 12px; font-variant-numeric: tabular-nums; margin-left: 5px; }
.ph-emp-cell { white-space: nowrap; }
.ph-note { color: #8a90a0; font-size: 12px; white-space: nowrap; }
.ph-dt { font-variant-numeric: tabular-nums; color: #64748b; font-size: 12.5px; }
.ph-tag { display: inline-block; font-size: 11px; color: #4f46e5; background: #eef2ff; border-radius: 4px; padding: 1px 6px; }
.ph-muted { color: #94a3b8; font-size: 12px; }
.ph-warn { color: #b45309; font-size: 12px; }
.ph-arrow { color: #c7cad3; font-size: 12px; }
/* 通道二的历史材料没有单号，列里给可读占位而不是 HIST-<工号> */
.ph-hist { color: #475569; font-size: 12.5px; }
.ph-hist em { font-style: normal; color: #a3a9b7; font-size: 11px; margin-left: 5px; }

/* ---------- 分页 ---------- */
.ph-pager { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 12.5px; color: #94a3b8; }
.ph-pager-pages { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ---------- 空状态 ---------- */
.ph-empty { text-align: center; padding: 56px 20px; color: #94a3b8; font-size: 13px; }
.ph-empty-t { font-size: 14px; color: #475569; margin-bottom: 6px; }
.ph-empty-s { font-size: 12.5px; color: #a3a9b7; line-height: 1.7; }

/* ---------- 弹窗 ---------- */
.ph-modal {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .42);
    display: flex; align-items: center; justify-content: center; z-index: 1200; padding: 28px;
}
.ph-panel {
    background: #fff; border-radius: 12px; width: min(1080px, 100%); max-height: 100%;
    display: flex; flex-direction: column; overflow: hidden;
}
.ph-panel-hd {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 18px 22px 14px; border-bottom: 1px solid #eef0f4; flex-shrink: 0;
}
.ph-panel-t { font-size: 15px; font-weight: 600; color: #0f172a; }
.ph-panel-sub { font-size: 12px; color: #94a3b8; margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }
.ph-panel-bd { padding: 18px 22px 22px; overflow-y: auto; }
.ph-close { appearance: none; background: none; border: none; cursor: pointer; color: #b4b8c4; font-size: 20px; line-height: 1; padding: 2px 4px; flex-shrink: 0; }
.ph-close:hover { color: #475569; }

/* ---------- 照片网格 ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.ph-cell { border: 1px solid #e8eaef; border-radius: 9px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.ph-thumb {
    position: relative; aspect-ratio: 3 / 4; background: #f7f8fa;
    display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in;
}
.ph-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ph-thumb-ph { color: #c7cad3; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ph-meta { padding: 8px 10px; border-top: 1px solid #f1f2f6; }
.ph-meta-n { font-size: 12.5px; color: #0f172a; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-meta-s { font-size: 11px; color: #94a3b8; margin-top: 3px; font-variant-numeric: tabular-nums; }
.ph-badge {
    position: absolute; top: 6px; right: 6px; font-size: 10px; padding: 1px 5px;
    border-radius: 4px; background: rgba(255, 255, 255, .92); border: 1px solid #e8eaef; color: #64748b;
}
.ph-badge-dt { color: #4f46e5; border-color: #c7d2fe; }
.ph-badge-fb { color: #b45309; border-color: #fed7aa; }

/* ---------- 大图查看（缩放 / 旋转 / 平移） ---------- */
.ph-viewer { position: fixed; inset: 0; background: rgba(15, 23, 42, .94); z-index: 1300; overflow: hidden; }
.ph-viewer-stage {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    overflow: hidden; cursor: grab; touch-action: none; user-select: none;
}
.ph-viewer-stage.is-drag { cursor: grabbing; }
.ph-viewer-img {
    max-width: 94vw; max-height: 80vh; object-fit: contain;
    transform-origin: center center; will-change: transform;
    user-select: none; -webkit-user-drag: none;
}
.ph-viewer-hint {
    position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
    font-size: 12px; color: rgba(255, 255, 255, .4); letter-spacing: .3px; pointer-events: none;
}
.ph-viewer-bar {
    /* 用 inset + margin auto 居中，不要用 left:50%+translateX：
       绝对定位元素的 shrink-to-fit 宽度会按 left 偏移后的剩余空间算，
       left:50% 会让可用宽度只剩半屏，工具栏被迫折行。 */
    position: absolute; bottom: 22px; left: 0; right: 0; margin: 0 auto;
    width: max-content; max-width: calc(100vw - 40px);
    display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
    background: rgba(255, 255, 255, .97); border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 10px; padding: 7px 12px; font-size: 12.5px; color: #334155;
    box-shadow: 0 8px 28px rgba(2, 6, 23, .3);
}
.ph-vtitle {
    display: inline-flex; align-items: baseline; gap: 7px; max-width: 34vw;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #475569;
}
.ph-vrot { font-style: normal; font-size: 11px; color: #4f46e5; }
.ph-vsep { width: 1px; height: 18px; background: #e8eaef; }
.ph-vgroup { display: inline-flex; align-items: center; gap: 3px; }
.ph-vbtn {
    appearance: none; border: 1px solid #e5e7eb; background: #fff; border-radius: 6px;
    padding: 3px 10px; cursor: pointer; font-size: 12.5px; color: #475569; line-height: 18px;
    transition: border-color .12s, color .12s;
}
.ph-vbtn:hover { border-color: #4f46e5; color: #4f46e5; }
.ph-vbtn:disabled { opacity: .4; cursor: not-allowed; }
.ph-vbtn.ph-vicon { padding: 3px 7px; display: inline-flex; align-items: center; }
.ph-vbtn.ph-vpct { min-width: 54px; font-variant-numeric: tabular-nums; }

/* 员工级合并展示：列表小注 + 详情分组组头 */
.ph-ghead {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 0 10px; padding: 7px 12px;
    border: 1px solid #e8eaef; border-radius: 6px; background: #fafbfc;
    font-size: 12.5px; color: #475569;
}
.ph-ghead:first-child { margin-top: 0; }
.ph-gno { font-weight: 600; color: #1f2937; font-family: Consolas, monospace; font-size: 12px; }
.ph-gn { font-weight: 600; color: #1f2937; }
.ph-gzip {
    margin-left: auto; cursor: pointer; color: #4f46e5;
    border: 1px solid #e5e7eb; border-radius: 5px; padding: 2px 8px;
    background: #fff; font-size: 11.5px; transition: border-color .12s, color .12s;
}
.ph-gzip:hover { border-color: #4f46e5; }
