/* ===== 薪酬核算 · 小公司三步版（铺满主内容区） ===== */

.pay-simple .pay-add {
  color: #0d9488;
  font-variant-numeric: tabular-nums;
}
.pay-simple .pay-ded {
  color: #c2415d;
  font-variant-numeric: tabular-nums;
}
.pay-simple .pay-muted {
  color: #94a3b8;
}
.pay-simple {
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
}
.emp-tab-panel[data-emp-panel="hr_payroll"],
.emp-tab-panel[data-emp-panel="hr_payroll"] .pay-simple,
#hrPayrollRoot {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

.pay-head h3 { margin: 0 0 6px; }
.pay-intro { margin: 0 0 12px; line-height: 1.55; max-width: none; }
.pay-intro strong { color: #0f172a; }

.pay-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 8px 0 16px;
  flex-wrap: wrap;
}
.pay-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}
.pay-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #cbd5e1;
  color: #fff;
  font-size: 12px;
}
.pay-step.active {
  background: #fff7ed;
  color: #c2410c;
  box-shadow: 0 0 0 1px #fdba74;
}
.pay-step.active .pay-step-num {
  background: #f97316;
}
.pay-step.done {
  background: #ecfdf5;
  color: #0f766e;
}
.pay-step.done .pay-step-num {
  background: #14b8a6;
}
.pay-step-line {
  width: 28px;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px;
}

