/* ============ 每日目标复盘系统 - 全局样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f4f6f8; color: #222; font-size: 14px; line-height: 1.5;
}
input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #1f4e79; color: #fff;
  box-shadow: 0 2px 8px rgba(31, 78, 121, .25);
}
.topbar-inner {
  max-width: 640px; margin: 0 auto; padding: 12px 14px 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b7bb8, #1f4e79);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff;
}
.brand-name { font-size: 16px; font-weight: 700; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.14);
  border-radius: 16px; padding: 3px 10px; max-width: 150px;
}
.user-chip .uname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.22); white-space: nowrap; }
.btn-logout { background: rgba(255,255,255,.14); border-radius: 16px; padding: 3px 10px; color: #fff; font-size: 12px; }
.btn-logout:active { background: rgba(255,255,255,.3); }

/* 窄屏(<=480px)顶部导航压缩: 隐藏品牌名, 简化用户区 */
@media (max-width: 480px) {
  .topbar-inner { padding: 9px 8px 7px; }
  .brand { gap: 5px; }
  .brand-name { display: none; }
  .user-chip { padding: 2px 6px; max-width: 80px; }
  .user-chip .uname { display: none; }
  .topbar-right { gap: 6px; }
  .btn-logout { padding: 2px 8px; font-size: 11px; }
  .tab { padding: 9px 5px; font-size: 12px; min-width: 72px; }
  .page { padding: 92px 10px 90px; }
  /* 今日目标 模板行窄屏: 名称占满一行, 控件换行 */
  .goal-tpl-row { flex-wrap: wrap; }
  .tpl-name { flex: 1 1 100%; }
  .tpl-ctrl { flex: 1 1 100%; justify-content: flex-end; }
}

