/* ============================================================
   工单/下载/新闻/知识库 · 云舟支持页设计层（support.css）
   2026-11-06 · 版本参数 ?v=20261039（B6 批起随相关页 tpl 引入）
   覆盖对象（B6 批 14 个有效页）：
     supporttickets / submitticket / viewticket / supporttickets-{one,two,customfields}
     news / newslist / newsview / knowledgebase / knowledgebaseview
     downloads / 404 / maintenance（后两者为独立文档，样式内联在各自 tpl，不读本文件）
   策略：
     ① 本批页面特有类（官方无样式或浅色硬编码）——深浅分流，浅色一律维持官方原值（零回归）
     ② 官方 global.css 浅色硬编码对抗（.ticket-reply.admin .post-by / .kb-link / pre / img-thumbnail）
     ③ 第三方编辑器深色保险（summernote / bootstrap-markdown-editor / ace）——颜色走主题变量
     ④ 本文件只放 B6 相关；通用组件（按钮/徽章/表单/表格/分页）仍归 skeleton.css 组件节
   ============================================================ */

/* ---------- ① 工单回复卡（viewticket） ---------- */
/* 官方 .ticket-reply.admin .post-by{background:#f6faff} 浅蓝白底——深色下刺眼 */
.ticket-reply { border: 1px solid var(--line); border-radius: var(--radius); }
.ticket-reply .post-by {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line-soft);
}
.ticket-reply.admin .post-by { background: var(--surface-2); }
html[data-theme="light"] .ticket-reply.admin .post-by { background: #f6faff; } /* 官方原值 */
.ticket-reply .post-user { color: var(--text); font-weight: 600; font-size: 13px; }
.ticket-reply .post-date { color: var(--muted); font-size: 12px; }
.ticket-reply .message { color: var(--text); }
.ticket-reply .message a { color: var(--accent-text); }
.ticket-reply .message a:hover { color: var(--accent); }

/* ---------- ② 知识库链接（官方 global.css .kb-link{color:#666} 深色不可读） ---------- */
.kb-link { color: var(--muted); font-size: 14px; }
html[data-theme="light"] .kb-link { color: #666; } /* 官方原值 */

/* ---------- ③ 富文本 pre（knowledgebaseview 的 pre.newscontent；bootstrap pre 默认 #f5f5f5 白底） ---------- */
pre.newscontent {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
html[data-theme="light"] pre.newscontent {
  background: #f5f5f5;  /* bootstrap pre 官方原值 */
  border-color: #ccc;   /* bootstrap pre 官方原值 */
  color: #333;          /* bootstrap pre 官方原值 */
}

/* ---------- ④ 下载页分类侧栏（downloads） ---------- */
.categories-list li a {
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.categories-list li a:hover { background: var(--surface-2); color: var(--accent-text); }
html[data-theme="light"] .categories-list li a:hover { background: #f5f7fa; } /* 官方表格 hover 同族值 */

/* ---------- ⑤ 第三方编辑器深色保险（viewticket/submitticket 工单内容编辑） ----------
   summernote-bs4 颜色主体继承 card（skeleton 已覆盖），此处对官方自有浅色规则做对抗；
   bootstrap-markdown-editor 自带 #f7f7f7/#d8d8d8/#fff 硬编码，逐一映射。 */
.note-toolbar { background: var(--surface-2); border-color: var(--line); }
.note-btn { background: var(--surface); border-color: var(--line); color: var(--text); }
.note-btn:hover { background: var(--surface-2); color: var(--accent-text); }
.note-btn.active, .note-btn:active { background: var(--accent-soft); color: var(--accent-text); }
.note-editable { background: var(--surface); color: var(--text); }
.note-editable p, .note-editable ul, .note-editable ol { color: var(--text); }
.note-statusbar { background: var(--surface-2); border-color: var(--line); }
.note-placeholder { color: var(--muted); }
.note-editor .note-dropzone { background: var(--surface-2); }
.note-dropdown-menu, .note-modal .modal-body { background: var(--surface); color: var(--text); }

.md-toolbar { background: var(--surface-2); border-color: var(--line); }
.md-editor, .md-preview { border-color: var(--line); }
.md-editor { background: var(--surface); color: var(--text); }
.md-preview { background: var(--surface); color: var(--text); }
.md-fullscreen { background: var(--bg); }
/* ace 编辑器默认 textmate 白底（JS 未配 theme，CSS 层映射） */
.ace-tm { background: var(--surface) !important; color: var(--text) !important; }
.ace-tm .ace_gutter { background: var(--surface-2) !important; color: var(--muted) !important; }
.ace-tm .ace_gutter-active-line { background: var(--line-soft) !important; }
.ace-tm .ace_cursor { color: var(--accent) !important; }
.ace-tm .ace_marker-layer .ace_active-line { background: var(--surface-2) !important; }
.ace-tm .ace_marker-layer .ace_selection { background: var(--line-strong) !important; }
.ace-tm .ace_keyword { color: var(--accent-text) !important; }
.ace-tm .ace_string { color: var(--ok) !important; }

/* ---------- ⑥ 通用 bootstrap 浅色硬编码补对抗（本批页面用到） ---------- */
/* img-thumbnail：bootstrap #fff 底 + #ddd 边（newslist 演示页配图） */
.img-thumbnail { background-color: var(--surface); border-color: var(--line); }
html[data-theme="light"] .img-thumbnail { background-color: #fff; border-color: #ddd; } /* 官方原值 */

/* nav-pills：官方 active 蓝底白字（newslist 视图切换）→ 品牌琥珀 */
.nav-pills .nav-link.active { background: var(--accent); color: var(--on-accent); }
html[data-theme="light"] .nav-pills .nav-link.active { background: #007bfc; color: #fff; } /* 官方原值 */

/* ---------- ⑦ 已知限制声明（不属本文件职责，交付函同步说明） ----------
   newsview.tpl 富文本 iframe：官方 JS 将 content 写入 contentDocument（viewstyle 由 JS 拼接），
   外层 CSS 进不去、动 JS 违「JS 一字不动」铁律——按 echarts 先例列独立补丁商请项。 */

/* ---------- ⑧ 富文本内元素七类白底对抗（客户函49 第二节第 2 条） ----------
   七类：正文容器（①节已覆盖 .message/.newscontent）/ 引用块 / 代码块 / 表格 /
        图片说明 / 附件列表（①节 .message a）/ 分页器（skeleton 组件节已覆盖）。
   作用范围：viewticket .message（工单正文）与 knowledgebaseview pre.newscontent（知识库正文）——
   两处均为官方直接渲染的富文本容器（newsview iframe 除外，见⑦）。 */
/* 引用块（bootstrap 官方 border-left .25rem solid #e9ecef，深色不可感知） */
.ticket-reply .message blockquote,
pre.newscontent blockquote {
  border-left: 0.25rem solid var(--line-strong);
  color: var(--muted);
}
html[data-theme="light"] .ticket-reply .message blockquote,
html[data-theme="light"] pre.newscontent blockquote { border-left-color: #e9ecef; color: #6c757d; } /* 官方原值 */
/* 代码块·行内（bootstrap code 官方 color #e83e8c；pre 官方 #f5f5f5 底已在③节对抗） */
.ticket-reply .message code, .ticket-reply .message kbd,
pre.newscontent code, pre.newscontent kbd {
  color: var(--accent-text);
}
html[data-theme="light"] .ticket-reply .message code, html[data-theme="light"] .ticket-reply .message kbd,
html[data-theme="light"] pre.newscontent code, html[data-theme="light"] pre.newscontent kbd { color: #e83e8c; } /* 官方原值 */
/* 富文本表格（bootstrap 官方边框 #dee2e2 族，深色下近乎不可见） */
.ticket-reply .message table, pre.newscontent table { border-color: var(--line); color: var(--text); }
.ticket-reply .message table th, .ticket-reply .message table td,
pre.newscontent table th, pre.newscontent table td { border-color: var(--line); color: var(--text); }
.ticket-reply .message thead th, pre.newscontent thead th { background: var(--surface-2); border-color: var(--line); }
.ticket-reply .message tbody tr:hover td, pre.newscontent tbody tr:hover td { background: var(--surface-2); }
html[data-theme="light"] .ticket-reply .message table, html[data-theme="light"] pre.newscontent table,
html[data-theme="light"] .ticket-reply .message table th, html[data-theme="light"] .ticket-reply .message table td,
html[data-theme="light"] pre.newscontent table th, html[data-theme="light"] pre.newscontent table td { border-color: #dee2e6; } /* 官方原值 */
html[data-theme="light"] .ticket-reply .message thead th, html[data-theme="light"] pre.newscontent thead th { background: transparent; }
/* 图片说明（figure/figcaption 官方无样式，深色补 muted；浅色不加，零添加） */
.ticket-reply .message figure, pre.newscontent figure,
.ticket-reply .message figcaption, pre.newscontent figcaption { color: var(--muted); }
html[data-theme="light"] .ticket-reply .message figure, html[data-theme="light"] pre.newscontent figure,
html[data-theme="light"] .ticket-reply .message figcaption, html[data-theme="light"] pre.newscontent figcaption { color: inherit; }
