:root {
  --blue: #1976d2;
  --blue-deep: #1565c0;
  --blue-soft: #e8f2fe;
  --cyan: #4facfe;
  --bg: #eef4fb;
  --card: #ffffff;
  --text: #17212f;
  --text-2: #5b6b80;
  --text-3: #8e9bad;
  --line: #e6eef8;
  --green: #16a34a;
  --orange: #f59e0b;
  --red: #e5484d;
  --purple: #7c5cff;
  --shadow-sm: 0 2px 10px rgba(23, 58, 102, 0.06);
  --shadow-md: 0 10px 30px rgba(23, 58, 102, 0.10);
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-size: 16px;
}

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

html, body { min-height: 100%; }

/* 整页禁止横向滚动：iOS 会把原生表单控件（超长下拉选项文字等）排得比视口宽，
   一旦该控件被系统「横向滚进可视区」，整页就会左移、左列字段与标题被裁。
   只作用于根元素，不产生新的滚动容器，顶部 sticky 与内部横向滚动（表格 / 胶囊组）都不受影响。 */
html { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }

/* ===== 顶部导航 ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(var(--safe-top) + 10px) 16px 14px;
  background: linear-gradient(140deg, #1e88e5 0%, #1976d2 55%, #1157a8 100%);
  color: #fff;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 10px 26px rgba(21, 101, 192, 0.28);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 9px;
  font-size: 13px; font-weight: 800; letter-spacing: .5px;
  line-height: 0;
}
.brand-text { font-size: 14px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }

.scope-select {
  appearance: none;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.32);
  color: #fff;
  border-radius: 9px;
  padding: 6px 26px 6px 10px;
  font-size: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='white' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.scope-select option { color: #17212f; }

.header-title-row { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.header-title { font-size: 25px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.15; }
.header-sub { font-size: 12px; color: rgba(255,255,255,0.78); margin-top: 3px; }
.header-spacer { flex: 1; }

.icon-btn {
  width: 44px; height: 44px; flex: none;
  position: relative;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  transition: transform .15s ease, background .15s ease;
}
/* 消息中心的未读角标：挂在铃铛右上角 */
.icon-btn .icon-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px;
  background: #d64a43; color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center;
}
.icon-btn:active { transform: scale(.94); background: rgba(255,255,255,0.28); }
.icon-btn svg { width: 20px; height: 20px; }
/* 可点击区域统一：消除移动端 300ms 延迟与长按弹出的选择/菜单，编辑一律单击触发 */
[data-action], .btn, .chip, .icon-btn, .section-link, .tab-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
[data-action] { -webkit-touch-callout: none; }

.header-avatar {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.9);
  color: var(--blue-deep);
  font-weight: 800;
  font-size: 14px;
}

