/* 概览近7日柱状图 / 用户·订单导出按钮 */

.ov-charts {
  margin: 0 0 14px;
}
.ov-charts .ov-charts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 4px 16px 16px;
}
.ov-charts .ov-chart {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px 10px;
}
.ov-charts .ov-chart h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 550;
}
.ov-charts .ov-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
}
.ov-charts .ov-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ov-charts .ov-bar-wrap {
  width: 100%;
  height: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ov-charts .bar,
.ov-bar {
  width: 12px;
  max-width: 18px;
  height: 0;
  background: linear-gradient(180deg, #5b8def, #2563eb);
  border-radius: 5px 5px 2px 2px;
}
.ov-charts .ov-chart:nth-child(2) .bar,
.ov-charts .ov-chart:nth-child(2) .ov-bar {
  background: linear-gradient(180deg, #f0b27a, #c05621);
}
.ov-charts .ov-chart:nth-child(3) .bar,
.ov-charts .ov-chart:nth-child(3) .ov-bar {
  background: linear-gradient(180deg, #6dca8e, #1f8a4c);
}
.ov-charts .ov-n,
.ov-charts .ov-lbl {
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ov-charts .ov-n { color: var(--ink); }

#导出用户Csv,
#导出订单Csv,
.导出Csv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--ink);
  white-space: nowrap;
  flex: none;
}
#导出用户Csv:hover,
#导出订单Csv:hover,
.导出Csv:hover {
  background: var(--soft);
  filter: none;
  color: var(--accent-deep);
}

@media (max-width: 900px) {
  .ov-charts .ov-charts-row {
    grid-template-columns: 1fr;
  }
}

/* 切片任务队列 */
#视频任务盒 .job-err {
  color: #9b2c2c;
}
#视频任务盒 .pill.fail {
  background: #fdecec;
  color: #9b2c2c;
}
#视频任务盒 .items {
  padding: 4px 16px 16px;
}

/* 社区补：帖子标签 / AI 作品 / 漫画章节 */
#帖子标签,
#礼物图标,
#工具作品,
#漫画章节 {
  grid-column: 1 / -1;
}
#aiWorks,
#cartoonEps {
  min-height: 96px;
}

/* 客服：评论勾选批量 / 日志搜索 */
.kf-cmt-batch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: none;
}
.kf-cmt-batch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--ink);
  white-space: nowrap;
}
.kf-cmt-batch button:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: #c5d8fb;
}
#commentRows .item.plain.kf-has-check {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
}
.kf-cmt-check {
  margin: 4px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex: none;
}
.kf-log-search {
  display: block;
  margin: 0 16px 8px;
  width: min(320px, calc(100% - 32px));
}
@media (max-width: 640px) {
  #commentRows .item.plain.kf-has-check {
    grid-template-columns: 22px 1fr;
  }
  #commentRows .item.plain.kf-has-check > .actions {
    grid-column: 2;
    justify-self: start;
  }
}

/* 客服坐席：微信式会话。只挂在客服页，不改别的页。 */
#page-service .chat-desk {
  overflow: hidden;
  align-items: stretch;
  background: #fff;
}
#page-service .chat-list {
  min-height: 0;
  background: #fff;
}
#page-service #chatList.items {
  padding: 0;
}
#page-service #chatList .item.plain {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
  box-shadow: none;
}
#page-service #chatList .item:hover {
  background: #f5f7fb;
  border-color: transparent;
}
#page-service #chatList .item.on,
#page-service #chatList .item.plain.on,
#page-service #chatList .item.on:hover {
  background: #e7eef8;
  border-color: transparent;
  box-shadow: none;
}
#page-service #chatList .user-hit {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 12px;
}
#page-service #chatList .kf-avatar {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  font-size: 16px;
}
#page-service #chatList .item-title {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  flex-wrap: nowrap;
}
#page-service #chatList .item-title > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#page-service #chatList .kf-list-time {
  margin-left: auto;
  flex: none;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 450;
  color: #8b95a5;
}
#page-service #chatList .meta {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-service .chat-desk > .panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  grid-column: 2;
  grid-row: 1 / span 3;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}
#page-service .chat-desk > .panel > .hint.slice-note {
  display: none;
}
#page-service .chat-desk > .panel > .panel-head {
  flex: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
