/* ==================== 施工人员档案（工价表） ====================
   表头：姓名 / 施工人员分类 / 出生日期 / 年龄 / 单价 / 保险费 / 工时单价 / 备注 / 在职状态 + 操作
  （2026-10-13 去掉工龄工资，加出生日期与年龄）。行跟着员工列表来，逐格可编辑，改完点这一行的「保存」。 */

/* 栏标题（桌面端）：与物料领退 / 月度考勤表那两栏同一套观感 */
.wp-header {
    margin-bottom: 16px;
}

.wp-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wp-title-icon {
    background: linear-gradient(135deg, #0f4c5c, #1a6b7c, #2a93a8);
    box-shadow: 0 6px 18px rgba(15, 76, 92, 0.28);
}

.wp-title {
    margin: 0;
    color: var(--water-dark);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-family: var(--font-display);
}

.wp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.wp-toolbar .search-box {
    flex: 1 1 220px;
    min-width: 180px;
    margin-bottom: 0;
}

.wp-select {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--water-glow);
    border-radius: var(--radius-sm);
    background: var(--surface-white);
    color: var(--ink-dark);
    font-size: 14px;
    font-family: inherit;
}

.wp-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.wp-chip {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--paper-warm);
    color: var(--ink-mid);
    font-size: 12px;
    letter-spacing: 0.5px;
}

.wp-chip-strong {
    background: var(--gradient-water);
    color: #fff;
    box-shadow: var(--shadow-water);
}

.wp-chip-muted {
    background: transparent;
    border: 1px dashed var(--water-glow);
}

.wp-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--surface-white);
    box-shadow: var(--shadow-sm);
}

.wp-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.wp-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 8px;
    background: var(--paper-warm);
    color: var(--ink-dark);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid rgba(15, 76, 92, 0.12);
}

.wp-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(15, 76, 92, 0.08);
    vertical-align: middle;
}

.wp-table tbody tr:hover { background: rgba(232, 244, 248, 0.5); }
.wp-row-left td { color: var(--ink-light); }
.wp-row-dirty { background: rgba(240, 216, 120, 0.16); }
.wp-row-dirty td:first-child { box-shadow: inset 3px 0 0 var(--gold-primary); }

.wp-input {
    width: 100%;
    min-width: 68px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--ink-black);
    font-size: 14px;
    text-align: center;      /* 每格内容居中（与表头对齐） */
    font-family: inherit;
}

.wp-input:hover { border-color: rgba(15, 76, 92, 0.16); }
.wp-input:focus {
    outline: none;
    border-color: var(--water-mid);
    background: var(--surface-white);
    box-shadow: 0 0 0 3px rgba(42, 147, 168, 0.14);
}

.wp-number { font-variant-numeric: tabular-nums; }   /* 居中继承 .wp-input，数字等宽好看 */
.wp-remark { min-width: 160px; }

/* 出生日期：点开是系统的日期选择（手机上是滚轮），选定后年龄那格当场带出 */
.wp-date {
    min-width: 136px;
    font-variant-numeric: tabular-nums;
}

/* iOS 的日期框：空值时不塌高、文字跟别的格子一样居中 */
.wp-date::-webkit-date-and-time-value { text-align: center; }

.wp-age {
    min-width: 48px;
    text-align: center;
    white-space: nowrap;
    color: var(--ink-dark);
    font-variant-numeric: tabular-nums;
}

.wp-input.wp-select {
    height: 34px;
    padding: 0 6px;
    background: transparent;
    border-color: transparent;
}

.wp-status-warning { display: block; margin-top: 5px; color: #a34c14; font-size: 12px; line-height: 1.5; }

.wp-actions {
    white-space: nowrap;
    text-align: center;
}

.wp-actions .btn {
    height: 30px;
    padding: 0 10px;
    font-size: 13px;
    margin-left: 6px;
}

.wp-save:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.wp-delete {
    color: #c0392b;
    border-color: rgba(192, 57, 43, 0.28);
}

/* 手机端：表格横向滚动，首列（姓名）钉住，工具栏与弹窗按窄屏排 */
@media (max-width: 768px) {
    /* 手机端：栏标题收起来（上面那行子标签已经说明在哪一栏），工具栏与弹窗按窄屏排 */
    .wp-header { display: none; }

    .wp-toolbar {
        gap: 8px;
    }

    .wp-toolbar .search-box { flex: 1 1 100%; }
    .wp-toolbar .wp-select { flex: 1 1 calc(50% - 4px); }
    /* 导出按钮：原来跟「导入 Excel」各占一半；导入去掉时只删了那半个选择器、留下一个悬空逗号，
       把下面表格的 min-width: 960px 也套到了按钮上（手机上一大块灰）。2026-10-13 补回按钮自己的规则。 */
    .wp-toolbar .btn { flex: 1 1 calc(50% - 4px); justify-content: center; }

    .wp-table { min-width: 960px; font-size: 13px; }

    .wp-table thead th:first-child,
    .wp-table tbody td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--surface-white);
    }

    .wp-table thead th:first-child { background: var(--paper-warm); }
    .wp-row-dirty td:first-child { background: #fdf6e3; }
}
