/* ============================================================================
 * frontend/calendar_full.css · 日历（前台整页）
 * 复刻对标站 scrm.gdzhongke.cn「日历」页 + 8766 统一规范
 * ========================================================================== */

#calendar_fullView .wk-page-card {
  display: flex; flex-direction: column; min-height: 0; height: 100%;
}
#calendar_fullHost { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---------------------------------------------------------------- 页头 */
.cf-page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 8px; flex: none;
}
.cf-title-wrap { display: flex; align-items: baseline; gap: 10px; }
.cf-page-title { margin: 0; font-size: 17px; font-weight: 600; color: #1f2a37; }
.cf-page-sub { font-size: 12px; color: #8a94a6; }
.cf-head-actions { display: flex; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- 工具条 */
.cf-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px 10px; flex: none;
}
.cf-nav { display: flex; gap: 4px; }
.cf-nav-btn {
  height: 30px; min-width: 30px; padding: 0 9px;
  border: 1px solid #dcdfe6; border-radius: 6px;
  background: #fff; color: #46536a; font-size: 15px; line-height: 1;
  cursor: pointer;
}
.cf-nav-btn:hover, .cf-today-btn:hover { border-color: #0052cc; color: #0052cc; }
.cf-today-btn { font-size: 13px; }
.cf-title { font-size: 15px; font-weight: 600; color: #1f2a37; min-width: 170px; margin-left: auto; }
.cf-view-bar { display: flex; gap: 4px; }
.cf-vbtn {
  height: 30px; padding: 0 12px; font-size: 13px;
  border: 1px solid #dcdfe6; border-radius: 6px;
  background: #fff; color: #5b6472; cursor: pointer;
}
.cf-vbtn:hover { border-color: #0052cc; color: #0052cc; }
.cf-vbtn.is-active { background: #eaf2ff; border-color: #0052cc; color: #0052cc; font-weight: 600; }

/* ---------------------------------------------------- 主体：左类型 + 日历 */
.cf-body-wrap {
  display: flex; flex: 1; min-height: 0;
  padding: 0 16px calc(var(--active-pager-height, 58px) + 14px);
  gap: 12px;
}
.cf-side {
  flex: none; width: 158px;
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 6px;
  border: 1px solid #e8ecf2; border-radius: 8px;
  background: #fafbfc;
  align-self: flex-start;
  max-height: 100%; overflow: auto;
}
.cf-side-group {
  font-size: 11px; color: #98a2b3;
  padding: 8px 8px 4px; letter-spacing: .4px;
}
.cf-side-tip { font-size: 11px; color: #b6bdc9; padding: 2px 9px 6px; line-height: 1.6; }
.cf-side-item {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 7px 9px;
  border: none; border-radius: 6px;
  background: none; font-size: 13px; color: #46536a;
  cursor: pointer; text-align: left;
}
.cf-side-item:hover { background: #eef2f7; }
.cf-side-item.is-active { background: #eaf2ff; color: #0052cc; font-weight: 600; }
.cf-side-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cf-side-label { flex: 1; }
.cf-side-item i {
  font-style: normal; font-size: 11px; color: #98a2b3;
  background: #fff; border: 1px solid #e8ecf2; border-radius: 9px;
  padding: 0 6px; min-width: 20px; text-align: center; line-height: 17px;
}
.cf-side-item.is-active i { color: #0052cc; border-color: #b3d0ff; }

.cf-main {
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  border: 1px solid #e8ecf2; border-radius: 8px;
  background: #fff; overflow: hidden;
}

/* ---------------------------------------------------------------- 月/周网格 */
.cf-grid-head {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #f7f9fc; border-bottom: 1px solid #e8ecf2;
  flex: none;
}
.cf-grid-head > span {
  padding: 9px 8px; font-size: 12px; font-weight: 600; color: #46536a; text-align: center;
}
.cf-head-date { font-style: normal; font-size: 11px; color: #98a2b3; margin-left: 4px; font-weight: 400; }

.cf-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(88px, 1fr);
  flex: 1; min-height: 0; overflow: auto;
}
.cf-grid-week { grid-auto-rows: minmax(150px, 1fr); }

.cf-cell {
  border-right: 1px solid #f0f3f7;
  border-bottom: 1px solid #f0f3f7;
  padding: 5px 6px;
  cursor: pointer;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 3px;
  transition: background .12s;
}
.cf-cell:hover { background: #f7f9fc; }
.cf-cell.is-out { background: #fcfcfd; }
.cf-cell.is-out .cf-daynum { color: #c9cfd8; }
.cf-cell.is-today { background: #f5f9ff; }
.cf-cell.is-today .cf-daynum { color: #0052cc; font-weight: 700; }

.cf-daynum {
  font-size: 12px; color: #46536a; font-weight: 600;
  display: flex; align-items: center; gap: 5px; flex: none;
}
.cf-daynum i {
  font-style: normal; font-size: 10px; font-weight: 600;
  background: #eaf2ff; color: #0052cc; border-radius: 8px;
  padding: 0 5px; line-height: 15px;
}
.cf-cell-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.cf-chip {
  font-size: 11px; color: #46536a;
  background: #f7f9fc; border: 1px solid #eef1f5;
  border-left: 3px solid #0052cc;
  border-radius: 3px; padding: 1px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cf-chip:hover { background: #eef2f7; }
.cf-more { font-size: 10px; color: #98a2b3; padding-left: 2px; }
.cf-empty-cell { font-size: 11px; color: #d5dae2; text-align: center; padding-top: 8px; }

/* ---------------------------------------------------------------- 年视图 */
.cf-year { padding: 12px; overflow: auto; flex: 1; min-height: 0; }
.cf-year-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cf-ycell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 92px; border: 1px solid #e8ecf2; border-radius: 10px;
  background: #fafbfc; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.cf-ycell:hover { background: #f2f6ff; border-color: #b3d0ff; }
.cf-ycell.is-empty { background: #fcfcfd; }
.cf-ycell.is-now { border-color: #b3d0ff; background: #f5f9ff; }
.cf-ym-t { font-size: 14px; font-weight: 600; color: #1f2a37; }
.cf-ycnt { font-size: 12px; color: #0052cc; margin-top: 4px; font-weight: 600; }
.cf-ycell.is-empty .cf-ycnt { color: #c9cfd8; font-weight: 400; }

/* ---------------------------------------------------------------- 日视图 */
.cf-day-list { padding: 8px 12px; overflow: auto; flex: 1; min-height: 0; }
.cf-day-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; margin-bottom: 6px;
  border: 1px solid #eef1f5; border-radius: 8px;
  background: #fff; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.cf-day-item:hover { background: #f7f9fc; border-color: #b3d0ff; }
.cf-day-time {
  flex: none; width: 52px; font-size: 12px; color: #46536a;
  font-variant-numeric: tabular-nums;
}
.cf-day-bar { flex: none; width: 3px; height: 30px; border-radius: 2px; }
.cf-day-body { flex: 1; min-width: 0; }
.cf-day-title { font-size: 13px; color: #1f2a37; font-weight: 500; }
.cf-day-meta { font-size: 12px; color: #8a94a6; margin-top: 2px; }
.cf-day-status {
  flex: none; font-size: 12px; color: #5b6472;
  background: #eef2f7; border-radius: 10px; padding: 1px 9px; line-height: 18px;
}
.cf-day-empty { text-align: center; padding: 60px 0; color: #b6bdc9; font-size: 13px; }
.cf-day-empty-sub {
  margin-top: 10px; font-size: 12px; color: #9aa3b2; line-height: 1.7;
}
.cf-day-empty-sub b { color: #e67700; font-weight: 600; }

/* 已完成：划掉、变淡（boss 2026-10-19：点「已完成」就自动擦掉）*/
.cf-day-item.is-done { background: #fafbfc; border-color: #f0f2f5; }
.cf-day-item.is-done .cf-day-title { text-decoration: line-through; color: #9aa3b2; }
.cf-day-item.is-done .cf-day-time,
.cf-day-item.is-done .cf-day-meta { color: #b6bdc9; }
.cf-day-item.is-done .cf-day-bar { opacity: .35; }

/* 悬停才出现的「✓ 已完成 / 🗑」操作（常态不干扰阅读）*/
/* 🔴 2026-10-19 boss：「移动到那条内容没有出现已完成/删除按钮」——
   原来靠 hover 才显形，悬停判定区窄 + 触屏摸不到 → 一律**常显**，不做悬停隐藏。 */
.cf-day-ops {
  flex: none; display: flex; gap: 6px;
}
.cf-op {
  height: 26px; padding: 0 10px; font-size: 12px; line-height: 1;
  border: 1px solid #dcdfe6; border-radius: 6px;
  background: #fff; color: #46536a; cursor: pointer; white-space: nowrap;
}
.cf-op:hover { border-color: #0052cc; color: #0052cc; background: #f5f9ff; }
.cf-op.is-on { border-color: #0052cc; color: #0052cc; }
.cf-op-del:hover { border-color: #e5484d; color: #e5484d; background: #fff5f5; }
.cf-op-hide:hover { border-color: #8a94a6; color: #46536a; background: #f5f7fa; }

/* 日历关键词查询（工具栏最右）· 2026-10-19 boss「上面要有一个查询」 */
.cf-search { position: relative; display: flex; align-items: center; margin-left: 12px; flex-shrink: 0; }
.cf-search-ic { position: absolute; left: 10px; font-size: 14px; color: #98a2b3; pointer-events: none; }
.cf-search-in { width: 240px; height: 32px; padding: 0 28px 0 30px; box-sizing: border-box;
  border: 1px solid #dfe5ef; border-radius: 8px; font-size: 13px; color: #1f2a37; background: #fff; outline: none; }
.cf-search-in:focus { border-color: #0052cc; box-shadow: 0 0 0 2px rgba(0,82,204,.08); }
.cf-search-in::placeholder { color: #b8bec7; }
.cf-search-x { position: absolute; right: 8px; width: 16px; height: 16px; line-height: 14px; padding: 0;
  border: none; border-radius: 50%; background: #e6eaf0; color: #6b7280; font-size: 12px; cursor: pointer; }
.cf-search-x:hover { background: #d6dce6; color: #374151; }

/* 搜索命中高亮（列表条目里把关键词标出来）· 2026-10-19 */
.cf-hit { background: #fff59d; border-radius: 2px; }

/* 侧栏二级子类（手风琴展开）· 2026-10-19 boss「每个类型下面至少再分一层」 */
.cf-side .cf-side-arrow { width: 12px; flex-shrink: 0; font-size: 10px; color: #98a2b3; }
.cf-side .cf-side-arrow.ph { visibility: hidden; }
.cf-side-item.has-sub { cursor: pointer; }
.cf-side-subs { margin: 2px 0 6px 14px; padding-left: 9px; border-left: 1px solid #e8edf5; }
.cf-side-sub { display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 5px 8px; border: none; background: transparent; border-radius: 6px; cursor: pointer;
  font-size: 12px; color: #5a6474; text-align: left; }
.cf-side-sub:hover { background: #f3f6fb; color: #1f2a37; }
.cf-side-sub.is-on { background: #eaf2ff; color: #0052cc; font-weight: 600; }
.cf-side-sub-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-side-sub i { font-style: normal; font-size: 11px; color: #98a2b3; margin-left: 6px; }
.cf-side-sub.is-on i { color: #0052cc; }
.cf-side-label b { font-weight: 600; color: #0052cc; }
.cf-side-sub-all { color: #0052cc; font-weight: 600; }

/* 🔴 2026-10-19 boss：「每一条后面都要跟一个『已完成』和『删除』，不用点进去再删。」
   → 按钮**常显**（不再靠悬停 —— 悬停在触屏和快速浏览时都摸不到），文案化 → 一眼看懂。 */
.cf-chip { display: flex; align-items: center; }
.cf-chip .cf-chip-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-chip .cf-chip-ops { display: inline-flex; gap: 3px; flex-shrink: 0; margin-left: 4px; }
.cf-chip .cf-chip-t { max-width: calc(100% - 22px); }
.cf-chip:hover .cf-chip-t { max-width: calc(100% - 92px); }
/* 默认只露一个「✓」小圆点，鼠标移上去展开成「✓ 已完成 / 🗑 删除」文字按钮，
   既不挤占格子宽度，又不用点进去就能操作 */
.cf-chip .cf-chip-ops .cf-cop { display: inline-block; }
.cf-cop { height: 16px; line-height: 14px; padding: 0 5px; font-size: 10px; cursor: pointer;
  border: 1px solid #dfe5ef; background: #fff; border-radius: 4px; color: #0052cc; white-space: nowrap; }
.cf-cop:hover { border-color: #0052cc; background: #f5f9ff; }
.cf-cop-hide { color: #e5484d; }
.cf-cop-hide:hover { border-color: #e5484d; background: #fff5f5; }
.cf-chip.is-done { opacity: .55; }
.cf-chip.is-done .cf-chip-t { text-decoration: line-through; }

/* 列表视图（全部日程平铺）· 2026-10-19 boss */
.cf-list { padding: 4px 2px 20px; flex: 1; min-height: 0; overflow-y: auto; }
.cf-list-head { font-size: 12px; color: #6b7280; padding: 6px 10px 10px; }
.cf-list-head b { color: #0052cc; font-size: 14px; }
.cf-list-date { display: flex; align-items: center; justify-content: space-between;
  margin: 14px 0 6px; padding: 5px 10px; background: #f6f8fc; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: #46536a; }
.cf-list-date i { font-style: normal; font-weight: 400; color: #98a2b3; }
.cf-list .cf-day-item { margin-bottom: 6px; }
.cf-list-empty { padding: 40px 0; text-align: center; color: #98a2b3; }
.cf-list-empty-tip { font-size: 12px; margin-top: 8px; color: #b8bec7; }
.cf-list-more { padding: 12px; text-align: center; font-size: 12px; color: #98a2b3; }

/* 列表视图：勾选 + 全选/反选/批量删除 · 2026-10-23 boss */
.cf-list-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; margin: 0 0 6px; background: #f7f9fc; border: 1px solid #e8eef7; border-radius: 8px; }
.cf-list-ckall { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #46536a; cursor: pointer; }
.cf-tool-btn { border: 1px solid #d5dde8; background: #fff; color: #46536a; border-radius: 6px;
  padding: 4px 10px; font-size: 12px; cursor: pointer; }
.cf-tool-btn:hover { border-color: #0052cc; color: #0052cc; }
.cf-tool-del { border-color: #f3c9cb; color: #d9363e; }
.cf-tool-del:hover { background: #fff5f5; border-color: #e5484d; color: #e5484d; }
.cf-tool-del:disabled { opacity: .45; cursor: not-allowed; background: #fff; }
.cf-list-tools-tip { font-size: 11px; color: #98a2b3; margin-left: auto; }
.cf-row-ck { flex: none; width: 15px; height: 15px; margin: 0 2px 0 0; cursor: pointer; accent-color: #0052cc; }
.cf-row-ck-na { flex: none; display: inline-block; width: 15px; height: 15px; margin-right: 2px;
  border: 1px dashed #d8dee8; border-radius: 3px; cursor: not-allowed; }
.cf-day-item.is-picked { background: #eef5ff; border-color: #9fc3f5; }
/* 列表分页 · 2026-10-23 */
.cf-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin: 14px 4px 4px; padding: 10px 12px; border-top: 1px solid #eef1f5; }
.cf-pager-info { font-size: 12px; color: #6b7280; }
.cf-pager-info b { color: #0052cc; font-size: 13px; }
.cf-pager-btns { display: flex; gap: 6px; }
.cf-pg { border: 1px solid #d5dde8; background: #fff; color: #46536a; border-radius: 6px;
  padding: 5px 11px; font-size: 12px; cursor: pointer; }
.cf-pg:hover:not(:disabled) { border-color: #0052cc; color: #0052cc; }
.cf-pg:disabled { opacity: .4; cursor: not-allowed; }
.cf-detail-ops { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.cf-dop { height:30px; padding:0 14px; border:1px solid #dfe5ef; background:#fff; border-radius:8px;
  font-size:13px; color:#374151; cursor:pointer; }
.cf-dop:hover { border-color:#0052cc; color:#0052cc; background:#f5f9ff; }
.cf-dop.del { color:#e5484d; border-color:#f7d4d1; }
.cf-dop.del:hover { background:#fff5f5; }

/* 每天格子上的「＋」：悬停格子才出现，一点就在那天新建 · 2026-10-19 boss 定 */
.cf-cell-add {
  float: right; width: 20px; height: 20px; line-height: 1; padding: 0;
  font-size: 14px; border: 1px solid #d5e2f5; border-radius: 5px;
  background: #f5f9ff; color: #0052cc; cursor: pointer;
  opacity: 0; transition: opacity .12s;
}
.cf-cell:hover .cf-cell-add { opacity: 1; }
.cf-cell-add:hover { background: #0052cc; color: #fff; border-color: #0052cc; }

/* 日视图底部「＋ 在这天新建」 */
.cf-day-add {
  width: 100%; margin-top: 10px; padding: 10px;
  border: 1px dashed #d5e2f5; border-radius: 8px;
  background: #fbfdff; color: #0052cc; font-size: 13px; cursor: pointer;
}
.cf-day-add:hover { background: #f0f6ff; border-color: #0052cc; }

/* 「＋」弹出的小菜单（新建任务 / 事务 / 日志）*/
.cf-qa-menu {
  position: fixed; z-index: 3000; width: 226px; padding: 6px;
  background: #fff; border: 1px solid #e3e8ef; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .16);
}
.cf-qa-head {
  font-size: 11px; color: #8a94a6; padding: 5px 8px 7px;
  border-bottom: 1px solid #f0f2f5; margin-bottom: 4px;
}
.cf-qa-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px;
  border: 0; border-radius: 7px; background: transparent; cursor: pointer;
}
.cf-qa-item:hover { background: #f2f7ff; }
.cf-qa-item b { display: block; font-size: 13px; color: #1f2a37; font-weight: 600; }
.cf-qa-item span { display: block; font-size: 11px; color: #8a94a6; margin-top: 2px; }

/* ---------------------------------------------------------------- 详情 */
.cf-detail { padding: 4px 0; }
.cf-kv-row { display: flex; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #f0f3f7; font-size: 13px; }
.cf-kv-row:last-child { border-bottom: none; }
.cf-kv-k { flex: none; width: 84px; color: #8a94a6; }
.cf-kv-v { flex: 1; color: #2c3849; word-break: break-all; }

@media (max-width: 1100px) {
  .cf-side { display: none; }
  .cf-title { min-width: 120px; font-size: 14px; }
}

/* 🔴 2026-10-25 boss：日历页「＋ 新建待办事务」——与「＋新建日程」主按钮并列，
   用事务的橙色描边区分（事务/待办不是任务，视觉上分开） */
#cfNewAffairTodoBtn.wk-btn-todo{
  background:#fff7ed;border:1px solid #f5a623;color:#b45309;font-weight:600;
}
#cfNewAffairTodoBtn.wk-btn-todo:hover{background:#ffedd5;border-color:#e67700;color:#8a4b00}
