/* ===== 考勤管理 / 薪酬核算（横向铺满，对齐人员管理） ===== */
.att-panel {
  max-width: none !important;
  width: 100% !important;
  box-sizing: border-box;
}
.emp-tab-panel[data-emp-panel="hr_attendance"],
.emp-tab-panel[data-emp-panel="hr_attendance"] .att-panel,
.emp-tab-panel[data-emp-panel="hr_payroll"],
.emp-tab-panel[data-emp-panel="hr_payroll"] .pay-simple,
#hrAttendanceRoot,
#hrPayrollRoot {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}
.emp-panel .emp-tab-panel {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* 汇总页顶部 KPI（参考智能人事） */
.att-kpi-wrap {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  padding: 12px 14px 14px;
  margin-bottom: 4px;
}
.att-kpi-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.att-kpi-tab {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.att-kpi-tab:hover { color: #0f172a; border-color: #cbd5e1; }
.att-kpi-tab.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}
.att-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.att-kpi-card {
  position: relative;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 12px 14px 14px;
  min-height: 72px;
}
.att-kpi-card.is-active {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}
.att-kpi-card.is-active::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent #3b82f6 transparent transparent;
  border-top-right-radius: 10px;
}
.att-kpi-title {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 8px;
}
.att-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.att-kpi-unit {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  margin-left: 2px;
}
.att-kpi-accent .att-kpi-value { color: #2563eb; }
.att-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 14px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 10px;
}
.att-subnav-item {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}
.att-subnav-item:hover { color: #0f172a; background: #e2e8f0; }
.att-subnav-item.active {
  background: #fff;
  color: #c2410c;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.att-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.att-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.att-badge-ok { background: #d1fae5; color: #047857; }
.att-badge-warn { background: #ffedd5; color: #c2410c; }
.att-badge-bad { background: #fee2e2; color: #b91c1c; }
.att-badge-info { background: #dbeafe; color: #1d4ed8; }
/* 智能人事风格：迟到 / 早退 / 缺卡 / 补卡 / 未到点 */
.att-badge-late { background: #ffedd5; color: #c2410c; }
.att-badge-early { background: #fef3c7; color: #b45309; }
.att-badge-miss { background: #fee2e2; color: #b91c1c; }
.att-badge-patch { background: #e0e7ff; color: #4338ca; }
.att-badge-pending { background: #f1f5f9; color: #64748b; }
.att-badge-rest { background: #f8fafc; color: #94a3b8; }

.att-time-late { color: #c2410c; font-weight: 700; }
.att-time-early { color: #b45309; font-weight: 700; }
.att-time-miss { color: #b91c1c; font-weight: 600; }
.att-time-patch { color: #4338ca; font-weight: 600; }
.att-num-warn { color: #c2410c; font-weight: 600; }
.att-num-bad { color: #b91c1c; font-weight: 700; }
.att-num-diff {
  color: #c2410c;
  font-weight: 800;
  background: #fff7ed;
}

.att-date-sun, .att-weekday.att-date-sun, td.att-date-sun {
  color: #94a3b8 !important;
  font-weight: 500;
}
.att-weekday { margin-left: 4px; font-size: 12px; }

.att-staff-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}
.att-staff-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.att-staff-btn:hover { border-color: #fdba74; color: #c2410c; }
.att-staff-btn.active {
  background: #fff7ed;
  border-color: #f97316;
  color: #c2410c;
  box-shadow: 0 0 0 1px #fdba74;
}
.att-staff-all {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.att-staff-all.active {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af;
  box-shadow: 0 0 0 1px #60a5fa;
}

.att-table-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.att-sum-table, .att-det-table {
  min-width: 960px;
  margin: 0;
}
.att-sum-table th, .att-det-table th {
  white-space: nowrap;
  font-size: 12px;
  background: #f8fafc;
}
.att-sum-table td, .att-det-table td {
  font-size: 13px;
  white-space: nowrap;
}

.att-desc { font-size: 12px; color: #64748b; max-width: 280px; }
.att-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.att-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}
.att-rules-grid .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.att-sync-head { margin-bottom: 12px; }

/* 处罚规则 / 班次卡片 */
.att-rules-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.att-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.att-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.att-card-head h4 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}
.att-card-shift {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 48%);
}
.att-shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.att-wd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.att-wd-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.att-wd-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.att-wd-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.att-wd-chip:has(input:checked) {
  background: #fff7ed;
  border-color: #fb923c;
  color: #c2410c;
}
.att-shift-tip {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #f97316;
}
.att-shift-sched-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}
.att-shift-sched-card {
  border: 1px solid #fed7aa;
  background: #fffdf9;
  border-radius: 12px;
  padding: 12px 14px;
}
.att-shift-sched-readonly {
  background: linear-gradient(165deg, #fff7ed 0%, #fff 55%);
}
.att-shift-sched-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.att-shift-sched-top strong {
  font-size: 14px;
  color: #9a3412;
}
.att-shift-period {
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  background: #ffedd5;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.att-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.att-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: #334155;
}
.att-rules-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.att-exempt-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.att-exempt-reason { grid-column: span 2; }
.att-exempt-actions { display: flex; align-items: end; }
.att-exempt-form .field,
.att-shift-grid .field,
.att-rules-grid .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.att-exempt-form .field span,
.att-shift-grid .field span,
.att-rules-grid .field span {
  color: #64748b;
  font-weight: 600;
  font-size: 12px;
}
@media (max-width: 800px) {
  .att-two-col { grid-template-columns: 1fr; }
  .att-staff-btn { padding: 6px 10px; font-size: 12px; }
  .att-exempt-reason { grid-column: span 1; }
}


/* 请假 / 补卡：上下分栏 + 筛选 */
.att-lp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.att-lp-filter-dates {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}
.att-lp-ff {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.att-lp-ff input,
.att-lp-ff select {
  min-height: 38px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
}
.att-lp-to {
  flex: 0 0 auto;
  padding-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}
.att-lp-ff-staff { min-width: 160px; }
.att-lp-query-btn {
  min-height: 38px;
  padding: 0 18px;
}
.att-lp-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.att-lp-toolbar label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.att-lp-meta {
  margin: 0 !important;
  width: 100%;
  font-size: 12px;
  color: #94a3b8;
}
.att-lp-card { margin-top: 0; }
.att-lp-head {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.att-lp-form[hidden] {
  display: none !important;
}
.att-lp-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #f1f5f9;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
}
.att-lp-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}
.att-lp-reason { grid-column: 1 / -1; }
.att-lp-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
}
.att-badge-ding {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}
.att-badge-manual {
  background: #f1f5f9;
  color: #475569;
}
@media (max-width: 720px) {
  .att-lp-head { flex-direction: column; }
}

.att-num-info {
  color: #1d4ed8;
  font-weight: 600;
}


/* MOBILE_ATT_20260811 */
@media (max-width: 720px) {
  .att-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .att-kpi-value { font-size: 22px; }
  .att-subnav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .att-subnav-item { white-space: nowrap; flex: 0 0 auto; }
  .att-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .att-toolbar label { width: 100%; }
  .att-toolbar input,
  .att-toolbar select,
  .att-toolbar .btn { width: 100%; min-height: 40px; box-sizing: border-box; }
  .att-lp-form { grid-template-columns: 1fr; }
  .att-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}


/* att-late-view-v1 */
.att-card-late .att-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.att-late-head-actions { flex: 0 0 auto; }
.att-late-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.att-late-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 13px;
}
.att-late-chip b {
  font-weight: 700;
  color: #1d4ed8;
}
.att-late-detail {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 8px;
}
.att-late-sum-table {
  max-width: 420px;
  margin-top: 4px;
}
.att-late-sum-table td.num {
  font-weight: 700;
  color: #b45309;
  text-align: right;
}
.att-late-edit {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}
.att-late-edit-tip {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
}
.att-late-mode-block {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafbfc;
}
.att-late-block-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.att-rules-grid .field-hint,
.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.35;
}
.att-late-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.att-late-edit-actions .btn {
  min-height: 34px;
  padding: 0 14px;
}
body.admin-body.admin-embed .att-late-chips {
  gap: 6px;
}
body.admin-body.admin-embed .att-late-chip {
  font-size: 12px;
  padding: 5px 10px;
}
body.admin-body.admin-embed .att-card-late .att-card-head {
  flex-direction: column;
  align-items: stretch;
}
body.admin-body.admin-embed .att-late-head-actions .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}
body.admin-body.admin-embed .att-late-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
body.admin-body.admin-embed .att-late-edit-actions .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
}

/* att-rules-v3 */
.att-rules-v2 { gap: 16px; }
.att-card-head-row { display:flex !important; flex-direction:row !important; align-items:flex-start; justify-content:space-between; gap:12px; }
.att-card-title { display:flex; align-items:flex-start; gap:12px; min-width:0; }
.att-card-title h4 { margin:0 0 2px; font-size:16px; }
.att-card-title .emp-hint { margin:0; font-size:12px; color:#64748b; }
.att-step { flex:0 0 auto; width:28px; height:28px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; font-size:13px; font-weight:800; color:#fff; background:linear-gradient(135deg,#f97316,#ea580c); box-shadow:0 2px 6px rgba(249,115,22,.35); }
.att-step-blue { background:linear-gradient(135deg,#3b82f6,#2563eb); box-shadow:0 2px 6px rgba(37,99,235,.3); }
.att-step-amber { background:linear-gradient(135deg,#f59e0b,#d97706); box-shadow:0 2px 6px rgba(217,119,6,.3); }
.att-step-slate { background:linear-gradient(135deg,#64748b,#475569); box-shadow:0 2px 6px rgba(71,85,105,.25); }
.att-card-shift { border:1px solid #fed7aa !important; background:linear-gradient(165deg,#fff7ed 0%,#fff 42%) !important; }
.att-shift-grid-v2 { display:grid !important; grid-template-columns:1.2fr 1fr 1fr; gap:12px; margin-bottom:14px; }
.att-field { display:flex; flex-direction:column; gap:6px; margin:0; font-size:12px; font-weight:700; color:#64748b; }
.att-input { width:100%; min-height:40px; box-sizing:border-box; border:1px solid #e2e8f0; border-radius:10px; padding:0 12px; font-size:14px; font-weight:600; color:#0f172a; background:#fff; }
.att-input:focus { border-color:#93c5fd; box-shadow:0 0 0 3px rgba(59,130,246,.12); outline:none; }
.att-wd-block { margin-top:4px; }
.att-wd-label { font-size:12px; font-weight:700; color:#64748b; margin-bottom:8px; }
.att-wd-label small { font-weight:500; color:#94a3b8; margin-left:6px; }
.att-wd-chip { min-height:36px; padding:0 14px; border-radius:999px; border:1px solid #e2e8f0; background:#fff; font-weight:700; }
.att-wd-chip:has(input:checked) { background:#fff7ed; border-color:#fb923c; color:#c2410c; box-shadow:0 0 0 3px rgba(251,146,60,.15); }
.att-tip { margin:12px 0 0; padding:10px 12px; background:#f8fafc; border-radius:10px; border-left:3px solid #f97316; font-size:12px; color:#64748b; }
#rLateCard { border-color:#bfdbfe !important; background:linear-gradient(180deg,#eff6ff 0%,#fff 40%) !important; }
#rEarlyCard { border-color:#fde68a !important; background:linear-gradient(180deg,#fffbeb 0%,#fff 40%) !important; }
.att-leave-block { margin-top:12px; padding:12px; border-radius:12px; background:#f8fafc; border:1px solid #eef2f7; }
.att-leave-title { font-size:13px; font-weight:700; color:#0f172a; margin-bottom:10px; }
.att-leave-title small { display:block; margin-top:4px; font-weight:500; font-size:12px; color:#64748b; }
.att-leave-view { margin-top:10px; }
.field-hint { display:block; margin-top:4px; font-size:11px; color:#94a3b8; font-weight:500; }
.att-other-edit[hidden], .att-late-edit[hidden] { display:none !important; }
.att-shift-grid-v2 .field span, .att-field > span { color:#64748b; font-weight:700; font-size:12px; }
.att-shift-grid-v2 input, .att-shift-grid-v2 .att-input { min-height:40px; border-radius:10px; }
@media (max-width:800px) {
  .att-shift-grid-v2 { grid-template-columns:1fr !important; }
  .att-card-head-row { flex-direction:column !important; }
  .att-card-head-row .btn { width:100%; min-height:40px; justify-content:center; }
}

/* ===== 布局优化 2026-08-12 ===== */
.att-panel-head h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.att-panel-head .emp-hint { margin: 0; max-width: 720px; line-height: 1.45; }
.att-subnav-sticky {
  position: sticky;
  top: 0;
  z-index: 8;
  margin-top: 10px;
}
.att-body { min-height: 200px; }

/* 处罚规则 */
.att-rules-intro {
  margin: 0 0 4px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #eef2f7;
}
.att-shift-grid-4 {
  grid-template-columns: 1.1fr 1fr 1fr 1fr !important;
}
.att-late-chips { gap: 8px 10px; }
.att-late-chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
.att-late-chip b { color: #0f172a; margin-right: 2px; }
#rLateCard .att-late-chip { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
#rLateCard .att-late-chip b { color: #1d4ed8; }
#rEarlyCard .att-late-chip { background: #fffbeb; border-color: #fde68a; color: #92400e; }
#rEarlyCard .att-late-chip b { color: #b45309; }
#rOtherCard .att-leave-view .att-late-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
#rOtherCard .att-leave-view .att-late-chip {
  border-radius: 10px;
  justify-content: space-between;
  padding: 8px 12px;
}
#rLeaveRatesEdit {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.att-rules-footer {
  position: sticky;
  bottom: 0;
  z-index: 6;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  margin-top: 18px;
  padding: 12px 4px 4px;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.04);
}
.att-rules-footer .btn { min-height: 40px; padding: 0 18px; font-weight: 700; }

/* 薪资扣减页 */
.att-pay-page { display: flex; flex-direction: column; gap: 14px; }
.att-pay-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.att-pay-toolbar-left,
.att-pay-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.att-pay-ym {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.att-pay-ym .date-input { min-height: 36px; }
.att-pay-note {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 3px solid #f97316;
}
.att-pay-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.att-pay-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.att-pay-section-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.att-pay-section-head .emp-hint { margin: 0; font-size: 12px; }

.att-pay-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}
.att-pay-kpi {
  position: relative;
  padding: 12px 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  min-height: 88px;
}
.att-pay-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}
.att-pay-kpi-main {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.att-pay-kpi-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.att-pay-kpi--total {
  background: linear-gradient(165deg, #fff1f2 0%, #fff 70%);
  border-color: #fecdd3;
}
.att-pay-kpi--total .att-pay-kpi-main { color: #be123c; font-size: 24px; }
.att-pay-kpi--late { border-color: #fed7aa; background: linear-gradient(165deg, #fff7ed 0%, #fff 70%); }
.att-pay-kpi--early { border-color: #fde68a; background: linear-gradient(165deg, #fffbeb 0%, #fff 70%); }
.att-pay-kpi--miss { border-color: #fecaca; background: linear-gradient(165deg, #fef2f2 0%, #fff 70%); }
.att-pay-kpi--absent { border-color: #e2e8f0; }
.att-pay-kpi--rest { border-color: #fcd34d; background: linear-gradient(165deg, #fffbeb 0%, #fff 70%); }
.att-pay-kpi--leave { border-color: #bfdbfe; background: linear-gradient(165deg, #eff6ff 0%, #fff 70%); }

.att-pay-table { min-width: 920px; margin: 0; }
.att-pay-table th {
  white-space: nowrap;
  font-size: 12px;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}
.att-pay-table td {
  font-size: 13px;
  vertical-align: middle;
}
.att-pay-table tbody tr:hover { background: #fafbfc; }
.att-name-cell { font-weight: 700; color: #0f172a; min-width: 132px; }
.att-name-main { white-space: nowrap; }
.att-name-remark {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #b45309;
  line-height: 1.35;
  white-space: normal;
}
.att-note-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #9a3412;
  background: #ffedd5;
  vertical-align: middle;
}
.att-split-cell .att-note-tag { margin-left: 6px; }
.att-muted { color: #cbd5e1; font-weight: 500; }
.att-split-cell {
  white-space: nowrap;
}
.att-split-cell .att-cnt {
  display: inline-block;
  min-width: 1.2em;
  font-weight: 700;
  color: #0f172a;
}
.att-split-cell .att-amt {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #c2410c;
  background: #fff7ed;
  border-radius: 999px;
  padding: 1px 8px;
}
.att-detail-link {
  width: 100%;
  min-width: 44px;
  border: 0;
  border-bottom: 1px dashed #f59e0b;
  padding: 4px 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.att-detail-link:hover,
.att-detail-link:focus-visible { background: #fff7ed; outline: 2px solid transparent; }
.att-detail-mask {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.5);
}
.att-detail-mask[hidden] { display: none !important; }
.att-detail-panel {
  width: min(920px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}
.att-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}
.att-detail-head h3 { margin: 0; font-size: 16px; }
.att-detail-head p { margin: 5px 0 0; color: #64748b; font-size: 12px; }
.att-detail-body { padding: 16px 18px 20px; overflow: auto; }
.att-detail-table { min-width: 700px; margin: 0; }
.att-detail-table .att-desc { min-width: 180px; white-space: normal; }
.att-leave-other {
  font-size: 12px;
  color: #64748b;
  max-width: 160px;
}
.att-deduct {
  color: #be123c !important;
  font-weight: 600;
  white-space: nowrap;
}
.att-deduct-total {
  font-weight: 800 !important;
  font-size: 13px;
}
.att-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.att-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.att-st-draft { background: #ffedd5; color: #c2410c; }
.att-st-ok { background: #d1fae5; color: #047857; }
.att-pay-detail-table .att-desc {
  max-width: 360px;
  white-space: normal;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .att-pay-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .att-shift-grid-4 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 720px) {
  .att-pay-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .att-pay-toolbar { flex-direction: column; align-items: stretch; }
  .att-pay-toolbar-left,
  .att-pay-toolbar-right { width: 100%; }
  .att-pay-toolbar .btn { flex: 1; min-height: 40px; justify-content: center; }
  .att-subnav-sticky { top: 0; }
  .att-rules-footer { padding-bottom: 8px; }
  .att-rules-footer .btn { width: 100%; }
  .att-detail-mask { padding: 0; place-items: stretch; }
  .att-detail-panel { width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
  .att-detail-body { padding: 12px; }
}

/* 移动端：隐藏考勤横条（每日考勤/请假补卡已进「更多」） */
body.admin-body.admin-embed .att-subnav,
body.admin-body.admin-embed .att-subnav-sticky {
  display: none !important;
}

.att-emp-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: #f1f5f9;
  margin: 0 0 8px;
}
.att-emp-tabs button {
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.att-emp-tabs button:hover { color: #0f172a; }
.att-emp-tabs button.active {
  background: #fff;
  color: #c2410c;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.att-staff-left-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  vertical-align: middle;
}

/* 每日考勤日期选择一行 */
.att-date-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  width: 100%;
}
.att-date-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.att-date-field input {
  min-width: 0;
  max-width: 100%;
  width: 100% !important;
  min-height: 40px;
  box-sizing: border-box;
}
body.admin-body.admin-embed .att-daily-toolbar,
body.admin-body.admin-embed .att-daily-toolbar.att-toolbar {
  flex-direction: row !important;
  align-items: center !important;
}
body.admin-body.admin-embed .att-date-row {
  width: 100%;
}
body.admin-body.admin-embed .att-date-row .btn {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 56px;
  min-height: 40px;
}

.att-range-toolbar {
  align-items: flex-end;
}
.att-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.att-range-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.att-range-field input {
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
body.admin-body.admin-embed .att-range-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: end !important;
}
body.admin-body.admin-embed .att-range-toolbar #sumLoad {
  width: 100% !important;
  min-height: 40px;
}

/* 薪资增减表格：细竖线 + 首列固定 */
.att-grid-table,
.att-freeze-col1 {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
.att-grid-table th,
.att-grid-table td {
  border-right: 1px solid #e5eaf0;
  border-bottom: 1px solid #eef2f6;
}
.att-grid-table th:last-child,
.att-grid-table td:last-child {
  border-right: 0;
}
.att-freeze-wrap,
body.admin-body.admin-embed .att-freeze-wrap,
body.admin-body.admin-embed .emp-table-wrap.att-freeze-wrap,
body.admin-body.admin-embed .sa-table-wrap .att-freeze-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.att-freeze-col1 th:first-child,
.att-freeze-col1 td:first-child,
.att-freeze-col1 .att-name-cell {
  position: -webkit-sticky;
  position: sticky;
  left: 0 !important;
  z-index: 3;
  background: #fff !important;
  border-right: 1px solid #e5eaf0 !important;
  box-shadow: none !important;
  outline: none;
  overflow: visible;
}
.att-freeze-col1 th:first-child::before,
.att-freeze-col1 td:first-child::before,
.att-freeze-col1 .att-name-cell::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -20px;
  width: 20px;
  background: #fff;
  pointer-events: none;
}
.att-freeze-col1 thead th:first-child {
  background: #f8fafc !important;
  z-index: 4;
}
.att-freeze-col1 thead th:first-child::before {
  background: #f8fafc;
}

/* 请假 / 补卡：移动端紧凑表格 */
.att-mtable-wrap { display: none; }
body.admin-body.admin-embed .att-mtable-wrap {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
body.admin-body.admin-embed .att-mtable {
  width: 100%;
  min-width: 680px;
  table-layout: fixed;
  border: 0;
}
body.admin-body.admin-embed .att-mtable th,
body.admin-body.admin-embed .att-mtable td {
  padding: 8px 7px !important;
  font-size: 12px !important;
  line-height: 1.35;
  vertical-align: top;
  white-space: normal;
}
body.admin-body.admin-embed .att-mtable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
}
body.admin-body.admin-embed .att-mtable th:nth-child(1) { width: 118px; }
body.admin-body.admin-embed .att-mtable th:nth-child(2) { width: 110px; }
body.admin-body.admin-embed .att-mtable th:nth-child(3) { width: 165px; }
body.admin-body.admin-embed .att-mtable th:nth-child(4) { width: 185px; }
body.admin-body.admin-embed .att-mtable th:nth-child(5) { width: 68px; }
body.admin-body.admin-embed .att-mtable td small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}
body.admin-body.admin-embed .att-mtable td small .att-badge {
  margin-top: 1px;
}
body.admin-body.admin-embed .att-mtable-time {
  font-variant-numeric: tabular-nums;
}
body.admin-body.admin-embed .att-lp-desktop { display: none !important; }
html.admin-embed-html body.admin-body.admin-embed .att-lp-toolbar,
html.admin-embed-html body.admin-body.admin-embed .att-lp-toolbar.att-lp-filter-card,
body.admin-body.admin-embed .att-lp-toolbar,
body.admin-body.admin-embed .att-lp-toolbar.att-lp-filter-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  grid-template-columns: none !important;
  gap: 12px !important;
  padding: 14px !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
body.admin-body.admin-embed .att-lp-filter-dates {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  width: 100%;
}
body.admin-body.admin-embed .att-lp-filter-dates .att-lp-to {
  display: none;
}
body.admin-body.admin-embed .att-lp-ff {
  width: 100%;
}
body.admin-body.admin-embed .att-lp-ff input,
body.admin-body.admin-embed .att-lp-ff select {
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  font-size: 15px;
}
body.admin-body.admin-embed .att-lp-to {
  padding-bottom: 12px;
}
body.admin-body.admin-embed .att-lp-query-btn,
body.admin-body.admin-embed .att-lp-toolbar #lpQuery {
  width: 100% !important;
  min-height: 44px !important;
  justify-content: center;
  font-weight: 700;
  border-radius: 12px;
}
body.admin-body.admin-embed .att-lp-meta {
  padding-top: 2px;
  text-align: left;
}
body.admin-body.admin-embed .att-lp-head {
  flex-direction: column;
  align-items: stretch;
}
body.admin-body.admin-embed .att-lp-head .btn {
  width: 100%;
  min-height: 40px;
}
body.admin-body.admin-embed .att-exempt-card {
  padding: 10px 12px;
}
body.admin-body.admin-embed .att-exempt-head h4 {
  margin: 0 0 2px;
  font-size: 14px;
}
body.admin-body.admin-embed .att-exempt-form-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
body.admin-body.admin-embed .att-exempt-form-compact .field {
  margin: 0;
}
body.admin-body.admin-embed .att-exempt-form-compact .att-exempt-reason,
body.admin-body.admin-embed .att-exempt-form-compact .att-exempt-actions {
  grid-column: 1 / -1;
}
body.admin-body.admin-embed .att-exempt-form-compact .btn {
  width: 100%;
  min-height: 36px;
}
