/* ============================================================
   考勤规则中心（att2-*）
   依据《公司考勤与假勤管理系统开发规则说明书》
   与既有的 .attendance-page（站点考勤 / 打卡记录）完全隔离，互不影响。
   ============================================================ */

/* ---------- 通用小标签 ---------- */
.att2-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: var(--radius-pill);
  font-size: 11.5px; line-height: 18px; white-space: nowrap;
  background: var(--ring-base); color: var(--text-muted);
  border: 1px solid transparent;
}
.att2-tag.t-blue   { background: rgba(26,115,232,.10); color: #1A73E8; }
.att2-tag.t-green  { background: rgba(52,168,83,.12);  color: #1E7E34; }
.att2-tag.t-orange { background: rgba(250,123,23,.13); color: #C25E05; }
.att2-tag.t-purple { background: rgba(161,66,244,.12); color: #7B2FD1; }
.att2-tag.t-red    { background: rgba(234,67,53,.12);  color: #C5221F; }
.att2-tag.t-gray   { background: var(--ring-base);     color: var(--text-muted); }
[data-theme="dark"] .att2-tag.t-blue   { background: rgba(91,149,255,.18); color: #8AB4FF; }
[data-theme="dark"] .att2-tag.t-green  { background: rgba(61,214,140,.18); color: #62DDA0; }
[data-theme="dark"] .att2-tag.t-orange { background: rgba(255,157,77,.18); color: #FFB271; }
[data-theme="dark"] .att2-tag.t-purple { background: rgba(189,139,255,.18); color: #CBA6FF; }
[data-theme="dark"] .att2-tag.t-red    { background: rgba(255,111,97,.18); color: #FF9585; }

.att2-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- 排班表 ---------- */
/* 排班工具条：日期范围（单框 · 可直接键入 · 双月日历 · 一次选起止） */
.att2-sched-toolbar .att2-range-lb { font-size: 12.5px; color: var(--text-muted); margin-right: 2px; white-space: nowrap; flex: none; }
.att2-rp { position: relative; flex: none; }
.att2-rp-field {
  display: inline-flex; align-items: center; gap: 3px;
  height: var(--ctrl-h); padding: 0 8px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); cursor: pointer;
  transition: border-color .15s;
}
.att2-rp-field:hover { border-color: var(--primary); }
.att2-rp-field:focus-within,
.att2-rp.is-open .att2-rp-field { border-color: var(--primary); }
.att2-rp-ico { display: inline-flex; flex: none; color: var(--text-faint); }
.att2-rp-ico > svg { width: 13px; height: 13px; display: block; }
.att2-rp-in {
  width: 76px; flex: none; height: 22px; padding: 0; margin: 0;
  border: 0; outline: 0; background: none; box-shadow: none;
  color: var(--text); font-family: inherit; font-size: 12.5px;
  font-variant-numeric: tabular-nums; letter-spacing: .1px; cursor: text;
}
.att2-rp-in::placeholder { color: var(--text-faint); }
.att2-rp-in.is-bad { color: #D93025; }
.att2-rp-field.has-bad,
.att2-rp.is-open .att2-rp-field.has-bad,
.att2-rp:focus-within .att2-rp-field.has-bad { border-color: #D93025; }
.att2-rp-sep { flex: none; color: var(--text-faint); font-size: 12px; line-height: 1; }
.att2-rp-caret {
  width: 0; height: 0; flex: none; margin-left: 2px;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-top: 4px solid var(--text-faint);
  transition: transform .16s;
}
.att2-rp.is-open .att2-rp-caret { transform: rotate(180deg); }

/* 弹出层：双月并排 */
.att2-rp-pop {
  position: absolute; z-index: 70; top: calc(100% + 6px); left: 0;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
  padding: 10px 12px 8px;
}
.att2-rp-months { display: flex; gap: 12px; }
.att2-rp-cal { width: 238px; }
.att2-rp-calhead { display: flex; align-items: center; justify-content: space-between; height: 26px; margin-bottom: 4px; }
.att2-rp-ym { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.att2-rp-nav {
  width: 22px; height: 22px; padding: 0; flex: none;
  border: none; border-radius: 5px; background: transparent;
  color: var(--text-muted); font-size: 15px; line-height: 1; cursor: pointer;
}
.att2-rp-nav:hover { background: var(--ring-base); color: var(--text-strong); }
.att2-rp-nav.is-ghost { visibility: hidden; pointer-events: none; }
.att2-rp-wd, .att2-rp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.att2-rp-wd { margin-bottom: 2px; }
.att2-rp-wd span { text-align: center; font-size: 11px; line-height: 22px; color: var(--text-faint); }
.att2-rp-grid { row-gap: 0; }
.att2-rp-cell {
  height: 26px; padding: 0; border: none; border-radius: 0;
  background: transparent; color: var(--text);
  font-size: 12.5px; font-family: inherit; font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background .12s, color .12s;
}
.att2-rp-cell:hover { background: var(--primary-soft); color: var(--primary); border-radius: 4px; }
.att2-rp-cell.is-other { cursor: default; pointer-events: none; }
.att2-rp-cell.is-today { color: var(--primary); font-weight: 600; }
.att2-rp-cell.is-today:not(.is-from):not(.is-to) { box-shadow: inset 0 0 0 1px var(--primary); border-radius: 4px; }
/* 区间内：极淡底色、文字保持常色，避免整月一片蓝 */
.att2-rp-cell.is-in { background: rgba(26, 115, 232, .09); color: var(--text); }
[data-theme="dark"] .att2-rp-cell.is-in { background: rgba(91, 149, 255, .18); }
.att2-rp-cell.is-from, .att2-rp-cell.is-to {
  background: var(--primary); color: #fff; font-weight: 600; border-radius: 4px;
}
.att2-rp-cell.is-from:hover, .att2-rp-cell.is-to:hover { background: var(--primary); color: #fff; }

.att2-rp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; row-gap: 4px;
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ring-base);
}
.att2-rp-quicks { display: flex; gap: 4px; flex: none; }
.att2-rp-quicks button {
  flex: none; height: 24px; padding: 0 9px; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 5px;
  background: var(--card-bg); color: var(--text-muted);
  font-size: 12px; font-family: inherit; cursor: pointer;
}
.att2-rp-quicks button:hover { border-color: var(--primary); color: var(--primary); }
.att2-rp-sum { font-size: 12px; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.att2-rp-sum.is-over { color: #E8710A; }
.att2-sched-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
table.att2-sched {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  /* 自适应列宽：fixed 布局让日期列均分剩余宽度；表格级 min-width 由渲染时按天数写入内联
     （574px 固定列 + N×38px 日期列下限），弹窗变宽时列撑满变宽、变窄时整体滚出不破下限。
     不能只靠单元格 min-width——fixed 布局会忽略它（实测窄容器被压到 2px）。 */
  table-layout: fixed;
  width: 100%;
  min-width: 100%;
}
table.att2-sched th, table.att2-sched td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0;
  text-align: center;
  height: 34px;
}
/* 跨年区间：列头变 YY/M/D，日期列下限放宽到 44px（同由渲染时内联 min-width 保证） */
table.att2-sched.is-yearspan thead th { font-size: 10.5px; padding: 6px 1px; letter-spacing: -.1px; }
table.att2-sched thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--card-bg);
  font-weight: 600; color: var(--text-muted);
  font-size: 11.5px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}
table.att2-sched thead th .wd { display: block; font-weight: 400; color: var(--text-faint); font-size: 10.5px; }
table.att2-sched thead th.is-holiday { color: #E8710A; }
table.att2-sched thead th.is-today { background: var(--primary-soft); color: var(--primary); }
/* 2026-10-28：员工/部门拆成「姓名 / 工号 / 部门」三列，三列都横向冻结；
   部门显示完整路径（A集团 / 华南制造中心 / 一厂 / 冲压车间），过长自动换行不省略。 */
table.att2-sched th.fix, table.att2-sched td.fix {
  position: sticky; z-index: 2;
  background: var(--card-bg);
  transform: translateZ(0);
  text-align: left;
  padding: 5px 10px;
  border-right: 1px solid var(--border);
  box-sizing: border-box;
  vertical-align: middle;
}
table.att2-sched thead th.fix { z-index: 4; white-space: nowrap; }
table.att2-sched th.fix1, table.att2-sched td.fix1 { left: 0; width: 88px; min-width: 88px; max-width: 88px; }
/* ---------- 排班留痕：来源标记 / 变更记录列 ---------- */
/* 已落库排班：左色条按来源区分——琥珀=手动、紫=周期批量、蓝=按组铺排、绿=大小周生成 */
.att2-sched td.cell.is-set { box-shadow: inset 2px 0 0 transparent; }
.att2-sched td.cell.src-manual { box-shadow: inset 2px 0 0 #F59E0B; }
.att2-sched td.cell.src-cycle  { box-shadow: inset 2px 0 0 #8B5CF6; }
.att2-sched td.cell.src-group  { box-shadow: inset 2px 0 0 #0EA5E9; }
.att2-sched td.cell.src-week   { box-shadow: inset 2px 0 0 #10B981; }
.att2-sched td.cell .att2-lock { font-style: normal; font-size: 11px; margin-left: 3px; opacity: .85; }
/* 已发布：低饱和靛蓝背景（不抢来源左色条），📌 图标提示「批量生成/覆盖将跳过」 */
.att2-sched td.cell.is-published { background: rgba(99,102,241,.09); }
.att2-sched td.cell .att2-pub { font-style: normal; font-size: 11px; margin-left: 3px; opacity: .9; }

/* 选择器必须带 table 前缀、与上面 `th:not(.fix)` 同权重(0,2,2) 才能压过它的 38px 定宽，
   否则变更记录列会被压成和日期列一样宽（这是踩过的坑）。 */
table.att2-sched th.chg,
table.att2-sched td.chg {
  position: sticky; right: 0; z-index: 2;
  background: var(--card-bg);
  transform: translateZ(0);
  border-left: 1px solid var(--border);
  padding: 3px 8px;
  font-size: 11px; line-height: 1.35;
  vertical-align: middle;
}
/* table-cell 的 min-width/width 在 table-layout:auto 下会被内容压掉，
   靠内层固定宽 div 才对列宽有约束力 */
.att2-sched .chg-in { width: 152px; min-width: 152px; overflow: hidden; }
table.att2-sched th.chg {
  z-index: 3;
  background: var(--bg-soft, #F8FAFC);
  font-size: 11.5px; font-weight: 600; color: var(--text-mute);
  white-space: nowrap;
  /* table-layout:auto 下，td 里固定宽的内层 div 不参与列宽计算（只溢出）；
     列宽必须落在 th 上，且 width 单独写还不被采纳，要配 min-width 才稳（实测）。 */
  width: 168px;
  min-width: 168px;
}
table.att2-sched td.chg { cursor: pointer; }
/* td.chg:hover 原有背景变色已移除：chg 是 sticky 格，hover 改背景即触发幽灵芯片 bug（见上） */
.att2-sched td.chg .chg-l1 { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att2-sched td.chg .chg-l1 b { color: var(--primary); font-weight: 600; }
.att2-sched td.chg .chg-l2 { color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.att2-sched td.chg .chg-none { color: var(--text-faint); }

/* 变更流水浮窗 */
.att2-slog-sum { font-size: 12px; color: var(--text-mute); padding: 2px 2px 8px; }
.att2-slog-sum b { color: var(--primary); }
.att2-slog { width: 100%; border-collapse: collapse; font-size: 12px; }
.att2-slog th {
  background: var(--bg-soft, #F8FAFC); color: var(--text-mute); font-weight: 600;
  text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.att2-slog td { padding: 6px 8px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.att2-slog tr:last-child td { border-bottom: 0; }
.att2-slog td.t { color: var(--text-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.att2-slog td .sb { font-weight: 500; }
.att2-slog td .ar { color: var(--text-faint); margin: 0 5px; }
.att2-slog td.rm { color: var(--text-faint); font-size: 11.5px; }
.att2-slog .act { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.att2-slog .act-manual { background: rgba(245, 158, 11, .14); color: #B45309; }
.att2-slog .act-cycle  { background: rgba(139, 92, 246, .14); color: #6D28D9; }
.att2-slog .act-group  { background: rgba(14, 165, 233, .14); color: #0369A1; }
.att2-slog .act-clear  { background: rgba(148, 163, 184, .18); color: #475569; }

/* 铺排说明块 */
.att2-hint-box {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: var(--bg-soft, #F8FAFC); border: 1px solid var(--border);
  font-size: 12px; line-height: 1.75; color: var(--text-mute);
}

table.att2-sched th.fix2, table.att2-sched td.fix2 { left: 88px; width: 104px; min-width: 104px; max-width: 104px; }
table.att2-sched th.fix3, table.att2-sched td.fix3 { left: 192px; width: 214px; min-width: 214px; max-width: 214px; }
table.att2-sched td.fix1 .nm { font-weight: 500; color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.att2-sched td.fix2 .no { font-size: 11px; color: var(--text-muted); display: block; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.att2-sched td.fix3 .dp { font-size: 10.5px; color: var(--text-faint); display: block; white-space: normal; word-break: break-word; line-height: 1.45; }
table.att2-sched tbody tr:hover td { background: rgba(26,115,232,.04); }
/* sticky 格（冻结列/变更记录列）hover 时背景必须保持不变——改背景会触发 Chromium
   对 sticky 表格单元格的重绘顺序 bug，被悬停行的日期芯片会画到这两列上面
   （幽灵芯片根因，视频实测复现；2026-10-28）。行高亮只落在普通日期格上。 */
table.att2-sched tbody tr:hover td.fix { background: var(--card-bg); }
table.att2-sched tbody tr:hover td.chg { background: var(--card-bg); }
table.att2-sched td.cell { cursor: pointer; }
table.att2-sched td.cell:hover { outline: 1.5px solid var(--primary); outline-offset: -2px; }
table.att2-sched td.cell.is-rest { background: rgba(128,134,139,.05); }
table.att2-sched td.cell.is-holiday { background: rgba(251,188,4,.08); }

.att2-shift-chip {
  display: block;
  margin: 2px 3px;
  padding: 2px 4px;
  border-radius: 5px;
  font-size: 10.5px;
  line-height: 15px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -.2px;
}
.att2-shift-chip.rest { background: transparent; color: var(--text-faint); font-weight: 400; }

/* 图例：三种来源色条（与表格里的标记一一对应） */
.att2-legend i.lg-src { width: 3px; height: 12px; border-radius: 1px; vertical-align: -2px; margin-right: 5px; }
.att2-legend i.lg-manual { background: #F59E0B; }
.att2-legend i.lg-cycle  { background: #8B5CF6; }
.att2-legend i.lg-group  { background: #0EA5E9; }
.att2-legend i.lg-week   { background: #10B981; }

.att2-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-faint); padding: 8px 12px; border-top: 1px solid var(--border); flex: 0 0 auto; }
.att2-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* ---------- 工时分配 ---------- */
.att2-wl-hours { font-variant-numeric: tabular-nums; }
.att2-wl-sum { font-weight: 600; }
.att2-wl-sum.bad { color: var(--danger); }
.att2-wl-sum.ok { color: var(--success); }
.att2-wl-sub { display: block; font-size: 10.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }

/* ---------- 表单（弹窗内） ---------- */
/* 2026-10-30：表单随浮窗宽度自适应列数——拉窄自动退到 1 列（min=min(100%,280px)：弹窗内边距约 96px，
   默认 760px 弹窗内容宽约 664px 仍够 2 列；拖窄到约 600px 以下退为 1 列；最小弹窗显示 1 列）。 */
.att2-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px 16px; }
.att2-form .full { grid-column: 1 / -1; }
.att2-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-muted); }
.att2-form label > span.req::after, .att2-form .att2-fld > span.req::after { content: "*"; color: var(--danger); margin-left: 2px; }
/* 表单区块包装：原用 <label class=full> 包裹嵌套复选块会触发「点空白转发勾选」，
   2026-10-31 改为 <div class="full att2-fld">，视觉保持与 label 一致 */
.att2-form .att2-fld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-muted); }
.att2-form input[type="text"], .att2-form input[type="number"], .att2-form input[type="date"],
.att2-form input[type="datetime-local"], .att2-form input[type="time"], .att2-form select, .att2-form textarea {
  width: 100%; box-sizing: border-box;
  height: 32px; padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.att2-form textarea { height: 64px; padding: 7px 9px; resize: vertical; line-height: 1.6; }
/* 2026-10-30：日期选择器是 .date-picker 包裹层（全局增强器产物），不吃上面 input 的
   height/border-radius 规则，于是比同排 input/select 高 2px（34 vs 32）、圆角大 2px（8 vs 6），
   视觉上「鼓出来一块」像浮在旁边的框。这里统一成与 .att2-form 其它控件完全一致。
   ⚠️ 关键：css_recruit_cost.css 里 `.modal-body label > .date-picker { flex: 1 }` 简写会展开成
   `flex: 1 1 0%`，而本表单的 label 是 flex-direction:column —— 于是它在【纵轴】上也被拉伸
   （height:32px 只当成下限，实际算到 34px）。必须把 flex 一并复位成 none，否则只改 height 无效。 */
.att2-form label > .date-picker {
  width: 100%;
  box-sizing: border-box;
  flex: none;
  height: 32px;
  border-radius: 6px;
}
.att2-form label > .date-picker .dp-icon-btn { border-radius: 4px; }
/* 2026-10-30 晚：上面 `input[type="text"]` 规则会命中日期选择器【内部】的文本框
   .dp-input（特异性 0,2,1 压过全局 `.date-picker .dp-input{border:none}` 的 0,2,0），
   给它又画了一层边框+白底 —— 外层 .date-picker 一个长框、内层一个短框叠在一起
   （底下长、上面短）。这里按全局日期控件设计复位：边框/底色只属于外层包裹层。 */
.att2-form .date-picker .dp-input {
  border: none;
  background: transparent;
  padding: 0;
  height: 100%;
  border-radius: 0;
}
.att2-form input:focus, .att2-form select:focus, .att2-form textarea:focus { border-color: var(--primary); }
.att2-form .hint { font-size: 11px; color: var(--text-faint); line-height: 1.5; }

.att2-check-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.att2-check {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; cursor: pointer; color: var(--text-muted); background: var(--card-bg);
  user-select: none;
}
/* 2026-10-30：复选方框自绘（appearance:none）。原生 checkbox 在鼠标按于外层 label
   空白处时会被浏览器同步 :active 按压态（首个关联控件 = 第一个方框「闪一下」）；
   自绘不含 :active 样式，按压无任何视觉反馈。 */
.att2-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px; height: 14px; flex: none;
  margin: 0;
  border: 1px solid var(--border); border-radius: 3px;
  background: var(--card-bg);
  vertical-align: -2px;
}
.att2-check input[type="checkbox"]:checked {
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4 10-10'/%3E%3C/svg%3E") center / 10px no-repeat;
  border-color: var(--primary);
}
/* 暗色下原生复选框默认仍渲染成白色方块，需显式声明深色配色 */
[data-theme="dark"] .att2-check input[type="checkbox"],
[data-theme="dark"] .att2-check-row input[type="checkbox"] { color-scheme: dark; }
.att2-check.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
/* 表单里嵌套的复选块不要继承 .att2-form label 的纵向排列（否则勾选框会跑到文字上方） */
.att2-form label.att2-check {
  display: inline-flex; flex-direction: row; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.att2-form label.att2-check.on { color: var(--primary); }

/* ---------- 工时分配弹窗三段 ---------- */
.att2-seg { display: grid; grid-template-columns: 84px 96px 1fr 30px; gap: 8px; align-items: center; margin-bottom: 8px; }
.att2-seg .lb { font-size: 12.5px; color: var(--text-muted); }
.att2-seg .lb b { color: var(--text); font-weight: 600; }
.att2-seg input[type="number"] { height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text); font-size: 13px; box-sizing: border-box; }
.att2-seg select { height: 30px; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text); font-size: 12.5px; box-sizing: border-box; min-width: 0; }
.att2-seg-total { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border-radius: 6px; background: var(--ring-base); font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.att2-seg-total b { font-variant-numeric: tabular-nums; }
.att2-seg-total.bad { background: rgba(234,67,53,.10); color: #C5221F; }
.att2-seg-total.ok { background: rgba(52,168,83,.10); color: #1E7E34; }
[data-theme="dark"] .att2-seg-total.bad { color: #FF9585; }
[data-theme="dark"] .att2-seg-total.ok { color: #62DDA0; }

/* ---------- 弹窗宽度 ---------- */
.att2-modal .modal { width: 760px; max-width: 94vw; min-width: min(340px, 94vw); }
.att2-modal .modal.modal-narrow { width: 560px; }
/* 长表单弹窗：body 内部滚动，避免超出屏幕 */
.att2-modal .modal-body { flex: 1 1 auto; min-height: 0; }

/* ---------- 空态 ---------- */
.att2-empty { padding: 40px 12px; text-align: center; color: var(--text-faint); font-size: 13px; }
.att2-empty .ico { font-size: 28px; display: block; margin-bottom: 8px; opacity: .55; }

/* 2026-11-05：固定班制 / 排班制互斥口径的常驻说明、空态与考勤组弹窗内联提示
   统一用「左细色条 + 低饱和底色」，不做整格红、不加蓝色 glow */
.att2-scope-note { display: flex; gap: 10px; align-items: stretch; margin: 0 0 8px; padding: 9px 12px;
  border-radius: 8px; background: var(--bg-soft, #F8FAFC); border: 1px solid var(--border);
  font-size: 12px; line-height: 1.7; }
.att2-scope-note .bar { width: 3px; flex: none; border-radius: 2px; background: var(--primary); opacity: .7; }
.att2-scope-note .tx { min-width: 0; }
.att2-scope-note b { display: block; color: var(--text-strong); font-weight: 600; margin-bottom: 1px; }
.att2-scope-note span { color: var(--text-mute); }
.att2-scope-note em { display: block; font-style: normal; margin-top: 3px; color: var(--text-faint); }

.att2-scope-empty { padding: 34px 20px 38px; text-align: center; max-width: 680px; margin: 0 auto; }
.att2-scope-empty .ico { font-size: 30px; opacity: .5; margin-bottom: 6px; }
.att2-scope-empty .ttl { font-size: 15px; font-weight: 600; color: var(--text-strong); margin-bottom: 8px; }
.att2-scope-empty .desc { font-size: 12.5px; line-height: 1.8; color: var(--text-mute); }
.att2-scope-empty .stat { display: inline-block; text-align: left; margin: 12px auto 0; padding: 8px 12px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft, #F8FAFC);
  font-size: 12px; line-height: 1.8; color: var(--text-mute); }
.att2-scope-empty .how { max-width: 570px; margin: 12px auto 0; padding-left: 10px; text-align: left;
  border-left: 3px solid var(--primary); font-size: 12px; line-height: 1.8; color: var(--text-mute); }
.att2-scope-empty b { color: var(--text-strong); font-weight: 600; }

.att2-scope-inline { margin: 8px 0 2px; padding: 8px 11px; border-left: 3px solid var(--primary);
  background: var(--bg-soft, #F8FAFC); border-radius: 0 6px 6px 0;
  font-size: 12px; line-height: 1.75; color: var(--text-mute); }
.att2-scope-inline b { color: var(--text-strong); font-weight: 600; }
.att2-scope-inline.is-sched { border-left-color: var(--purple, #722ed1); }

/* ---------- 假勤页左右布局 ---------- */
.att2-pane { display: none; flex: 1; min-height: 0; flex-direction: column; }
.att2-pane.active { display: flex; }

/* ---------- 表格里的行操作 ---------- */
.att2-ops { white-space: nowrap; }
.att2-ops a { color: var(--primary); cursor: pointer; font-size: 12px; margin-right: 8px; }
.att2-ops a:hover { text-decoration: underline; }
.att2-ops a.danger { color: var(--danger); }
.att2-ops a.muted { color: var(--text-faint); }

/* 数字列等宽 */
.att2-num { text-align: right; font-variant-numeric: tabular-nums; }
/* 击穿 .data-table td 的 text-align:center（特异性 0,1,1 > 0,1,0），数字/时间/名称列真正右对齐 */
.data-table td.att2-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 推送凭证 ---------- */
.att2-link { color: var(--primary); cursor: pointer; font-variant-numeric: tabular-nums; }
.att2-link:hover { text-decoration: underline; }
.att2-vc-head { padding-bottom: 12px; border-bottom: 1px dashed var(--border); margin-bottom: 14px; }
.att2-vc-title { font-size: 17px; font-weight: 700; letter-spacing: .4px; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.att2-vc-sub { margin-top: 5px; font-size: 12.5px; color: var(--text-muted); }
.att2-vc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; }
.att2-vc-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--ring-base); font-size: 12.5px; }
.att2-vc-line span { color: var(--text-muted); }
.att2-vc-line b { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.att2-vc-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--text-muted); line-height: 1.9; }

/* ---------- 绑定部门（#deptPickerPop 多选 chip） ---------- */
.att2-deptpick { display: flex; flex-direction: column-reverse; gap: 7px; } /* 2026-10-30：选中部门 chip 显示在方框上方，选择后第一时间可见 */
.att2-deptpick .dept-picker-anchor { width: 100%; box-sizing: border-box; height: 32px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 12.5px; }
.att2-deptpick .dept-picker-anchor::placeholder { color: var(--text-faint); }
.att2-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.att2-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 3px 1px 9px; border-radius: 999px; background: var(--primary-soft, #E8F0FE); color: var(--primary); font-size: 12px; line-height: 1.7; }
.att2-chip i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; font-style: normal; font-size: 13px; line-height: 1; cursor: pointer; opacity: .6; }
.att2-chip i:hover { background: rgba(0, 0, 0, .06); opacity: 1; }
.att2-chip-empty { font-size: 12px; color: var(--text-faint); line-height: 1.8; }
/* 新增排班：已选员工 chips 容器 */
.att2-emp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px; border: 1px solid var(--border, #D9D9D9); border-radius: 6px; min-height: 34px; background: var(--bg-input, #FFF); }
/* 弹窗「上下式」全局 .att2-form input[type=text]{width:100%;height:32px;border:1px;padding:0 9px;background:white}
   会把日期范围选择器的两个内部文本框（.att2-rp-in）画成两个独立的白色边框框，叠在外层 .att2-rp-field 长框里
   （一长一短两个框重叠）。此处按 .att2-rp-in 基础设计全量复位（选择器 0,2,1 靠源序取胜于上面的 input[type=text]）。 */
.att2-form input.att2-rp-in {
  width: 76px; flex: none;
  height: 22px; padding: 0; margin: 0;
  border: 0; background: none; box-shadow: none; border-radius: 0;
}

/* ---------- 考勤中心（聚合入口 · 骨架占位） ---------- */
.att2-hub-title { font-size: 15px; font-weight: 600; color: var(--text-strong); }
/* 子 tab 栏与花名册 #empSubTabs 同一口径（2026-10-27 实测对齐）：
   顶栏→tab 栏 2px（上提 -2px）、tab 紧凑 padding 4px 16px（栏高 32px）、tab 栏→内容 0px。
   同口径已用于 #view-org-social（社保福利），此处保持一致。 */
.att2-hub-tabs { margin: -2px 0 0; flex: 0 0 auto; }
.att2-hub-tabs .tab.subtab { padding: 4px 16px; }
/* 工具条独立成行（2026-10-28）：子 tab 栏一行 + 工具条一行，口径对齐花名册
   （#empSubTabs 底 → .toolbar 0 间距、工具条 padding 4px 0 0、底留 2px；
    按钮走 .toolbar 内的 --ctrl-h 统一高度，与花名册工具栏 30px 一致） */
.att2-hub-bar { margin-bottom: 2px; padding: 4px 0 0; }
.att2-hub-bar .att2-hub-ops { gap: 14px; }
.att2-hub-ops { flex: none; display: flex; align-items: center; }
/* 内容区上间距：有工具条时贴紧（花名册同位置就是工具条自带留白 + 2px）；
   无工具条的骨架页（考勤数据）仍保留 8px，避免内容顶到 tab 下划线 */
.att2-hub-body { padding-top: 8px; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.att2-hub-body.is-tight { padding-top: 0; }
.att2-hub-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px 22px;
  overflow: hidden;
}
.att2-hub-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--hub-accent, var(--primary));
}
.att2-hub-hd { display: flex; align-items: flex-start; gap: 10px; }
.att2-hub-num {
  flex: none;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--hub-accent, var(--primary));
  font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.att2-hub-tt { flex: 1; min-width: 0; }
.att2-hub-tt .nm { font-size: 14.5px; font-weight: 600; color: var(--text-strong); }
.att2-hub-tt .ch { margin-top: 2px; font-size: 11.5px; color: var(--text-faint); }
.att2-hub-desc { margin-top: 12px; font-size: 13px; line-height: 1.75; color: var(--text-muted); }
.att2-hub-sec { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--border); }
.att2-hub-shd { margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.att2-hub-ul {
  margin: 0; padding: 0; list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 32px;
}
@media (max-width: 1100px) {
  .att2-hub-ul { grid-template-columns: minmax(0, 1fr); }
}
.att2-hub-ul li { position: relative; padding-left: 15px; font-size: 13px; line-height: 1.85; color: var(--text-muted); }
.att2-hub-ul li::before {
  content: '';
  position: absolute; left: 3px; top: 11px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--hub-accent, var(--primary));
  opacity: .55;
}
.att2-hub-foot {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px;
}
.att2-hub-foot .k { color: var(--text-faint); }
.att2-hub-link { color: var(--primary); cursor: pointer; }
.att2-hub-link:hover { text-decoration: underline; }
.att2-hub-none { color: var(--text-faint); }
.att2-hub-note {
  margin-top: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-muted);
}
.att2-hub-note .hd {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.att2-hub-note .tx { color: var(--text-muted); }
.att2-hub-note .lk { margin-top: 3px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.att2-hub-note .lk .sep { color: var(--text-faint); }

/* ============================================================
 * 规则中心（5 类规则卡片 + 加班规则引擎）
 * ============================================================ */
.att2-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
/* 6 张卡（2026-10-28 加「请休假规则」后）：宽屏单行 6 列，窄屏退 3 列 / 2 列，
   避免 auto-fill 把第 6 张挤到第二行只留一张。 */
.att2-rule-grid.is-many { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.att2-rule-grid.is-many .att2-rule-card { padding: 14px 14px 12px 16px; gap: 8px; }
.att2-rule-grid.is-many .rc-desc { font-size: 11.5px; min-height: 44px; }
.att2-rule-grid.is-many .rc-meta { font-size: 11px; }
/* 6 列时脚注左侧的功能清单太长会折成两行、把卡片底部顶乱 —— 只留「进入配置 ›」右对齐 */
.att2-rule-grid.is-many .rc-foot { justify-content: flex-end; padding-top: 8px; }
.att2-rule-grid.is-many .rc-foot > span:first-child { display: none; }
@media (max-width: 1560px) { .att2-rule-grid.is-many { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .att2-rule-grid.is-many { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.att2-rule-card {
  position: relative;
  display: flex; flex-direction: column; gap: 9px;
  padding: 16px 18px 14px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.att2-rule-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--rc-accent, var(--primary));
}
.att2-rule-card:hover {
  border-color: var(--rc-accent, var(--primary));
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}
.att2-rule-card.is-off { opacity: .72; }
.rc-top { display: flex; align-items: center; gap: 9px; }
.rc-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--ring-base);
  color: var(--rc-accent, var(--primary));
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rc-name { font-size: 14.5px; font-weight: 600; color: var(--text-strong); line-height: 1.4; }
.rc-desc { font-size: 12px; color: var(--text-muted); line-height: 1.65; min-height: 38px; }
.rc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-faint); }
.rc-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.rc-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2px; padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--rc-accent, var(--primary));
}
.rc-foot .go { display: inline-flex; align-items: center; gap: 3px; }

/* 规则中心底部说明 */
.att2-rule-tip {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  display: flex; flex-direction: column; gap: 5px;
}
.att2-rule-tip .li {
  display: flex; align-items: baseline; gap: 9px;
  font-size: 12px; color: var(--text-muted); line-height: 1.75;
}
.att2-rule-tip .k {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--ring-base);
  color: var(--text-faint);
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  text-align: center; line-height: 16px;
}

/* 卡片内状态点 */
.rc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; }
.rc-dot.off { background: var(--text-faint); }

/* 子视图：面包屑 + 操作条 */
.att2-rule-crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-faint); margin-bottom: 10px; }
.att2-rule-crumb a { color: var(--primary); cursor: pointer; }
.att2-rule-crumb a:hover { text-decoration: underline; }
.att2-rule-crumb b { color: var(--text-strong); font-weight: 600; }
.att2-rule-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg);
  font-size: 12.5px; color: var(--text-muted);
}
.att2-rule-bar .ops { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.att2-rule-bar .tip { display: flex; align-items: center; gap: 6px; }

/* 规则表格 */
table.att2-rule-table { width: 100%; }
table.att2-rule-table td { vertical-align: top; }
.att2-rule-nm { font-weight: 600; color: var(--text-strong); font-size: 13px; }
.att2-rule-code { font-size: 11px; color: var(--text-muted); opacity: .85; font-variant-numeric: tabular-nums; letter-spacing: .2px; white-space: nowrap; }
.att2-prio {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 20px; padding: 0 6px; border-radius: 5px;
  background: var(--ring-base); color: var(--text-muted);
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.att2-prio.p1 { background: rgba(234, 67, 53, .10); color: #C5221F; }
.att2-prio.p2 { background: rgba(250, 123, 23, .12); color: #B45309; }
.att2-prio.p3 { background: rgba(26, 115, 232, .10); color: var(--primary); }
[data-theme="dark"] .att2-prio.p1 { color: #FF9585; }
[data-theme="dark"] .att2-prio.p2 { color: #FBBF6A; }
.att2-scope { display: flex; flex-wrap: wrap; gap: 4px; }
.att2-scope .s {
  display: inline-block; padding: 0 6px; border-radius: 4px;
  background: var(--ring-base); color: var(--text-muted);
  font-size: 11px; line-height: 18px; white-space: nowrap;
}
.att2-scope .s.acc { background: var(--primary-soft, #E8F0FE); color: var(--primary); }
.att2-calc-txt { font-size: 11.5px; color: var(--text-muted); line-height: 1.7; }
.att2-calc-txt em { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }

/* 编辑弹窗分区 */
.att2-modal .modal.modal-wide { width: 940px; }
/* 2026-11-03：考勤组弹窗专属加宽档位——工作日周七项需一行放下 */
.att2-modal .modal.modal-wide.modal-xl { width: 1080px; }

/* 2026-11-04：新增排班周期（组内内联展开，非弹窗）；紧凑布局：名称/天数并排、日行 3 列 */
.att2-cyc-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--bg-2, #f7f8fa);
  padding: 10px 12px;
}
.att2-cyc-panel .att2-form { gap: 8px 14px; }
.att2-cyc-name, .att2-cyc-days { display: flex; align-items: center; gap: 8px; }
.att2-form .att2-cyc-name input, .att2-form .att2-cyc-days input { width: 200px; flex: none; }
.att2-form .att2-cyc-days input { width: 90px; }
.att2-cyc-name .hint, .att2-cyc-days .hint { flex: none; white-space: nowrap; }
.att2-cyc-day-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 6px 12px; }
.att2-cyc-day-row { display: flex; align-items: center; gap: 6px; margin-top: 0; min-width: 0; }
/* 2026-11-04：标签定宽，保证「第1天/第14天」下拉框纵向对齐 */
.att2-cyc-day-row .k { flex: none; width: 56px; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.att2-cyc-day-row select, .att2-cyc-day-row .wb-combo { width: 100%; min-width: 0; flex: 1; max-width: none; }
/* 2026-11-04：foot 跨满 grid 全宽，按钮缩小并推到右下角 */
.att2-cyc-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; grid-column: 1 / -1; }
/* 2026-11-05：已建排班周期列表（编辑 / 删除入口） */
.att2-cyc-list-block { margin-top: 12px; }
.att2-cyc-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.att2-cyc-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-2, #f7f8fa); font-size: 12.5px; }
.att2-cyc-row .att2-cyc-name2 { flex: 1; font-weight: 500; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att2-cyc-row .att2-cyc-name2 i { font-style: normal; color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.att2-cyc-row .att2-cyc-acts { display: flex; gap: 6px; flex: none; }
.att2-mini-btn { height: 24px; padding: 0 11px; font-size: 12px; border-radius: 5px; cursor: pointer; border: 1px solid var(--border); background: var(--bg-1, #fff); color: var(--text-strong); }
.att2-mini-btn:hover { border-color: var(--primary); color: var(--primary); }
.att2-mini-btn.danger { color: var(--danger); }
.att2-mini-btn.danger:hover { border-color: var(--danger); background: rgba(234,84,85,.06); }
.att2-cyc-foot .btn-secondary, .att2-cyc-foot .btn-primary { flex: none; height: 26px; padding: 0 14px; font-size: 12px; }
/* 2026-11-05：批量排班弹窗——各考勤组默认周期配置概览（未配置用左色条低饱和提示，不整格红） */
.att2-cyc-gi { border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; background: var(--bg-2, #f7f8fa); }
.att2-cyc-gi-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.att2-cyc-gi-row:last-child { border-bottom: 0; }
.att2-cyc-gi-row > span { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att2-cyc-gi-row b { flex: none; color: var(--text-strong); font-weight: 500; }
.att2-cyc-gi-row i { flex: none; font-style: normal; color: var(--text-muted); font-size: 11.5px; }
.att2-cyc-gi-row em { flex: none; font-style: normal; color: var(--danger); border-left: 3px solid var(--danger); background: rgba(234,84,85,.06); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
/* 2026-11-04：考勤班次 tagbox——已选 chip 显示在框内，点框弹层多选 */
.att2-tagbox { position: relative; width: 100%; }
/* 2026-11-04：日历集 tagbox 在「节假日自动排休」行内弹性吃掉剩余宽度，
   随弹窗宽度自适应（最小 240px 兜底，过窄时自动换行），消除右侧空白 */
.att2-tagbox.att2-hol-tagbox { flex: 1 1 240px; width: auto; min-width: 240px; max-width: 100%; box-sizing: border-box; }
/* 弹层宽度跟随盒子（width:100% + border-box，含 padding/border），盒子自适应时弹层同步缩放 */
.att2-tagbox.att2-hol-tagbox .att2-tagbox-pop { width: 100%; min-width: 240px; box-sizing: border-box; }
/* 2026-11-04：考勤人员卡片三项 tagbox（参与成员 / 无需考勤 / 绑定部门），浮层跟随框宽 */
.att2-tagbox.att2-mem-tagbox .att2-tagbox-pop { width: 100%; min-width: 240px; box-sizing: border-box; }
.att2-tagbox-in {
  min-height: 34px; padding: 4px 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.att2-tagbox-in:focus-within, .att2-tagbox.is-open .att2-tagbox-in { border-color: var(--primary); }
.att2-tagbox-in > .hint { color: var(--text-faint); font-size: 12.5px; }
.att2-tagbox-pop {
  position: absolute; z-index: 80; top: calc(100% + 4px); left: 0; width: 300px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16); padding: 8px;
}
.att2-tagbox-search { margin-bottom: 6px; }
.att2-tagbox-search input {
  width: 100%; height: 28px; padding: 0 9px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg);
  font-size: 12.5px; color: var(--text); font-family: inherit; outline: none;
}
.att2-tagbox-search input:focus { border-color: var(--primary); }
.att2-tagbox-search input::placeholder { color: var(--text-faint); }
.att2-tagbox-list, #gfSchedShiftList { max-height: 220px; overflow: auto; }
.att2-tagbox-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--text);
}
.att2-tagbox-item:hover { background: var(--bg-hover, rgba(127,127,127,.08)); }
.att2-form .att2-tagbox-pop .att2-tagbox-item { display: flex; flex-direction: row; align-items: center; gap: 8px; }   /* 压过 .att2-form label 纵向布局 */
.att2-tagbox-item input { flex: none; margin: 0; }
.att2-tagbox-item .t { margin-left: auto; color: var(--text-faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.att2-tagbox-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ring-base); }
.att2-tagbox-foot .btn-primary { height: 26px; padding: 0 14px; font-size: 12px; }
/* 2026-11-05：另一侧名单里的人不再禁用，改为低饱和橙标注 + 可勾选；
   选中后由确认弹窗说明冲突并自动迁移，无需「先减后加」。 */
.att2-tagbox-item.is-cross { background: rgba(217, 119, 6, .05); }
.att2-tagbox-item.is-cross:hover { background: rgba(217, 119, 6, .10); }
.att2-tagbox-item.is-cross input { cursor: pointer; }
.att2-tagbox-item .t.att2-cross-tag { margin-left: auto; flex: none; color: #b45309; font-size: 11px; line-height: 16px; padding: 0 5px; border-radius: 4px; background: rgba(217, 119, 6, .11); }
.att2-mem-rule { color: #b45309; font-weight: 500; }
.att2-mem-conflict-wrap { grid-column: 1 / -1; }
.att2-mem-conflict { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border: 1px solid rgba(234, 84, 85, .3); border-left: 3px solid var(--danger); border-radius: 8px; background: rgba(234, 84, 85, .05); }
.att2-mem-conflict .ic { flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.att2-mem-conflict .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att2-mem-conflict .tx b { font-size: 12.5px; font-weight: 600; color: var(--danger); }
.att2-mem-conflict .tx span { font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.att2-mem-conflict .acts { flex: none; display: flex; gap: 6px; }
.att2-chip.conflict { background: rgba(234, 84, 85, .12); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(234, 84, 85, .38); }
.att2-dt2-conflict { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-left: 3px solid var(--danger); border-radius: 6px; background: rgba(234, 84, 85, .06); }
.att2-dt2-conflict b { font-size: 12px; font-weight: 600; color: var(--danger); }
.att2-dt2-conflict span { font-size: 12px; line-height: 1.6; color: var(--text-muted); }
/* 2026-11-04：排班层级规则管理（个人例外/岗位模板/组织默认） */
.att2-layer-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.att2-layer-tabs span { padding: 7px 14px; font-size: 13px; color: var(--text-muted); cursor: pointer; border-radius: 6px 6px 0 0; }
.att2-layer-tabs span.on { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 500; }
.att2-layer-pane { display: none; }
.att2-layer-pane.on { display: block; }
.att2-layer-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.att2-layer-hd .hint { margin-right: auto; }
.att2-layer-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.att2-layer-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; }
.att2-layer-row .t { flex: none; font-weight: 500; color: var(--text); min-width: 120px; }
.att2-layer-row .r { flex: none; color: var(--text-muted); }
.att2-layer-row .d { flex: 1; color: var(--text-faint); text-align: right; }
.att2-layer-empty { padding: 18px; text-align: center; color: var(--text-faint); font-size: 12.5px; }
.att2-mini-x { flex: none; height: 22px; padding: 0 9px; font-size: 12px; color: var(--danger); background: transparent; border: 1px solid transparent; border-radius: 5px; cursor: pointer; }
.att2-mini-x:hover { background: var(--bg-hover, rgba(127,127,127,.08)); }
.att2-fsec { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 16px; margin-bottom: 12px; background: var(--card-bg); }
.att2-fsec:last-child { margin-bottom: 0; }
.att2-fsec > .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.att2-fsec > .hd .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--primary-soft, #E8F0FE); color: var(--primary);
  font-size: 10.5px; font-weight: 700;
}
.att2-fsec > .hd .t { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.att2-fsec > .hd .tag {
  margin-left: auto;
  padding: 0 7px; border-radius: 999px;
  background: var(--ring-base); color: var(--text-faint);
  font-size: 10.5px; line-height: 18px; font-weight: 600; letter-spacing: .3px;
}
.att2-fsec > .hd .hintx { font-size: 11px; color: var(--text-faint); font-weight: 400; }
/* 随浮窗宽度自适应列数：默认 940px 弹窗显示 3 列，拉窄自动退到 2 / 1 列；最小弹窗也能显示 1 列 */
.att2-form.cols3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.att2-form.cols1 { grid-template-columns: 1fr; }

/* 三档补偿行 */
.att2-comp { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.att2-comp th, .att2-comp td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.att2-comp th { font-size: 11.5px; font-weight: 600; color: var(--text-faint); }
.att2-comp td:first-child { width: 130px; color: var(--text); font-weight: 600; }
.att2-comp select, .att2-comp input {
  height: 28px; padding: 0 7px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 5px;
  background: var(--card-bg); color: var(--text); font-size: 12.5px;
  width: 100%; max-width: 150px;
}
.att2-comp .unit { margin-left: 5px; font-size: 11.5px; color: var(--text-faint); }

/* 试算推导 */
.att2-sim { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.att2-sim .left { display: flex; flex-direction: column; gap: 10px; }
.att2-sim .right { min-width: 0; }
.att2-sim-out {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--card-bg);
}
.att2-sim-out .hd2 {
  padding: 8px 12px; background: var(--ring-base);
  font-size: 11.5px; font-weight: 600; color: var(--text-muted);
}
.att2-sim-steps { padding: 4px 0; }
.att2-sim-step {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 10px;
  padding: 7px 12px; align-items: baseline;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.att2-sim-step:last-child { border-bottom: 0; }
.att2-sim-step .k { color: var(--text-faint); font-size: 11.5px; white-space: nowrap; }
.att2-sim-step .e { color: var(--text-muted); line-height: 1.6; }
.att2-sim-step .v { color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.att2-sim-step.warn .v { color: var(--danger); }
.att2-sim-sum {
  margin-top: 10px; padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--primary-soft, #E8F0FE);
  color: var(--primary); font-size: 13px; font-weight: 600; line-height: 1.6;
}
.att2-sim-none { padding: 26px 10px; text-align: center; color: var(--text-faint); font-size: 12.5px; }

/* 快照列表 */
.att2-snap-list { display: flex; flex-direction: column; gap: 8px; }
.att2-snap-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card-bg); font-size: 12.5px;
}
.att2-snap-item .ver {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 22px; border-radius: 5px;
  background: var(--ring-base); color: var(--text-muted);
  font-size: 11.5px; font-weight: 700;
}
.att2-snap-item .meta { flex: 1; min-width: 0; color: var(--text-muted); }
.att2-snap-item .meta b { color: var(--text); font-weight: 600; }
.att2-snap-detail {
  margin-top: 10px; padding: 12px 14px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--bg);
  font-size: 12px; color: var(--text-muted); line-height: 1.85;
  max-height: 320px; overflow: auto;
}
.att2-snap-detail .row { display: flex; gap: 10px; }
.att2-snap-detail .row span { flex: 0 0 96px; color: var(--text-faint); }
.att2-snap-detail .row b { font-weight: 600; color: var(--text); }

/* 类型选择弹窗 */
.att2-type-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.att2-type-item {
  position: relative;
  display: flex; flex-direction: column; gap: 5px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card-bg); cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.att2-type-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rc-accent, var(--primary)); }
.att2-type-item:hover { border-color: var(--rc-accent, var(--primary)); background: var(--ring-base); }
.att2-type-item .nm { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.att2-type-item .ds { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; }
.att2-type-item .st { font-size: 11px; color: var(--text-faint); }
.att2-type-item.disabled { opacity: .62; cursor: not-allowed; }
.att2-type-item.disabled:hover { border-color: var(--border); background: var(--card-bg); }

/* ===================== 外出 / 出差规则（2026-10-27） ===================== */
/* 列表：场景标签 / 补贴摘要 / 溢出 chip */
.att2-trip-sc {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 9px 1px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--ring-base);
  font-size: 11.5px; line-height: 1.85; color: var(--text); white-space: nowrap;
}
.att2-trip-sc::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sc, var(--cyan)); flex: none; }
.att2-scope .s.att2-sc-more { background: transparent; border: 1px dashed var(--border); color: var(--text-faint); cursor: help; }
.att2-sc-none { font-size: 12px; color: var(--text-faint); }
.att2-trip-allow { display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 1.55; }
.att2-trip-allow .l1 { color: var(--text); font-weight: 600; }
.att2-trip-allow .l2 { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.att2-trip-allow .l3 { color: var(--text-faint); font-size: 11.5px; }
table.att2-trip-table { min-width: 1240px; }
table.att2-trip-table td { vertical-align: top; }

/* ---- 补卡规则列表（makeup） ---- */
table.att2-mk-table { min-width: 1320px; }
table.att2-mk-table td { vertical-align: top; }
.att2-mk-sub { margin-top: 3px; font-size: 11px; line-height: 1.55; color: var(--text-faint); }
.att2-mk-warn { color: var(--orange); }

/* 弹窗：场景选择卡 */
.att2-trip-scenes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
/* 外出/出差 5 张场景卡（4 预设 + 自定义）单行展示；补卡等 4 卡场景不受影响 */
#tprScenes { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
#tprScenes .att2-trip-scard .ds { min-height: 56px; }
.att2-trip-scard {
  position: relative; overflow: hidden;
  padding: 11px 12px 10px 15px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card-bg); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.att2-trip-scard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc, var(--cyan)); }
.att2-trip-scard .nm { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.att2-trip-scard .ds { margin-top: 4px; min-height: 38px; font-size: 11.5px; line-height: 1.6; color: var(--text-faint); }
.att2-trip-scard .ck { margin-top: 6px; font-size: 11px; color: var(--text-faint); }
.att2-trip-scard:hover { border-color: var(--sc, var(--cyan)); }
.att2-trip-scard.on { border-color: var(--sc, var(--cyan)); background: var(--ring-base); }
.att2-trip-scard.on .ck { color: var(--sc, var(--cyan)); font-weight: 600; }
.att2-trip-sctip {
  margin-top: 10px; padding: 8px 11px; border-radius: 6px;
  background: var(--ring-base); font-size: 12px; line-height: 1.7; color: var(--text-muted);
}
.att2-trip-sctip b { margin-right: 6px; color: var(--text-strong); }

/* 弹窗：审批分级行 / 矩阵表 / 实施要点 */
.att2-trip-sub { margin: 6px 0 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.att2-trip-days { display: flex; flex-direction: column; gap: 8px; }
.att2-trip-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg);
}
.att2-trip-row .k, .att2-trip-row .u, .att2-trip-row .ar { font-size: 12px; color: var(--text-faint); }
.att2-trip-row input[type="number"] { width: 72px; height: 28px; padding: 0 8px; }
.att2-trip-row select { height: 28px; min-width: 150px; }
.att2-trip-row .del, .att2-comp .del {
  margin-left: auto; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-style: normal; font-size: 14px; line-height: 1; color: var(--text-faint); cursor: pointer;
}
.att2-trip-row .del:hover, .att2-comp .del:hover { background: rgba(0, 0, 0, .06); color: var(--danger); }
.att2-trip-posts td:first-child, .att2-trip-allow td:first-child { width: auto; font-weight: 400; color: var(--text); }
.att2-trip-allow td.c, .att2-trip-posts td.c { text-align: center; }
.att2-trip-add { height: 28px; padding: 0 12px; margin-top: 8px; font-size: 12px; }
.att2-trip-impl {
  margin-top: 12px; padding: 11px 13px;
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--ring-base);
}
.att2-trip-impl .hd { margin-bottom: 7px; font-size: 12px; font-weight: 600; color: var(--text); }
.att2-trip-impl .li { position: relative; padding-left: 14px; font-size: 11.5px; line-height: 1.85; color: var(--text-muted); }
.att2-trip-impl .li::before { content: '·'; position: absolute; left: 5px; color: var(--text-faint); }
.att2-trip-impl .li b { margin-right: 6px; color: var(--text); }
.is-dim { opacity: .5; }
@media (max-width: 1180px) { .att2-trip-scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===================== 节假日规则 · 多日历引擎（2026-10-27） ===================== */
.att2-hol-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.att2-hol-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--ring-base); }
.att2-hol-seg > span {
  padding: 5px 14px; border-radius: 6px; cursor: pointer;
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
  transition: background .15s, color .15s;
}
.att2-hol-seg > span:hover { color: var(--text); }
.att2-hol-seg > span.on { background: var(--card-bg); color: var(--text-strong); font-weight: 600; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.08)); }
.att2-hol-ops { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 左右分栏 */
.att2-hol-wrap { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 14px; align-items: start; }
.att2-hol-side { display: flex; flex-direction: column; gap: 8px; }
.att2-hol-sidhd {
  display: flex; align-items: center; gap: 6px;
  padding: 0 2px 2px; font-size: 12px; font-weight: 600; color: var(--text);
}
.att2-hol-sidhd .n {
  padding: 0 6px; border-radius: 999px; background: var(--ring-base);
  color: var(--text-faint); font-size: 10.5px; line-height: 17px; font-weight: 600;
}
.att2-hol-card {
  position: relative; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px 10px 15px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card-bg);
  transition: border-color .15s, background .15s;
}
.att2-hol-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--hc, var(--purple)); }
.att2-hol-card:hover { border-color: var(--hc, var(--purple)); }
.att2-hol-card.on { border-color: var(--hc, var(--purple)); background: var(--ring-base); }
.att2-hol-card .hd { display: flex; align-items: center; gap: 6px; }
.att2-hol-card .hd .nm { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att2-hol-card .hd .off { font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.att2-hol-card .tp { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att2-hol-card .mt { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.att2-hol-card .mt b { color: var(--text); font-weight: 600; }
.att2-hol-card .bar { height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; margin-top: 2px; }
.att2-hol-card .bar i { display: block; height: 100%; background: var(--hc, var(--purple)); opacity: .75; border-radius: 2px; }
.att2-hol-card .ft { font-size: 10.5px; color: var(--text-faint); }

/* 右侧主区 */
.att2-hol-main { min-width: 0; display: flex; flex-direction: column; }
.att2-hol-mhd {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg);
}
.att2-hol-mhd .l1 { display: flex; align-items: center; gap: 8px; }
.att2-hol-mhd .l1 .nm { font-size: 14.5px; font-weight: 600; color: var(--text-strong); }
.att2-hol-mhd .l1 .yr { margin-left: auto; font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.att2-hol-mhd .l2 { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.att2-hol-mhd .l3 { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--text-faint); }
.att2-hol-mhd .l3 b { color: var(--text); font-weight: 600; }
.att2-hol-mhd .ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.att2-hol-mhd .ops .btn-secondary, .att2-hol-mhd .ops .btn-primary { height: 28px; padding: 0 11px; font-size: 12px; }

.att2-hol-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 9px 2px 0; font-size: 11.5px; color: var(--text-faint);
}
.att2-hol-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.att2-hol-legend i.ho { background: rgba(234,67,53,.75); }
.att2-hol-legend i.lv { background: rgba(217,119,6,.8); }
.att2-hol-legend i.sw { background: rgba(13,148,136,.8); }
.att2-hol-legend i.mk { background: rgba(26,115,232,.7); }
.att2-hol-legend i.lo { background: rgba(250,123,23,.75); }
.att2-hol-legend i.co { background: rgba(161,66,244,.7); }
.att2-hol-legend i.we { background: var(--ring-base); border: 1px solid var(--border); }
.att2-hol-legend .tip { margin-left: auto; }

.att2-hol-months { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 0; }
.att2-hol-mchip {
  position: relative; cursor: pointer;
  padding: 3px 9px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card-bg);
  font-size: 11.5px; color: var(--text-muted); line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.att2-hol-mchip:hover { border-color: var(--primary); color: var(--primary); }
.att2-hol-mchip.on { border-color: var(--primary); background: var(--primary-soft, #E8F0FE); color: var(--primary); font-weight: 600; }
.att2-hol-mchip i {
  margin-left: 4px; padding: 0 4px; border-radius: 999px;
  background: rgba(234,67,53,.12); color: #C5221F;
  font-style: normal; font-size: 10px; font-weight: 700;
}
[data-theme="dark"] .att2-hol-mchip i { background: rgba(255,111,97,.2); color: #FF9585; }

/* 2026-11-04：月份条最前面的年份滚动选择器（滚轮 / 箭头 / 下拉列表） */
.att2-hol-ypick {
  position: relative; display: inline-flex; align-items: center; gap: 2px;
  height: 26px; padding: 0 3px; border-radius: 6px;
  border: 1px solid var(--primary); background: var(--primary-soft, #E8F0FE);
  color: var(--primary); font-size: 11.5px; font-variant-numeric: tabular-nums;
  user-select: none; outline: none;
}
.att2-hol-ypick:focus { box-shadow: 0 0 0 2px rgba(26,115,232,.16); }
.att2-hol-ypick .ar {
  width: 16px; height: 20px; line-height: 19px; text-align: center;
  cursor: pointer; border-radius: 4px; font-size: 14px; color: var(--primary);
}
.att2-hol-ypick .ar:hover { background: rgba(26,115,232,.14); }
.att2-hol-ypick .yv { min-width: 62px; text-align: center; cursor: pointer; font-weight: 600; white-space: nowrap; }
.att2-hol-ypick .yv .dot {
  display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%;
  background: var(--ring-base); vertical-align: middle;
}
.att2-hol-ypick .yv .dot.on { background: #16A34A; }
.att2-hol-ysep { width: 1px; align-self: stretch; margin: 2px 5px; background: var(--border); }
.att2-hol-ydd {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 40;
  width: 158px; max-height: 216px; overflow-y: auto;
  padding: 4px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--card-bg, #fff); box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
.att2-hol-yopt {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 8px; border-radius: 5px; cursor: pointer;
  font-size: 11.5px; color: var(--text); white-space: nowrap;
}
.att2-hol-yopt em { font-style: normal; font-size: 10px; color: var(--text-faint); }
.att2-hol-yopt:hover { background: var(--primary-soft, #E8F0FE); }
.att2-hol-yopt.on { background: var(--primary-soft, #E8F0FE); color: var(--primary); font-weight: 600; }
.att2-hol-stat .c-warn { color: #B45309; font-weight: 500; }
[data-theme="dark"] .att2-hol-ydd { background: #1E2230; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
[data-theme="dark"] .att2-hol-stat .c-warn { color: #FBBF24; }

.att2-hol-grid { margin-top: 10px; }
.att2-hol-stat { display: flex; flex-wrap: wrap; gap: 16px; font-size: 11.5px; color: var(--text-faint); padding: 0 2px 8px; }
.att2-hol-stat b { font-variant-numeric: tabular-nums; color: var(--text); }
.att2-hol-stat b.c-ho { color: #C5221F; }
.att2-hol-stat b.c-lv { color: #B45309; }
.att2-hol-stat b.c-sw { color: #0B7A70; }
.att2-hol-stat b.c-mk { color: var(--primary); }
.att2-hol-stat b.c-lo { color: #B45309; }
.att2-hol-stat b.c-co { color: #7B2FD1; }
.att2-hol-stat .brk { margin-left: 4px; font-size: 11px; color: var(--text-faint); }
[data-theme="dark"] .att2-hol-stat b.c-ho { color: #FF9585; }
[data-theme="dark"] .att2-hol-stat b.c-lv { color: #FBBF6A; }
[data-theme="dark"] .att2-hol-stat b.c-sw { color: #5EEAD4; }
[data-theme="dark"] .att2-hol-stat b.c-lo { color: #FBBF6A; }
[data-theme="dark"] .att2-hol-stat b.c-co { color: #CBA6FF; }
.att2-hol-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding-bottom: 4px; }
.att2-hol-week span { text-align: center; font-size: 11px; color: var(--text-faint); }
.att2-hol-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.att2-hol-cell {
  position: relative; cursor: pointer;
  min-height: 52px; padding: 4px 6px 5px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg);
  display: flex; flex-direction: column; gap: 1px;
  transition: border-color .12s, background .12s;
}
.att2-hol-cell:hover { border-color: var(--primary); }
.att2-hol-cell .dd {
  display: flex; align-items: baseline; gap: 5px; min-width: 0;
  font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums;
}
/* 2026-11-04：农历跟在公历日期右侧，淡灰小字；自身声明覆盖父级按类型着色的继承 */
.att2-hol-cell .lu {
  font-size: 10px; line-height: 1.3; color: var(--text-muted); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.att2-hol-cell .bd {
  position: absolute; right: 4px; top: 3px;
  width: 15px; height: 15px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
}
.att2-hol-cell .nm {
  font-size: 10px; line-height: 1.4; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 2026-11-04：不同类型用不同颜色，法定/调休放假/补班一眼可分 */
.att2-hol-cell.ho .nm { color: #C5221F; }
.att2-hol-cell.lv .nm { color: #B45309; }
.att2-hol-cell.sw .nm { color: #0B7A70; }
.att2-hol-cell.mk .nm { color: var(--primary); }
.att2-hol-cell.lo .nm { color: #B45309; }
.att2-hol-cell.co .nm { color: #7B2FD1; }
[data-theme="dark"] .att2-hol-cell.ho .nm { color: #FF9585; }
[data-theme="dark"] .att2-hol-cell.lv .nm { color: #FBBF6A; }
[data-theme="dark"] .att2-hol-cell.sw .nm { color: #5EEAD4; }
[data-theme="dark"] .att2-hol-cell.lo .nm { color: #FBBF6A; }
[data-theme="dark"] .att2-hol-cell.co .nm { color: #CBA6FF; }
.att2-hol-cell.out { border-color: transparent; background: transparent; cursor: default; }
.att2-hol-cell.out .dd { color: var(--text-faint); opacity: .45; }
.att2-hol-cell.we { background: var(--ring-base); }
.att2-hol-cell.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.att2-hol-cell.ho { background: rgba(234,67,53,.07); border-color: rgba(234,67,53,.28); }
.att2-hol-cell.ho .dd { color: #C5221F; font-weight: 600; }
.att2-hol-cell.ho .bd { background: #EA4335; }
/* 2026-11-04：法定假与周末重叠的补休，独立橙色，避免和「补班换来的调休」混淆 */
.att2-hol-cell.lv { background: rgba(217,119,6,.08); border-color: rgba(217,119,6,.3); }
.att2-hol-cell.lv .dd { color: #B45309; font-weight: 600; }
.att2-hol-cell.lv .bd { background: #D97706; }
[data-theme="dark"] .att2-hol-cell.lv { background: rgba(251,191,36,.12); }
[data-theme="dark"] .att2-hol-cell.lv .dd { color: #FBBF6A; }
.att2-hol-cell.sw { background: rgba(13,148,136,.08); border-color: rgba(13,148,136,.3); }
.att2-hol-cell.sw .dd { color: #0B7A70; font-weight: 600; }
.att2-hol-cell.sw .bd { background: #0D9488; }
.att2-hol-cell.mk { background: rgba(26,115,232,.07); border-color: rgba(26,115,232,.28); }
.att2-hol-cell.mk .dd { color: var(--primary); font-weight: 600; }
.att2-hol-cell.mk .bd { background: #1A73E8; }
.att2-hol-cell.lo { background: rgba(250,123,23,.08); border-color: rgba(250,123,23,.3); }
.att2-hol-cell.lo .bd { background: #FA7B17; }
.att2-hol-cell.co { background: rgba(161,66,244,.08); border-color: rgba(161,66,244,.3); }
.att2-hol-cell.co .bd { background: #A142F4; }
[data-theme="dark"] .att2-hol-cell.ho { background: rgba(255,111,97,.12); }
[data-theme="dark"] .att2-hol-cell.ho .dd { color: #FF9585; }
[data-theme="dark"] .att2-hol-cell.sw { background: rgba(45,212,191,.12); }
[data-theme="dark"] .att2-hol-cell.sw .dd { color: #5EEAD4; }
[data-theme="dark"] .att2-hol-cell.mk { background: rgba(91,149,255,.12); }

/* 2026-11-04：调休 / 补班互换配对小字（格子第三行，随类型着色） */
.att2-hol-cell .pr {
  font-size: 9px; line-height: 1.25; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.att2-hol-cell.lv .pr { color: #B45309; }
.att2-hol-cell.sw .pr { color: #0B7A70; }
.att2-hol-cell.mk .pr { color: var(--primary); }
[data-theme="dark"] .att2-hol-cell.lv .pr { color: #FBBF6A; }
[data-theme="dark"] .att2-hol-cell.sw .pr { color: #5EEAD4; }
[data-theme="dark"] .att2-hol-cell.mk .pr { color: #93B4FF; }
/* 单日编辑弹窗里的完整配对说明 */
.att2-hol-pair { margin: -4px 0 12px; font-size: 11.5px; color: var(--text-muted); }
.att2-hol-pair b { color: var(--text); font-weight: 600; }
.att2-hol-pair span { margin-left: 8px; font-size: 11px; color: var(--text-faint); }

/* 单日编辑弹窗 */
.att2-hol-dayhd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.att2-hol-dayhd .d { font-size: 17px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.att2-hol-dayhd .w { font-size: 12px; color: var(--text-faint); }
.att2-hol-dcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.att2-hol-dcard {
  position: relative; cursor: pointer;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card-bg);
  transition: border-color .12s, background .12s;
}
.att2-hol-dcard .nm { font-size: 12.5px; font-weight: 600; color: var(--text); }
.att2-hol-dcard .ds { margin-top: 3px; min-height: 46px; font-size: 10.5px; line-height: 1.5; color: var(--text-faint); }
.att2-hol-dcard .ck { font-size: 10.5px; color: var(--text-faint); }
.att2-hol-dcard:hover { border-color: var(--primary); }
.att2-hol-dcard.on { border-color: var(--primary); background: var(--primary-soft, #E8F0FE); }
.att2-hol-dcard.on .ck { color: var(--primary); font-weight: 600; }
.att2-hol-dcard.on.ho { border-color: #EA4335; background: rgba(234,67,53,.07); }
.att2-hol-dcard.on.lv { border-color: #D97706; background: rgba(217,119,6,.08); }
.att2-hol-dcard.on.sw { border-color: #0D9488; background: rgba(13,148,136,.08); }
.att2-hol-dcard.on.mk { border-color: #1A73E8; background: rgba(26,115,232,.07); }
.att2-hol-dcard.on.lo { border-color: #FA7B17; background: rgba(250,123,23,.08); }
.att2-hol-dcard.on.co { border-color: #A142F4; background: rgba(161,66,244,.08); }

/* 规则列表：判定优先级 / 优先级条 */
table.att2-hol-table { min-width: 1460px; }
table.att2-hol-table td { vertical-align: top; }
.att2-hol-prio { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; font-size: 11.5px; color: var(--text-muted); }
.att2-hol-prio .p1, .att2-hol-prio .p2, .att2-hol-prio .p4 {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 4px;
  font-size: 9.5px; font-weight: 700; color: #fff;
}
.att2-hol-prio .p1 { background: #EA4335; }
.att2-hol-prio .p2 { background: #1A73E8; }
.att2-hol-prio .p4 { background: #9AA0A6; }
.att2-hol-prio i { font-style: normal; color: var(--text-faint); font-size: 10px; }
.att2-hol-priobar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius);
  border: 1px dashed var(--border); background: var(--ring-base);
  font-size: 12px; color: var(--text-muted);
}
.att2-hol-priobar span { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; }
.att2-hol-priobar .p1 { background: rgba(234,67,53,.12); color: #C5221F; font-weight: 600; }
.att2-hol-priobar .p2 { background: rgba(26,115,232,.10); color: var(--primary); font-weight: 600; }
.att2-hol-priobar .p4 { background: transparent; border: 1px solid var(--border); color: var(--text-faint); }
.att2-hol-priobar i { font-style: normal; color: var(--text-faint); }
[data-theme="dark"] .att2-hol-priobar .p1 { color: #FF9585; }

@media (max-width: 1180px) {
  .att2-hol-wrap { grid-template-columns: 1fr; }
  .att2-hol-side { flex-direction: row; flex-wrap: wrap; }
  .att2-hol-card { flex: 1 1 200px; }
  .att2-hol-dcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .att2-sim { grid-template-columns: 1fr; }
  .att2-modal .modal.modal-wide, .att2-modal .modal.modal-wide.modal-xl { width: 96vw; }
  /* 小屏/小浮窗：cols3 也允许退到 1 列（auto-fit，不再硬锁 2 列） */
  .att2-form.cols3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
}



/* ---------- 请休假规则（2026-10-28） ---------- */
/* 固定列宽：10 列内容长短不一，auto 布局会被长文本撑到 1900px 触发横向滚动；
   fixed + 全部 th 给 width 后总宽 1326px，容器 1448px 时按比例放大、全部列一屏可见。 */
table.att2-lv-table { table-layout: fixed; width: 100%; min-width: 1326px; }
table.att2-lv-table th, table.att2-lv-table td { white-space: normal; word-break: break-word; }
table.att2-lv-table th:first-child, table.att2-lv-table td:first-child,
table.att2-lv-table th:last-child, table.att2-lv-table td:last-child { white-space: nowrap; }
.att2-lv-kinds .att2-check { margin-right: 2px; }
.att2-lv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.att2-lv-chips:empty { display: none; }
.att2-lv-note {
  margin-top: 10px; padding: 8px 12px;
  border-radius: 8px; background: var(--ring-base);
  font-size: 11.5px; color: var(--text-muted); line-height: 1.75;
}
.att2-lv-impl {
  margin-top: 12px; padding: 12px 14px;
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--bg);
}
.att2-lv-impl .hd { font-size: 12.5px; font-weight: 600; color: var(--text-strong); margin-bottom: 7px; }
.att2-lv-impl .li { position: relative; padding-left: 12px; font-size: 12px; color: var(--text-muted); line-height: 1.95; }
.att2-lv-impl .li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--warning, #FBBC04);
}
.att2-lv-impl .li b { color: var(--text); font-weight: 600; margin-right: 6px; }

/* ============================================================
 * 请休假元数据引擎（2026-10-28）：子视图分段 / 规则卡片 / 条件构建器 / 试算轨迹
 * ============================================================ */
.att2-lv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.att2-lv-seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--ring-base); flex-wrap: wrap; }
.att2-lv-seg > span {
  padding: 5px 14px; border-radius: 6px; cursor: pointer;
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
  transition: background .15s, color .15s;
}
.att2-lv-seg > span:hover { color: var(--text); }
.att2-lv-seg > span.on { background: var(--card-bg); color: var(--text-strong); font-weight: 600; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.08)); }
.att2-lv-ops { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.att2-lv-code { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.att2-lv-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

table.att2-lv-type-table, table.att2-lv-bal-table { table-layout: fixed; width: 100%; }
table.att2-lv-type-table th, table.att2-lv-type-table td,
table.att2-lv-bal-table th, table.att2-lv-bal-table td { white-space: normal; word-break: break-word; }
table.att2-lv-type-table td.c, table.att2-lv-bal-table td.c { text-align: center; }

/* ---------- 规则卡片 ---------- */
.att2-lvr-list { display: flex; flex-direction: column; gap: 8px; }
.att2-lvr-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card-bg); overflow: hidden; }
.att2-lvr-card.is-off { opacity: .6; }
.att2-lvr-card .hd {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--bg);
}
.att2-lvr-card .hd .ttl { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.att2-lvr-card .hd .nm { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.att2-lvr-card .hd .code { font-size: 11px; color: var(--text-faint); }
.att2-lvr-card .hd .mops { display: flex; align-items: center; gap: 10px; flex: none; }
.att2-lvr-card .hd .mops a { font-size: 12px; color: var(--primary); cursor: pointer; line-height: 1.4; }
.att2-lvr-card .hd .mops a[data-mv] { font-size: 14px; color: var(--text-muted); }
.att2-lvr-card .hd .mops a[data-mv]:hover { color: var(--primary); }
.att2-lvr-card .hd .mops a:hover { text-decoration: underline; }
.att2-lvr-card .hd .mops a.danger { color: var(--danger, #E5484D); }
.att2-lvr-card .bd { padding: 8px 12px 9px; display: flex; flex-direction: column; gap: 4px; }
.att2-lvr-card .bd .row { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; }
.att2-lvr-card .bd .row .k { flex: none; width: 34px; color: var(--text-faint); }
.att2-lvr-card .bd .row .v { color: var(--text); word-break: break-word; }
.att2-lvr-card .bd .row .v.act { color: var(--text-strong); font-weight: 500; }
.att2-lvr-card .bd .row.meta { font-size: 11.5px; color: var(--text-faint); gap: 14px; flex-wrap: wrap; }
.att2-lvr-card .bd .row.meta .rm { color: var(--text-muted); }

/* ---------- 条件构建器 ---------- */
.att2-lv-condh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; color: var(--text-muted); }
.att2-lv-condh .hint { font-size: 11.5px; color: var(--text-faint); margin-left: 4px; }
.att2-lv-crow {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 7px; background: var(--bg);
}
.att2-lv-crow select, .att2-lv-crow input { height: 28px; font-size: 12.5px; }
.att2-lv-crow .vwrap { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.att2-lv-crow > select { flex: none; max-width: 230px; }
.att2-lv-crow .vwrap input, .att2-lv-crow .vwrap select { flex: none; }
.att2-lv-crow .u, .att2-lv-crow .ar { font-size: 12px; color: var(--text-faint); }
.att2-lv-crow .del {
  margin-left: auto; width: 20px; height: 20px; line-height: 18px; text-align: center;
  border-radius: 50%; color: var(--text-faint); cursor: pointer; font-style: normal;
}
.att2-lv-crow .del:hover { background: rgba(229,72,77,.12); color: var(--danger, #E5484D); }

.att2-lv-vars { margin-top: 8px; font-size: 11.5px; color: var(--text-faint); line-height: 2; }
.att2-lv-vars code {
  padding: 1px 5px; margin: 0 4px 0 0; border-radius: 4px;
  background: var(--ring-base); color: var(--text-muted); font-size: 11px;
}

table.att2-lv-tier { width: 460px; max-width: 100%; border-collapse: collapse; margin-top: 4px; }
table.att2-lv-tier th { font-size: 11.5px; color: var(--text-faint); font-weight: 500; text-align: left; padding: 4px 6px; }
table.att2-lv-tier td { padding: 3px 6px; }
table.att2-lv-tier input, table.att2-lv-tier select { height: 28px; width: 100%; font-size: 12.5px; }
table.att2-lv-tier td.c { text-align: center; }
table.att2-lv-tier .del { color: var(--text-faint); cursor: pointer; font-style: normal; }
table.att2-lv-tier .del:hover { color: var(--danger, #E5484D); }

/* ---------- 余额条 ---------- */
.att2-lv-bar { height: 5px; border-radius: 3px; background: var(--ring-base); overflow: hidden; min-width: 60px; }
.att2-lv-bar > i { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width .2s; }

/* ---------- 试算轨迹 ---------- */
.att2-lv-try { display: flex; flex-direction: column; gap: 10px; }
#att2LvTryModal .modal-body, #att2LvLogModal .modal-body { max-height: 74vh; overflow: auto; }
.att2-lv-try .ctx {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  padding: 9px 12px; border-radius: 8px; background: var(--ring-base);
  font-size: 12px; color: var(--text-muted);
}
.att2-lv-try .ctx b { color: var(--text-strong); font-size: 13px; }
.att2-lv-try .step { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.att2-lv-try .step .sh {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.att2-lv-try .step .sh b { color: var(--text-strong); }
.att2-lv-try .step .sh span { font-size: 11.5px; color: var(--text-faint); }
.att2-lv-try .step .sb { padding: 10px 12px; }
.att2-lv-try .tr { font-size: 12px; color: var(--text-muted); line-height: 1.9; }
.att2-lv-try .val { margin-top: 6px; font-size: 12.5px; color: var(--text); }
.att2-lv-try .val b { font-size: 15px; color: var(--primary); }
.att2-lv-try .val .att2-lv-code { margin-left: 8px; }
.att2-lv-try .bal { font-size: 12.5px; color: var(--text-muted); }
.att2-lv-try .bal b { color: var(--text-strong); font-size: 14px; }
.att2-lv-try .bal b.neg { color: var(--danger, #E5484D); }
.att2-lv-try .ord { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att2-lv-try .ord .it {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 4px; border-radius: 20px; background: var(--ring-base);
  font-size: 12px; color: var(--text);
}
.att2-lv-try .ord .it i {
  width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 10px; display: flex; align-items: center; justify-content: center; font-style: normal;
}
.att2-lv-try .ord .ar { color: var(--text-faint); font-size: 12px; }
.att2-lv-try .chk { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.7; padding: 3px 0; }
.att2-lv-try .chk i {
  flex: none; width: 16px; height: 16px; border-radius: 50%; font-style: normal;
  font-size: 10px; display: flex; align-items: center; justify-content: center; color: #fff; margin-top: 2px;
}
.att2-lv-try .chk.ok i { background: var(--success, #0E9F6E); }
.att2-lv-try .chk.warn i { background: var(--warning, #FBBC04); }
.att2-lv-try .chk.bad i { background: var(--danger, #E5484D); }
.att2-lv-try .chk em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--text-faint); }
.att2-lv-try .verdict { padding: 10px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; }
.att2-lv-try .verdict.pass { background: rgba(14,159,110,.10); color: var(--success, #0E9F6E); }
.att2-lv-try .verdict.block { background: rgba(229,72,77,.10); color: var(--danger, #E5484D); }
.att2-lv-try .verdict .skip { margin-left: 10px; font-weight: 400; font-size: 11.5px; color: var(--text-faint); }

@media (max-width: 1280px) {
  .att2-lv-seg > span { padding: 5px 10px; font-size: 12px; }
  .att2-lvr-card .hd { flex-wrap: wrap; }
}

/* ============================================================
   考勤配置弹窗（.att2-modal）浮窗化后的适配
   - floatwin 把 .modal 移进 .float-win__body，原 #id 选择器不再命中，
     故这里按结构还原「铺满浮窗」；弹窗宽度/高度由 inline 100% 控制。
   - 标题栏给拖拽手势，右下角缩放手柄已由 floatwin 统一渲染。
   ============================================================ */
.float-win__body > .att2-modal-card,
.float-win__body > .modal.modal-wide.att2-modal-card,
.float-win__body > .modal.modal-narrow.att2-modal-card {
  width: 100%; max-width: none; height: 100%; max-height: none;
  /* 2026-10-30：压过 css_base .modal 的 min-width:320 —— 320 > 浮窗默认最小宽 260，
     会出现「窗口 260 / 卡片 320」右侧截断。设 340 让 floatwin 把它透传为浮窗最小宽
     （floatwin.js 读 computed minWidth → opts.minWidth），窗口最小 340px 时表单恰为 1 列、完整显示。 */
  min-width: 340px;
}
.float-win__body > .att2-modal-card > .modal-head { cursor: move; }
.float-win__body > .att2-modal-card > .modal-body { min-height: 0; }
/* 三段分区在矮窗口下可整体滚动，底部按钮始终可见 */
.float-win__body > .att2-modal-card { display: flex; flex-direction: column; }
.float-win__body > .att2-modal-card > .modal-foot { flex: 0 0 auto; }

/* ============================================================
 * 考勤白名单（豁免判定层 · 2026-10-30）
 * ============================================================ */
.att2-wl-note {
  margin: 0 0 12px; padding: 10px 14px; border-radius: 8px;
  background: var(--info-bg, rgba(26,115,232,.06)); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted); line-height: 1.6;
}
.att2-wl-note b { color: var(--text-strong); }

.att2-wl-bar .spacer { flex: 1; }

.att2-pick-list { padding: 4px; }
.att2-pick-item {
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.att2-pick-item:hover { background: var(--hover-bg, rgba(0,0,0,.04)); }
.att2-pick-item .sub { font-size: 12px; color: var(--text-faint); }

.att2-wl-exempt {
  padding: 10px 12px; border-radius: 8px; background: rgba(52,168,83,.12);
  color: #1E7E34; font-weight: 600; font-size: 14px;
}
.att2-wl-exempt small { display: block; font-weight: 400; color: var(--text-muted); margin-top: 4px; }
.att2-wl-noex {
  padding: 10px 12px; border-radius: 8px; background: var(--ring-base, #eee);
  color: var(--text-muted); font-weight: 600; font-size: 14px;
}

.att2-pager { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); }
.wl-pager-info { font-size: 13px; color: var(--text-muted); }
.wl-pg:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
 * 2026-10-30 班次表单（参考「新增班次」模型）：多次上下班段卡片 /
 * 打卡时间范围 / 弹性打卡 / 工时汇总 / 更多设置（上下式标签布局）
 * ============================================================ */
/* 2026-10-31 字段标题行：标签文字 + 行内超链接（如「上下班时间 ＋添加一段」），链接与文字竖向居中 */
.att2-fld-hd { display: flex; align-items: center; gap: 10px; }
.att2-fld-hd > a { font-size: 12px; color: var(--primary); cursor: pointer; text-decoration: none; }
.att2-fld-hd > a:hover { text-decoration: underline; }
.att2-segs { display: flex; flex-direction: column; gap: 8px; }
.att2-seg { border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); overflow: hidden; }
.att2-seg-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 10px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted);
  background: var(--ring-base, #f6f7f9); }
.att2-seg-del { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; font-style: normal; font-size: 14px; line-height: 1; cursor: pointer; color: var(--text-faint); }
.att2-seg-del:hover { background: rgba(234, 67, 53, .12); color: #C5221F; }
.att2-seg-bd { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; }
.att2-seg.att2-seg-card { display: block; grid-template-columns: none; }
.att2-seg-hd-r { display: inline-flex; align-items: center; gap: 10px; }
.att2-seg-row { display: flex; align-items: flex-end; gap: 8px 10px; flex-wrap: wrap; }
.att2-seg-row > label { flex: 1 1 0; min-width: 100px; }
/* 2026-10-31 自绘时间选择弹层（点输入框弹出，小时/分钟两列点选） */
.att2-form input.seg-time, .att2-form input.seg-range { cursor: pointer; }
.atr-timepop { position: fixed; z-index: 9600; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.20); overflow: hidden; }
.atr-timepop-cols { display: flex; }
.atr-timepop-col { width: 56px; height: 208px; overflow-y: auto; padding: 4px 0; text-align: center;
  border-right: 1px solid var(--border); scrollbar-width: thin; }
.atr-timepop-col:last-child { border-right: 0; }
.atr-timepop-col i { display: block; font-style: normal; font-size: 13px; line-height: 26px;
  color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; }
.atr-timepop-col i:hover { background: var(--hover-bg, rgba(0,0,0,.06)); }
.atr-timepop-col i.on { background: var(--primary); color: #fff; }
.atr-timepop-ft { display: flex; justify-content: flex-end; padding: 5px 10px; border-top: 1px solid var(--border); }
.atr-timepop-ft a { font-size: 12px; color: var(--danger, #E5484D); text-decoration: none; }
.atr-timepop-ft a:hover { text-decoration: underline; }
/* 标识色：取色块 + HEX 文本 */
.att2-color-row { display: flex; align-items: center; gap: 8px; }
.att2-color-row input[type="color"] { width: 48px; height: 32px; padding: 2px 3px; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); cursor: pointer; }
.att2-color-hex { font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.att2-punch-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 8px;
  padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; }
.att2-punch-range > label { flex: 1 1 130px; min-width: 0; }
.att2-punch-range .hint { flex: 1 1 100%; }
.att2-check-col { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.att2-inline-check { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att2-inline-txt { font-size: 12px; color: var(--text-muted); }
.att2-mini-num { width: 68px !important; height: 28px !important; padding: 0 6px !important; }
/* 休息时间段输入（原生 type=time，28px 高、104px 宽含框内时钟位，与 mini-num 同排） */
.att2-rest-t { width: 104px !important; height: 28px !important; padding: 0 4px !important; padding-right: 26px !important; }
/* 时间输入：原生 type=time 系统级分段识别；隐藏系统下拉指示器（点选走框内时钟按钮弹自绘面板） */
.att2-form input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
[data-theme="dark"] .att2-form input[type="time"] { color-scheme: dark; }
/* 时间字体：等宽数字 + 轻字距，分段对齐更整洁 */
.att2-form input[type="time"] { font-variant-numeric: tabular-nums; letter-spacing: .5px; font-weight: 500; }
/* 时钟按钮置于输入框内部右缘（容器 relative + 图标 absolute，输入框右侧留白） */
.seg-twrap { position: relative; display: flex; align-items: center; width: 100%; }
.seg-twrap input[type="time"] { flex: 1 1 auto; min-width: 0; width: auto !important; padding-right: 30px; }
.att2-tbox { position: relative; display: inline-flex; }
.att2-tbox input[type="time"] { width: 104px !important; padding-right: 28px; }
.seg-clock { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px; cursor: pointer; color: var(--text-faint); }
.seg-clock:hover { background: var(--ring-base, rgba(0,0,0,.06)); color: var(--primary, #1A73E8); }
.seg-clock svg { display: block; }
.att2-mini-sel { width: auto !important; min-width: 86px; height: 28px !important; padding: 0 4px !important; font-size: 12px !important; }
/* 晚走次日可晚到：规则构建器行 */
.att2-rule-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px;
  border: 1px dashed var(--border); border-radius: 6px; background: var(--ring-base, #f6f7f9); }
.att2-rule-row .att2-mini-sel { min-width: 78px; }
.att2-rule-del { font-style: normal; color: var(--text-faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.att2-rule-del:hover { color: var(--danger); background: rgba(217, 48, 37, .08); }
.att2-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--ring-base, #f6f7f9); font-size: 12px; color: var(--text-muted); }
.att2-sum-label { font-weight: 600; color: var(--text-strong); }
.att2-sum-txt { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.att2-sum-txt b { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.att2-sum .att2-mini-num { width: 52px !important; }
.att2-more { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.att2-more-hd { font-size: 12px; font-weight: 600; color: var(--text-strong); }

/* ===== 2026-10-31：下拉全部升级 wb-combo（可输入筛选 + 空默认）后的尺寸适配 ===== */
.att2-form .wb-combo { width: 100%; }
.att2-form .att2-check-row .wb-combo, .att2-form .att2-inline-check .wb-combo { width: auto; min-width: 110px; }
.att2-form .att2-check-row .wb-combo-input, .att2-form .att2-inline-check .wb-combo-input { width: 110px; height: 28px; padding: 0 6px; }
.att2-rule-row .wb-combo { width: auto; min-width: 96px; }
.att2-rule-row .wb-combo-input { width: 96px; height: 28px; padding: 0 6px; }
.att2-rule-row .wb-combo-list { min-width: 100%; }\r\n/* 休息时间段（可多段）：行容器纵向排列，与加班时段同款虚线框行 */
#sfRestSpanWrap { flex-wrap: wrap; align-items: center; row-gap: 6px; }
#sfRestRows { width: 100%; display: flex; flex-direction: column; gap: 6px; }
#sfRestRows .att2-rule-row { flex-wrap: nowrap; }
#sfRestLocked { color: var(--text-faint, #999); }
/* 添加加班时段/添加规则/添加休息时段 链接：紧跟按钮之后同行、与按钮竖向居中；仅悬停显示下划线（与「添加一段」同款样式） */
.att2-check-row > a, .att2-inline-check > a { margin-left: 10px; font-size: 12px; color: var(--primary, #1A73E8); white-space: nowrap; text-decoration: none; }
.att2-check-row > a:hover, .att2-inline-check > a:hover { text-decoration: underline; }
/* 2026-10-31 打卡范围四项与上下班时间同行显示：分钟项可弹性收窄（最小≈1个时间输入框宽），放不下自动换行 */
.att2-seg-punchrow > label.punch { flex: 1 1 0; min-width: 100px; }
.seg-mwrap { display: flex; align-items: center; gap: 4px; width: 100%; }
.att2-form input.seg-min { flex: 1 1 auto; min-width: 0; width: auto !important; text-align: center; padding: 0 4px !important; }
.min-unit { font-size: 11px; color: var(--text-faint); flex: none; }
/* 2026-12-04 P1 工厂班次段级：下班必选项目 / 实时拍照（工时按时间段识别，无独立字段） */
.att2-seg-facrow { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--border, #DADCE0); }
.att2-seg-facrow > label.att2-check { flex: 0 1 auto; min-width: 96px; align-self: center; gap: 5px; }
/* ===== 2026-10-31：弹性打卡 3 个勾选项各带展开面板（勾选即展开对应条件/规则） ===== */
.att2-flex-panel { display: none; flex-direction: column; gap: 6px; align-self: stretch; padding: 4px 0 2px 24px; }
.att2-flex-panel.open { display: flex; }
.att2-scope-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12px; }
.att2-radio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text); cursor: pointer; white-space: nowrap; }
.att2-radio input { accent-color: var(--primary, #1A73E8); margin: 0; flex: none; }
.att2-rule-block { flex-direction: column; align-items: flex-start; gap: 4px; }
.att2-rule-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att2-rule-ex { font-size: 11.5px; color: var(--text-faint, #999); padding-left: 2px; }
/* 2026-10-31 加班时段/晚走规则行容器：与休息时段(#sfRestRows)同款纵向排列+间隔 */
#sfOtRanges, #sfNextRules { display: flex; flex-direction: column; gap: 6px; }
/* ===== 2026-10-31：计算规则改按钮框单选（att2-check 同款外观，radio 自绘圆点），一行放置 ===== */
.att2-check input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; flex: none; margin: 0;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--card-bg); vertical-align: -2px;
}
.att2-check input[type="radio"]:checked {
  border-color: var(--primary);
  background: radial-gradient(circle, var(--primary) 0, var(--primary) 3.5px, transparent 4.5px);
}
.att2-form label.att2-check.att2-radio-btn { flex-direction: row; }
.att2-scope-row .att2-check { max-width: 100%; }
/* ===== 2026-10-31：弹性面板行首黑色圆点（便于识别两行是分开的数据行） ===== */
.att2-flex-panel > .att2-inline-check::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: #333; flex: none;
}

/* ===== 2026-10-31 班次负责人：内联搜索多选弹层 ===== */
.att2-leadpick { display: flex; flex-direction: column; gap: 6px; }
.att2-lead-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.att2-lead-chips:empty { display: none; }
.att2-leadpick input#sfLeaderAnchor { width: 100%; box-sizing: border-box; height: 32px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text);
  font-size: 12.5px; padding: 0 10px; }
.att2-leadpick input#sfLeaderAnchor::placeholder { color: var(--text-faint); }
.att2-lead-pop { position: fixed; z-index: 9600; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.20); overflow: hidden; }
.att2-lead-kw { width: 100%; box-sizing: border-box; height: 34px; padding: 0 10px;
  border: 0; border-bottom: 1px solid var(--border); background: var(--card-bg); color: var(--text); font-size: 13px; outline: none; }
.att2-lead-list { max-height: 240px; overflow-y: auto; padding: 4px 0; scrollbar-width: thin; }
.att2-lead-item { display: flex; align-items: center; gap: 6px; padding: 7px 10px; cursor: pointer; font-size: 13px; color: var(--text); }
.att2-lead-item:hover { background: var(--hover-bg, rgba(0,0,0,.06)); }
.att2-lead-item b { font-weight: 500; }
.att2-lead-item .sub { color: var(--text-faint); font-size: 12px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.att2-lead-item .ck { flex: none; width: 16px; height: 16px; margin-left: 4px; border: 1px solid var(--border); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; color: #fff; background: var(--card-bg); }
.att2-lead-item.on .ck { background: var(--primary); border-color: var(--primary); }
.att2-lead-item.on .ck::after { content: '✓'; }
.att2-lead-empty { padding: 18px 10px; text-align: center; color: var(--text-faint); font-size: 12.5px; }
.att2-lead-foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); }
.att2-lead-sel { font-size: 12px; color: var(--text-faint); }

/* ===== 2026-10-31 班次管理：左右分栏 + 只读详情 + 文本左对齐/数字右对齐 ===== */
.att2-shift-layout { display: flex; gap: 10px; align-items: stretch; flex: 1; min-height: 0; }
.att2-shift-layout > .att2-shift-list { flex: 1 1 0%; min-width: 320px; min-height: 0; display: flex; flex-direction: column; }
/* 2026-11-02 班次列表 38 列全量字段：单元格不换行，容器横向滚动，JSON 列省略号+悬浮全文 */
.att2-shift-layout > .att2-shift-list .table-wrap { overflow: auto; min-width: 0; }
#att2ShiftTable td { white-space: nowrap; }
#att2ShiftTable td > span[title] { display: inline-block; max-width: 176px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* 2026-11-02 详情面板默认常驻：左右分区为默认布局，未选中时右侧显示空态占位 */
.att2-shift-detail { flex: 1 1 0%; min-width: 320px; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.att2-shift-detail-empty {
  height: 100%; min-height: 220px; display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); text-align: center; padding: 24px; font-size: 13px;
  background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: var(--radius, 12px);
}
.att2-shift-detail-inner { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.att2-dt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius, 12px); flex: 0 0 auto; }
.att2-dt-title { font-size: 16px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 10px; }
.att2-dt-sub { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.att2-dt-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.att2-dt-body { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 14px 16px; }
.att2-dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; }
.att2-dt-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.att2-dt-row.wide { grid-column: 1 / -1; }
.att2-dt-row .att2-dt-k { font-size: 11.5px; color: var(--text-faint); }
.att2-dt-row .att2-dt-v { font-size: 13px; color: var(--text); word-break: break-word; line-height: 1.7; }
/* 文本列左对齐（击穿 .data-table td 的 text-align:center） */
.data-table td.att2-txt { text-align: left; }

/* ===== 2026-10-31 班次详情：时段小卡片 + 修改历史 ===== */
.att2-segline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.att2-segcard { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card-bg); min-width: 92px; }
.att2-segcard i { font-style: normal; font-size: 15px; line-height: 1; }
.att2-segcard b { font-size: 11.5px; color: var(--text-faint); font-weight: 500; }
.att2-segcard span { font-size: 13px; color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.att2-segcard.on { border-color: #34A853; background: rgba(52,168,83,.08); }
.att2-segcard.on b { color: #34A853; }
.att2-segcard.off { border-color: #E8710A; background: rgba(232,113,10,.08); }
.att2-segcard.off b { color: #E8710A; }
.att2-segcard.rest { border-color: #1A73E8; background: rgba(26,115,232,.08); }
.att2-segcard.rest b { color: #1A73E8; }
.att2-dt-hist .att2-dt-sec-h { font-size: 12.5px; font-weight: 600; color: var(--text-strong); margin-bottom: 8px; }
.att2-dt-hist-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.att2-dt-hist-row:last-child { border-bottom: 0; }
.att2-dt-hist-row .t { font-weight: 500; color: var(--text); }
.att2-dt-hist-row .o { color: var(--text-muted); }
.att2-dt-hist-row .ts { margin-left: auto; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ===== 2026-10-31 班次详情 v2：参考版式（徽标头部 + 24h 时段轴 + 规则小卡片组） ===== */
.att2-dt2-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.att2-dt2-title { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--text-strong); }
.att2-dt2-title b { font-weight: 600; }
.att2-dt2-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.att2-badge { display: inline-flex; align-items: center; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 400; }
.att2-badge.on { color: #1E8E3E; background: rgba(52,168,83,.12); }
.att2-badge.off { color: #9AA0A6; background: rgba(154,160,166,.16); }
.att2-dt2-sub { margin-top: 6px; font-size: 12px; color: var(--text-faint); }
.btn-danger-ghost { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 6px;
  border: 1px solid rgba(234,67,53,.45); background: var(--card-bg); color: #D93025; font-size: 13px; cursor: pointer; }
.btn-danger-ghost:hover { background: rgba(234,67,53,.06); }
/* 24h 时段轴 */
.att2-tl-card .att2-kcard-h { margin-bottom: 10px; }
.att2-tl { position: relative; height: 36px; border-radius: 8px; background: var(--hover-bg, #F1F3F4); overflow: hidden; }
/* 2026-11-02 跨天分两行：当天/次日各一行，共用下方刻度 */
.att2-tl-rows { display: flex; flex-direction: column; gap: 6px; }
.att2-tl-row { display: flex; align-items: center; gap: 8px; }
.att2-tl-daylab { flex: none; width: 40px; text-align: right; font-size: 11px; color: var(--text-faint); }
.att2-tl-row .att2-tl { flex: 1; min-width: 0; }
.att2-tl-rows + .att2-tl-axis { margin-left: 48px; }
.att2-tl-blk { position: absolute; top: 5px; bottom: 5px; border-radius: 5px; background: var(--primary, #1A73E8);
  color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  white-space: nowrap; padding: 0 4px; box-sizing: border-box; }
.att2-tl-blk.rest { background: #F9AB00; }
.att2-tl-axis { position: relative; height: 18px; margin-top: 4px; font-size: 11px; color: var(--text-faint); }
.att2-tl-axis span { position: absolute; top: 0; transform: translateX(-50%); }
.att2-tl-note { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.att2-tl-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.att2-tl-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.att2-tl-legend .lg-work { background: var(--primary, #1A73E8); }
.att2-tl-legend .lg-rest { background: #F9AB00; }
.att2-tl-legend .lg-cross { background: var(--text-faint); }
/* 规则小卡片组 */
.att2-dt2-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
/* 负责人 / 修改历史各占一行 */
.att2-dt2-foot { display: flex; flex-direction: column; gap: 10px; }
.att2-kcard { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px 10px; min-width: 0; }
.att2-kcard-h { font-size: 13px; font-weight: 600; color: var(--text-strong); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.att2-kico { font-style: normal; font-size: 14px; flex: none; }
.att2-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.att2-kv:last-child { border-bottom: 0; }
.att2-kv .k { color: var(--text-faint); flex: none; }
.att2-kv .v { color: var(--text-strong); font-weight: 500; text-align: right; word-break: break-word; }
.att2-flex-li { font-size: 12.5px; color: var(--text); line-height: 1.7; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.att2-flex-li:last-child { border-bottom: 0; }
.att2-flex-none { font-size: 12.5px; color: var(--text-faint); padding: 6px 0; }
.att2-chips-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
@media (max-width: 1100px) { .att2-dt2-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .att2-dt2-cards { grid-template-columns: 1fr; } }

/* 2026-11-02 考勤组详情 v2（参考设计稿）：统计行 + 子 tab + 双列字段栅格 */
.att2-dt2-stats { display: flex; flex-wrap: wrap; gap: 10px 32px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; }
.att2-dt2-stats .att2-stat { display: flex; flex-direction: column; gap: 3px; min-width: 88px; }
.att2-dt2-stats .att2-stat .k { font-size: 11px; color: var(--text-faint); }
.att2-dt2-stats .att2-stat .v { font-size: 13px; color: var(--text-strong); font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.att2-dt2-stats .att2-stat-num { color: var(--primary); }
.att2-dt2-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); background: var(--card-bg);
  border-radius: 12px 12px 0 0; border: 1px solid var(--border); border-bottom: none; padding: 4px 8px 0; margin-top: 2px; }
.att2-dt2-tabs span { padding: 7px 14px; font-size: 13px; color: var(--text-muted); cursor: pointer;
  border-radius: 8px 8px 0 0; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 5px; user-select: none; }
.att2-dt2-tabs span:hover { color: var(--text-strong); }
.att2-dt2-tabs span.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; background: var(--hover-bg, #F1F3F4); }
.att2-dt2-tabs .att2-tab-badge { font-style: normal; font-size: 11px; line-height: 16px; background: var(--hover-bg, #F1F3F4);
  color: var(--text-muted); border-radius: 8px; padding: 0 6px; }
.att2-dt2-tabs span.on .att2-tab-badge { background: var(--primary); color: #fff; }
.att2-dt2-pane-wrap { background: var(--card-bg); border: 1px solid var(--border); border-radius: 0 0 12px 12px; padding: 14px 16px; }
.att2-dt2-pane { display: none; }
.att2-dt2-pane.on { display: block; }
.att2-dt2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.att2-dt2-grid .att2-dt2-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.att2-dt2-grid .att2-dt2-field.full { grid-column: 1 / -1; }
.att2-dt2-grid .att2-dt2-field .k { font-size: 11px; color: var(--text-faint); }
.att2-dt2-grid .att2-dt2-field .v { font-size: 13px; color: var(--text-strong); word-break: break-all; }
.att2-dt2-grid .att2-dt2-field .v b { font-weight: 600; }
/* 考勤组详情：显式成员「＋ 添加」快捷入口 */
.att2-dt2-mem-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.att2-dt2-mem-hd .k { font-size: 11px; color: var(--text-faint); }
.att2-mini-add { flex: none; padding: 2px 10px; font-size: 12px; line-height: 1.6; border-radius: 6px; border: 1px solid var(--border); background: var(--card-bg); color: var(--primary); cursor: pointer; }
.att2-mini-add:hover { background: var(--primary-soft, #E8F0FE); }

/* ===== 2026-11-02 详情头部按钮紧凑化：班次/考勤组详情头统一收小，仅作用于本区域，不影响全局按钮 ===== */
.att2-dt2-head { align-items: center; }
.att2-dt2-head .att2-dt-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.att2-dt2-head .att2-dt-actions .btn-secondary,
.att2-dt2-head .att2-dt-actions .btn-danger-ghost,
.att2-dt2-head .att2-dt-actions .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  height: 26px; padding: 0 12px; border-radius: 6px;
  font-size: 12px; font-weight: 400; line-height: 1; letter-spacing: 0;
  transition: all .15s; cursor: pointer;
}
.att2-dt2-head .att2-dt-actions .btn-secondary {
  background: var(--card-bg); color: var(--text); border: 1px solid var(--border); box-shadow: none;
}
.att2-dt2-head .att2-dt-actions .btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--bg); }
.att2-dt2-head .att2-dt-actions .btn-danger-ghost {
  height: 26px; padding: 0 12px; border: 1px solid rgba(234,67,53,.4); background: var(--card-bg); color: #D93025;
}
.att2-dt2-head .att2-dt-actions .btn-danger-ghost:hover { background: rgba(234,67,53,.06); border-color: rgba(234,67,53,.65); }
.att2-dt2-head .att2-dt-actions .btn-ghost {
  width: 26px; height: 26px; padding: 0; flex: none;
  background: var(--card-bg); color: var(--text-faint); border: 1px solid var(--border);
  font-size: 12px;
}
.att2-dt2-head .att2-dt-actions .btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--bg); }

/* ===== 2026-11-02 考勤组「更多 ▾」下拉弹层（body 级单例，anchorFixedList 定位） ===== */
.att2-more-caret { font-size: 9px; transform: translateY(-1px); display: inline-block; color: var(--text-faint); }
.att2-more-pop { position: fixed; z-index: 4600; min-width: 152px; padding: 4px;
  background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.13); }
.att2-more-item { padding: 8px 12px; font-size: 13px; border-radius: 6px; cursor: pointer;
  color: var(--text); white-space: nowrap; line-height: 1.2; }
.att2-more-item:hover { background: var(--hover-bg, #F1F3F4); }
.att2-more-item.danger { color: #D93025; }
.att2-more-item.danger:hover { background: rgba(234,67,53,.06); }
.att2-more-sep { height: 1px; margin: 4px 6px; background: var(--border); }

/* ===== 2026-11-03 考勤组表单：钉钉式扩展配置（考勤时间/特殊日期/负责人/地点Wi-Fi/外勤补卡） ===== */
/* 2026-11-03：三个考勤类型卡片改为同一行三列等宽；圆形单选钮自绘成方格勾选（与 .att2-check 复选框同风格） */
.att2-mode-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; margin-bottom: 12px; }
.att2-mode-card { display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; min-width: 0;
  border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--card-bg); }
.att2-mode-card .top { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.att2-mode-card input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px; flex: none; margin: 2px 0 0;
  border: 1px solid var(--border); border-radius: 3px;
  background: var(--card-bg);
}
.att2-mode-card input[type="radio"]:checked {
  border-color: var(--primary);
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4 10-10'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.att2-mode-card b { font-size: 12.5px; color: var(--text-strong); flex: 1 1 auto; min-width: 0;
  white-space: normal; overflow-wrap: break-word; line-height: 1.35; }
.att2-mode-card .desc { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; min-width: 0; overflow-wrap: break-word; }
.att2-mode-card.on { border-color: var(--primary); background: var(--primary-soft, #E8F0FE); }
.att2-mode-card.on b { color: var(--primary); }
.att2-wd-hd { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.att2-wd-hd .k { font-size: 12px; font-weight: 600; color: var(--text-strong); margin-right: auto; white-space: nowrap; flex: none; }
.att2-wd-hd select { width: 200px; flex: none; }
.att2-wd-table { width: 100%; border-collapse: collapse; margin-bottom: 4px; table-layout: fixed; }
.att2-wd-table th, .att2-wd-table td { text-align: left; padding: 5px 8px;
  border-bottom: 1px solid var(--border); font-size: 12px; }
.att2-wd-table th { color: var(--text-faint); font-weight: 500; }
.att2-wd-table th:first-child, .att2-wd-table td:first-child { width: 56%; }
.att2-wd-days { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.att2-wd-days .att2-check { padding: 3px 8px; }
.att2-wd-table .wd-del-td { width: 36px; padding: 5px 4px; text-align: center; }
.att2-wd-table .wd-del { border: none; background: none; cursor: pointer;
  color: var(--text-faint); font-size: 16px; line-height: 1; padding: 2px 6px; }
.att2-wd-table .wd-del:hover { color: #E5484D; }
.att2-wd-table tbody tr:first-child .wd-del { visibility: hidden; }   /* 第一行不显示删除，保证至少一行 */
.att2-wd-add { display: inline-block; margin: 2px 0 6px; font-size: 12px;
  color: var(--primary); cursor: pointer; user-select: none; text-decoration: none; }
.att2-wd-add:hover { text-decoration: underline; }
.att2-wd-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.att2-wd-extra .k { font-size: 12px; font-weight: 600; color: var(--text-strong); margin-right: 4px; white-space: nowrap; flex: none; }
.att2-wd-extra > .att2-check { margin: 0; }
/* 考勤组弹窗：内容组之间虚线分隔（与 .att2-wd-extra 同款）——
   考勤时间卡片里「工作周模式 / 工作日设置」两组补上分隔线，其余各卡片按全宽组分隔。
   上下间距统一 8px（margin-top 控制虚线到上方、padding-top 控制虚线到下方，对称一致） */
.att2-group-form #gfWeekModeBlock,
.att2-group-form #gfWdBlock,
.att2-group-form #gfWdWeekBlock,
.att2-group-form #gfSchedBlock,
.att2-group-form #gfFreeBlock,
.att2-group-form .att2-fsec .att2-form > .full:not(:first-child) {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border);
}
/* 特殊日期：上下式（标题在上、控件在下），避免 flex 横排把标题/输入/标签/提示 wrap 得错乱留白 */
.att2-wd-extra.att2-sd-block { display: flex; flex-direction: column; align-items: flex-start; }
.att2-sd-block > .k { margin-bottom: 2px; }
.att2-sd-row { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; flex-wrap: wrap; }
.att2-sd-row input[type="date"] { width: 220px; max-width: 100%; flex: none; }
.att2-sd-row select { width: 130px; flex: none; }
/* 原生控件被 form_enhance 升级后：select→.wb-combo、date→.date-picker，上面的 width 不再命中，
   需按升级后组件重新限宽，否则 .wb-combo 撑满整行、三个控件逐行竖排（空白大） */
.att2-sd-row .wb-combo { width: 130px; flex: none; }
.att2-sd-row .date-picker { width: 220px; flex: none; }
/* 升级后的日期框内部 .dp-input 是 text input，会误命中上面的 input 规则被固定宽/禁收缩，
   从而把日历图标挤出框外；这里恢复其弹性收缩，让图标回到框内右侧 */
.att2-sd-row .date-picker .dp-input { flex: 1; min-width: 0; width: auto; }
.att2-sd-row #gfSdShift, .att2-sd-row #gfSdShiftWrap .wb-combo { width: 168px; }
.att2-sd-row .att2-wd-add { margin: 0; white-space: nowrap; }   /* 特殊日期「＋ 新增」文字链接，去多余 margin 对齐同排控件 */
/* 2026-11-04：办公地点 / 办公 Wi-Fi 添加行——输入框与「＋ 添加」同处一行。
   .att2-form 的 input[type=text] 默认 width:100%，会把每个框撑满整行导致竖排三行，
   这里复位成弹性伸缩；按钮沿用排班周期的小号规格（26px 高 / 12px 字），不再 35px 突兀。 */
.att2-add-row { flex-wrap: wrap; }
.att2-form .att2-add-row input[type="text"] { flex: 1 1 160px; width: auto; min-width: 160px; max-width: none; }
.att2-add-row > .btn-secondary { flex: none; height: 26px; padding: 0 11px; font-size: 12px; line-height: 1; white-space: nowrap; }
.att2-add-row > .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
/* 特殊日期：无需打卡 / 必须打卡 分组展示 */
.att2-sd-groups { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 2px; }
.att2-sd-group { display: flex; flex-direction: column; gap: 4px; }
.att2-sd-gtitle { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.att2-sd-group .att2-chips { min-height: 22px; }
.att2-sd-chip.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft, #E8F0FE); }
.att2-chip-off { opacity: .62; }
.att2-rc-block { display: block; }
/* 2026-11-04 三轮：休息日打卡规则固定两行——
   ① 每天开始时间 + 隔壁的「休息日打卡需审批」；② 打卡方式两种 + 上/下班打卡间隔。
   每行用 grid 的「控件轨 / 说明轨」两行，说明与所属控件同列，即落在其正下方；
   列宽 max-content 不做等分拉伸，也不再靠 flex-wrap 把说明甩到第三行。 */
.att2-rc-lines { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.att2-rc-line { display: grid; align-items: center; column-gap: 22px; row-gap: 4px; width: max-content; max-width: 100%; }
.att2-rc-line1 { grid-template-columns: max-content max-content; }
.att2-rc-line2 { grid-template-columns: max-content max-content max-content; }
.att2-rc-line > .att2-rc-c1 { grid-column: 1; grid-row: 1; }
.att2-rc-line > .att2-rc-c2 { grid-column: 2; grid-row: 1; }
.att2-rc-line > .att2-rc-c3 { grid-column: 3; grid-row: 1; }
.att2-rc-line > .att2-rc-h1 { grid-column: 1; grid-row: 2; }
.att2-rc-line > .att2-rc-h2 { grid-column: 2; grid-row: 2; }
.att2-rc-i { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.att2-rc-i > .k { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex: none; }
.att2-rc-line .seg-twrap { width: 116px; flex: none; max-width: none; }
.att2-rc-line select, .att2-rc-line .wb-combo { width: 108px; flex: none; box-sizing: border-box; }
.att2-rc-line > label.att2-rc-approve { margin: 0; white-space: nowrap; }
.att2-rc-line > .hint { align-self: start; font-size: 11px; color: var(--text-faint); line-height: 1.5; max-width: none; margin: 0; white-space: nowrap; }
/* 排班制：幽灵按钮 / chip 移除钮（2026-11-04：自定义对班时段改文字链接，att2-sched-card 已废弃） */
.att2-sched-card { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-hover, rgba(127,127,127,.06)); padding: 7px 12px; margin: 4px 0 2px; font-size: 12.5px; color: var(--text-strong); }
.att2-sched-card a { color: var(--primary); text-decoration: none; cursor: pointer; }
.att2-sched-card a:hover { text-decoration: underline; }
.att2-chip .chip-x { font-style: normal; margin-left: 6px; cursor: pointer; opacity: .65; font-weight: 700; }
.att2-chip .chip-x:hover { opacity: 1; }
.att2-ghost-btn { height: 28px; padding: 0 12px; border: 1px dashed var(--border); border-radius: 6px; background: transparent; color: var(--text-strong); font-size: 12.5px; cursor: pointer; }
.att2-ghost-btn:hover { border-color: var(--primary); color: var(--primary); }
#gfSchedBlock > .att2-wd-hd, #gfFreeBlock > .att2-wd-hd { margin-top: 10px; }
#gfSchedBlock > .att2-wd-hd:first-child, #gfFreeBlock > .att2-wd-hd:first-child { margin-top: 0; }
.att2-fsec .att2-chips { margin-top: 2px; }

/* ============================================================
 * 厂长日审 · 移动端卡片化（钉钉 H5 窄屏适配，≤768px）
 * 仅作用于工时分配视图，不影响其它 data-table。
 * ============================================================ */
@media (max-width: 768px) {
  /* 工具栏换行堆叠，筛选/按钮占满宽度 */
  #view-att2-worklog .toolbar { flex-wrap: wrap; gap: 8px; }
  #view-att2-worklog .toolbar-left,
  #view-att2-worklog .toolbar-right { flex-wrap: wrap; width: 100%; gap: 8px; }
  #view-att2-worklog .toolbar-left .filter-input,
  #view-att2-worklog .toolbar-left .field-select { flex: 1 1 140px; min-width: 0; }
  #view-att2-worklog .toolbar-right .btn-secondary { flex: 1 1 auto; }

  /* 取消横向滚动，改为纵向卡片 */
  #view-att2-worklog .table-wrap { overflow: visible; }
  #view-att2-worklog .data-table { width: 100%; }
  #view-att2-worklog .data-table thead { display: none; }

  /* 真实数据行（带 .att2-ops）转卡片；空态/加载行不参与 */
  #view-att2-worklog .data-table tr:has(td.att2-ops) {
    display: block;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    overflow: hidden;
  }
  #view-att2-worklog .data-table tr:has(td.att2-ops) td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
  }
  #view-att2-worklog .data-table tr:has(td.att2-ops) td:last-child { border-bottom: none; }
  #view-att2-worklog .data-table tr:has(td.att2-ops) td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.5;
  }
  /* 上午/下午/加班 三段内容较多（工时+工单+标记链接），纵向堆叠更清晰 */
  #view-att2-worklog .data-table tr:has(td.att2-ops) td[data-label*="（工单）"] {
    flex-direction: column;
    align-items: stretch;
  }
  #view-att2-worklog .data-table tr:has(td.att2-ops) td[data-label*="（工单）"]::before { margin-bottom: 4px; }
  /* 放大操作/标记链接的点击区，便于手机点按 */
  #view-att2-worklog .att2-ops a { display: inline-block; padding: 5px 10px; margin: 0 6px 4px 0; border: 1px solid var(--border); border-radius: 6px; }
  #view-att2-worklog .att2-wl-flag { display: inline-block; padding: 5px 7px; margin: 2px 6px 2px 0; }
  /* 空态/加载单行提示居中 */
  #view-att2-worklog .data-table tr:not(:has(td.att2-ops)) td.empty { display: block; text-align: center; padding: 18px; color: var(--text-faint); }
}
