/* 报工系统 · 移动端样式 */
:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e9f0;
  --primary: #1d4ed8;
  --primary-soft: #eaf0ff;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fdf1e0;
  --danger: #b91c1c;
  --danger-soft: #fdeaea;
  --info: #1d4ed8;
  --info-soft: #eaf0ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 18px rgba(15, 23, 42, .04);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { min-height: 100vh; }

button, input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}
input[readonly] { background: #f8fafc; color: var(--muted); }
textarea { resize: vertical; min-height: 60px; }

.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ---------- 顶栏 ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-top, 0px));
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-title { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.hdr-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: -2px; }
.hdr-main { flex: 1; min-width: 0; }
.user-chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 46vw;
  white-space: nowrap;
  overflow: hidden;
}
.user-chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.user-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; }

/* ---------- 主体 ---------- */
.view {
  flex: 1;
  padding: 14px 14px calc(84px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, .7);
}
.card-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.card-h .sub { font-weight: 400; color: var(--muted); font-size: 12px; }
/* 卡片头右侧：汇总文字 + 次级入口按钮 */
.hd-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hd-right .sub { font-weight: 400; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-right .btn { flex: none; }
/* 页面顶部的返回条（总表页用） */
.view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -2px 2px 0;
}
.card-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 18px 8px;
}

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* 网格子项默认 min-width:auto 会被 input[type=date]/[type=month] 的固有宽度撑破容器，
 * 横向溢出导致右侧内容（按钮、输入框）被裁切 */
.row2 > * { min-width: 0; }
.view > * { min-width: 0; }

.readonly-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s, opacity .15s, background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: #fff; border-color: #f3c9c9; color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-group { display: flex; gap: 8px; }
.btn-group > .btn { flex: 1; }