.pay-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pay-guide { margin-bottom: 12px; }
.pay-guide-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}
.pay-guide-ok {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a5f;
}
.pay-guide-pay {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.pay-guide-done {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.pay-stat-grid { margin-bottom: 14px; }

.pay-summary,
#hrPaySummary {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  border: 0;
}
.pay-kpi-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.pay-kpi-board-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .pay-kpi-board-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pay-kpi {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}
.pay-kpi-k {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
}
.pay-kpi-v {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.pay-kpi-unit {
  margin-left: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}
.pay-kpi-ded .pay-kpi-v { color: #be123c; }
.pay-kpi-net {
  background: #f0fdfa;
  border-color: #99f6e4;
}
.pay-kpi-net .pay-kpi-v { color: #0f766e; }

.pay-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.pay-badge-ok { background: #d1fae5; color: #047857; }
.pay-badge-warn { background: #ffedd5; color: #c2410c; }
.pay-badge-info { background: #dbeafe; color: #1d4ed8; }
.pay-badge-off { background: #fee2e2; color: #b91c1c; }

.pay-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  font-weight: 400;
}
td.pay-ops,
th.pay-ops,
body.admin-body.admin-embed td.pay-ops {
  display: table-cell;
  white-space: nowrap;
  width: 220px;
  min-width: 220px;
  max-width: 280px;
  vertical-align: middle;
}
.pay-op-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  width: 124px;
}
.pay-op-grid-wide {
  width: 212px;
}
.pay-kpi-paid .pay-kpi-v { color: #047857; }
.pay-kpi-unpaid .pay-kpi-v { color: #c2410c; }
.pay-op-grid .btn,
.pay-op-grid .pay-confirmed {
  justify-content: center;
}
.pay-op-grid [data-exp],
.pay-op-grid [data-pay] { flex: 0 0 48px; }
.pay-op-grid [data-confirm],
.pay-op-grid .pay-confirmed { flex: 0 0 72px; }
.pay-op-grid .pay-op-placeholder { display: none; }
.pay-confirmed {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
}
.pay-op-placeholder {
  display: block;
  min-height: 1px;
}
.pay-detail-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pay-detail-export-title {
  display: none;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 2px solid #0f172a;
  color: #0f172a;
}
.pay-detail-export-title strong,
.pay-detail-export-title span,
.pay-detail-export-title small {
  display: block;
}
.pay-detail-export-title strong { font-size: 24px; line-height: 1.3; }
.pay-detail-export-title span { margin-top: 8px; font-size: 17px; font-weight: 700; }
.pay-detail-export-title small { margin-top: 5px; font-size: 13px; color: #64748b; }
.pay-detail-export-note {
  display: none;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 12px;
  text-align: right;
}
.pay-detail-sheet-body.pay-detail-exporting {
  overflow: visible;
  width: 920px;
  max-width: none;
  background: #fff;
  padding: 24px;
}
.pay-detail-sheet-body.pay-detail-exporting .pay-detail-export-title {
  display: block;
}
.pay-detail-sheet-body.pay-detail-exporting .pay-detail-export-note {
  display: block;
}
.pay-detail-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 4px 0 8px;
}
.pay-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 4200;
}
.pay-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.pay-detail-sheet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 24px));
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.pay-detail-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.pay-detail-sheet-head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}
.pay-detail-close {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}
.pay-detail-sheet-body {
  padding: 12px 16px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.pay-detail-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #475569;
}
.pay-detail-reg-sum {
  margin: -4px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 14px;
  font-weight: 600;
}
.pay-detail-reg-sum strong {
  font-size: 18px;
  color: #c2410c;
  margin: 0 2px;
}
.pay-reg-badge {
  margin-top: 4px;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.pay-reg-total-line {
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 4px;
}
.pay-detail-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.pay-detail-table-wrap table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
}
.pay-detail-table-wrap th,
.pay-detail-table-wrap td {
  border-right: 1px solid #dbe3ec;
  border-bottom: 1px solid #e5eaf0;
  padding: 10px 12px;
  vertical-align: top;
}
.pay-detail-table-wrap th:last-child,
.pay-detail-table-wrap td:last-child {
  border-right: 0;
}
.pay-detail-table-wrap th:nth-child(1) { width: 16%; }
.pay-detail-table-wrap th:nth-child(2) { width: 14%; }
.pay-detail-table-wrap th:nth-child(3) { width: 70%; }
.pay-detail-table-wrap tbody tr:last-child td { border-bottom: 0; }
.pay-detail-table-wrap .money-cell { white-space: nowrap; }
.pay-detail-table-wrap .pay-formula {
  max-width: none;
  line-height: 1.55;
  white-space: normal;
}
body.pay-detail-open { overflow: hidden; }
body.admin-body.admin-embed .pay-detail-sheet {
  left: 12px;
  right: 12px;
  top: auto;
  bottom: 12px;
  transform: none;
  width: auto;
  max-height: min(78vh, 620px);
  border-radius: 16px 16px 12px 12px;
}

.pay-detail-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  color: #0f172a;
}
.pay-formula {
  font-size: 12px;
  color: #475569;
  max-width: 420px;
}
.pay-hist-title {
  margin: 20px 0 8px;
  font-size: 14px;
  color: #334155;
}
.pay-table-wrap .linkish {
  background: none;
  border: 0;
  padding: 0;
  color: #0369a1;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.pay-table-wrap .linkish:hover { text-decoration: underline; }
.pay-table-wrap .money-strong {
  font-weight: 700;
  color: #0f172a;
}

@media (max-width: 720px) {
  .pay-step-label { display: none; }
  .pay-step-line { width: 12px; }
  .pay-toolbar .btn { flex: 1 1 auto; }
}


/* MOBILE_PAY_20260811 */
@media (max-width: 720px) {
  .pay-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .pay-toolbar label,
  .pay-toolbar input,
  .pay-toolbar .btn {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
  }
  .pay-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .pay-kpi-board { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pay-kpi { padding: 12px; }
  .pay-kpi-v { font-size: 18px; }
  .pay-op-grid .btn { min-height: 36px; }
  .pay-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* MOBILE_PAY_LAYOUT_REQ6 */
@media (max-width: 720px) {
  .pay-simple { padding: 0 2px; }
  .pay-head h3 { font-size: 17px; }
  .pay-intro {
    font-size: 12px;
    line-height: 1.55;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
  }
  .pay-steps {
    justify-content: space-between;
    gap: 4px;
    margin: 10px 0 14px;
  }
  .pay-step {
    flex: 1 1 0;
    justify-content: center;
    padding: 8px 6px;
    min-width: 0;
  }
  .pay-step-label {
    display: inline !important;
    font-size: 11px;
  }
  .pay-step-line { display: none; }
  .pay-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
  }
  .pay-toolbar .salary-period-field,
  .pay-toolbar label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
  }
  .pay-toolbar .date-input,
  .pay-toolbar input[type="month"] {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
  }
  .pay-toolbar .btn {
    width: 100%;
    min-height: 42px;
    font-size: 14px;
    font-weight: 700;
  }
  #hrPayMeta {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 12px;
  }
  .pay-guide-card {
    border-radius: 12px;
    font-size: 12px;
  }
  .pay-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .pay-stat-grid .pnl-stat-card {
    min-width: 0 !important;
    padding: 10px 12px !important;
    border-radius: 12px;
  }
  .pay-stat-grid .s-label { font-size: 11px; }
  .pay-stat-grid .s-value { font-size: 16px; word-break: break-all; }
  .pay-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
    border-radius: 12px;
  }
  .pay-table-wrap table.data {
    min-width: 640px;
    font-size: 12px;
  }
  .pay-table-wrap table.data th,
  .pay-table-wrap table.data td {
    padding: 8px 6px;
    white-space: nowrap;
  }
  .pay-op-grid .btn {
    width: 100%;
    min-height: 34px;
  }
  .pay-detail-box {
    border-radius: 12px;
    overflow-x: auto;
  }
  .pay-detail-table-wrap table.data {
    min-width: 520px;
  }
  .pay-hist-title { margin-top: 16px; }
}

body.admin-body.admin-embed .pay-simple .pay-intro {
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
body.admin-body.admin-embed .pay-steps {
  justify-content: space-between;
}
body.admin-body.admin-embed .pay-step {
  flex: 1 1 0;
  justify-content: center;
  min-width: 0;
  padding: 8px 4px;
}
body.admin-body.admin-embed .pay-step-label {
  display: inline !important;
  font-size: 11px;
}
body.admin-body.admin-embed .pay-step-line { display: none; }
body.admin-body.admin-embed .pay-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
body.admin-body.admin-embed .pay-toolbar .btn {
  width: 100%;
  min-height: 42px;
  font-weight: 700;
}
body.admin-body.admin-embed #hrPaySummary,
body.admin-body.admin-embed .pay-summary {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: none !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
  background: transparent !important;
  border: 0 !important;
}
body.admin-body.admin-embed .pay-stat-grid,
body.admin-body.admin-embed .pay-kpi-board {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}
body.admin-body.admin-embed .pay-kpi {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 12px;
  border-radius: 14px;
  min-height: 76px;
}
body.admin-body.admin-embed .pay-kpi-k {
  font-size: 12px;
}
body.admin-body.admin-embed .pay-kpi-v {
  font-size: 20px;
}
body.admin-body.admin-embed .pay-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
body.admin-body.admin-embed .pay-table-wrap table.data {
  min-width: 640px;
  font-size: 12px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
body.admin-body.admin-embed .pay-table-wrap table.data th,
body.admin-body.admin-embed .pay-table-wrap table.data td {
  border-right: 1px solid #e5eaf0;
}
body.admin-body.admin-embed .pay-table-wrap table.data th:first-child,
body.admin-body.admin-embed .pay-table-wrap table.data td:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 1px 0 0 #e5eaf0;
}
body.admin-body.admin-embed .pay-hist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pay-hist-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}
.pay-hist-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.pay-hist-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 8px 0;
  font-size: 12px;
  color: #64748b;
}
.pay-hist-card-ops {
  display: flex;
  gap: 8px;
}
.pay-hist-card-ops .btn { flex: 1; min-height: 38px; }