#page-service #chatThread.chat-thread {
  flex: none;
  height: calc(100vh - 220px);
  min-height: 360px;
  max-height: none;
  overflow: auto;
  background: #eaeef3;
  gap: 14px;
  padding: 16px 14px;
}
#page-service .kf-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}
#page-service .kf-row.them { justify-content: flex-start; }
#page-service .kf-row.me { justify-content: flex-end; }
#page-service .kf-row.sys { justify-content: center; }
#page-service .kf-col {
  display: flex;
  flex-direction: column;
  max-width: calc(100% - 48px);
  min-width: 0;
}
#page-service .kf-row.me .kf-col { align-items: flex-end; }
#page-service .kf-row.them .kf-col { align-items: flex-start; }
#page-service .kf-row.sys .kf-col { align-items: center; max-width: 90%; }
#page-service .kf-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  color: #fff;
  user-select: none;
  background: #7d92a8;
}
#page-service .kf-avatar.me { background: #2f6fed; }
#page-service .chat-bubble {
  max-width: 100%;
}
#page-service .chat-bubble.them {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 1px rgba(22, 24, 29, 0.05);
}
#page-service .chat-bubble.me {
  background: #2f6fed;
  color: #fff;
}
#page-service .kf-col > .kf-time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 450;
  color: #8b95a5;
}
#page-service .chat-bubble.kf-media {
  padding: 0;
  background: transparent;
  box-shadow: none;
}
#page-service .chat-bubble.kf-emoji {
  font-size: 28px;
  line-height: 1.25;
  padding: 2px 4px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
}
#page-service .chat-bubble img {
  display: block;
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
  margin-top: 6px;
  border-radius: 8px;
  cursor: zoom-in;
  background: #dde3ea;
}
#page-service .chat-bubble.kf-media img { margin-top: 0; }
#page-service .chat-bubble.kf-media > * + * { margin-top: 6px; }
#page-service .chat-bubble video {
  display: block;
  width: 240px;
  max-width: min(240px, 100%);
  height: auto;
  margin-top: 6px;
  border-radius: 8px;
  background: #111;
}
#page-service .chat-bubble.kf-media video { margin-top: 0; }
#page-service .kf-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 22, 32, 0.72);
  cursor: zoom-out;
}
#page-service .kf-mask img {
  max-width: min(92vw, 960px);
  max-height: 88vh;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  cursor: zoom-out;
  background: transparent;
}
#page-service #chatReply.chat-reply {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "tools text send"
    "emoji emoji emoji"
    "prev prev prev";
  align-items: center;
  gap: 8px;
  flex: none;
  position: relative;
  background: #fff;
  border-top: 1px solid var(--line);
}
#page-service #chatReply .kf-tools {
  grid-area: tools;
  display: flex;
  align-items: center;
  gap: 0;
}
#page-service #chatReplyText {
  grid-area: text;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  margin: 0;
}
#page-service #chatReply button[type="submit"] {
  grid-area: send;
  flex: none;
  width: auto;
  min-width: 76px;
  height: 38px;
  padding: 0 14px;
}
#page-service #chatReplyFile,
#page-service #chatReplyVideo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#page-service #chatReply .kf-tool,
#page-service #chatReply .kf-emoji,
#page-service #chatReply .kf-preview-x {
  width: auto;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #5c6b82;
}
#page-service #chatReply .kf-tool {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
}
#page-service #chatReply .kf-tool svg {
  width: 22px;
  height: 22px;
}
#page-service #chatReply .kf-tool:hover,
#page-service #chatReply .kf-emoji:hover {
  background: #e8eef6;
  filter: none;
  color: var(--accent-deep);
}
#page-service #chatEmoji {
  grid-area: emoji;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  max-height: 168px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
#page-service #chatReply .kf-emoji {
  width: 100%;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}
#page-service #chatReplyPreview {
  grid-area: prev;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f4f7fb;
}
#page-service #chatReplyPreview img,
#page-service #chatReplyPreview video {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
  flex: none;
}
#page-service #chatReplyPreview .kf-preview-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}
#page-service #chatReply .kf-preview-x {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
}
#page-service #chatReply .kf-preview-x:hover {
  filter: none;
  background: #fdecec;
  color: #9b2c2c;
  border-color: #f0d0d0;
}
#page-service #ticketRows .kf-time {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 450;
  color: var(--muted);
  opacity: 0.75;
}
#page-service #ticketRows > .item.kf-wait {
  background: #f7f9fc;
  box-shadow: inset 3px 0 0 #d3deec;
}
#page-service #ticketRows > .item.kf-wait:hover {
  background: #f3f7fb;
}
#page-service #ticketRows .kf-wait-hint {
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  color: #5c6b82;
  background: #eef3f8;
  border-radius: 999px;
  padding: 0 7px;
}
@media (max-width: 900px) {
  #page-service .chat-desk {
    overflow: visible;
  }
  #page-service #chatThread.chat-thread {
    height: calc(100vh - 220px);
    min-height: 360px;
    max-height: none;
  }
  #page-service #chatReply.chat-reply {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
  }
}