/* ---------- 分段控件 ---------- */
.seg {
  display: flex;
  background: #eef2f7;
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}
.seg button.on { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(15,23,42,.1); }

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.sup { background: var(--info-soft); color: var(--info); }
.badge.approved { background: var(--ok-soft); color: var(--ok); }
.badge.rejected { background: var(--danger-soft); color: var(--danger); }
.badge.role { background: #eef2f7; color: #475569; }
.tag {
  font-size: 11px;
  color: var(--muted);
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 7px;
}

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.day-group { display: flex; flex-direction: column; gap: 8px; }
.day-hd {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 2px;
  font-weight: 600;
}
.rec {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rec.sel { border-color: var(--primary); background: var(--primary-soft); }
.rec-check { padding-top: 2px; }
.rec-check input { width: 20px; height: 20px; accent-color: var(--primary); }
.rec-main { flex: 1; min-width: 0; }
.rec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rec-title { font-weight: 600; font-size: 15px; }
.rec-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rec-hours { font-weight: 700; font-size: 15px; color: var(--primary); white-space: nowrap; }
.rec-note { font-size: 12px; color: #475569; margin-top: 6px; background: #f8fafc; border-radius: 6px; padding: 6px 8px; }
.rec-cmt { font-size: 12px; margin-top: 6px; padding: 6px 8px; border-radius: 6px; }
.rec-cmt.sup { background: #f2f6ff; color: #334155; }
.rec-cmt.dir { background: #f0f9f2; color: #334155; }
.rec-cmt.rej { background: var(--danger-soft); color: var(--danger); }
.rec-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- 统计 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 2px; letter-spacing: -.5px; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }

.bar-list { display: flex; flex-direction: column; gap: 12px; }
.bar-item .bar-hd {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 5px;
}
.bar-item .bar-hd .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-item .bar-hd .m { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bar-track { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #1d4ed8); border-radius: 999px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar-inner {
  display: flex;
  width: 100%;
  max-width: 720px;
  gap: 2px;
}
.tabbar button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
}
.tabbar button.on { color: var(--primary); }
.tabbar svg { width: 22px; height: 22px; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(900px 420px at 50% -10%, #e3ecff 0%, rgba(244,246,249,0) 70%),
    var(--bg);
}
.login-head { text-align: center; margin-bottom: 22px; }
.login-logo {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
  margin-bottom: 12px;
}
.login-head h1 { font-size: 20px; margin: 0 0 4px; letter-spacing: .5px; }
.login-head p { margin: 0; font-size: 13px; color: var(--muted); }
.login-card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); border: 1px solid rgba(226,232,240,.8); }
.login-foot { text-align: center; font-size: 11px; color: #94a3b8; margin-top: 18px; line-height: 1.7; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 12px);
  z-index: 90;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  max-width: 86vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: rgba(153, 27, 27, .95); }

/* ---------- 底部弹层 ---------- */
.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, .4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.sheet-mask[hidden] { display: none; }
.sheet {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 86vh;
  overflow: auto;
  animation: up .2s ease-out;
}
@keyframes up { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-hd {
  position: sticky;
  top: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.sheet-x {
  border: 0; background: transparent; font-size: 26px; line-height: 1;
  color: #94a3b8; padding: 0 4px; cursor: pointer;
}
.sheet-bd { padding-bottom: 6px; }

.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}
.menu-item .mi-sub { font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- 管理员 ---------- */
.emp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f1f5f9;
}
.emp-row:last-child { border-bottom: 0; }
.emp-info { flex: 1; min-width: 0; }
.emp-name { font-size: 15px; font-weight: 600; }
.emp-meta { font-size: 12px; color: var(--muted); }
.emp-row select { width: 96px; padding: 7px 26px 7px 10px; font-size: 13px; background-position: right 8px center; }

.proc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed #eef2f7;
  font-size: 14px;
}
.proc-row:last-child { border-bottom: 0; }
.proc-no { width: 30px; color: var(--muted); font-size: 12px; flex: none; }
.proc-name { flex: 1; }
.proc-row.off .proc-name { color: #cbd5e1; text-decoration: line-through; }

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 0 2px;
  letter-spacing: .5px;
}
.section-label:first-child { margin-top: 0; }
.section-label .mini { height: 24px; min-width: 24px; padding: 0 6px; font-size: 15px; line-height: 1; }

.kv { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid #f1f5f9; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; }

.filter-box { display: flex; flex-direction: column; gap: 10px; }
.filter-toggle {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 14px; font-size: 14px; font-weight: 600; width: 100%; cursor: pointer;
}

.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state .big { font-size: 34px; margin-bottom: 8px; opacity: .35; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.foot-note { font-size: 11px; color: #94a3b8; text-align: center; padding: 4px 0 0; }

/* ---------- 复选框 ----------
 * 上方 input 通用样式（appearance:none + padding）会抹掉原生复选框外观，
 * 导致勾选后没有任何视觉变化；此处单独恢复并补上选中态。 */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  position: relative;
  cursor: pointer;
  flex: none;
}
input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 设置页内的开关分段控件：靠右、不换行 */
.kv .seg { flex: none; }
.kv .seg button { padding: 7px 0; font-size: 13px; }

/* ---------- 报工入口卡片 ---------- */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.entry-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.entry-card:active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .08); }
.entry-ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.entry-ic.c-blue { background: #1d4ed8; }
.entry-ic.c-amber { background: #b45309; }
.entry-ic.c-green { background: #047857; }
.entry-t { font-size: 14px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.entry-s { font-size: 11px; color: var(--muted); line-height: 1.4; text-align: center; }

/* ---------- 员工打卡墙 ---------- */
.wall-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 10px;
  font-size: 10.5px;
  color: var(--muted);
}
.wall-legend .lg { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.wall-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }
.wall-legend .wt-swatch-off { background: #fff; border: 1px dashed #cbd5e1; }
.wall-legend .wt-swatch-multi { background: linear-gradient(135deg, #047857 0 50%, #dc2626 50% 100%); }

.wall-grid {
  display: grid;
  grid-template-columns: repeat(var(--wall-cols, 5), minmax(0, 1fr));
  gap: 6px;
}
.wall-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 2px 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #fff;
  line-height: 1.06;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s;
  /* 字号变量由 fitWallText() 按方块实测宽度覆盖；下面是不执行 JS 时的兜底 */
  --fs-name: 18px;
  --fs-h: 13px;
}
.wall-tile:active { transform: scale(.96); }
.wall-tile.wt-off { color: var(--muted); border-style: dashed; }
.wall-tile.wt-blank { border: 1px dashed #eef1f6; background: transparent; cursor: default; }
.wall-tile .wt-name {
  font-size: var(--fs-name);
  font-weight: 800;
  line-height: 1.08;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wall-tile .wt-h {
  font-size: var(--fs-h);
  line-height: 1.08;
  opacity: .96;
  text-align: center;
  max-width: 100%;
  /* 中文只在 fitWallText 插入的 <wbr> 处断行，避免“正常出/勤”这类难看断法 */
  word-break: keep-all;
  overflow-wrap: break-word;
}
.wall-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}



/* ---------- 部门与工序维护 ---------- */
.proc-ops { display: flex; gap: 4px; flex: none; }
.mini {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mini:disabled { opacity: .32; cursor: default; }
.mini.danger { color: var(--danger); border-color: #f3c6c6; background: #fff5f5; }
.mini.add { color: var(--primary); border-color: #c7d7fb; background: #eff4ff; font-weight: 700; }
.proc-row { font-size: 14px; }

/* ---------- 打卡墙 · 当天报工明细 ---------- */
.wr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #eef2f7;
}
.wr-row:last-of-type { border-bottom: 0; }
.wr-main { flex: 1; min-width: 0; }
.wr-t { font-size: 14px; font-weight: 600; }
.wr-n { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wr-h { font-size: 14px; font-weight: 700; white-space: nowrap; }
.wr-ops { display: flex; gap: 4px; flex: none; }
.sheet-sub { font-size: 12px; font-weight: 700; color: var(--muted); margin: 16px 0 2px; letter-spacing: .5px; }
.btn.danger-ghost { color: var(--danger); border-color: #f3c6c6; background: #fff5f5; }

/* ---------- 员工多部门 · 可多选 ---------- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 4px;
}
.dept-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.dept-chip input[type="checkbox"] { width: 20px; height: 20px; min-width: 20px; }
.dept-chip input[type="checkbox"]:checked::after { left: 6px; top: 2px; }
.dept-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-chip.on { border-color: var(--primary); background: #eff6ff; color: var(--primary); font-weight: 700; }
.dept-chip:active { transform: scale(.98); }

/* ---------- 每日报工总时长上限 · 醒目提示（字体偏大，方便年长员工阅读） ---------- */
.cap-note {
  margin: 10px 0 12px;
  padding: 11px 12px;
  border: 1px solid #c7d7fb;
  border-radius: 10px;
  background: #eff4ff;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}
.cap-note b { font-size: 17px; color: var(--primary); }
.cap-hint {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.cap-hint b { color: #b45309; }
.cap-note .cap-seg,
.cap-hint .cap-seg { display: inline-block; white-space: nowrap; }
.cap-note .cap-seg + .cap-seg,
.cap-hint .cap-seg + .cap-seg { margin-left: 10px; }

/* ---------- 危险操作区（清除打卡数据） ---------- */
.card.danger-zone { border: 1px solid #f3c6c6; background: #fffafa; }
.card.danger-zone .card-h { color: var(--danger); }
.card.danger-zone .card-h .sub { color: var(--danger); opacity: .8; }
.card.danger-zone .btn.danger { font-weight: 700; }

/* ---------- 导入备份文件（原生文件选择框要恢复 appearance） ---------- */
input[type="file"].file-input {
  appearance: auto;
  -webkit-appearance: auto;
  padding: 9px 10px;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}
