/* 考勤报表管理模块样式（2026-11-05）
 * 设计：Ant Design 风格（深色 #001529 标题条 / 胶囊状态标签）；异常数据采用「左色条 + 低饱和背景」，
 * 不使用整格红色高亮；编辑态无 3px 蓝色 glow。 */

/* 页面级布局（镜像 .employee-page） */
.att-report-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - var(--topbar-h, 52px) - 2 * var(--pad, 16px));
  min-height: 0;
  overflow: hidden;
}

.att-rep {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  padding: 0;
}

/* 工具栏间距 */
.att-rep-toolbar { margin-bottom: 0; flex: 0 0 auto; }
.att-rep-toolbar .att-rep-seg { margin-right: 4px; }

/* 分段控件 */
.att-rep-seg {
  display: inline-flex;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.att-rep-seg button {
  border: 0;
  background: #fff;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  transition: background .15s, color .15s;
}
.att-rep-seg button + button { border-left: 1px solid var(--border, #e5e7eb); }
.att-rep-seg button:hover { background: #f2f5f9; }
.att-rep-seg button.active { background: #001529; color: #fff; }

/* 年/月、范围容器 */
.att-rep-ym { display: inline-flex; gap: 6px; align-items: center; }
.att-rep-ym .field-select { margin: 0; }
.att-rep-ym select { height: 32px; }
.att-rep-range { display: inline-flex; align-items: center; }
.att-rep-range .att2-rp { min-width: 220px; }

/* 统计条 */
.att-rep-stats { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }
.att-rep-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eef0f3;
  border-left: 3px solid #cbd5e1;
  min-width: 96px;
}
.att-rep-chip i { font-style: normal; font-size: 12px; color: #8a94a6; }
.att-rep-chip b { font-size: 18px; font-weight: 700; color: #1f2733; line-height: 1.2; }
.att-rep-chip.c-blue { border-left-color: #1d4ed8; }
.att-rep-chip.c-green { border-left-color: #16a34a; }
.att-rep-chip.c-red { border-left-color: #ef4444; }
.att-rep-chip.c-orange { border-left-color: #f59e0b; }
.att-rep-chip.c-purple { border-left-color: #7c3aed; }

/* 报表卡片 */
.att-rep-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.att-rep-card-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef0f3;
  flex: 0 0 auto;
}
.att-rep-title { font-size: 15px; font-weight: 700; color: #1f2733; }
.att-rep-sub { font-size: 12px; color: #8a94a6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-rep-table-wrap { flex: 1; overflow: auto; min-height: 0; }

/* 表格 */
.att-rep-table th, .att-rep-table td { text-align: center; padding: 7px 10px; white-space: nowrap; }
.att-rep-table th { position: sticky; top: 0; background: #fafbfc; z-index: 1; }
.att-rep-table td:first-child, .att-rep-table th:first-child { text-align: left; }
.att-rep-table tr.odd td { background: #fbfcfd; }
.att-rep-empty { text-align: center !important; color: var(--text-faint, #9aa3b2); padding: 28px !important; }

/* 异常高亮：左色条 + 低饱和背景（非整格红） */
.att-rep-table td.cell-abn { background: #fff1f0; position: relative; }
.att-rep-table td.cell-abn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #ff4d4f;
}
/* 每日明细：异常行整体左色条 */
.att-rep-table tr.att-rep-row-abn > td { background: #fffaf9; }
.att-rep-table tr.att-rep-row-abn > td:first-child { box-shadow: inset 3px 0 0 #ff4d4f; }

/* 胶囊状态标签 */
.att-badge {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  font-weight: 500;
}
.bdg-ok { background: #e6f7ec; color: #1a7f43; }
.bdg-late { background: #fff3e0; color: #b76e00; }
.bdg-serious { background: #ffe0e0; color: #c0392b; }
.bdg-early { background: #e6f0ff; color: #1d4ed8; }
.bdg-absent { background: #fde0e0; color: #b71c1c; }
.bdg-leave { background: #ede7f6; color: #6a1b9a; }
.bdg-miss { background: #f0f0f0; color: #616161; }

/* 图例 */
.att-rep-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #8a94a6;
  padding: 8px 14px 4px;
  flex: 0 0 auto;
}
.att-rep-legend .lg {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -1px;
}
.lg-abn { background: #fff1f0; border: 1px solid #ffccc7; }
.lg-warn { background: #fff7e6; border: 1px solid #ffe7a3; }
.att-rep-note { margin-left: auto; color: #aab2c0; }

/* 历史报表 / 保存面板 */
.att-rep-hist-mask, .att-rep-save-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.att-rep-hist-panel {
  background: #fff;
  border-radius: 10px;
  width: 700px;
  max-width: 92vw;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.att-rep-hist-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f3;
}
.att-rep-hist-h { font-weight: 700; font-size: 15px; }
.att-rep-hist-head .filter-input { flex: 1; }
.att-rep-hist-panel .table-wrap { flex: 1; overflow: auto; padding: 0 16px 16px; }
.att-rep-hist-panel .data-table th, .att-rep-hist-panel .data-table td { text-align: left; padding: 8px 10px; }

.att-rep-save-box { background: #fff; border-radius: 10px; width: 380px; max-width: 90vw; padding: 18px; }
.att-rep-save-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.att-rep-save-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #555; }
.att-rep-save-field input {
  height: 34px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  outline: none;
}
.att-rep-save-field input:focus { border-color: #001529; }
.att-rep-save-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.btn-link {
  background: none;
  border: 0;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}
.btn-link.danger { color: #d4380d; }

/* 导出/打印按钮与既有 .btn-secondary 一致即可，无需额外样式 */