/* ===== 内容区 ===== */
.app-content {
  flex: 1;
  padding: 18px 16px calc(92px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.app-content.no-tabs { padding-bottom: calc(28px + var(--safe-bottom)); }

/* 子页面的导航：小屏隐藏底部 tab 栏，桌面宽屏保留左侧固定导航（见文末 ≥1024px） */
@media (max-width: 1023px) {
  .app-shell.no-tabs .tabbar { display: none; }
}

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title { font-size: 17px; font-weight: 750; letter-spacing: -0.2px; }
.section-link {
  font-size: 13px; color: var(--blue); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 6px;
}
.muted { color: var(--text-2); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.strong { font-weight: 700; }

/* ===== 统计卡 ===== */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card {
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 10px 22px rgba(21, 101, 192, 0.18);
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ""; position: absolute; width: 90px; height: 90px; right: -30px; bottom: -36px;
  border-radius: 50%; background: rgba(255,255,255,0.16);
}
.stat-card .stat-label { font-size: 12.5px; font-weight: 600; opacity: .92; }
.stat-card .stat-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.stat-card .stat-foot { font-size: 11px; opacity: .8; }
.stat-blue { background: linear-gradient(135deg, #4facfe 0%, #1f7ae0 100%); }
.stat-orange { background: linear-gradient(135deg, #f7b955 0%, #ef7b45 100%); }
.stat-purple { background: linear-gradient(135deg, #8f7bff 0%, #6b53d8 100%); }
.stat-pink { background: linear-gradient(135deg, #f77fb0 0%, #e0507a 100%); }
.stat-teal { background: linear-gradient(135deg, #35c2c9 0%, #1596a8 100%); }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(25, 118, 210, 0.06);
}
.card.flush { padding: 0; overflow: hidden; }
.card-pad { padding: 16px; }

/* ===== 列表 ===== */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  min-height: 62px;
  transition: background .15s ease;
}
.row:last-child { border-bottom: 0; }
.row:active { background: #f6faff; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-sub { font-size: 12.5px; color: var(--text-2); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* 人员列表行：姓名与「工号 · 岗位 · 车站」同排（对齐 App），空间不足时省略后半段 */
.row-inline-meta {
  font-size: 12.5px; font-weight: 400; color: var(--text-2);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.chevron { color: #bcc8d8; width: 15px; height: 15px; flex: none; }

.avatar {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue-deep);
  font-weight: 700; font-size: 15px;
}
.avatar.green { background: #e6f7ee; color: #0f8a4b; }
.avatar.orange { background: #fff2dd; color: #b36b00; }
.avatar.purple { background: #efebff; color: #6247d6; }
.avatar.pink { background: #ffe9f1; color: #c03a6c; }

.file-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: .3px;
  background: #eef3fa; color: #5a7396;
}
.file-icon.pdf { background: #ffeceb; color: #c93a3a; }
.file-icon.doc, .file-icon.docx { background: #e8f0ff; color: #2c62c9; }
.file-icon.xls, .file-icon.xlsx { background: #e6f7ee; color: #15803d; }
.file-icon.mp4, .file-icon.mov { background: #f1ecff; color: #6b4bd8; }
.file-icon.jpg, .file-icon.png { background: #fff2dd; color: #b36b00; }

/* ===== 分段控件 ===== */
.segmented {
  display: flex; gap: 3px; padding: 3px;
  background: #e6edf6;
  border-radius: 12px;
}
.segmented button {
  flex: 1; padding: 8px 10px; border-radius: 9px;
  font-size: 13px; font-weight: 650; color: var(--text-2);
  transition: all .18s ease;
  white-space: nowrap;
}
.segmented button.active {
  background: #fff; color: var(--blue-deep);
  box-shadow: 0 2px 6px rgba(23, 58, 102, 0.12);
}

/* ===== 搜索 & 筛选 ===== */
/* 搜索框：输入框与「搜索」按钮同一行（表单默认块级会让按钮掉到下一行并压住卡片） */
.search-box { position: relative; display: flex; align-items: center; gap: 8px; }
.search-box input { flex: 1 1 auto; min-width: 0; }
.search-box .chip { flex: 0 0 auto; }
.search-box svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-3);
}
.search-box input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 13px;
  border: 1px solid #dfe8f3;
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
.search-box input:focus { border-color: #9ec7f5; box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.10); }

/* 筛选胶囊组：固定一行显示，按可用宽度均分撑满，左右与页边距对齐、右侧不留空白；
   宽度不够时收紧间距与内边距，极端窄屏才横向滚动 */
.chips { display: flex; flex-wrap: nowrap; gap: 6px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips > .chip, .chips > .chip-select { flex: 1 1 auto; min-width: 0; }
.chips .chip { padding-left: 11px; padding-right: 11px; }
/* 下拉不再限制最大宽度：只有两项时也能各自撑满一半，右侧不留空白 */
.chips .chip-select { max-width: none; }
@media (max-width: 430px) {
  .chips { gap: 5px; }
  .chips .chip { padding-left: 9px; padding-right: 9px; font-size: 12px; }
  .chips .chip-select { padding-left: 16px; padding-right: 16px; font-size: 12px; background-position: right 6px center; }
}
.chip {
  padding: 9px 14px; border-radius: 999px;
  min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #dfe8f3;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  white-space: nowrap;
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
/* 带复选框的 chip（推送渠道等）：选中态用蓝底表达，隐藏原生方框，避免胶囊里再套一个框 */
.chip { position: relative; }
.chip input[type="checkbox"] {
  position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none;
}
/* 匹配的依据条目：名称与分值按普通文字流排版，分值紧跟在文字后面，放不下才整体换行；不溢出弹层 */
.rule-chip {
  display: block;
  white-space: normal; text-align: left; max-width: 100%;
  line-height: 1.45; word-break: break-word;
}
.rule-chip-name { display: inline; }
.rule-chip-score { display: inline; white-space: nowrap; }
/* 日常检查责任人：已选人员胶囊 */
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; }
.pick-chips:empty { display: none; }
.pick-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 10px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-deep);
  font-size: 12.5px; font-weight: 600;
  /* 同行胶囊等分撑满，避免行尾空一块 */
  flex: 1 1 auto; min-width: 0;
}
.pick-chip-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-chip button {
  width: 20px; height: 20px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(25, 118, 210, 0.16);
  color: var(--blue-deep);
  font-size: 12px; line-height: 1;
}
.pick-chip button:active { background: rgba(25, 118, 210, 0.28); }
.range-pill { display: inline-flex; align-items: center; gap: 5px; }
.range-pill svg { width: 13px; height: 13px; flex: none; }
/* 日期胶囊 + 车站筛选排一行，车站靠右（绩效管理 / 安全评比）
   日期区间一律完整显示，宽度不够时车站筛选整块换到下一行（右侧对齐） */
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filter-row .range-pill { flex: none; }
/* 单个筛选胶囊时贴左（如用户管理的区域筛选） */
.filter-row .chip-select:only-child { margin-left: 0; }
/* 胶囊筛选组内的下拉框：不再自动右推，与其余胶囊保持 8px 间距、整体靠左 */
.chips .chip-select { margin-left: 0; }

/* 筛选行：下拉筛选项与日期胶囊成组靠左，主操作按钮（新增/导出）贴右 */
/* 下拉吃掉剩余宽度，行尾与右边距对齐（与 App 端一致），不再在右侧留白 */
.filter-row .chip-select { margin-left: 0; flex: 1 1 auto; max-width: none; }
.filter-row > .btn { margin-left: auto; flex: none; white-space: nowrap; }
/* 筛选行里的新增按钮（如日常检查）用与旁边胶囊同款的白底按钮，不再用蓝色文字链 */
.filter-row > .filter-add { flex: none; }

/* 人员调动：同一张卡片内两列——左侧目标区域/目标车站/调动原因，右侧选择员工 + 提交，窄屏堆叠 */
.transfer-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px 20px; align-items: start; }
.transfer-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.transfer-fields .field { margin-bottom: 0; }
.transfer-picker { min-width: 0; }
/* 已选人员胶囊条：勾选后在标题下方直接显示选了谁，点 × 移除 */
.transfer-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; max-height: 66px; overflow-y: auto; }
.transfer-pick { min-height: 0; padding: 5px 10px; gap: 4px; font-size: 12px; background: #eaf3ff; border-color: #cfe3fb; color: var(--blue); }
.transfer-pick .x { font-size: 13px; font-weight: 700; opacity: .7; }
@media (max-width: 900px) {
  .transfer-grid { grid-template-columns: 1fr; }
}

/* 手机端筛选行里的新增入口撑满整行，便于点按 */
@media (max-width: 640px) {
  .filter-row > .filter-add { flex: 1 0 100%; }
}
.chip-select {
  -webkit-appearance: none; appearance: none;
  margin-left: auto;
  flex: none; max-width: 46%; min-width: 0;
  /* 与 .chip 胶囊同高（40px），日期区间按钮旁边的车站筛选不再矮一截 */
  min-height: 40px;
  /* 左右内边距对称 + 文字居中，和旁边的胶囊按钮保持一致的观感 */
  padding: 7px 16px;
  text-align: center;
  text-align-last: center;
  border-radius: 999px; border: 1px solid #dfe8f3;
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23637d99' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 9px 9px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== 三级安全教育：员工矩阵 ===== */
.edu-scope {
  margin-bottom: 10px; padding: 10px 12px;
  background: var(--blue-soft); border-left: 3px solid var(--blue);
  border-radius: 10px; font-size: 12.5px; line-height: 1.65; color: var(--blue-deep);
}
.edu-scope-link { color: var(--blue); font-weight: 700; text-decoration: underline; padding: 0; font-size: inherit; }
/* 矩阵顶部：类别筛选下拉 + 导出 ZIP 并排一行 */
.edu-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.edu-filter-btn {
  flex: 1 1 auto; min-width: 0; max-width: none;
  appearance: none; -webkit-appearance: none;
  padding: 8px 24px;
  text-align: center; text-align-last: center;
  border: 1px solid #dfe8f3; border-radius: 999px;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%235b6b80' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  text-overflow: ellipsis;
}
.edu-filter-btn:focus { outline: none; border-color: #9ec7f5; box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.10); }
.edu-zip-btn {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; border: 1px solid #cfe1f8; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-deep);
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.edu-zip-btn svg { width: 14px; height: 14px; }
.edu-zip-btn:active { background: #d8e8fc; }
.edu-panels { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
.edu-panels > * { min-width: 0; }
@media (min-width: 640px) { .edu-panels { grid-template-columns: 1fr 1fr; } }
.edu-panel { padding: 12px; }
.edu-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: nowrap; }
.edu-panel-title { font-size: 13.5px; font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edu-panel-head .tiny { flex: none; white-space: nowrap; }
.edu-panel-add { display: flex; gap: 6px; margin-bottom: 10px; }
.edu-panel-add input {
  flex: 1 1 0; min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid #dfe8f3; border-radius: 9px; background: #fff;
}
.edu-panel-add input:focus { outline: none; border-color: #9ec7f5; box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.10); }
.edu-panel-add .btn { flex: none; white-space: nowrap; }
.edu-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.edu-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 6px 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  /* 同行标签等分撑满，避免右侧空出一大块 */
  flex: 1 1 auto; min-width: 0;
}
.edu-tag-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edu-tag.cat { background: #fdecec; color: #c0392b; }
.edu-tag.type { background: #fff4e5; color: #c46a00; }
/* 三级教育：单元格文件网格（参照旧版编辑弹窗：缩略图 + 文件名 + 下载/删除） */
.edu-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}
.edu-file-item {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #f9fbfe; display: flex; flex-direction: column;
}
.edu-file-thumb {
  width: 100%; height: 96px; object-fit: cover; display: block;
  background: #eef4fb; cursor: zoom-in;
}
.edu-file-icon {
  width: 100%; height: 96px; display: grid; place-items: center;
  background: #f0f4fa; color: var(--text-3);
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.edu-file-icon.previewable { cursor: zoom-in; color: var(--blue-deep); background: var(--blue-soft); }
.edu-file-name {
  padding: 6px 8px 0; font-size: 11.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.edu-file-actions {
  display: flex; gap: 6px; padding: 6px 8px 8px; margin-top: auto;
}
.edu-file-btn {
  flex: 1; height: 26px; display: grid; place-items: center;
  border-radius: 7px; background: var(--blue-soft); color: var(--blue-deep);
  font-size: 11.5px; font-weight: 650;
}
.edu-file-btn.danger { background: rgba(229, 72, 77, 0.1); color: var(--red); }
.edu-file-btn.disabled { background: var(--bg); color: var(--text-3); font-weight: 500; }

/* 三级教育：图片灯箱（对齐旧版 lightbox） */
.edu-lb {
  position: fixed; inset: 0; z-index: 1200;
  display: none; align-items: center; justify-content: center;
}
.edu-lb.on { display: flex; }
.edu-lb-mask { position: absolute; inset: 0; background: rgba(9, 16, 26, 0.82); }
.edu-lb-img {
  position: relative; z-index: 1;
  max-width: min(92vw, 1100px); max-height: 82vh;
  border-radius: 12px; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
/* PDF：内嵌浏览器阅读器 */
.edu-lb-frame {
  position: relative; z-index: 1;
  width: min(92vw, 960px); height: 78vh;
  border: 0; border-radius: 12px; background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
/* 音视频：原生播放器 */
.edu-lb-media {
  position: relative; z-index: 1;
  max-width: min(92vw, 960px); max-height: 78vh;
  border-radius: 12px; background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.edu-lb-audio {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 22px 26px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.12); color: #fff;
}
.edu-lb-audio-name { font-size: 13px; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 文本：直接读取原文展示 */
.edu-lb-text {
  position: relative; z-index: 1;
  width: min(92vw, 900px); max-height: 74vh; overflow: auto;
  margin: 0; padding: 16px 18px; border-radius: 12px;
  background: #fbfdff; color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.edu-lb-nav {
  position: absolute; z-index: 2; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: #fff;
}
.edu-lb-nav svg { width: 18px; height: 18px; }
.edu-lb-nav.prev { left: 14px; }
.edu-lb-nav.next { right: 14px; }
.edu-lb-nav.prev svg { transform: rotate(90deg); }
.edu-lb-nav.next svg { transform: rotate(-90deg); }
.edu-lb-bar {
  position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  max-width: min(92vw, 720px);
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); color: #fff;
  backdrop-filter: blur(10px);
}
.edu-lb-name { font-size: 12.5px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edu-lb-count { font-size: 12px; opacity: .8; flex: none; }
.edu-lb-link { font-size: 12.5px; font-weight: 650; color: #fff; text-decoration: underline; flex: none; }
.edu-lb-close {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.22); color: #fff;
  font-size: 16px; line-height: 1;
}

.edu-tag-x {
  width: 20px; height: 20px; display: inline-grid; place-items: center;
  border-radius: 50%; background: #e5484d; color: #fff;
  font-size: 12px; line-height: 1; flex: none;
}
/* 员工本人矩阵的排序箭头：原来只有 13×15、透明背景，看起来像空白方块，这里给底色并放大点击区 */
.edu-tag-move {
  width: 20px; height: 22px; display: inline-grid; place-items: center;
  color: inherit; opacity: .9; flex: none; border-radius: 6px;
  background: rgba(255, 255, 255, .75);
}
.edu-tag-move svg { width: 13px; height: 13px; }
.edu-tag-move.prev svg { transform: rotate(90deg); }
.edu-tag-move.next svg { transform: rotate(-90deg); }
.edu-tag-move:disabled { opacity: .25; }
.edu-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.edu-table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 12.5px; }
.edu-table th, .edu-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: center; }
.edu-table thead th { background: #fdf3e6; color: var(--text-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.edu-table .edu-corner { background: #eef3fb; color: var(--text-2); white-space: normal; line-height: 1.25; }
.edu-table .edu-row-head { background: #fdecec; color: #c0392b; font-weight: 700; white-space: nowrap; text-align: center; }
.edu-cell-box { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.edu-count { font-size: 13px; font-weight: 700; color: var(--text-3); padding: 2px 6px; }
.edu-count.on { color: var(--green); }
.edu-upload {
  padding: 3px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 700;
  background: #e6f7ee; color: #12874a; border: 1px solid #bfe9d2;
}

/* ===== 三级安全教育：全局类别与材料类型管理 ===== */
.edu-config-note {
  margin-bottom: 10px; padding: 10px 12px;
  background: #eaf7ee; border-left: 3px solid #4caf50;
  border-radius: 10px; font-size: 12.5px; line-height: 1.65; color: #2e7d32;
}
.edu-config-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .edu-config-grid { grid-template-columns: 1fr 1fr; } }
.edu-config-card { padding: 0; overflow: hidden; }
.edu-config-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 12px; font-weight: 750; font-size: 13.5px;
}
.edu-config-head.is-cat { background: #fdecec; color: #b03a2e; }
.edu-config-head.is-type { background: #fff4e5; color: #b06a10; }
.edu-config-title { min-width: 0; }
.edu-config-card .edu-panel-add { padding: 10px 12px 0; }
.edu-config-card .list { padding: 6px 0; }
/* 列宽有限：名称、文件数、排序与操作保持一行；名称超长省略，其余控件收紧 */
.edu-config-card .row { flex-wrap: nowrap; gap: 6px; padding: 9px 10px; min-height: 0; }
.edu-config-card .row-main { flex: 0 1 auto; min-width: 0; }
.edu-config-card .row-title { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edu-config-card .badge { flex: none; padding: 2px 6px; font-size: 10.5px; white-space: nowrap; }
.edu-config-card .row-side { flex: none; margin-left: auto; flex-direction: row; align-items: center; justify-content: flex-end; gap: 4px; }
.edu-config-card .row-icon { width: 24px; height: 24px; border-radius: 7px; }
.edu-config-card .row-icon svg { width: 13px; height: 13px; }
/* 上移/下移改成并排两个按钮：竖排小箭头在手机上几乎点不中 */
.edu-move { display: flex; flex-direction: row; align-items: center; gap: 4px; flex: none; }
.edu-move-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; background: var(--bg); color: var(--text-2);
}
.edu-move-btn svg { width: 14px; height: 14px; }
.edu-move-btn:disabled { opacity: .35; }
.edu-move-btn.up svg { transform: rotate(180deg); }

/* ===== 徽章 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 7px;
  font-size: 11px; font-weight: 700; line-height: 1.4;
  white-space: nowrap;
}
.badge-blue { background: #e7f1fe; color: #1565c0; }
.badge-green { background: #e6f7ee; color: #0f8a4b; }
.badge-orange { background: #fff2dd; color: #a86400; }
.badge-red { background: #ffe9e9; color: #c62f34; }
.badge-gray { background: #eef2f7; color: #64748b; }
.badge-purple { background: #efebff; color: #5f43cf; }
.badge-teal { background: #e3f6f4; color: #0f766e; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* 纸质编号胶囊：固定宽度、文字居中，保证各行胶囊大小一致（超长编号省略） */
.rule-paper {
  display: inline-block; flex: none; width: 62px; box-sizing: border-box;
  padding: 1px 0; border-radius: 999px; text-align: center;
  background: var(--blue); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 1.6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 依据条目：第一行「纸质编号胶囊 + 项目编号 · 项目分类」，第二行项目名称，第三行纯文本/混合文本分值 */
.rule-meta { font-size: 12.5px; font-weight: 400; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-name { margin-top: 4px; }
/* 依据条目中非数值的项目分值（如「-0.5/处」或文字说明）：在项目名称下方整行显示，
   颜色按项目分类判定（含加分绿、含扣分红，无关键词时按分值正负兜底） */
.rule-score-line { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--green); }
.rule-score-line.neg { color: var(--red); }
.rule-score-line.blank { color: var(--text-2); }
/* 依据条目的分值：保持原位置（删除按钮左侧），只去掉色块，不再有底色 */
.rule-score-text { flex: none; min-width: 34px; text-align: right; font-size: 15px; font-weight: 700; color: var(--green); }
.rule-score-text.neg { color: var(--red); }
.rule-score-text.blank { color: var(--text-2); font-weight: 400; }

/* 卡片内列表行右侧的小图标按钮（浅底深图标，区别于导航栏上的白色按钮） */
.row-icon {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--bg); color: var(--text-2);
}
.row-icon:active { background: #e5eefb; }
.row-icon svg { width: 18px; height: 18px; }
.row-icon.danger { background: #fdeeee; color: var(--red); }

/* ===== 现场图片缩略图 ===== */
.thumb-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* 没有图片时不占位（现场图片的「已存」与「待上传」两个网格都适用） */
.thumb-grid:empty { display: none; }
/* 保存时才上传的附件：已选文件条（文件名 + 大小 + 移除） */
.pending-uploads { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pending-uploads:empty { display: none; }
.pending-file { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); background: var(--blue-soft, rgba(10,132,255,.08)); border: 1px dashed var(--blue); border-radius: 10px; padding: 6px 8px; }
.pending-file em { font-style: normal; color: var(--text-3); font-size: 11px; flex: none; }
.pending-file button { margin-left: auto; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 13px; line-height: 20px; cursor: pointer; flex: none; }
.thumb {
  width: 72px; height: 72px; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
  background: var(--bg); flex: none; cursor: zoom-in;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.missing {
  display: grid; place-items: center; font-size: 10px; color: var(--text-3);
  border: 1px dashed var(--line); cursor: default;
}

/* 关键事件行：姓名 + 日期 + 项目编号（蓝字，对齐 App eventCard） */
.event-date { font-size: 12px; font-weight: 400; color: var(--text-2); }
.event-number { font-size: 12px; font-weight: 600; color: var(--blue); white-space: nowrap; }
/* 关键事件分值：纯文字，无底色胶囊 */
.event-score { margin-left: 8px; font-size: 14px; font-weight: 700; color: var(--green); white-space: nowrap; }
.event-score.neg { color: var(--red); }

/* 日常检查卡片：日期+车站+分值一行、问题一行、检查人/责任人一行（对齐 App inspectionCard） */
.insp-card { display: flex; align-items: flex-start; gap: 10px; }
.insp-main { flex: 1; min-width: 0; }
.insp-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.insp-station {
  font-size: 12px; font-weight: 600; color: var(--blue);
  max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.insp-score { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--green); white-space: nowrap; }
.insp-score.neg { color: var(--red); }
.insp-problem {
  margin: 8px 0 6px; font-size: 14.5px; font-weight: 600;
  line-height: 1.55; word-break: break-word;
}
.insp-edit { flex: none; align-self: flex-start; }
.insp-main .thumb { width: 56px; height: 56px; }

/* ===== 提醒 ===== */
.alert-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.alert-row:last-child { border-bottom: 0; padding-bottom: 0; }
.alert-icon {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: grid; place-items: center; font-size: 16px;
  background: #fff2e5; color: #c26a00;
}
.alert-icon.danger { background: #ffe9e9; color: #c62f34; }
/* 证件状态图标（首页到期提醒、员工详情证件列表共用）：实心三角 + 30px 圆角方块
   颜色与状态文字一致：有效绿 / 30天内橙 / 紧急、已过期红 */
.alert-icon.cert-alert {
  width: 30px; height: 30px; border-radius: 9px; font-size: 16px;
  background: rgba(25, 118, 210, 0.12); color: var(--blue);
}
.alert-icon.cert-alert svg { width: 17px; height: 17px; }
.alert-icon.cert-alert.valid { background: rgba(40, 163, 104, 0.12); color: #28a368; }
.alert-icon.cert-alert.soon { background: rgba(239, 152, 37, 0.12); color: #ef9825; }
.alert-icon.cert-alert.urgent, .alert-icon.cert-alert.expired { background: rgba(214, 74, 67, 0.12); color: #d64a43; }
.alert-main { flex: 1; min-width: 0; }
.alert-title { font-size: 13.5px; font-weight: 650; }
.alert-sub { font-size: 11.5px; color: var(--text-2); margin-top: 2px; }

/* ===== 详情 ===== */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { background: #f7fafd; border-radius: 12px; padding: 11px 12px; }
.detail-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.detail-value { font-size: 13.5px; font-weight: 650; word-break: break-all; }

.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ===== 绩效条 ===== */
.perf-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.perf-row:last-child { border-bottom: 0; }
.perf-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.perf-name { font-size: 14px; font-weight: 650; }
.perf-score { font-size: 15px; font-weight: 800; }
.perf-score.up { color: var(--green); }
.perf-score.down { color: var(--red); }
.perf-bar { height: 7px; border-radius: 999px; background: #edf2f8; overflow: hidden; }
.perf-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4facfe, #1976d2); }
.perf-bar > i.down { background: linear-gradient(90deg, #ff9a9a, #e5484d); }
/* 绩效汇总表（对齐 App 的 7 列表格，窄屏横向滚动） */
.perf-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.perf-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.perf-table th { padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--line); }
.perf-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.perf-table tbody tr:last-child td { border-bottom: 0; }
.perf-table th.num, .perf-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.perf-table td.strong { font-weight: 650; }
.perf-table td.plus { color: var(--green); }
.perf-table td.minus { color: var(--red); }
.perf-table td.score { font-weight: 800; }
.perf-table td.score.up { color: var(--green); }
.perf-table td.score.mid { color: var(--orange); }
.perf-table td.score.down { color: var(--red); }

/* ===== 表单 ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
/* 表单里并排两个字段（如角色 + 所属区域） */
.field-grid { display: flex; gap: 10px; }
.field-grid > .field { flex: 1 1 0; min-width: 0; margin-bottom: 14px; }
/* 用户管理：区域筛选 + 搜索框一行，两者高度对齐 */
.user-filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin-top: 12px; }
.user-filter-row .chip-select { margin: 0; min-height: 44px; height: 44px; border-radius: 12px; }
.user-filter-row .search-box { flex: 1 1 auto; min-width: 0; }
.user-filter-row .search-box input { height: 44px; padding-top: 0; padding-bottom: 0; }
.field label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0; max-width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid #dfe8f3;
  background: #fbfdff;
  font-size: 14px;
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #9ec7f5; box-shadow: 0 0 0 3px rgba(25,118,210,.10); background: #fff;
}
/* 两列表单：用 minmax(0,1fr) 把轨道最小宽度钉成 0，避免 iOS 日期控件的固有宽度把卡片撑破 */
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field-row > .field { min-width: 0; }
/* 只读自动匹配字段（如日常检查的纸质编号） */
.field input[readonly] { background: #f4f7fb; color: var(--text-2); }
/* iOS Safari 的日期/时间控件默认按内容宽度渲染，不理会 width:100%，必须复位 appearance 才能收缩 */
.field input[type="date"],
.field input[type="time"],
.field input[type="month"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
}
/* 窄屏放不下两个日期框时改为上下排列，避免日期文本被裁切 */
@media (max-width: 380px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
}
.check-list {
  max-height: 170px; overflow-y: auto;
  border: 1px solid #dfe8f3; border-radius: 11px; background: #fbfdff;
}
.check-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.check-item:last-child { border-bottom: 0; }
.check-item input { width: 17px; height: 17px; accent-color: var(--blue); }
.check-item small { color: var(--text-3); margin-left: auto; }

/* 账号模块权限：已选标签 + 搜索框 */
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.perm-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px 3px 9px; border: 0; border-radius: 999px;
  background: rgba(31, 111, 235, 0.12); color: var(--blue);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.perm-chip:active { background: rgba(31, 111, 235, 0.2); }
.perm-chip-x { font-size: 13px; line-height: 1; opacity: 0.7; }
.perm-chip-empty { font-size: 12px; color: var(--text-3); }
.perm-search { margin-bottom: 8px; }
.perm-search input {
  width: 100%; padding: 9px 12px;
  border: 1px solid #dfe8f3; border-radius: 10px;
  background: #fbfdff; color: inherit; font-size: 13.5px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 700;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, #1e88e5, #1565c0); color: #fff; box-shadow: 0 6px 16px rgba(21,101,192,.22); }
.btn-secondary { background: #eef3fa; color: #41536b; }
.btn-danger { background: #ffecec; color: #c62f34; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 12.5px; border-radius: 10px; min-height: 40px; }
.btn svg { width: 16px; height: 16px; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(255,255,255,0.92);
  border-top: 1px solid rgba(23, 58, 102, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 2px; color: var(--text-3);
  font-size: 10.5px; font-weight: 600;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item.active { color: var(--blue); }
.tab-item.active svg { stroke-width: 2.2; }
/* 侧边导航标题：仅桌面宽屏显示 */
.tabbar-brand { display: none; }

/* ===== 登录 ===== */
.login-screen {
  min-height: 100dvh;
  background: linear-gradient(160deg, #1e88e5 0%, #1976d2 45%, #0f4c96 100%);
  display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + 46px) 24px calc(var(--safe-bottom) + 28px);
  color: #fff;
  position: relative;
  overflow-x: hidden; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.login-screen::before, .login-screen::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.login-screen::before { width: 260px; height: 260px; top: -90px; right: -80px; }
.login-screen::after { width: 220px; height: 220px; bottom: 60px; left: -110px; }
/* 与 App LoginView 一致：盾牌 + 站名整体居中，副标题在下方居中 */
.login-brand { display: flex; align-items: center; justify-content: center; gap: 14px; }
.login-logo {
  width: 66px; height: 66px; border-radius: 20px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.34);
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  flex: none;
  backdrop-filter: blur(6px);
}
.login-title { font-size: 29px; font-weight: 800; letter-spacing: -0.6px; }
.login-sub { font-size: 13.5px; color: rgba(255,255,255,0.78); margin-top: 12px; line-height: 1.55; text-align: center; }
.login-card {
  /* 与 App 一致：标题下 28px 紧跟登录卡，不再用 auto 把卡片压到屏幕底部 */
  margin-top: 28px;
  background: rgba(255,255,255,0.97);
  color: var(--text);
  border-radius: 24px;
  padding: 22px 20px calc(20px + var(--safe-bottom) * 0.2);
  box-shadow: 0 20px 50px rgba(4, 31, 70, 0.3);
  position: relative; z-index: 2;
}
.login-card h2 { font-size: 18px; font-weight: 750; margin-bottom: 16px; }
/* 登录页底部备案号 */
.login-icp { margin-top: 22px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.72); position: relative; z-index: 2; }
.login-icp a { color: rgba(255,255,255,0.82); text-decoration: none; }
.login-icp a:hover { text-decoration: underline; }
.login-error { color: var(--red); font-size: 12.5px; margin-bottom: 10px; display: none; }
.login-error.show { display: block; }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 34px 18px; color: var(--text-3); }
.empty svg { width: 46px; height: 46px; margin-bottom: 10px; opacity: .45; }
.empty p { font-size: 13px; }

/* ===== 底部弹窗 ===== */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(13, 30, 55, 0.42);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in .2s ease;
}
.sheet {
  width: 100%; max-width: 640px; max-height: 92dvh;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 8px 18px calc(20px + var(--safe-bottom));
  overflow-y: auto;
  animation: slide-up .28s cubic-bezier(.32,.72,0,1);
}
.sheet-handle { width: 38px; height: 5px; border-radius: 99px; background: #dbe3ee; margin: 2px auto 14px; }
/* 宽内容弹层（三级安全教育矩阵 / 类别管理）：桌面端放大，避免卡片被压窄 */
.sheet.sheet-wide { max-width: 720px; }
@media (min-width: 1024px) { .sheet.sheet-wide { max-width: 880px; } }
/* 档案详情：左右分栏展示（安全档案 = 附件 | 培训记录，台账 = 基本信息 | 培训记录） */
.sheet.sheet-archives { max-width: 720px; }
@media (min-width: 1024px) { .sheet.sheet-archives { max-width: 1080px; } }
.archives-columns { display: grid; gap: 10px; }
@media (min-width: 900px) { .archives-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
/* 编辑员工基本信息：基本信息与资格证左右分栏，窄屏回落为上下 */
.sheet.sheet-profile { max-width: 720px; }
@media (min-width: 1024px) { .sheet.sheet-profile { max-width: 1080px; } }
.form-columns { display: grid; gap: 10px 20px; }
@media (min-width: 900px) { .form-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
/* 基本信息横跨两栏，资格证两栏从同一行开始，左右字段严格对齐 */
.form-columns > .form-span { grid-column: 1 / -1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.sheet-title { font-size: 18px; font-weight: 750; }
/* 弹层右上角关闭：.icon-btn 默认是白色图标（给顶部蓝底用），放在白色弹层里看不见，这里改成浅灰底 + 深色图标 */
.sheet-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); color: var(--text-2); border: 1px solid var(--line);
}
.sheet-close:active { background: var(--line); transform: scale(.94); }
.sheet-close svg { width: 16px; height: 16px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 8px; }
.sheet-actions .btn { flex: 1; }

/* 导入结果：逐条列出未导入的行与提示，常驻直到手动关闭 */
.import-result { display: flex; flex-direction: column; gap: 12px; }
.import-result-summary { font-size: 14px; font-weight: 600; line-height: 1.6; }
.import-result-block { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.import-result-title { padding: 8px 12px; font-size: 12.5px; font-weight: 700; background: #f6f9fd; }
.import-result-title.red { color: var(--red); }
.import-result-title.orange { color: #b36b00; }
.import-result-list {
  max-height: 42vh; overflow-y: auto;
  padding: 6px 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.65;
}
.import-result-list > div { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.import-result-list > div:last-child { border-bottom: 0; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(30px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }

/* ===== Toast ===== */
.toast-root {
  position: fixed; left: 0; right: 0; top: calc(var(--safe-top) + 14px);
  z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(23, 33, 47, 0.92);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0,0,0,.2);
  animation: toast-in .22s ease;
  max-width: 86vw; text-align: center;
}
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== 渐变头卡（对齐 App headerGradient） ===== */
.hero-panel {
  background: linear-gradient(135deg, #2891e7 0%, #1976d2 55%, #0d47a1 100%);
  border-radius: 20px;
  padding: 18px;
  color: #fff;
  box-shadow: 0 12px 28px rgba(13, 71, 161, 0.26);
}
.hero-panel-top { display: flex; align-items: center; gap: 12px; }
.hero-panel-icon {
  width: 46px; height: 46px; flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
}
.hero-panel-icon svg { width: 22px; height: 22px; }
.hero-panel-avatar {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.92);
  color: var(--blue-deep);
  font-size: 16px; font-weight: 800;
}
.hero-greet { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.hero-date { font-size: 12px; color: rgba(255,255,255,0.82); margin-top: 4px; }

.hero-quick {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-top: 16px;
}
.hero-quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  transition: transform .15s ease, background .15s ease;
}
.hero-quick-item:active { transform: scale(.95); background: rgba(255,255,255,0.26); }
.hero-quick-icon { display: grid; place-items: center; }
.hero-quick-icon svg { width: 20px; height: 20px; }
.hero-quick-name { font-size: 11px; font-weight: 600; opacity: .95; }

.hero-metrics {
  display: flex; align-items: stretch;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.22);
}
.hero-metric {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.hero-metric:first-child { border-left: 0; }
.hero-metric b { font-size: 18px; font-weight: 800; line-height: 1.1; }
.hero-metric span { font-size: 11px; color: rgba(255,255,255,0.8); }
.hero-date svg { width: 13px; height: 13px; vertical-align: -2px; }

/* ===== 信息行（对齐 App InfoRow） ===== */
.info-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row span { font-size: 13px; color: var(--text-2); flex: none; }
.info-row b { font-size: 13.5px; font-weight: 650; text-align: right; word-break: break-word; }

/* ===== 日期块 ===== */
.date-block {
  width: 68px; flex: none;
  padding: 6px 2px;
  border-radius: 9px;
  background: rgba(25, 118, 210, 0.08);
  text-align: center;
}
.date-block b { display: block; font-size: 12px; font-weight: 700; color: var(--blue); line-height: 1.3; white-space: nowrap; }
.date-block span { display: block; font-size: 10px; color: var(--text-2); margin-top: 1px; white-space: nowrap; }

/* ===== 车站卡片 ===== */
.station-cards { display: flex; flex-direction: column; gap: 10px; }
.station-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(25,118,210,0.06);
  color: var(--text);
  transition: transform .15s ease, background .15s ease;
}
.station-card:active { transform: scale(.99); background: #f6faff; }
.station-icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e3f1ff, #cfe6ff);
  color: var(--blue-deep);
}
.station-icon svg { width: 20px; height: 20px; }

/* ===== 证件行 ===== */
/* 证件行：姓名 → 车站 → 类别 → 剩余天数 单行显示，超出省略中间段 */
.cert-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.cert-line .cert-staff { font-size: 14.5px; font-weight: 650; color: var(--text); flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.cert-line .cert-meta { font-size: 12.5px; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cert-line .cert-days { font-size: 12.5px; font-weight: 600; flex: none; }

/* ===== 批量选择（对齐 App 证件批量删除） ===== */
.select-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.select-count { flex: 1; font-size: 12px; color: var(--text-2); }
.select-bar .chip { padding: 6px 12px; }
.select-bar .btn:disabled, .select-bar .chip:disabled { opacity: .45; }
.pick {
  width: 21px; height: 21px; flex: none;
  border-radius: 50%;
  border: 1.8px solid #c3d2e5;
  display: grid; place-items: center;
  color: #fff;
  transition: background .15s ease, border-color .15s ease;
}
.pick.on { background: var(--blue); border-color: var(--blue); }
.pick svg { width: 13px; height: 13px; stroke-width: 3; }
.icon-btn.active { background: rgba(255,255,255,0.34); border-color: rgba(255,255,255,0.5); }

/* ===== 下拉式筛选 chip ===== */
/* 基础样式统一在上面 .chip-select 定义（同高、文字居中），这里只保留交互态 */
.chip-select:focus { outline: none; border-color: #9ec7f5; }
.chip-select.active {
  background-color: var(--blue);
  border-color: var(--blue);
  color: #fff;
  /* 与默认态同一套箭头几何，只把描边换成白色，避免选中后箭头变小、变细 */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

.section-sub { font-size: 12px; font-weight: 600; color: var(--text-3); }
.stat-card .stat-label { display: flex; align-items: center; gap: 5px; }
.stat-card .stat-label svg { width: 14px; height: 14px; }

/* ===== 更多菜单行（对齐 App MenuRow） ===== */
.menu-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--text);
}
.menu-row:last-child { border-bottom: 0; }
/* flush 卡片里的菜单行没有外层内边距，图标会贴住卡片边框线，这里补左右留白 */
.card.flush > .list > .menu-row { padding-left: 12px; padding-right: 12px; }
/* 开关控件（自动同步、模块开关等）：对齐 App 的 iOS 风格开关 */
input.switch {
  -webkit-appearance: none;
  appearance: none;
  width: 46px; height: 28px; flex: none;
  margin: 0; padding: 0; border: 0; border-radius: 999px;
  background: #d4dce7; position: relative; cursor: pointer;
  transition: background .18s ease;
}
input.switch::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 40, 70, .28);
  transition: transform .18s ease;
}
input.switch:checked { background: var(--blue); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.menu-row:active { opacity: .75; }
button.menu-row {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--line);
  padding: 12px 0;
  font: inherit;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
button.menu-row:last-child { border-bottom: 0; }
.menu-row-icon {
  width: 32px; height: 32px; flex: none;
  border-radius: 9px;
  display: grid; place-items: center;
  padding: 8px; box-sizing: border-box;
}
.menu-row-icon svg { width: 100%; height: 100%; }
.menu-row-main { flex: 1; min-width: 0; }
.menu-row-title { font-size: 14px; font-weight: 650; }
.menu-row-sub { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.tint-green { background: #e6f7ee; color: #0f8a4b; }
.tint-orange { background: #fff2dd; color: #a86400; }
.tint-purple { background: #efebff; color: #5f43cf; }
.tint-blue { background: #e7f1fe; color: #1565c0; }
.tint-cyan { background: #e0f6f8; color: #11757f; }
.tint-gray { background: #eef2f7; color: #64748b; }
.tint-red { background: #ffe9e9; color: #c62f34; }

.logout-btn {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  background: var(--card);
  color: var(--red);
  font-size: 15px; font-weight: 650;
  box-shadow: var(--shadow-sm);
}
.logout-btn:active { opacity: .8; }

/* ===== 小屏适配 ===== */

@media (max-width: 360px) {
  .stat-card { padding: 13px; min-height: 96px; }
  .stat-card .stat-value { font-size: 27px; }
  .header-title { font-size: 22px; }
  /* 窄屏下保持「图标 + 标题」单行 */
  .login-title { font-size: 25px; }
}

@media (min-width: 600px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 深色模式 ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1622;
    --card: #16212f;
    --text: #eaf1fa;
    --text-2: #9fb0c4;
    --text-3: #72859a;
    --line: #243244;
    --blue-soft: #17324d;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.25);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.35);
  }
  body { background: var(--bg); }
  .segmented { background: #1b2939; }
  .segmented button.active { background: #2a3b4f; color: #dceaff; }
  .search-box input, .field input, .field select, .field textarea, .check-list {
    background: #131e2c; border-color: #2a3a4d; color: var(--text);
  }
  .chip { background: #16212f; border-color: #2a3a4d; color: var(--text-2); }
  .chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }
  .edu-filter-btn { background-color: #16212f; border-color: #2a3a4d; color: var(--text-2); }
  .edu-zip-btn { background: #17324d; border-color: #24486e; color: #8fc4ff; }
  .edu-cell { background: #1a2737; }
  .row-icon { background: #1b2939; }
  .row-icon.danger { background: #3a1f22; color: #ff9a9e; }
  .edu-cell.on { background: #143327; border-color: #1f5a41; }
  .detail-item { background: #1a2737; }
  .row:active { background: #1b2939; }
  .row { background: var(--card); }
  .perf-bar { background: #223143; }
  .tabbar { background: rgba(18, 27, 39, 0.94); border-top-color: #223143; }
  .sheet { background: #16212f; }
  .sheet-handle { background: #2f4156; }
  .login-card { background: #16212f; color: var(--text); }
  .file-icon { background: #1f2f42; color: #9db4cf; }
  .badge-gray { background: #223143; color: #9fb0c4; }
  .alert-icon { background: #332717; }
  .alert-icon.danger { background: #3a1f22; }
  .avatar { background: #1d3550; color: #a8ccf5; }
  .avatar.green { background: #143327; color: #6ee7a8; }
  .avatar.orange { background: #332717; color: #fbbf6b; }
  .avatar.purple { background: #271f45; color: #c0b3ff; }
  .avatar.pink { background: #3a1f2b; color: #ffa8c5; }
  .btn-secondary { background: #223143; color: #c6d5e8; }
  .btn-danger { background: #3a1f22; color: #ff9a9e; }
  .icon-btn { background: rgba(255,255,255,0.12); }
  .header-avatar { background: #e8f2ff; }
  .date-block { background: #1b2939; }
  .date-block b { color: #8fc4ff; }
  .station-card { background: var(--card); border-color: #223143; }
  .station-card:active { background: #1b2939; }
  .station-icon { background: linear-gradient(135deg, #1d3550, #17324d); color: #a8ccf5; }
  .chip-select { background-color: #16212f; border-color: #2a3a4d; color: var(--text-2); }
  .alert-icon.cert-alert.valid { background: #143327; color: #6ee7a8; }
  .alert-icon.cert-alert.soon { background: #332717; color: #fbbf6b; }
  .alert-icon.cert-alert.urgent, .alert-icon.cert-alert.expired { background: #3a1f22; color: #ff9a9e; }
  .menu-row-icon.tint-green { background: #143327; color: #6ee7a8; }
  .menu-row-icon.tint-orange { background: #332717; color: #fbbf6b; }
  .menu-row-icon.tint-purple { background: #271f45; color: #c0b3ff; }
  .menu-row-icon.tint-blue { background: #1d3550; color: #a8ccf5; }
  .menu-row-icon.tint-cyan { background: #123335; color: #6fd7df; }
  .menu-row-icon.tint-gray { background: #223143; color: #9fb0c4; }
  .menu-row-icon.tint-red { background: #3a1f22; color: #ff9a9e; }
  .logout-btn { background: var(--card); }
  .select-bar { background: var(--card); border-color: #223143; }
  .pick { border-color: #3b4c61; }
  .pick.on { background: var(--blue); border-color: var(--blue); }
}

/* iOS Safari 给原生 select 算宽度时用的是「最长选项文字」的固有宽度，不理会
   width:100% / min-width:0；选项一长就会把右列和整页一起撑宽（表现为右列被裁、
   整页可被横向拖走，文档比视口宽几十像素）。复位 appearance 后它才按盒模型收缩，
   箭头改由背景图画，深浅色模式都适用。 */
.field select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-right: 34px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%238e9bad' stroke-width='1.8' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ===== 桌面宽屏（≥1024px） ===== */

@media (min-width: 1024px) {
  /* 侧边导航：底部 tab 改为左侧竖排，内容区让出 216px */
  .app-shell { padding-left: 216px; }
  .tabbar {
    top: 0; right: auto; bottom: 0; left: 0;
    width: 216px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 20px 12px;
    background: var(--card);
    border-top: 0;
    border-right: 1px solid var(--line);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .tabbar-brand {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px 16px;
    font-size: 15px; font-weight: 800; color: var(--blue-deep);
    letter-spacing: .2px;
  }
  .tabbar-brand svg { width: 20px; height: 20px; flex: none; }
  .tabbar-brand span { white-space: nowrap; }
  .tab-item {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 11px;
    font-size: 13.5px;
  }
  .tab-item svg { width: 20px; height: 20px; }
  .tab-item:hover { background: var(--blue-soft); }
  .tab-item.active { background: var(--blue-soft); color: var(--blue-deep); }

  /* 顶栏内边距与内容列对齐，避免蓝条横贯整屏 */
  .app-header {
    padding-left: max(24px, calc((100% - 1040px) / 2 + 16px));
    padding-right: max(24px, calc((100% - 1040px) / 2 + 16px));
  }
  .header-title { font-size: 27px; }
  .app-content,
  .app-content.no-tabs {
    max-width: 1040px;
    padding-bottom: 36px;
    gap: 18px;
  }

  /* 卡片内列表在宽屏下两列；分隔线画在两列之间（列间距正中），不与行内图标贴边 */
  .app-content .card .list {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }
  .app-content .card .list::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: var(--line);
  }
  /* 两列网格里最后一行同样保留底部分隔线，避免最后一项缺线造成左右不一致 */
  .app-content .card .list > .row:last-child { border-bottom: 1px solid var(--line); }

  /* 车站/培训/档案等卡片列表在宽屏下两列 */
  .app-content .station-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* 筛选 chips 直接换行，不再横向滚动 */
  .chips { flex-wrap: wrap; overflow-x: visible; }

  /* 底部抽屉改为居中对话框 */
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet {
    max-width: 560px;
    border-radius: 18px;
    padding: 20px 22px 22px;
    max-height: 84dvh;
    box-shadow: 0 24px 60px rgba(4, 31, 70, 0.28);
    animation: dialog-in .18s ease;
  }
  .sheet-handle { display: none; }

  /* 登录页居中收窄，避免卡片铺满整行 */
  .login-screen { align-items: center; justify-content: center; }
  .login-title, .login-sub { text-align: center; }
  .login-card { width: 100%; max-width: 420px; margin-top: 28px; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

/* 密码框眼睛按钮（Web 登录页 / 修改密码） */
.pwd-wrap { position: relative; display: flex; align-items: center; }
.pwd-wrap input { padding-right: 46px; }
.pwd-eye {
  position: absolute; right: 2px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; color: #8a94a6; cursor: pointer;
}
.pwd-eye:active { color: #2f6fed; }

/* 消息规则配置（系统设置页）：开关、数字字段与命中量预览 */
.rule-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0 6px;
  border-top: 1px solid var(--line);
}
.rule-row:first-of-type { border-top: 0; }
.rule-main { flex: 1; min-width: 0; }
.rule-main .row-title { font-size: 14.5px; font-weight: 650; color: var(--text); }
.rule-main .row-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.rule-range { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.rule-toggle { position: relative; width: 48px; height: 28px; flex: none; display: block; }
.rule-toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rule-toggle i {
  display: block; width: 48px; height: 28px; border-radius: 14px;
  background: #d6deea; transition: background .18s ease;
}
.rule-toggle i::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 11px; background: #fff;
  box-shadow: 0 1px 3px rgba(15, 35, 60, .25);
  transition: transform .18s ease;
}
.rule-toggle input:checked + i { background: var(--green); }
.rule-toggle input:checked + i::after { transform: translateX(20px); }
.rule-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin: 6px 0 4px;
}
.rule-grid .rule-field { margin: 0; }
.rule-grid .rule-field label { font-size: 11.5px; }
.rule-preview { display: flex; gap: 10px; margin: 12px 0; }
.rule-preview > div {
  flex: 1; display: flex; align-items: baseline; gap: 6px;
  background: var(--blue-soft); border-radius: 12px; padding: 10px 12px;
}
.rule-preview b { font-size: 20px; line-height: 1; color: var(--blue-deep); }
.rule-preview span { font-size: 12px; color: var(--text-2); }

/* 消息推送渠道配置（系统设置页） */
.push-channel { border-top: 1px solid var(--line); padding: 12px 0; }
.push-channel:first-of-type { border-top: 0; padding-top: 4px; }
/* 按区域分组的推送配置：「全部区域」范围下一个区域一块，块内独立保存 */
.push-region { border-top: 1px solid var(--line); padding: 12px 0; }
.push-region:first-of-type { border-top: 0; padding-top: 4px; }
.push-region-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.push-region-head .row-title { font-size: 14.5px; font-weight: 650; color: var(--text); }
.push-region .push-channel { border-top: 1px dashed var(--line); padding: 10px 0; }
.push-region .push-channel:first-of-type { border-top: 0; padding-top: 2px; }
/* 全部区域：每个区域一张卡片，宽屏两列、窄屏单列 */
.push-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* 单条铺满，两条及以上一行两个；窄屏回落为单列 */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.card-grid.is-single { grid-template-columns: 1fr; }
/* 只有一个区域时铺满整行，两个及以上才分两列卡片 */
.push-grid.is-single { grid-template-columns: 1fr; }
.push-card-sm { margin: 0; }
/* 每个区域一列：文案模板卡片在上、推送配置卡片在下 */
.push-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.push-card-sm .push-channel { border-top: 0; padding: 0; margin-bottom: 10px; }
.push-card-sm .push-channel + .push-channel { border-top: 1px dashed var(--line); padding-top: 10px; }
/* 每个机器人一张独立卡片：区域内上下排列，不再挤在同一张卡里 */
.push-region-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.push-target-list { display: flex; flex-direction: column; gap: 10px; }
.push-target.card { padding: 14px 16px; margin: 0; }
@media (max-width: 900px) {
  .push-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}
.push-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.push-head .row-title { font-size: 14.5px; font-weight: 650; color: var(--text); }
/* 多机器人：每条机器人一行，渠道 / 名称两列，窄屏单列 */
.push-target .target-actions { display: flex; gap: 6px; flex-shrink: 0; }
.target-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.target-check {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-2); cursor: pointer; min-height: 28px;
}
.target-check input { width: auto; margin: 0; }
/* 启用 / @所有人 用和「机器人每日汇总」一致的开关，不再用小方框 */
.target-switches { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 4px; }
.target-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.kinds-item {
  position: relative;
  display: inline-flex; align-items: center; padding: 7px 13px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); background: var(--card); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
/* 原生小方框藏起来，只看胶囊的选中态，视觉上更整齐 */
.kinds-item input {
  position: absolute; width: 0; height: 0; opacity: 0; margin: 0; pointer-events: none;
}
.kinds-item:has(input:checked) {
  border-color: var(--blue); color: var(--blue); background: rgba(25, 118, 210, .08);
}
.kinds-item:has(input:checked) span::before { content: '✓'; margin-right: 5px; font-weight: 800; }
.kinds-item.is-off, .kinds-item:has(input:disabled) {
  opacity: .45; cursor: not-allowed; background: #f5f8fd;
}
.custom-target-group { margin-bottom: 10px; }
@media (max-width: 420px) {
  .target-grid { grid-template-columns: 1fr; }
}
.push-stats { font-size: 12px; color: var(--text-3); margin: 10px 0; line-height: 1.6; }

/* 文案模板：独立卡片，放在「消息推送」卡片上方，默认收起 */
.tpl-fold { margin: 0; }
.tpl-fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  list-style: none; cursor: pointer;
  font-size: 17px; font-weight: 750; letter-spacing: -0.2px; color: var(--text);
  min-height: 40px;
}
.tpl-fold > summary::-webkit-details-marker { display: none; }
.tpl-fold > summary::after {
  content: "›"; font-size: 16px; color: var(--text-3); transform: rotate(90deg); transition: transform .15s ease;
}
.tpl-fold[open] > summary::after { transform: rotate(-90deg); }
.tpl-group { border-top: 1px dashed var(--line); padding: 10px 0 2px; }
.tpl-group:first-of-type { border-top: 0; }
.tpl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tpl-head .row-title { font-size: 13.5px; font-weight: 650; color: var(--text); }
.tpl-vars { margin-top: 6px; line-height: 1.8; }
.tpl-vars code {
  font-family: inherit; font-size: 11.5px; color: var(--blue-deep);
  background: var(--blue-soft); border-radius: 6px; padding: 1px 5px; margin-right: 4px;
}
/* 左侧编辑、右侧实时预览：同一张模板卡片内左右分栏 */
.tpl-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.tpl-edit { min-width: 0; }
.tpl-preview { min-width: 0; }
.tpl-preview-label { font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.tpl-prev-card {
  background: var(--blue-soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; min-height: 108px; font-size: 13px; line-height: 1.7; color: var(--text);
}
.tpl-prev-prefix { font-size: 11.5px; color: var(--text-2); margin-bottom: 4px; }
.tpl-prev-title { font-weight: 650; margin-bottom: 6px; }
.tpl-prev-body { white-space: pre-wrap; word-break: break-word; }
.tpl-prev-empty { font-size: 12px; color: var(--text-3); }
/* 自定义消息：右侧预览撑满左栏高度，把下方空白也变成预览区 */
.tpl-split.is-fill { align-items: stretch; }
.tpl-split.is-fill .tpl-preview { display: flex; flex-direction: column; }
.tpl-split.is-fill .tpl-prev-card { flex: 1; }
@media (max-width: 900px) {
  .tpl-split { grid-template-columns: 1fr; }
}

/* ===== 排班管理 ===== */
.shift-top { display: flex; flex-direction: column; gap: 12px; }
.shift-month-pick { margin-left: auto; flex: none; white-space: nowrap; }

/* 班次设置 / 假期设置（含模版三列）：基础设置页左右两张卡，窄屏折叠为单列 */
.shift-tpl-card-item { min-width: 0; }
.shift-tpl-table { display: grid; grid-template-columns: minmax(54px, 1fr) 1fr 1fr; gap: 4px; align-items: start; margin-top: 4px; }
.shift-tpl-th { font-size: 11px; color: var(--text-3); padding: 0 2px 4px; }
.shift-tpl-name { border: 0; background: transparent; text-align: left; padding: 4px 2px; min-width: 0; cursor: pointer; }
.shift-tpl-name b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-tpl-name i { display: block; font-size: 10px; color: var(--text-3); font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-tpl-cell { border: 1px dashed #d7e3f2; background: #f8fafc; border-radius: 8px; padding: 5px 6px; font-size: 11.5px; line-height: 1.4; color: var(--text); text-align: left; cursor: pointer; min-height: 28px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
.shift-tpl-cell.is-empty { color: var(--text-3); }
.shift-tpl-empty { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); padding: 4px 2px; }
/* 轮排序列 / 我的排班班次标签：统一中性色，不按班次着色 */
.shift-plan-chip, .shift-day-tag { background: #f1f5f9; color: #33414f; }
/* 车站设置：车站名 + 简称两列 */
.shift-station-card { margin-top: 12px; }
.shift-sta-table { display: grid; grid-template-columns: minmax(78px, 1.1fr) 1fr 88px; gap: 6px 8px; align-items: center; }
.shift-sta-color { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 1px solid #e3ecf6; border-radius: 8px; background: #fff; font-size: 11px; color: var(--text-2); cursor: pointer; overflow: hidden; }
.shift-sta-color i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.shift-sta-color span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-sta-color.is-auto span { color: var(--text-3); }
/* 车站颜色选择弹层 */
.shift-color-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.shift-color-pick { width: 32px; height: 32px; border: 2px solid transparent; border-radius: 50%; background: none; padding: 3px; cursor: pointer; }
.shift-color-pick i { display: block; width: 100%; height: 100%; border-radius: 50%; }
.shift-color-pick.is-active { border-color: #2f6fd0; }
.shift-color-custom { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.shift-color-custom input[type="color"] { width: 34px; height: 28px; padding: 0; border: 1px solid #e3ecf6; border-radius: 6px; background: #fff; }
.shift-color-auto { margin-left: auto; padding: 5px 10px; border: 1px solid #cfe0f3; border-radius: 8px; background: #fff; color: #2f6fd0; font-size: 12px; cursor: pointer; }
.shift-sta-name b { display: block; font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-roster-empty { padding: 20px 12px; text-align: center; color: var(--text-2); font-size: 12.5px; }
.shift-week { display: flex; align-items: center; gap: 10px; }
.shift-week-label { flex: 1; min-width: 0; text-align: center; }
.shift-week-label b { display: block; font-size: 16px; font-weight: 750; letter-spacing: -0.2px; }
.shift-week-label span { display: block; font-size: 11.5px; color: var(--text-2); margin-top: 2px; }
.shift-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.shift-dot.morning { background: #6aa8ee; }
.shift-dot.middle { background: #37b26d; }
.shift-dot.night { background: #8f76f5; }
.shift-dot.training { background: #f0a63a; }
.shift-dot.leave { background: #ea6b6f; }
.shift-dot.rest { background: #b9c4d3; }

.shift-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-top: 12px;
}
.shift-summary-item { padding: 12px 6px; text-align: center; background: var(--card); }
.shift-summary-item b { display: block; font-size: 19px; font-weight: 800; color: var(--blue-deep); line-height: 1.2; }
.shift-summary-item span { display: block; font-size: 11px; color: var(--text-2); margin-top: 2px; }

.shift-table-card { margin-top: 12px; }
/* 表格内部滚动：表头首行吸顶，首列吸左 */
.shift-table-wrap {
  overflow: auto;
  max-height: max(280px, calc(100dvh - 250px));
  -webkit-overflow-scrolling: touch;
}
.shift-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.shift-table thead th {
  position: sticky; top: 0; z-index: 3;
  padding: 7px 3px;
  background: #f4f8fd;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 650; color: var(--text-2);
  text-align: center; white-space: nowrap;
}
.shift-table thead th b { display: block; font-size: 12px; color: var(--text); }
.shift-table thead th span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.shift-table thead th.is-today { background: var(--blue-soft); }
.shift-table thead th.is-today b, .shift-table thead th.is-today span { color: var(--blue-deep); }
.shift-table tbody td {
  padding: 4px 2px; border-bottom: 1px solid var(--line); text-align: center;
}
.shift-table tbody tr:last-child td { border-bottom: 0; }
.shift-table td.is-today { background: #f7fbff; }
.shift-name-col {
  position: sticky; left: 0; z-index: 2;
  text-align: left !important;
  background: var(--card);
}
.shift-table thead .shift-name-col { background: #f4f8fd; z-index: 4; }
/* 分组置顶：置顶行淡蓝底，选「吸附首行」后停在表头下方 */
.shift-pin-tag {
  display: inline-block; margin-left: 6px; padding: 1px 5px;
  border-radius: 6px; background: var(--blue-soft); color: var(--blue-deep);
  font-size: 10px; font-style: normal; font-weight: 700; vertical-align: 1px;
}
.shift-table tbody tr.is-pinned > td { background: #f7fbff; }
.shift-table tbody tr.is-pinned > td.is-today { background: #e6f1ff; }
.shift-table tbody tr.is-sticky > td {
  position: sticky;
  top: calc(42px + var(--pin-i, 0) * 37px);
  z-index: 2;
  background: #fff;
  box-shadow: inset 0 -1px 0 var(--line);
}
.shift-table tbody tr.is-sticky > td.is-today { background: #e6f1ff; }
.shift-table tbody tr.is-sticky > td.shift-name-col { z-index: 3; background: #fff; }

/* 区域排班右上角「更多」：四宫格按钮 + 修改记录浮层 */
.shift-more-wrap { position: relative; flex: none; margin-left: 4px; }
.shift-more-btn { padding: 6px 8px; }
.shift-more-btn svg { width: 20px; height: 20px; }
.shift-more-btn.active { background: rgba(255,255,255,0.32); }
.shift-more-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 150px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md);
}
.shift-more-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border-radius: 10px;
  font-size: 13px; color: var(--text); text-align: left;
}
.shift-more-item svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.shift-more-item.is-on { background: var(--blue-soft); color: var(--blue-deep); font-weight: 600; }
.shift-more-item:active { background: var(--blue-soft); }

.shift-log-panel {
  position: fixed; right: 14px; bottom: calc(88px + var(--safe-bottom));
  width: min(340px, calc(100vw - 28px));
  max-height: 70vh; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 42px rgba(23, 58, 102, .18);
  z-index: 70; overflow: hidden;
  min-width: 260px; min-height: 168px;
  resize: none;
}
/* 右下角缩放把手：宽高都能拖 */
.shift-log-resize {
  position: absolute; right: 2px; bottom: 2px; width: 20px; height: 20px;
  cursor: nwse-resize; touch-action: none; z-index: 2;
  background-image: linear-gradient(135deg,
    transparent 45%, #b9c4d4 45%, #b9c4d4 53%,
    transparent 53%, transparent 68%, #b9c4d4 68%, #b9c4d4 76%, transparent 76%);
}
.shift-log-panel.is-resizing { box-shadow: 0 24px 56px rgba(23, 58, 102, .26); }
.shift-log-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  cursor: grab; touch-action: none;
}
.shift-log-panel.is-dragging .shift-log-head { cursor: grabbing; }
.shift-log-panel.is-dragging { box-shadow: 0 24px 56px rgba(23, 58, 102, .26); }
.shift-log-head b { font-size: 14px; }
.shift-log-head span { font-size: 12px; color: var(--text-3); }
.shift-log-close {
  margin-left: auto; padding: 4px 8px; border-radius: 8px;
  font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-soft);
}
.shift-log-search { padding: 8px 10px 6px; border-bottom: 1px solid var(--line); }
.shift-log-search input {
  width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 34px 0 12px; background: #fff; font-size: 12px;
}
.shift-log-list { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 4px 6px 8px; }
.shift-log-row { padding: 9px 8px; border-bottom: 1px dashed var(--line); }
.shift-log-row:last-child { border-bottom: 0; }
.shift-log-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.shift-log-time { font-size: 11px; color: var(--text-3); }
.shift-log-no {
  font-size: 11px; color: var(--text-3);
  padding: 1px 6px; border-radius: 6px; background: #f2f5fa; white-space: nowrap;
}
.shift-log-line { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.shift-log-line b { font-size: 13px; }
.shift-log-flow { font-size: 12px; color: var(--text-2); }
.shift-log-by { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.shift-log-empty { padding: 18px 12px; font-size: 12px; color: var(--text-3); text-align: center; }

/* 手机宽度：记录浮层改为贴底半屏，带顶部把手 */
@media (max-width: 480px) {
  .shift-log-panel {
    left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
    width: auto !important; height: 50dvh; max-height: 50dvh;
    min-width: 0; min-height: 0;
    border-radius: 18px 18px 0 0;
    resize: none;
    padding-bottom: var(--safe-bottom);
  }
  .shift-log-head { position: relative; cursor: default; padding-top: 16px; }
  .shift-log-head::before {
    content: ''; position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
    width: 38px; height: 4px; border-radius: 2px; background: var(--line);
  }
  .shift-log-list { -webkit-overflow-scrolling: touch; }
  .shift-log-resize { display: none; }
}
.shift-name-col b { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.shift-id-col, .shift-post-col, .shift-station-col {
  text-align: left !important; white-space: nowrap;
  font-size: 11.5px; line-height: 1.2; color: var(--text-2);
}
.shift-total-col { font-size: 12px; font-weight: 700; color: var(--blue-deep); white-space: nowrap; }

.shift-cell {
  width: 100%; min-width: 32px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  padding: 0 3px;
  border-radius: 9px;
  font-size: 12px; font-weight: 750;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform .12s ease;
}
/* 带车站前缀（如 奥早1）时字号收一点，尽量完整显示 */
.shift-cell.has-station-prefix { font-size: 10px; letter-spacing: -0.2px; padding: 0 2px; }
.shift-cell:active { transform: scale(.94); }
.shift-cell[disabled] { cursor: default; opacity: .85; }
.shift-cell.morning { background: #e8f2fe; color: #1565c0; }
.shift-cell.middle { background: #e6f7ee; color: #0f8a4b; }
.shift-cell.night { background: #efebff; color: #5f43cf; }
.shift-cell.training { background: #fff2dd; color: #a86400; }
.shift-cell.leave { background: #ffe9e9; color: #c62f34; }
.shift-cell.rest { background: #eef2f7; color: #64748b; }
/* 班次不再用颜色区分，统一文字样式 */
.shift-cell.is-plain { background: #f4f8fd; color: #33414f; border: 1px solid #e3ecf6; }
.shift-cell.is-empty { background: #fbfdff; border: 1px dashed #d6e2f0; color: #b6c2d2; font-size: 15px; font-weight: 600; }
/* 当天登记为假期（区域级）且该员工没有单独排班 */
.shift-cell.is-holiday-day { background: #fff3ea; border: 1px solid #e3ecf6; color: var(--text); font-weight: 700; }

.shift-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.shift-actions .btn { padding: 11px 6px; font-size: 13.5px; white-space: nowrap; }
.shift-summary.in-card {
  margin-top: 12px; padding-top: 12px;
  background: transparent; box-shadow: none; border-radius: 0;
  border-top: 1px solid var(--line);
}

/* 排班单元格内联编辑：原地输入 + 候选班次 */
.shift-cell-editor {
  position: fixed; z-index: 80; width: 236px;
  padding: 8px; border-radius: 12px;
  background: var(--card); border: 1px solid #dbe7f5;
  box-shadow: 0 16px 36px rgba(15, 64, 120, 0.18);
}
.shift-cell-editor input {
  width: 100%; height: 32px; padding: 0 9px;
  border: 1px solid #dbe7f5; border-radius: 8px;
  font-size: 13px; color: var(--text);
}
.shift-cell-editor input:focus { outline: none; border-color: var(--blue); }
.shift-cell-hint { margin: 6px 2px 0; font-size: 11px; color: var(--text-2); }
.shift-cell-list { display: flex; flex-direction: column; gap: 2px; max-height: 188px; overflow-y: auto; margin-top: 6px; }
.shift-cell-option {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border: 0; border-radius: 8px;
  background: none; text-align: left; font-size: 12.5px; color: var(--text);
}
.shift-cell-option.is-active { background: var(--blue-soft); }
.shift-cell-option b { font-weight: 700; }
.shift-cell-option span { font-size: 11px; color: var(--text-2); }
.shift-cell-option.is-clear { color: #c62f34; }
.shift-cell-option.is-current b::after { content: " · 当前"; font-size: 10px; font-weight: 600; color: var(--text-3); }
/* 手机：单元格编辑器改为顶部浮层，放大触摸目标，避免键盘遮挡与固定定位点击偏移 */
@media (max-width: 640px) {
  .shift-cell-editor.is-mobile {
    left: 8px; right: 8px; top: calc(var(--safe-top) + 56px);
    width: auto; max-height: 56dvh; overflow-y: auto;
    border-radius: 16px; padding: 10px;
  }
  .shift-cell-editor.is-mobile input { height: 38px; font-size: 16px; }
  .shift-cell-editor.is-mobile .shift-cell-list { max-height: 38dvh; }
  .shift-cell-editor.is-mobile .shift-cell-option { min-height: 42px; font-size: 14px; padding: 8px 10px; }
  .shift-cell-editor.is-mobile .shift-fill-swatch { width: 30px; height: 30px; }
}
/* 单元格编辑弹层：填充颜色 */
.shift-cell-fill { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.shift-cell-fill-title { font-size: 11px; color: var(--text-2); }
.shift-cell-fill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.shift-fill-swatch {
  width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid var(--line); background: #fff;
}
.shift-fill-swatch.is-none { width: auto; padding: 0 9px; font-size: 11px; color: var(--text-2); }
.shift-fill-swatch.is-active { box-shadow: 0 0 0 2px var(--blue); }
/* 自定义填充色：色块 + 加号，点开系统取色器 */
.shift-fill-custom {
  position: relative; width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px dashed #b9c9dc; background: #fff;
  display: grid; place-items: center; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--text-3); overflow: hidden;
}
.shift-fill-custom input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; padding: 0; border: 0;
}
@media (max-width: 640px) {
  .shift-cell-editor.is-mobile .shift-fill-custom { width: 30px; height: 30px; }
}
/* 单元格编辑弹层：车站配色（假期 / 班次都适用） */
.shift-cell-stations { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.shift-station-swatch {
  padding: 3px 9px; border-radius: 999px; font-size: 11px;
  border: 1.5px solid var(--line); background: #fff; color: var(--text);
  white-space: nowrap;
}
.shift-station-swatch.is-active { box-shadow: 0 0 0 2px var(--blue); font-weight: 700; }

/* 基础设置单元格内联输入：输入框直接盖在原单元格上 */
.shift-inline-editor {
  position: fixed; z-index: 80; display: flex;
  padding: 2px; border-radius: 8px;
  background: var(--card); border: 1.5px solid var(--blue);
  box-shadow: 0 8px 22px rgba(15, 64, 120, 0.18);
}
.shift-inline-editor input {
  width: 100%; height: 100%; min-height: 24px; padding: 0 6px;
  border: 0; border-radius: 6px; background: transparent;
  font-size: 12.5px; color: var(--text);
}
.shift-inline-editor input:focus { outline: none; }

/* ===== 班表转换（Excel → 本系统班次） ===== */
.shift-conv-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.shift-conv-stats > div { background: var(--bg); border-radius: 10px; padding: 8px 4px; text-align: center; }
.shift-conv-stats b { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
.shift-conv-stats span { font-size: 10px; color: var(--text-3); }
.shift-conv-stats .is-diff b { color: var(--red); }
.shift-conv-stats .is-warn b { color: var(--orange); }

.shift-conv-map { margin-top: 10px; max-height: 300px; overflow: auto; -webkit-overflow-scrolling: touch; }
.shift-conv-map-row {
  display: grid; grid-template-columns: 86px 52px minmax(0, 1fr);
  align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line);
}
.shift-conv-map-row:last-child { border-bottom: 0; }
.shift-conv-map-row b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-conv-map-row span { font-size: 10.5px; color: var(--text-3); }
.shift-conv-map-row select {
  width: 100%; height: 30px; padding: 0 6px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px;
}
.shift-conv-map-row.is-warn b { color: var(--orange); }
.shift-conv-map-row.is-warn select { border-color: #f2c98a; background: #fffbf2; }

.shift-conv-card { padding: 0; overflow: hidden; }
/* 手机端：写入/取消按钮下方留出浏览器悬浮工具栏的高度，避免按钮被遮挡点不到 */
@media (max-width: 640px) {
  .shift-conv-actions { margin-bottom: calc(56px + var(--safe-bottom)); }
}
.shift-conv-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.shift-conv-head b { font-size: 14px; }
.shift-conv-head span { font-size: 11.5px; color: var(--text-3); }
.shift-conv-wrap { overflow: auto; -webkit-overflow-scrolling: touch; max-height: 72dvh; }
.shift-conv-table { border-collapse: separate; border-spacing: 0; font-size: 11px; }
.shift-conv-table th,
.shift-conv-table td {
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 0; text-align: center; white-space: nowrap;
}
.shift-conv-table th {
  position: sticky; top: 0; z-index: 2;
  height: 26px; min-width: 28px;
  background: #f7fafd; color: var(--text-2); font-size: 10px; font-weight: 600;
}
.shift-conv-table th.is-weekend { color: var(--red); }
.shift-conv-table .shift-conv-name {
  position: sticky; left: 0; z-index: 3;
  min-width: 76px; max-width: 76px;
  padding: 3px 8px; text-align: left; background: #fff;
}
.shift-conv-table thead .shift-conv-name { z-index: 4; background: #f7fafd; }
.shift-conv-name b { display: block; font-size: 11.5px; font-weight: 700; }
.shift-conv-name i { display: block; font-style: normal; font-size: 9.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.shift-conv-cell { height: 26px; min-width: 30px; }
.shift-conv-cell[data-action] { cursor: pointer; }
.shift-conv-cell[data-action]:hover { filter: brightness(0.96); }
.shift-conv-cell.is-edited { outline: 1px dashed var(--blue); outline-offset: -2px; }
.shift-conv-cell.is-empty { background: #fbfcfe; }
.shift-conv-cell.is-gap { background: #fff6f5; }
.shift-conv-cell.is-raw { color: #b26a00; background: #fff8ec; font-size: 10px; }
.shift-conv-cell.is-diff {
  font-weight: 800; color: #b42318;
  box-shadow: inset 0 0 0 1.5px #f04438;
  background-image: linear-gradient(rgba(240, 68, 56, 0.09), rgba(240, 68, 56, 0.09));
}

.shift-conv-diffs { padding: 0; }
.shift-conv-diffs summary { padding: 12px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.shift-conv-diff-list { max-height: 320px; overflow: auto; border-top: 1px solid var(--line); }
.shift-conv-diff-row {
  display: grid; grid-template-columns: max-content max-content minmax(0, 1fr);
  gap: 8px; padding: 7px 14px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.shift-conv-diff-row:last-child { border-bottom: 0; }
.shift-conv-diff-row b { font-weight: 700; white-space: nowrap; }
.shift-conv-diff-row span { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.shift-conv-diff-row em { font-style: normal; color: var(--red); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 1024px) {
  .shift-table { min-width: 0; }
}

/* 月视图：整月 30/31 天横向滚动，周末与今日底色区分 */
.shift-table.shift-month { width: max-content; min-width: 100%; }
.shift-table.shift-month thead th { padding: 6px 2px; }
.shift-table.shift-month thead th b { font-size: 11.5px; }
.shift-table.shift-month thead th span { font-size: 10px; }
.shift-table.shift-month tbody td { padding: 4px 1px; }
.shift-table.shift-month .shift-cell { min-width: 30px; height: 28px; border-radius: 8px; font-size: 11.5px; }
.shift-table thead th.is-weekend { background: #f7f9fc; }
.shift-table td.is-weekend { background: #fafcff; }
/* 今日列：整列淡蓝底 + 表头深蓝强调，便于一眼定位 */
.shift-table thead th.is-today {
  background: #d6e8ff;
  box-shadow: inset 0 -2px 0 var(--blue), inset 1px 0 0 #b6d3f4, inset -1px 0 0 #b6d3f4;
}
.shift-table thead th.is-today b { font-size: 13px; font-weight: 800; color: var(--blue-deep); }
.shift-table thead th.is-today span { color: var(--blue); font-weight: 700; }
.shift-table tbody td.is-today {
  background: #e6f1ff;
  box-shadow: inset 1px 0 0 #c3dbf5, inset -1px 0 0 #c3dbf5;
}
.shift-table tbody td.is-today .shift-cell.is-empty {
  background: #f1f8ff; border-color: #a7c9ec; color: #6f9ecb;
}

/* 排班管理分段与「我的排班」 */
.shift-tabs { margin-bottom: 12px; }
.shift-rules-card { margin-top: 12px; }
.shift-rules-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.shift-rules-add { padding: 6px 12px; font-size: 12px; }
.shift-rules-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.shift-tpl-fold { padding: 6px 10px; font-size: 12px; }
.shift-rule-ops { display: flex; gap: 2px; margin-left: 6px; flex: none; }
.shift-rule-op {
  border: 0; background: none; padding: 2px 4px;
  font-size: 12px; color: var(--blue); cursor: pointer;
}
.shift-rule-op.danger { color: var(--red); }
.shift-cross-hint { margin-top: 6px; line-height: 1.6; }
/* 排班设置：两列卡片并排 */
.shift-settings-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-top: 12px; align-items: start;
}
.shift-settings-grid > .card { margin-top: 0; }
@media (max-width: 860px) {
  .shift-settings-grid { grid-template-columns: 1fr; }
}
.shift-dot.holiday { background: #e5484d; }
.shift-rule-empty { padding: 10px 2px; line-height: 1.6; }
.shift-holiday-item[data-action] { cursor: pointer; }
.shift-holiday-item[data-action]:hover { background: #f7f9fc; }
.shift-holiday-item .shift-rule-op {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 8px; background: #fff;
}
.shift-holiday-item .shift-rule-op.danger { border-color: #f3cdd0; }
/* 分组成员搜索选择 */
.shift-search-wrap { position: relative; }
.shift-search-wrap input { padding-right: 38px; }
.shift-search-wrap input::-webkit-search-cancel-button { display: none; }
/* 不带放大镜等原生搜索装饰 */
.shift-search-wrap input::-webkit-search-decoration,
.shift-search-wrap input::-webkit-search-results-button,
.shift-search-wrap input::-webkit-search-results-decoration { display: none; -webkit-appearance: none; }
.shift-search-wrap input { -webkit-appearance: none; appearance: none; }
/* 区域排班：搜索框跟在岗位筛选右侧，自动占满剩余宽度 */
.filter-row .shift-roster-search { flex: 1 1 130px; min-width: 108px; }
.filter-row .shift-roster-search input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 999px; padding: 0 34px 0 12px; background: #fff; font-size: 13px; }
.shift-search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: #eceff4; color: #5b6b82; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.shift-search-clear:active { background: #dde3ec; }
.is-hidden { display: none !important; }
.shift-member-results {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; max-height: 220px; overflow: auto;
}
.shift-member-hint { padding: 14px 12px; color: var(--text-2); font-size: 12px; line-height: 1.5; }
.shift-member-result {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; border: 0; border-bottom: 1px solid #f0f2f5;
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.shift-member-result:last-child { border-bottom: 0; }
.shift-member-result span { font-weight: 600; flex: none; }
.shift-member-result em {
  flex: 1; min-width: 0; font-style: normal; font-size: 12px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shift-member-result i { flex: none; font-style: normal; font-size: 12px; color: #2f6fd0; }
.shift-member-result:hover { background: #f7f9fc; }
.shift-member-result.is-added { background: #f7f9fc; cursor: default; }
.shift-member-result.is-added i { color: var(--text-2); }
/* 轮排方案选择：两个及以上时一行两个，文字保持单行 */
.shift-plan-results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.shift-plan-results-grid .shift-member-result { border-bottom: 1px solid #f0f2f5; }
.shift-plan-results-grid .shift-member-result em { letter-spacing: 1px; }
.shift-member-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.shift-member-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 6px 4px 10px; border-radius: 999px;
  background: #eef3fb; color: #274066; font-size: 12px;
}
.shift-member-chip em { font-style: normal; color: #63728a; }
.shift-member-chip button {
  border: 0; background: none; padding: 0 2px;
  color: #63728a; font-size: 14px; line-height: 1; cursor: pointer;
}
.shift-member-chip.is-empty { background: none; color: var(--text-2); }
.shift-table th.is-holiday b, .shift-table th.is-holiday span { color: #e5484d; }
.shift-cal-day.is-holiday b { color: var(--text); }
/* 假期格：底色由车站配色 / 填充色决定，标签本身透明，文字黑色 */
.shift-day-tag.is-holiday { background: none; color: var(--text); }
.shift-time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shift-time-row input[type="time"] {
  flex: 1 1 96px; min-width: 0; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; color: var(--text); background: #fff;
}
.shift-time-row input[type="time"]:disabled { background: #f5f7fb; color: var(--muted); }
.shift-time-sep { font-size: 12px; color: var(--muted); }
.shift-allday {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; cursor: pointer; flex: none;
}
.shift-allday input { width: 15px; height: 15px; }
.shift-hours-row { display: flex; align-items: center; gap: 8px; }
.shift-hours-row > input { flex: 1 1 auto; min-width: 0; }
/* 去掉数字输入框的上下箭头 */
.shift-hours-row input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.shift-hours-row input[type="number"]::-webkit-outer-spin-button,
.shift-hours-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; appearance: none; margin: 0;
}
.shift-groups-card { margin-top: 12px; }
.shift-staff-picker {
  max-height: 260px; overflow: auto;
  border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px;
}
.shift-picker-station { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 0 4px; }
.shift-picker-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.shift-picker-item input { width: 16px; height: 16px; flex: none; }
.shift-group-options { display: flex; flex-direction: column; gap: 6px; }
.shift-group-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
}
.shift-group-option b { font-size: 13px; }
.shift-group-option span { font-size: 12px; color: var(--muted); margin-right: auto; }
.shift-mini-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 4px 9px; font-size: 12px; color: var(--text); cursor: pointer;
}
.shift-mini-btn:active { background: #f1f5fa; }
.shift-plan-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.shift-plan-seq { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 30px; }
.shift-plan-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-width: 26px; height: 26px; padding: 0 2px 0 5px; border-radius: 8px; font-size: 12px; font-weight: 600;
}
.shift-plan-chip-x {
  border: 0; background: none; padding: 0 2px;
  font-size: 12px; line-height: 1; color: inherit; opacity: 0.6; cursor: pointer;
}
.shift-plan-chip-x:hover { opacity: 1; }
.shift-plan-chip.morning { background: #e8f2fe; color: #1565c0; }
.shift-plan-chip.middle { background: #e6f7ee; color: #0f8a4b; }
.shift-plan-chip.night { background: #efebff; color: #5f43cf; }
.shift-plan-chip.training { background: #fff2dd; color: #a86400; }
.shift-plan-chip.leave { background: #ffe9e9; color: #c62f34; }
.shift-plan-chip.rest { background: #eef2f7; color: #64748b; }
.shift-plan-tools { display: flex; gap: 8px; margin-top: 6px; }
.shift-rule-list { display: flex; flex-direction: column; }
.shift-rule-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.shift-rule-item:last-child { border-bottom: 0; }
.shift-rule-item b { font-weight: 700; white-space: nowrap; }
.shift-rule-item span { color: var(--text-2); }
.shift-rule-item em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.shift-rule-clickable[data-action] { cursor: pointer; }
.shift-rule-clickable[data-action]:hover { background: #f7f9fc; }
/* 分组表单：删除按钮位于保存右侧 */
.shift-form-actions .btn-danger { flex: 0 0 92px; }

.shift-me-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shift-me-info b { display: block; font-size: 16px; font-weight: 750; }
.shift-me-info span { display: block; margin-top: 3px; font-size: 12px; color: var(--text-2); }
/* 工号 · 岗位 与车站同一行：车站排在岗位右侧 */
.shift-me-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shift-me-meta span { margin-top: 0; }
.shift-me-station { color: var(--text-3) !important; }
.shift-me-month { text-align: right; flex: none; }
.shift-me-month b { display: block; font-size: 14px; font-weight: 700; color: var(--blue-deep); }
.shift-me-month span { font-size: 11px; color: var(--text-3); }

.shift-cal-card { margin-top: 12px; }
/* 我的排班日历：7 列等宽自适应，长车站简称自动换行，格内自上而下「日期 / 车站简称 / 班次」 */
.shift-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.shift-cal-head {
  text-align: center; font-size: 11px; color: var(--text-3);
  padding: 2px 0 4px;
}
/* 日期数字固定在格子顶部，未排的格子不居中、只留数字 */
.shift-cal-day {
  min-height: 44px; padding: 4px 1px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border-radius: 10px; background: #f7fafd;
}
.shift-cal-day.is-weekend { background: #f3f7fb; }
.shift-cal-day.is-today { background: #eef6ff; box-shadow: inset 0 0 0 1.5px var(--blue); }
.shift-cal-day.is-blank { background: transparent; }
.shift-cal-day b { font-size: 11px; font-weight: 650; color: var(--text-2); }
/* 我的排班格内文字：车站简称 / 班次 / 假期简称，均单行不换行。
   用块级 + text-align:center 居中：文字比格子宽时左右两侧同时溢出，
   不会像 flex 项那样在部分 iOS 上被挤到右边。 */
.shift-cal-station, .shift-cal-shift, .shift-cal-holiday {
  display: block; width: 100%; text-align: center; white-space: nowrap;
}
.shift-cal-station { font-size: 8.5px; line-height: 1.15; color: var(--text-3); letter-spacing: -.2px; }
.shift-cal-shift { font-size: 11px; font-weight: 750; line-height: 1.15; color: var(--text); }
.shift-cal-holiday { font-size: 10.5px; font-weight: 700; line-height: 1.15; color: var(--text); }
.shift-day-tag {
  font-size: 10.5px; font-weight: 700;
  padding: 1px 5px; border-radius: 6px; white-space: nowrap;
}
.shift-day-tag.morning { background: #e8f2fe; color: #1565c0; }
.shift-day-tag.middle { background: #e6f7ee; color: #0f8a4b; }
.shift-day-tag.night { background: #efebff; color: #5f43cf; }
.shift-day-tag.training { background: #fff2dd; color: #a86400; }
.shift-day-tag.leave { background: #ffe9e9; color: #c62f34; }
.shift-day-tag.rest { background: #eef2f7; color: #64748b; }
.shift-day-tag.is-empty { background: #fbfdff; border: 1px dashed #d6e2f0; color: #b6c2d2; }

/* 员工信息四列：姓名（吸附）/ 工号 / 岗位 / 车站，宽度随内容自适应 */
.shift-table th.shift-name-col, .shift-table td.shift-name-col { padding-left: 12px !important; padding-right: 10px !important; }
.shift-table th.shift-id-col, .shift-table td.shift-id-col { padding-left: 8px !important; padding-right: 8px !important; }
.shift-table th.shift-post-col, .shift-table td.shift-post-col { padding-left: 8px !important; padding-right: 8px !important; }
.shift-table th.shift-station-col, .shift-table td.shift-station-col { padding-left: 8px !important; padding-right: 12px !important; }
.shift-table th.shift-total-col, .shift-table td.shift-total-col { padding-left: 8px !important; padding-right: 10px !important; }

/* ---------- 信息汇报（js/report.js，与 report-module-package 的 report.css 一致） ---------- */
/* 模块自己拼接分段与卡片，补上与页面一致的纵向间距，避免卡片上下贴在一起 */
#report-root { display: flex; flex-direction: column; gap: 16px; }
.report-snippet {
  margin-top: 6px; font-size: 12.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.report-table-wrap {
  max-height: 62vh; overflow: auto; border: 1px solid var(--line);
  border-radius: 12px; background: #fff;
}

.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.report-table th,
.report-table td {
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 8px 10px; text-align: left; white-space: nowrap; color: var(--text);
}

.report-table th { background: var(--blue-soft); font-weight: 700; position: sticky; top: 0; }

.report-table tr:last-child td { border-bottom: 0; }

.report-table td:last-child,
.report-table th:last-child { border-right: 0; }

.report-pre {
  max-height: 62vh; overflow: auto; margin: 0; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}

.report-image { display: block; width: 100%; height: auto; border-radius: 12px; }

.report-pdf { width: 100%; height: 66vh; border: 0; border-radius: 12px; background: #fff; }

.report-result {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 160px;
  max-height: 60vh;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  resize: vertical;
  field-sizing: content;
}

.report-filter-row { display: flex; gap: 10px; align-items: flex-start; }

.report-filter-row > .field { flex: 1 1 0; min-width: 0; }

@media (max-width: 420px) {
  .report-filter-row { flex-wrap: wrap; }
}

/* 窄屏触控：排班格子放大到接近 40px，避免点班次时误触到隔壁员工 / 隔壁日期 */
@media (max-width: 480px) {
  .shift-cell { min-width: 40px; height: 38px; font-size: 11.5px; padding: 0 2px; }
  .shift-cell.has-station-prefix { font-size: 9.5px; }
  .shift-table thead th { padding-top: 8px; padding-bottom: 8px; }
}

/* ===== 模块切换：View Transition 交叉淡入 =====
   路由切换时整块 DOM 被替换，若不加过渡，iOS 上会看到一帧白闪；
   这里只缩短默认的淡入时长，保持轻快手感 ===== */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: .16s; animation-timing-function: ease-out; }
}
