/* 老板块统一换肤 v3（2026-09-23，按《中台设计规范》v3）
   目的：还没重写的老板块，先统一底色、字体、主色、阴影，和新规范页面看起来是一套东西。
   做法：只改老样式用到的颜色变量（styles.css 的 --bg/--accent…、--hk-ui-*、--task-*，hk-ui.v8.css 的 --hk-*），
   外加统一字体。不动布局。写死在规则里的颜色这里管不到，等各板块重写时再清。
   加载顺序：styles.css 之后、console-nav 之前（renderLayout 里）。 */

:root {
  /* styles.css 顶层变量（原来是蓝色系） */
  --bg: #f2f3f1;
  --panel: #ffffff;
  --ink: #1d1f1c;
  --muted: #80867d;
  --line: #e3e5e0;
  --accent: #2f3d2b;
  --accent-strong: #1f2a1c;
  --success-bg: #e5f3ea;
  --success-ink: #2e7d4f;
  --danger-bg: #fbeae7;
  --danger-ink: #c0392b;
  --shadow: none;

  /* 通用 hk-ui 变量 */
  --hk-ui-bg: #f2f3f1;
  --hk-ui-panel: #ffffff;
  --hk-ui-panel-soft: #f7f8f6;
  --hk-ui-ink: #1d1f1c;
  --hk-ui-text: #3d423b;
  --hk-ui-muted: #80867d;
  --hk-ui-faint: #a3a89f;
  --hk-ui-line: #e3e5e0;
  --hk-ui-line-strong: #c4c8c0;
  --hk-ui-green: #2e7d4f;
  --hk-ui-red: #c0392b;
  --hk-ui-blue: #2f3d2b;      /* 原来的蓝色主色 → 乌木绿 */
  --hk-ui-brass: #a26a00;
  --hk-ui-orange: #b5832f;
  --hk-ui-shadow: none;

  /* 任务区：分类色保留（它们表示任务类型），中性色和阴影统一 */
  --task-blue: #3a7f4f;
  --task-ink: #1d1f1c;
  --task-text: #3d423b;
  --task-muted: #80867d;
  --task-line: #e3e5e0;
  --task-soft: #f7f8f6;
  --task-shadow: none;

  --console-page-bg: #f2f3f1;
}

/* 供应链模块（货品 / 供应商 / 生产路线）的 hk-ui.v8.css 变量 */
body .hk-ui {
  --hk-ink: #1d1f1c; --hk-sub: #3d423b; --hk-mute: #80867d; --hk-line: #e3e5e0; --hk-line-2: #c4c8c0;
  --hk-bg: #f2f3f1; --hk-card: #ffffff; --hk-hover: #f7f8f6;
  --hk-pri: #2f3d2b; --hk-pri-2: #3a7f4f; --hk-pri-weak: #e6ebe3;
  --hk-red: #c0392b; --hk-red-weak: #fbeae7; --hk-amber: #a26a00; --hk-amber-weak: #fbf1dc;
  --hk-blue: #2f3d2b; --hk-blue-weak: #e6ebe3;
}

