/* v1.84：原 chatbase.css 的全局滚动约束，AI 小助手下线后迁到本文件 */
html {
    background: #fafafa;
    overflow-y: hidden;
}

._dash-loading {
    color: transparent;
    position: fixed;
    width: calc(544px / 2.5);
    height: calc(408px / 2.5);
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    background-image: url("/assets/imgs/loading.webp");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

._dash-loading::after {
    content: '';
}

#login-form-container .ant-card-head-wrapper {
    text-align: center;
}

#login-form-container .ant-card-head-title {
    font-size: 26px !important;
    font-weight: bold;
}

/*滚动条自定义样式*/
*::-webkit-scrollbar-thumb {
    background-color: #bfbfbf;
    outline: none;
    border-radius: 6px;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

/*火狐浏览器*/
* {
    scrollbar-width: thin;
}
/* ===== 订单总览-商品明细：按是否有未发数量区分行固定底色（v1.28af） =====
   高对比：有未发=橙 #ffe7ba；已发完=绿 #b7eb8f */
.ant-table-tbody tr.del-row-unsent td {
  background: #ffe7ba !important;
}
.ant-table-tbody tr.del-row-done td {
  background: #b7eb8f !important;
}
/* ===== v1.49c 在途占用行：浅蓝（已推 ERP/委派，占用中但未发完；不是「已发完」的绿） ===== */
.ant-table-tbody tr.del-row-inflight td {
  background: #bae7ff !important;
}
/* ===== v1.28ak 售后占用行：浅红警示（进行中/已退款，禁组货） ===== */
.ant-table-tbody tr.del-row-refund td {
  background: #ffccc7 !important;
  color: rgba(0, 0, 0, 0.72) !important;
}
/* ===== v1.42 售后「待确认收货」：退货物流已签收 → 整行绿底（货到了，可确认收货） ===== */
.ant-table-tbody tr.refund-row-signed td {
  background: #b7eb8f !important;
}

/* ===== 首页·销售日历（AntdCalendar 版） =====
   回调写入 customCells 的完成率分档着色 + 底部图例
   分档与 callbacks/dashboard/page_bottom_c.py 的 _render_cal_rate 一致 */
.dashhome-cal-wrap {
  width: 100%;
  height: 100%;
}
/* 锁定当前月：隐藏 AntdCalendar 头部（年月选择 + 月/年切换），使日历不可翻月 */
.dashhome-cal-wrap .ant-picker-calendar-header {
  display: none;
}
.dashhome-cal-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 6px;
  padding-left: 2px;
}
/* 达成率用 AntdTag 展示：压缩尺寸以适配日历格（覆盖 Antd 默认的 margin/padding） */
.dashhome-cal-wrap .dashhome-cal-tag {
  margin-inline-end: 0;
  margin-bottom: 1px;
  font-size: 14px;
  line-height: 20px;
  padding: 0 4px;
}
.dashhome-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  padding-left: 2px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}
.dashhome-cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dashhome-cal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #d9d9d9;
}
.dashhome-cal-dot.is-high { background: #52c41a; }
.dashhome-cal-dot.is-mid  { background: #1890ff; }
.dashhome-cal-dot.is-low  { background: #ff4d4f; }
.dashhome-cal-dot.is-none { background: #bfbfbf; }

/* ===== 首页·销售日历：万年历 hover 气泡 ===== */
/* 让「整个日期格」都能触发气泡（含日期号区域）：
   - 用 td.ant-picker-cell 作为定位参照，伪元素可覆盖整格（含 Antd 的格子内边距）；
   - 触发元素用绝对定位伪元素铺满整格，不改动 Antd 原有布局/行高；
   - 必须放开内容区 overflow（Antd 默认 overflow-y:auto 会把伪元素裁掉）。 */
.dashhome-cal-wrap .ant-picker-cell {
  position: relative;
}
.dashhome-cal-wrap .ant-picker-calendar-date-content {
  overflow: visible !important;
}
.dashhome-cal-hover {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 22px;
  padding-bottom: 2px;
  cursor: default;
}
.dashhome-cal-hover::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.dashhome-lunar-tip {
  max-width: 420px;
  font-size: 12px;
  line-height: 18px;
}
.dashhome-lunar-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
}
.dashhome-lunar-date {
  font-variant-numeric: tabular-nums;
}
.dashhome-lunar-week {
  opacity: 0.85;
}
.dashhome-lunar-row {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}
.dashhome-lunar-label {
  flex: 0 0 32px;
  opacity: 0.7;
}
.dashhome-lunar-value {
  flex: 1 1 auto;
  word-break: break-word;
}
.dashhome-lunar-value.is-yi { color: #b7eb8f; }
.dashhome-lunar-value.is-ji { color: #ffadd2; }
.dashhome-lunar-value.is-term { color: #ffd591; font-weight: 600; }
.dashhome-lunar-empty { opacity: 0.75; }

/* ===== 首页·导购业绩（日历右侧） ===== */
/* 上排两栏等高：AntdRow.align 不支持 stretch，用 class 覆盖为 stretch */
.dashhome-top-row {
  align-items: stretch !important;
}
.dashhome-staff-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
/* 右栏表格体：内部滚动，高度由整行固定高度决定（与日历等高） */
.dashhome-staff-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
/* 滚动时表头固定 */
.dashhome-staff-body .ant-table-thead > tr > th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fafafa;
}
.dashhome-staff-title {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 6px;
  padding-left: 2px;
}

/* ===== 首页：矮窗口时内容区自身滚动 =====
   全局 html 设了 overflow-y: hidden，文档不滚动；
   本容器把高度收到视口内并内部滚动（与 delivery 页约定一致）。 */
.dashhome-scroll {
  width: 100%;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

/* ===== SSRS 报表 iframe：高度跟随可视区，矮窗口不再被挤到窗口外 =====
   全局 html 设了 overflow-y: hidden、文档不滚动，iframe 超出视口的部分会被直接裁掉，
   所以高度要自己收在可视区内：视口高 -（头部 50 + 头下间距 10 + 标签栏含边距约 62）≈ 130px。
   dvh 兜住移动端 / 钉钉 webview 的动态视口；矮到连 240px 都没有时给个下限（超出部分由
   iframe 内部滚动，参数栏和报表自己会滚）。 */
.ssrs-report-frame {
  display: block;
  width: 100%;
  border: 0;
  height: calc(100vh - 130px);
  height: calc(100dvh - 130px);
  min-height: 240px;
}

/* v1.80.1 数据看板查询加载态：照「操作日志」页签的 AntdSpin 做法（大转圈 + 数据加载中），
   但把转圈钉在视口中央——数据区高几千像素，antd 默认按容器垂直居中，圈会被画到首屏之外。 */
#dash-spin-work .ant-spin-spinning,
#dash-spin-biz .ant-spin-spinning {
  position: fixed;
  top: 45vh;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1200;
}
#dash-spin-work .ant-spin-blur,
#dash-spin-biz .ant-spin-blur {
  opacity: 0.4;
}
#dash-spin-work .ant-spin-text,
#dash-spin-biz .ant-spin-text {
  font-size: 13px;
  color: #1677ff;
  text-shadow: none;
}

/* v1.84 参数配置页签：yz_delivery_config 动态行（网格对齐，窄屏不挤成一团）
   v1.85：值列改只读展示（改值走弹窗），多出「操作」列 */
#cfg-root .cfg-row {
  display: grid;
  grid-template-columns: 240px minmax(200px, 1.6fr) minmax(180px, 1fr) 130px 76px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 4px;
  transition: background-color 0.15s ease;
}
#cfg-root .cfg-row:last-child {
  border-bottom: 0;
}
/* 隔行变色：一眼能横向对齐，长值也不会看串行 */
#cfg-root .cfg-row:nth-child(even) {
  background: #f7f9fc;
}
#cfg-root .cfg-row:nth-child(odd) {
  background: #fff;
}
#cfg-root .cfg-row:hover {
  background: #eaf3ff;
}
/* 表头吸顶后加一道浅投影，滚动时与行区分开 */
#cfg-root .cfg-head {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
#cfg-root .cfg-key {
  font-family: ui-monospace, Menlo, Consolas, 'Courier New', monospace;
  font-size: 13px;
  font-weight: 500;
  color: #1f3a93;
  word-break: break-all;
  line-height: 1.5;
}
/* 当前值：单行省略，长值/密钥靠 title 悬停看全文（避免行高忽大忽小） */
#cfg-root .cfg-val {
  color: #1f1f1f;
  font-size: 12px;
  font-family: ui-monospace, Menlo, Consolas, 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
}
#cfg-root .cfg-val-empty {
  color: #bfbfbf;
  font-family: inherit;
  font-style: italic;
}
/* 修改弹窗：参数键与更新时间 */
#cfg-root .cfg-modal-key {
  font-family: ui-monospace, Menlo, Consolas, 'Courier New', monospace;
  font-size: 13px;
  color: #1f3a93;
  word-break: break-all;
}
#cfg-root .cfg-modal-meta {
  color: #8c8c8c;
  font-size: 12px;
  margin-top: 4px;
}
#cfg-root .cfg-desc {
  color: #595959;
  font-size: 12px;
  line-height: 1.5;
}
/* 分页条：常驻在滚动区下方（右对齐） */
#cfg-root .cfg-pager {
  display: flex;
  justify-content: flex-end;
  padding: 2px 4px 0;
}
#cfg-root .cfg-time {
  color: #8c8c8c;
  font-size: 12px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
/* 转圈同样钉在视口中央（数据区会随行数变高） */
#cfg-spin .ant-spin-spinning {
  position: fixed;
  top: 45vh;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1200;
}
#cfg-spin .ant-spin-text {
  font-size: 13px;
  color: #1677ff;
  text-shadow: none;
}
