/* ============================================================
   wb-cal.css —— 自绘日历组件样式（z867 首建 / z909 抽出为独立共享文件）
   工作台（style.css 已不再包含）与业绩看板共用；
   主色带 fallback：工作台走 var(--brand)，独立页回退 #204DF3。
   ============================================================ */
/* ============================================================
   z867（陶总 2026-10-30）：自定义日历组件（替代原生 date 弹窗）
   ------------------------------------------------------------
   陶总原话：「日历做成这种样式的 不要有黑框」（参考图：年月下拉 + ‹ › 翻月
   + 中文星期 + 底部「今天」）。
   原生 <input type="date"> 的 showPicker() 弹的是**系统控件**（夸克里是深色边框黑框），
   样式不可控 → 改成自绘浮层，白底、无边框、主色沿用工作台 var(--brand, #204DF3)。

   配色取自参考图实测：面板 #FFFFFF / 今天 浅蓝底+蓝字 / 选中 浅灰底+深字
   / 周标题 #3D3D3D / 正文 #191919 / 下拉框描边 #DCDFE6。
   ============================================================ */
.wb-cal {
  position: fixed;
  z-index: 9995;
  width: 300px;
  padding: 12px 14px 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(22, 32, 52, .18);
  font-size: 13px;
  color: #191919;
  user-select: none;
  box-sizing: border-box;
}
/* 头部：年 / 月 下拉 + 前后翻月 */
.wb-cal-head { display: flex; align-items: center; gap: 8px; }
.wb-cal-head select {
  flex: 1 1 auto; min-width: 0;
  height: 32px; padding: 0 24px 0 9px;
  font-size: 14px; font-family: inherit; color: #191919;
  background: #fff;
  border: 1px solid #dcdfe6; border-radius: 8px;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%2381868f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
}
.wb-cal-head select:focus { outline: none; border-color: var(--brand, #4370fa); box-shadow: 0 0 0 3px rgba(67, 112, 250, .12); }
.wb-cal-nav {
  flex: none; width: 26px; height: 32px;
  border: none; background: transparent;
  font-size: 20px; line-height: 1; color: #6b7280;
  cursor: pointer; border-radius: 6px;
}
.wb-cal-nav:hover { background: #f3f5f7; color: var(--brand, #204DF3); }
/* 星期表头（周一起） */
.wb-cal-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 8px; }
.wb-cal-week span { text-align: center; font-size: 13px; color: #3d3d3d; padding: 6px 0; }
/* 日期网格 */
.wb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.wb-cal-grid button {
  height: 38px; border: none; background: transparent;
  font-size: 13px; font-family: inherit; color: #191919;
  cursor: pointer; border-radius: 8px;
}
.wb-cal-grid button:hover { background: #f3f5f7; }
.wb-cal-grid button.other { color: #c3c9d2; }
.wb-cal-grid button.other:hover { background: transparent; }
.wb-cal-grid button.today { background: var(--brand-pale, #eaf1ff); color: var(--brand, #204DF3); font-weight: 600; }
.wb-cal-grid button.sel { background: #f0f2f4; color: #191919; font-weight: 600; }
.wb-cal-grid button.today.sel { background: var(--brand-pale, #eaf1ff); color: var(--brand, #204DF3); font-weight: 700; }
/* 底部「今天」 */
.wb-cal-foot { margin-top: 6px; padding-top: 10px; border-top: 1px solid #eef0f3; text-align: center; }
.wb-cal-today {
  border: none; background: transparent;
  font-size: 13px; font-family: inherit; color: #5a6270;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; padding: 4px 10px; border-radius: 6px;
}
.wb-cal-today:hover { background: #f3f5f7; color: var(--brand, #204DF3); }
.wb-cal-today-ico { font-size: 15px; color: #81868f; }
/* z1368（陶总 2026-12-03）：月份表底部新增「全部」按钮（清空月份回全量），与「本月」并排 */
.wb-cal-all { margin-right: 14px; }
/* z1370（陶总 2026-12-03）：「全部/本月」图标改 CSS 画圆——字符 ○/◉ Windows 雅黑下字形特别小、Mac 正常。
   CSS 圆脱离字体跨平台一致：空心=border 圆圈；选中 .sel 填充实心。
   pointer-events:none 让点击穿透到按钮（修「点图标本身没反应」：原点击目标落在 span 上，程序只认 button）。 */
.wb-cal-mark {
  display: inline-block;
  width: 12px; height: 12px;
  border: 1.5px solid #81868f;
  border-radius: 50%;
  box-sizing: border-box;
  vertical-align: -2px;
  pointer-events: none;
  position: relative;
}
/* z1373（陶总 2026-12-03）：撤销 z1372 双层环（陶总「画的很不对、很难看」），
   改回最普通的实心圆——未选中=空心圈（border 圆），选中 .sel=实心圆（背景填充）。 */
.wb-cal-mark.sel {
  background: #81868f;
}

/* ============================================================
   z1156（陶总 2026-11-19）：全站 date input 统一用自绘日历
   ------------------------------------------------------------
   原生 <input type="date"> 右侧的小日历图标（::-webkit-calendar-picker-indicator）
   是原生日历弹层的唯一触发点 —— 全局藏掉，点击输入框由 wb-cal.js 自动弹自绘日历。
   此前只有 .grp-order-date（对账页）藏了图标，其它 date input（ng-date /
   fin-entry-date / statement-start·end / dash-date-from·to / f-date 等）
   图标还在，点图标弹的是系统黑框日历 —— 现在全站统一。
   ============================================================ */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  display: none !important;
  -webkit-appearance: none;
}

/* ============================================================
   z1320（陶总 2026-12-01）：自绘月份表 WB_MONTH —— 接管 type=month
   ------------------------------------------------------------
   与 WB_CAL 同一套设计语言：白底无黑框、主色 var(--brand)、12 个月格子 3×4。
   原生 <input type="month"> 的小日历图标同样是系统弹层触发点 → 全局藏掉，
   点击输入框由 wb-cal.js 的 WB_MONTH 全局委托弹自绘月份表。
   ============================================================ */
.wb-month { width: 276px; }
/* 12 个月格子：3 列 × 4 行 */
.wb-month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
  gap: 4px;
}
.wb-month-grid .wb-month-cell {
  height: 40px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: #191919;
  cursor: pointer;
  border-radius: 8px;
}
.wb-month-grid .wb-month-cell:hover { background: #f3f5f7; }
.wb-month-grid .wb-month-cell.today { background: var(--brand-pale, #eaf1ff); color: var(--brand, #204DF3); font-weight: 600; }
.wb-month-grid .wb-month-cell.sel { background: #f0f2f4; color: #191919; font-weight: 600; }
.wb-month-grid .wb-month-cell.today.sel { background: var(--brand-pale, #eaf1ff); color: var(--brand, #204DF3); font-weight: 700; }

input[type="month"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator:hover {
  display: none !important;
  -webkit-appearance: none;
}