/* 字体：只用系统黑体（苹方 / 微软雅黑），不用 Inter */
body,
body button,
body input,
body select,
body textarea {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body code, body pre, body kbd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

body { background: #f2f3f1; color: #1d1f1c; }

/* ===== v2：按各板块实际页面逐个查出来的写死样式（9/23 用脚本扫过：蓝色、米色、渐变、重阴影） ===== */

/* 英文小标题（Business Operations、Library、Blogger command desk…）一律不显示 */
body .eyebrow { display: none !important; }

/* 页头：去掉渐变底、边框和阴影，只留标题和说明，和新规范页面的页头一致 */
body :is(.ops-heading, .distribution-heading, .crm-heading, .task-desk-page-head, .library-heading,
         .blogger-heading, .product-ops-heading, .tpv2-hero, .messages-header) {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body :is(.ops-heading, .distribution-heading, .crm-heading, .task-desk-page-head, .library-heading,
         .blogger-heading, .product-ops-heading, .tpv2-hero, .messages-header) h1 {
  font-size: 24px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  color: #1d1f1c !important;
}

/* 面板、卡片：不要阴影，圆角统一 12，边框换成浅线 */
body main.workspace :is([class*="-panel"], .task-desk-frame, .task-desk-create-form, .task-desk-empty,
         .star-leader-section, .leader-tier-overview, .blogger-profile-card, .distribution-freshness,
         .library-cache-meter) {
  box-shadow: none !important;
}
body main.workspace :is([class*="-panel"], .task-desk-frame, .star-leader-section, .leader-tier-overview, .blogger-profile-card) {
  border-radius: 12px !important;
  border-color: #e3e5e0 !important;
}
body main.workspace details > summary { box-shadow: none !important; }

/* 工具条、表头：去渐变 */
body :is(.task-desk-toolbar, .task-desk-create-form-head, .library-folder-bar, .library-lightbox-bar) {
  background-image: none !important;
}
body main.workspace thead, body main.workspace thead th { background-image: none !important; }
body .task-desk-row.is-completed { background-image: none !important; box-shadow: none !important; }
body .library-folder-icon { background-image: none !important; background-color: #e6ebe3 !important; }

/* 写死的蓝色：链接、标签、头像占位 → 乌木绿系 / 中性 */
body main.workspace a:not([class]) { color: #2f3d2b; }
body :is(.leader-profile-link, .msg-ip, .blogger-tag, .document-archive-file-summary) {
  color: #2f3d2b !important;
  border-color: #c4c8c0 !important;
}
body :is(.leader-tier-badge-core, .leader-tier-badge-active) {
  color: #2f3d2b !important;
  border-color: #c4c8c0 !important;
  background: #e6ebe3 !important;
}
body :is(.leader-tier-card.leader-tier-core, .leader-tier-card.leader-tier-active) { border-color: #c4c8c0 !important; }
body :is(.blogger-performance.muted, .blogger-status.muted) { color: #80867d !important; border-color: #e3e5e0 !important; }
body :is(.crm2-avatar, .blogger-avatar-placeholder, .blogger-profile-avatar.placeholder, .blogger-note-cover-placeholder, .task-desk-thumb, .task-desk-thumb-glyph) {
  color: #2f3d2b !important;
  border-color: #e3e5e0 !important;
}
body .crm2-avatar { background: #e6ebe3 !important; }
body .task-desk-thumb.is-product { background-image: none !important; background-color: #e6ebe3 !important; }
body :is(.document-archive-drop-zone, .document-archive-progress) { border-color: #c4c8c0 !important; }
body b.blue { background: #3a7f4f !important; }

/* 米色底的小标签 → 浅灰 */
body :is(.blogger-category-pill.incomplete, .blogger-muted-action) { background: #f7f8f6 !important; }

/* 选中的筛选按钮（原来是蓝色） */
body .ops2-preset.on { background: #2f3d2b !important; border-color: #2f3d2b !important; color: #fff !important; }
/* 按钮：默认白底细边（次要），提交按钮和选中状态才用乌木绿实心 —— 和新规范的 .ds-btn 一致 */
body main.workspace button:not(:disabled) {
  background: #ffffff;
  border: 1px solid #c4c8c0;
  color: #1d1f1c;
  border-radius: 8px;
  box-shadow: none;
  transform: none;
  font-weight: 500;
}
body main.workspace button:not(:disabled):hover { background: #f7f8f6; }
body main.workspace :is(button[type="submit"], button.active, button.is-active, button.on, button[aria-pressed="true"], button[aria-selected="true"]):not(:disabled) {
  background: #2f3d2b;
  border-color: #2f3d2b;
  color: #ffffff;
}
body main.workspace .button-link { border-radius: 8px; box-shadow: none; transform: none; }

/* 页头里面的小卡片（例如博主管理的说明卡、更新时间卡）也拍平 */
body :is(.ops-heading, .distribution-heading, .crm-heading, .task-desk-page-head, .library-heading,
         .blogger-heading, .product-ops-heading, .tpv2-hero, .messages-header) > div {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 0 !important;
}

/* 外框里的「退出」按钮不吃全局按钮样式 */
body .console-nav-shell .console-nav-account button {
  min-height: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #3d423b !important;
  font-weight: 400 !important;
}
body .console-nav-shell .console-nav-account button:hover { background: rgba(29, 31, 28, 0.05) !important; color: #1d1f1c !important; }
@media (max-width: 767px) {
  body .console-nav-shell .console-nav-account button { color: #2f3d2b !important; font-weight: 500 !important; }
}