.tabs {
  max-width: 640px; margin: 0 auto;
  display: flex; overflow-x: auto;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1; min-width: 82px; padding: 10px 8px; text-align: center;
  color: rgba(255,255,255,.72); font-size: 13px; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.tab.active { color: #fff; font-weight: 600; border-bottom-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- 页面容器 ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 104px 12px 96px; }
.page.no-tabs { padding-top: 76px; }
.section-title { font-size: 15px; font-weight: 700; color: #1f4e79; margin: 18px 0 10px; display: flex; align-items: center; gap: 6px; }
.section-title:first-child { margin-top: 6px; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border-radius: 12px; padding: 15px 14px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(31,78,121,.06); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 6px; }
.card-title { font-size: 14px; font-weight: 700; color: #222; }
.card-sub { font-size: 12px; color: #888; }

/* ---------- 表单 ---------- */
.form-item { margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; display: block; }
.form-label .req { color: #d64545; }
.input, .textarea, .select {
  width: 100%; padding: 11px 12px; border: 1px solid #e0e6ec; border-radius: 10px;
  background: #fbfcfe; font-size: 14px; outline: none; transition: border-color .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: #1f4e79; background: #fff; }
.textarea { min-height: 80px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; }

/* 只读信息行 */
.info-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.info-cell {
  flex: 1; min-width: calc(50% - 5px); background: #f7f9fb; border-radius: 10px; padding: 9px 12px;
}
.info-cell .k { font-size: 11px; color: #888; }
.info-cell .v { font-size: 14px; font-weight: 600; color: #222; margin-top: 1px; }

/* ---------- 按钮 ---------- */
.btn {
  display: block; width: 100%; padding: 13px; border-radius: 12px;
  font-size: 16px; font-weight: 600; text-align: center; transition: all .15s;
}
.btn-primary { background: #1f4e79; color: #fff; }
.btn-primary:active { background: #163a5c; }
.btn-ghost { background: #eef2f7; color: #1f4e79; }
.btn-ghost:active { background: #e0e7ef; }
.btn-sm { display: inline-block; width: auto; padding: 6px 14px; font-size: 13px; border-radius: 8px; font-weight: 600; }
.btn-danger { background: #d64545; color: #fff; }
.btn-danger-ghost { background: #fdecec; color: #d64545; }
.btn:disabled { opacity: .5; }

/* 补救措施 筛选按钮 */
.remedy-btns { display: flex; gap: 10px; }
.remedy-btn {
  flex: 1; padding: 12px; border-radius: 12px; border: 1.5px solid #e0e6ec;
  background: #fff; text-align: center; font-size: 14px; color: #666;
}
.remedy-btn.active-ot { border-color: #1f4e79; background: #eef4fa; color: #1f4e79; font-weight: 700; }
.remedy-btn.active-rp { border-color: #b0760a; background: #fdf3e0; color: #8a5a00; font-weight: 700; }
.remedy-panel { margin-top: 10px; background: #f7f9fb; border-radius: 10px; padding: 12px; }

/* ---------- 动态行 ---------- */
.dyn-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.dyn-no {
  width: 24px; height: 24px; border-radius: 50%; background: #eef2f7; color: #1f4e79;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 9px;
}
.dyn-input { flex: 1; padding: 10px 12px; border: 1px solid #e0e6ec; border-radius: 10px; font-size: 14px; outline: none; background: #fbfcfe; }
.dyn-input:focus { border-color: #1f4e79; background: #fff; }
.dyn-input.name-warn { border-color: #e06666; background: #fff7f7; box-shadow: 0 0 0 2px rgba(224,102,102,0.12); }
.dyn-input.name-warn::placeholder { color: #d9534f; font-weight: 600; }
.dyn-del { flex-shrink: 0; width: 34px; height: 38px; margin-top: 1px; border-radius: 10px; background: #f7f9fb; color: #999; font-size: 18px; }
.dyn-del:active { background: #fdecec; color: #d64545; }
.add-row-btn {
  width: 100%; padding: 10px; border: 1.5px dashed #c6d2de; border-radius: 10px;
  color: #1f4e79; font-size: 13px; font-weight: 600; background: #fbfcfe;
}
.add-row-btn:active { background: #eef4fa; }

/* ---------- 今日目标(完成/待办) & 今日待办 ---------- */
.goal-row { border: 1px solid #e7ecf2; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: #fbfcfe; }
.goal-row .dyn-row { margin-bottom: 6px; }
/* 新增行(5+, 含 + 添加目标): 上=内容行, 下=文本/数据 tab */
.goal-add-row { display: flex; flex-direction: column; gap: 6px; }
.goal-add-row .goal-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.goal-add-row .goal-main .goal-input { flex: 1 1 130px; min-width: 0; }
.goal-tpl-row .dyn-no, .goal-add-row .goal-main .dyn-no { margin-top: 0; }
/* 数据形态: 名称 + 目标/完成 数字块 */
.num-pair { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; flex: 1 1 auto; }
.num-pair .goal-num { width: 52px; }
/* 行内 类型选项卡(文本/数据) */
.goal-type-pick { display: inline-flex; gap: 0; padding: 2px; background: #eef2f7; border-radius: 7px; align-self: flex-start; margin-left: 32px; }
.mini-tab { padding: 3px 12px; font-size: 11px; color: #6b7280; border-radius: 5px; cursor: pointer; user-select: none; transition: background .15s, color .15s; }
.mini-tab.active { background: #1f4e79; color: #fff; font-weight: 600; }
.mini-tab:hover:not(.active) { background: #dde3ea; }
.goal-btns { display: flex; gap: 8px; flex-shrink: 0; }
.goal-btn {
  padding: 4px 14px; border-radius: 14px; font-size: 12px; font-weight: 600; border: 1px solid #dfe4ea;
  background: #fff; color: #8892a0;
}
.goal-btn.on-todo { background: #fff3e0; border-color: #f0c674; color: #b0760a; }
.goal-btn.on-done { background: #e6f5ec; border-color: #a9d9bd; color: #2e9e5b; }
.todo-empty { font-size: 13px; color: #2e9e5b; background: #f0faf4; border-radius: 8px; padding: 10px 12px; text-align: center; }
.goal-tag { margin-left: auto; flex-shrink: 0; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 9px; }
.goal-tag[data-gi] { cursor: pointer; user-select: none; transition: opacity .15s; }
.goal-tag[data-gi]:hover { opacity: .72; }
.goal-tip { font-size: 11px; color: #999; margin-top: 8px; line-height: 1.6; }
/* 模板行(1-4): 序号 + 名称锁定 + 目标[数字] + 完成[数字] + 状态 */
.goal-tpl-row { display: flex; align-items: center; gap: 12px; }
.tpl-name { flex: 1; min-width: 80px; padding: 3px 8px; font-size: 13px; color: #1f4e79; font-weight: 600; background: #eef4fa; border-radius: 8px; border: 1px solid #d3e1ee; }
.tpl-ctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tpl-lb { font-size: 11px; color: #8892a0; }
/* 数字输入(目标/完成) */
.goal-num { width: 56px; padding: 4px 8px; border: 1px solid #dfe4ea; border-radius: 8px; font-size: 14px; text-align: center; background: #fff; color: #333; -moz-appearance: textfield; }
.goal-num::-webkit-outer-spin-button,
.goal-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-state { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 9px; white-space: nowrap; min-width: 56px; text-align: center; }
.num-state.done { background: #e6f5ec; color: #2e9e5b; }
.num-state.todo { background: #fff3e0; color: #b0760a; }
.goal-prog { color: #8892a0; font-size: 12px; }
.todo-prog { color: #b0760a; font-size: 11px; font-weight: 400; }
.goal-tag.done { background: #e6f5ec; color: #2e9e5b; }
.goal-tag.todo { background: #fff3e0; color: #b0760a; }
.item-chip > span:not(.no):not(.goal-tag) { flex: 1; }

/* ---------- 7天状态条 ---------- */
.week-strip { display: flex; gap: 6px; }
.day-cell {
  flex: 1; text-align: center; background: #f7f9fb; border-radius: 10px; padding: 7px 2px 5px;
}
.day-cell .d { font-size: 10px; color: #999; }
.day-cell .md { font-size: 12px; font-weight: 600; margin: 1px 0 3px; }
.day-cell .st { font-size: 14px; font-weight: 800; }
.day-cell.ok { background: #e6f5ec; }
.day-cell.ok .st { color: #2e9e5b; }
.day-cell.no { background: #fdecec; }
.day-cell.no .st { color: #d64545; }
.day-cell.today { box-shadow: inset 0 0 0 1.5px #1f4e79; }
.day-cell .st-txt { font-size: 10px; }

/* ---------- 数据导航 ---------- */
.nav-cards { display: flex; gap: 10px; }
.nav-card { flex: 1; background: #f7f9fb; border-radius: 12px; padding: 13px 6px; text-align: center; }
.nav-num { font-size: 24px; font-weight: 800; color: #1f4e79; line-height: 1.2; }
.nav-card.warn .nav-num { color: #d64545; }
.nav-label { font-size: 12px; color: #666; margin-top: 2px; }
.nav-list { margin-top: 10px; background: #f7f9fb; border-radius: 10px; padding: 10px 12px; }
.nav-list .list-title { font-size: 12px; font-weight: 700; color: #d64545; margin-bottom: 6px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #fff; border-radius: 14px; padding: 3px 10px; font-size: 12px; color: #555; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.chip.warn { background: #fdecec; color: #d64545; }
.chip.ok { background: #e6f5ec; color: #2e9e5b; }

/* 团队切换横向 chip 列表 */
.team-switch { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px; margin: 6px 0 10px; scrollbar-width: none; }
.team-switch::-webkit-scrollbar { display: none; }
.ts-chip {
  flex-shrink: 0; padding: 6px 13px; border-radius: 16px;
  background: #fff; border: 1px solid #e0e6ec; font-size: 12px; color: #555; cursor: pointer;
  white-space: nowrap; transition: all .12s;
}
.ts-chip:active { background: #eef2f7; }
.ts-chip.active { background: #1f4e79; color: #fff; border-color: #1f4e79; font-weight: 600; }

/* 部门汇总(数据看板) */
.dept-block { margin-bottom: 8px; background: #f7f9fb; border-radius: 10px; padding: 10px 12px; }
.dept-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.dept-head .cnt { font-size: 12px; color: #888; font-weight: 400; }
.dept-progress { height: 4px; background: #e0e6ec; border-radius: 2px; margin: 8px 0 6px; overflow: hidden; }
.dept-progress .fill { height: 100%; background: #2e9e5b; border-radius: 2px; }
.dept-miss { font-size: 12px; color: #d64545; }

/* ---------- 记录卡片 ---------- */
.rec-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(31,78,121,.06); }
.rec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; flex-wrap: wrap; gap: 4px; }
.rec-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.rec-meta { font-size: 12px; color: #999; }
.rec-date { font-size: 12px; color: #1f4e79; font-weight: 600; background: #eef4fa; padding: 2px 8px; border-radius: 10px; }
.rec-edit-btn { font-size: 12px; font-weight: 600; color: #fff; background: #1f4e79; border: none; border-radius: 8px; padding: 4px 12px; cursor: pointer; flex-shrink: 0; }
.rec-edit-btn:active { opacity: .75; }
.sec-title { font-size: 12px; font-weight: 700; color: #1f4e79; margin: 10px 0 6px; }
.item-chip { background: #f7f9fb; border-radius: 8px; padding: 7px 10px; font-size: 13px; margin-bottom: 4px; display: flex; gap: 8px; }
.item-chip .no { color: #1f4e79; font-weight: 700; flex-shrink: 0; }
.remedy-tag {
  display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; margin: 2px 6px 2px 0;
}
.remedy-tag.ot { background: #eef4fa; color: #1f4e79; }
.remedy-tag.rp { background: #fdf3e0; color: #8a5a00; }
.empty-tip { text-align: center; color: #aaa; padding: 40px 0; font-size: 13px; }

/* 审批 */
.approve-box { background: #f7f9fb; border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.approve-item { background: #fff; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }
.approve-item:last-child { margin-bottom: 0; }
.approve-item .who { font-weight: 600; color: #1f4e79; margin-bottom: 2px; }
.approve-item .time { font-size: 11px; color: #aaa; }
.approve-input { width: 100%; padding: 9px 10px; border: 1px solid #e0e6ec; border-radius: 8px; font-size: 13px; outline: none; background: #fff; }
.approve-input:focus { border-color: #1f4e79; }
.approve-submit { margin-top: 6px; display: inline-block; padding: 6px 16px; background: #1f4e79; color: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; }
.approve-submit:active { background: #163a5c; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #1f4e79 0%, #1a4270 55%, #163a5c 100%); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 34px 26px 26px; box-shadow: 0 12px 40px rgba(0,0,0,.28); }
.login-logo {
  width: 140px; height: 62px; border-radius: 14px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #3b7bb8, #1f4e79);
  display: flex; align-items: center; justify-content: center;
  font-size: 25px; font-weight: 800; color: #fff; letter-spacing: 3px;
}
.login-title { text-align: center; font-size: 20px; font-weight: 800; color: #1f4e79; }
.login-sub { text-align: center; font-size: 12px; color: #999; margin: 4px 0 24px; }
.login-tip { text-align: center; font-size: 12px; color: #aaa; margin-top: 16px; line-height: 1.6; }
.err-msg { background: #fdecec; color: #d64545; font-size: 13px; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; display: none; }
.err-msg.show { display: block; }

/* ---------- 搜索栏 ---------- */
.search-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.search-bar .input { flex: 1; }
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

/* 日期范围快捷栏 */
.date-bar { display: flex; flex-direction: column; gap: 8px; }
.date-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.dp {
  padding: 7px 14px; border: 1px solid #e0e6ec; border-radius: 8px;
  background: #fff; color: #555; font-size: 13px; cursor: pointer;
  transition: all .12s; font-weight: 500;
}
.dp:active { background: #eef2f7; }
.dp.active { background: #1f4e79; color: #fff; border-color: #1f4e79; font-weight: 600; }
.date-custom { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.date-c {
  flex: 1; padding: 8px 10px; border: 1px solid #e0e6ec; border-radius: 8px;
  font-size: 13px; background: #fbfcfe; outline: none;
}
.date-c:focus { border-color: #1f4e79; background: #fff; }
.date-hint { font-size: 12px; color: #8a929b; line-height: 1.5; }
.date-hint b { color: #1f4e79; font-weight: 600; }
.filter-bar .input, .filter-bar .select { flex: 1; min-width: 110px; }
.filter-bar .date-input { flex: 1.2; min-width: 130px; }


/* 团队筛选(多选下拉) */
.ms-wrap { position: relative; flex: 1; min-width: 140px; }
.ms-btn {
  width: 100%; text-align: left; padding: 11px 12px; border: 1px solid #e0e6ec; border-radius: 10px;
  background: #fbfcfe; font-size: 14px; color: #6b7a8a; font-family: inherit; cursor: pointer;
}
.ms-btn.on { border-color: #1f4e79; color: #1f4e79; background: #f2f7fc; font-weight: 600; }
.ms-panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; min-width: 210px;
  background: #fff; border: 1px solid #e0e6ec; border-radius: 12px;
  box-shadow: 0 10px 28px rgba(31, 78, 121, .14); overflow: hidden;
}
.ms-acts { display: flex; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #f0f3f7; }
.ms-act { font-size: 12px; font-weight: 600; color: #1f4e79; background: #eef4fa; border: none; border-radius: 8px; padding: 5px 12px; cursor: pointer; font-family: inherit; }
.ms-list { max-height: 260px; overflow-y: auto; padding: 6px; }
.ms-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; font-size: 13px; color: #33475b; cursor: pointer; }
.ms-item:hover { background: #f5f8fb; }
.ms-item input { width: 16px; height: 16px; accent-color: #1f4e79; flex: none; }
.ms-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-ct { font-size: 11px; color: #9aa7b4; flex: none; }
/* ---------- 后台管理 ---------- */
.sub-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.sub-tab { flex: 1; padding: 9px; border-radius: 10px; background: #eef2f7; color: #1f4e79; font-size: 13px; font-weight: 600; text-align: center; }
.sub-tab.active { background: #1f4e79; color: #fff; }
.upload-zone { border: 1.5px dashed #c6d2de; border-radius: 12px; padding: 18px; text-align: center; color: #888; font-size: 13px; margin-bottom: 10px; background: #fbfcfe; }
.upload-zone.active { border-color: #1f4e79; background: #eef4fa; color: #1f4e79; }
.upload-zone input[type=file] { display: none; }
.user-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid #f0f3f6;
}
.user-row:last-child { border-bottom: none; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #eef2f7; color: #1f4e79;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.user-meta { font-size: 11px; color: #999; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 10px; padding: 1px 7px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.tag.super { background: #fdecec; color: #d64545; }
.tag.gm { background: #efe9fb; color: #6b4bb8; }
.tag.manager { background: #eef4fa; color: #1f4e79; }
.tag.staff { background: #f0f3f6; color: #777; }
.tag.on { background: #e6f5ec; color: #2e9e5b; }
.tag.off { background: #f0f3f6; color: #999; }

/* 表格(访客中心) */
.table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(31,78,121,.06); }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
table.list th { background: #f7f9fb; color: #666; font-weight: 600; text-align: left; padding: 10px 12px; white-space: nowrap; font-size: 12px; }
table.list td { padding: 10px 12px; border-top: 1px solid #f0f3f6; white-space: nowrap; }
table.list tr:first-child td { border-top: none; }

/* ---------- 底部 ---------- */
.footer { text-align: center; color: #bbb; font-size: 11px; padding: 20px 0 8px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(20,32,48,.5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  width: 100%; max-width: 340px; background: #fff; border-radius: 16px;
  padding: 22px 18px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.modal-title { font-size: 16px; font-weight: 700; color: #1f4e79; margin-bottom: 4px; }
.modal-sub { font-size: 12px; color: #888; margin-bottom: 14px; }
.modal .input { margin-bottom: 10px; }
.modal-btns { display: flex; gap: 10px; margin-top: 12px; }
.modal-btns .btn { flex: 1; padding: 11px; font-size: 14px; }

/* 提示 toast */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: rgba(31,78,121,.95); color: #fff; font-size: 13px; padding: 10px 18px;
  border-radius: 24px; z-index: 999; opacity: 0; pointer-events: none; transition: all .25s;
  max-width: 82%; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 加载 */
.loading { text-align: center; color: #999; padding: 30px 0; font-size: 13px; }

/* PC 端微调: 内容更宽舒适 */
@media (min-width: 768px) {
  .page { max-width: 760px; }
  .topbar-inner, .tabs { max-width: 760px; }
}

/* ============ 月历视图(一人一张当月日历) ============ */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-month { font-size: 17px; font-weight: 700; color: #1f4e79; letter-spacing: 0.5px; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend .lg.ok { color: #2e9e5b; }
.cal-legend .lg.miss { color: #d9534f; }
.cal-legend .lg.fut { color: #a8b3bf; }

.cal-person { background: #fff; border: 1px solid #eef1f5; border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.cal-ph { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-nm { font-size: 15px; font-weight: 700; color: #1f3b57; }
.cal-no { font-size: 11px; color: #9aa7b4; }
.cal-bg { font-size: 11px; color: #1f4e79; background: #eef4fa; border-radius: 8px; padding: 2px 8px; }
.cal-rt { margin-left: auto; font-size: 12px; font-weight: 600; color: #5a6b7c; white-space: nowrap; }
.cal-rt.bad { color: #d9534f; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; color: #a8b3bf; padding-bottom: 2px; }
.cal-cell { height: 40px; border-radius: 8px; background: #f7f9fb; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cal-cell i { font-style: normal; font-size: 9px; line-height: 1; color: #a8b3bf; }
.cal-cell b { font-size: 13px; line-height: 1.25; font-weight: 700; }
.cal-cell.ok { background: #e6f5ec; }
.cal-cell.ok b { color: #2e9e5b; }
.cal-cell.ok i { color: #7fbf9a; }
.cal-cell.miss { background: #fdecea; }
.cal-cell.miss b { color: #d9534f; }
.cal-cell.miss i { color: #e8a49e; }
.cal-cell.blank { background: transparent; }
.cal-cell.fut { background: #fbfcfd; }
.cal-cell.fut i { color: #dfe5ea; }

/* ===== 月历网格(个人/团队共用)：手机日历风格 —— 无网格线、大日期、留白分隔 ===== */
.cal-grid.gcal { gap: 2px; background: transparent; border: none; border-radius: 0; overflow: visible; }
.cal-grid.gcal .cal-dow { background: transparent; font-size: 12px; font-weight: 500; color: #9aa4af; padding: 2px 0 8px; }
.cal-grid.gcal .cal-dow:nth-child(6),
.cal-grid.gcal .cal-dow:nth-child(7) { color: #e0604f; }
.cal-grid.gcal .cal-cell { height: 54px; border-radius: 12px; background: transparent; border: none; position: relative; overflow: hidden; padding-bottom: 0; }
.cal-grid.gcal .cal-cell .cd { font-style: normal; font-size: 18px; font-weight: 500; color: #1f2328; line-height: 1.1; }
.cal-grid.gcal .cal-cell .cn { font-size: 11px; font-weight: 500; color: #a8b0ba; line-height: 1.1; margin-top: 3px; }
/* 周六日: 日期暖红(与日历 App 一致) */
.cal-grid.gcal .cal-cell:nth-child(7n+6) .cd,
.cal-grid.gcal .cal-cell:nth-child(7n) .cd { color: #e0604f; }
/* 补位格 / 未来日期: 浅灰 */
.cal-grid.gcal .cal-cell.blank .cd,
.cal-grid.gcal .cal-cell.fut .cd { color: #ccd4dd; }
/* 今天: 蓝色圆角描边 */
.cal-grid.gcal .cal-cell.today { box-shadow: inset 0 0 0 2px #4a7cf0; }

/* 个人月历: 已填写=绿底 / 未填写=红底 (日期保持深色, 状态字加粗) */
.cal-grid.person-cal .cal-cell.p-ok { background: #d9f2e3; }
.cal-grid.person-cal .cal-cell.p-ok .cd { color: #1c4a33; font-weight: 600; }
.cal-grid.person-cal .cal-cell.p-ok .cn { color: #1f7a45; font-weight: 700; }
.cal-grid.person-cal .cal-cell.p-miss { background: #fddfdd; }
.cal-grid.person-cal .cal-cell.p-miss .cd { color: #7d2b27; font-weight: 600; }
.cal-grid.person-cal .cal-cell.p-miss .cn { color: #d0352f; font-weight: 700; }

/* 团队月历: 底块深浅表示当日填写率 */
.cal-grid.team-cal .cal-cell.t-full { background: #e9f7ef; }
.cal-grid.team-cal .cal-cell.t-full .cn { color: #1f7a45; }
.cal-grid.team-cal .cal-cell.t-high { background: #f3fbf6; }
.cal-grid.team-cal .cal-cell.t-high .cn { color: #2e9e5b; }
.cal-grid.team-cal .cal-cell.t-part .cn { color: #c8901a; }
.cal-grid.team-cal .cal-cell.t-none { background: #fceceb; }
.cal-grid.team-cal .cal-cell.t-none .cn { color: #d9534f; }

/* 团队月历: 置顶「全公司汇总」卡 */
.cal-person.summary-cal { border: 1px solid #cfdfef; background: linear-gradient(180deg, #f7fbff 0%, #ffffff 70%); box-shadow: 0 2px 12px rgba(31, 78, 121, .07); margin-bottom: 16px; }
.cal-person.summary-cal .cal-nm { color: #1f4e79; font-size: 16px; }
.cal-person.summary-cal .cal-bg { background: #e3edf9; color: #1f4e79; font-weight: 600; }
.cal-person.summary-cal .cal-rt { color: #1f4e79; }
.cal-person.summary-cal .cal-rt.bad { color: #d9534f; }
.cal-grid.team-cal.sum-cal .cal-cell .cd { font-weight: 600; }
.sum-note { font-size: 11px; color: #9aa7b4; margin-top: 8px; line-height: 1.5; }

/* 月历图例色块 */
.cal-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.cal-legend .sw.s-full { background: #c9ebd8; }
.cal-legend .sw.s-high { background: #e4f5ea; }
.cal-legend .sw.s-part { background: #fff; border: 1px solid #e8b450; }
.cal-legend .sw.s-none { background: #fbdcd9; }
.cal-legend .sw.s-ok { background: #d9f2e3; border: 1px solid #a8ddbe; }
.cal-legend .sw.s-miss { background: #fddfdd; border: 1px solid #f0b3ae; }

/* PC 端格子更舒展 */
@media (min-width: 768px) {
  .cal-grid.gcal .cal-cell { height: 64px; }
  .cal-grid.gcal .cal-cell .cd { font-size: 20px; }
  .cal-grid.gcal .cal-cell .cn { font-size: 12px; }
}

@media (max-width: 400px) {
  /* 区间模式下汇总卡增至 5 个(多一个「全勤」), 窄屏收紧间距 */
  .nav-cards { gap: 6px; }
  .nav-card { padding: 11px 3px; }
  .nav-num { font-size: 20px; }
  .nav-label { font-size: 11px; }
  .cal-grid.gcal .cal-cell { height: 48px; }
  .cal-grid.gcal .cal-cell .cd { font-size: 15px; }
  .cal-grid.gcal .cal-cell .cn { font-size: 10px; }
  .cal-grid.gcal .cal-dow { font-size: 11px; padding: 2px 0 6px; }
  .cal-rt { margin-left: 0; width: 100%; }
}

/* ===== V1.47 休息 / 请假 / 调休 ===== */
.rest-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rest-btn {
  flex: 1; min-width: 74px; padding: 11px 6px; border-radius: 12px;
  border: 1.5px solid #e0e6ec; background: #fff; text-align: center;
  font-size: 13px; color: #666; cursor: pointer; user-select: none; transition: all .12s;
}
.rest-btn:active { background: #eef2f7; }
.rest-btn.active { border-color: #1f7a45; background: #e9f7ef; color: #1f7a45; font-weight: 700; }
/* 记录卡上的休息标签 */
.remedy-tag.rest { background: #eef4fa; color: #1f4e79; }
/* 个人月历: 休息/请假/调休格子(蓝灰底 + 休/假/调) */
.cal-grid.person-cal .cal-cell.p-rest { background: #e8eef6; }
.cal-grid.person-cal .cal-cell.p-rest .cd { color: #3d5771; font-weight: 600; }
.cal-grid.person-cal .cal-cell.p-rest .cn { color: #2f6fc4; font-weight: 700; }
/* 团队月历 / 汇总日历: 当日全员休息 */
.cal-grid.team-cal .cal-cell.t-rest { background: #e8eef6; }
.cal-grid.team-cal .cal-cell.t-rest .cd { color: #3d5771; }
.cal-grid.team-cal .cal-cell.t-rest .cn { color: #2f6fc4; font-weight: 700; }
/* 图例色块 + 文字 */
.cal-legend .sw.s-rest { background: #e8eef6; border: 1px solid #b9cde4; }
.cal-legend .lg.rest { color: #2f6fc4; }
/* 记录卡「删除」按钮 */
.rec-del-btn {
  font-size: 12px; font-weight: 600; color: #fff; background: #c0392b;
  border: none; border-radius: 8px; padding: 4px 12px; cursor: pointer;
  flex-shrink: 0; margin-left: 6px;
}
.rec-del-btn:active { opacity: .75; }
.rec-del-btn:disabled { opacity: .5; }
