/* ============================================================
 * 供应商门户（外部）样式
 *
 * 与内部布局的视觉区分：主色深蓝紫 #4338CA（内部为青蓝 #0E7490），
 * 登录 / 注册用深色品牌区，工作台用浅灰底 + 白色顶栏 + 左侧窄导航。
 * 所有类名以 esg-portal- 前缀隔离，避免与内部页面样式互相污染。
 * ============================================================ */

/* ---------- 登录 / 注册页 ---------- */

.esg-portal-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 14% 18%, rgba(79, 70, 229, 0.3), transparent 44%),
    radial-gradient(circle at 86% 82%, rgba(67, 56, 202, 0.32), transparent 46%),
    linear-gradient(135deg, #1e1b4b 0%, #312e81 52%, #4338ca 100%);
}

.esg-portal-login-card {
  width: 100%;
  max-width: 940px;
  min-height: 480px;
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 15, 45, 0.42);
}

.esg-portal-login-card.is-wide {
  max-width: 1000px;
}

.esg-portal-login-left {
  flex: 1;
  padding: 40px 36px;
  color: #e0e7ff;
  background: linear-gradient(155deg, #1e1b4b 0%, #4338ca 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.esg-portal-login-right {
  flex: 1.1;
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 表单较多（注册页）时允许滚动 */
  max-height: 92vh;
  overflow-y: auto;
}

.esg-portal-brand {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.esg-portal-slogan {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(224, 231, 255, 0.86);
}

.esg-portal-points {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.esg-portal-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: rgba(224, 231, 255, 0.9);
}

.esg-portal-mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 700;
  color: #1e1b4b;
}

.esg-portal-login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.8;
}

.esg-portal-login-footer a {
  color: #4338ca;
  font-weight: 500;
}

.esg-portal-login-footer a:hover {
  color: #4f46e5;
}

/* ---------- 工作台布局 ---------- */

.esg-portal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f6fb;
}

.esg-portal-header {
  height: 56px;
  flex: none;
  background: #fff;
  border-bottom: 1px solid #e5e7f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.esg-portal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #1e1b4b;
  white-space: nowrap;
}

.esg-portal-header-tag {
  font-size: 11px;
  font-weight: 500;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  padding: 1px 8px;
  line-height: 18px;
}

.esg-portal-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.esg-portal-supplier-name {
  font-size: 13px;
  color: #334155;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.esg-portal-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.esg-portal-sider {
  width: 196px;
  flex: none;
  background: #fff;
  border-right: 1px solid #e5e7f0;
  padding: 12px 10px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.esg-portal-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s ease;
  user-select: none;
}

.esg-portal-nav-item:hover {
  background: #f5f6fb;
  color: #4338ca;
}

.esg-portal-nav-item.is-active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

.esg-portal-nav-item.is-disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  background: transparent;
}

.esg-portal-nav-group {
  font-size: 11px;
  color: #94a3b8;
  padding: 10px 12px 6px;
  letter-spacing: 0.4px;
}

.esg-portal-content {
  flex: 1;
  min-width: 0;
  padding: 18px 20px 28px;
}

/* ---------- 工作台内容卡 ---------- */

.esg-portal-welcome {
  margin-bottom: 14px;
}

.esg-portal-welcome-title {
  font-size: 19px;
  font-weight: 600;
  color: #1e1b4b;
  margin: 0 0 4px;
}

.esg-portal-welcome-sub {
  font-size: 13px;
  color: #64748b;
}

/* 评级卡：等级大字号 + 分项进度条 */
.esg-portal-rating-grade {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 1px;
}

.esg-portal-rating-score {
  font-size: 14px;
  color: #64748b;
  margin-top: 2px;
}

.esg-portal-dim-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.esg-portal-dim-label {
  width: 62px;
  flex: none;
  font-size: 12px;
  color: #475569;
}

.esg-portal-dim-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #eef1f6;
  overflow: hidden;
}

.esg-portal-dim-bar > i {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.esg-portal-dim-value {
  width: 56px;
  flex: none;
  text-align: right;
  font-size: 12px;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

/* 不可见说明 */
.esg-portal-not-visible {
  border: 1px dashed #cbd5e1;
  background: #fafbff;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.9;
}

.esg-portal-not-visible-title {
  color: #475569;
  font-weight: 600;
  margin-bottom: 4px;
}

/* 占位页（待办 / 整改 / 上传尚未开发） */
.esg-portal-placeholder {
  background: #fff;
  border: 1px solid #e5e7f0;
  border-radius: 10px;
  padding: 46px 24px;
  text-align: center;
}

/* ============================================================
 * 待办汇总卡（工作台首页）
 * ============================================================ */

.esg-portal-todo-card .ant-card-body {
  padding: 16px 18px 12px;
}

/* 四个统计格子：尽调待办 / 尽调逾期 / 整改待办 / 整改逾期 */
.esg-portal-todo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.esg-portal-todo-cell {
  border: 1px solid #e5e7f0;
  border-radius: 9px;
  padding: 11px 12px;
  background: #fafbff;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.esg-portal-todo-cell:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  transform: translateY(-1px);
}

.esg-portal-todo-cell.is-danger {
  border-color: #fca5a5;
  background: #fef2f2;
}

.esg-portal-todo-cell.is-danger:hover {
  border-color: #f87171;
  background: #fee2e2;
}

.esg-portal-todo-cell-label {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esg-portal-todo-cell-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.esg-portal-todo-cell.is-danger .esg-portal-todo-cell-value {
  color: #dc2626;
}

/* 逾期提示条：整条可点击跳转 */
.esg-portal-todo-alert {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-size: 12px;
  color: #b91c1c;
  cursor: pointer;
  transition: all 0.15s ease;
}

.esg-portal-todo-alert:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.esg-portal-todo-alert-arrow {
  margin-left: auto;
  color: #dc2626;
  flex: none;
}

/* ============================================================
 * 任务列表页（待办事项 / 整改任务）
 * ============================================================ */

.esg-portal-page-card {
  background: #fff;
  border: 1px solid #e5e7f0;
  border-radius: 10px;
  padding: 14px 16px 4px;
}

.esg-portal-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.esg-portal-page-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.esg-portal-page-hint {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.8;
}

/* 截止日期列：日期 + 剩余天数两行 */
.esg-portal-due {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.5;
}

.esg-portal-due-date {
  font-size: 12px;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.esg-portal-due-remain {
  font-size: 11px;
  font-weight: 500;
}

/* 详情抽屉内的信息区块 */
.esg-portal-detail-block {
  border: 1px solid #eef1f6;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fafbff;
}

.esg-portal-detail-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 3px;
}

.esg-portal-detail-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 状态时间线：已下发 → 已回复 → 验证中 → 已验证 → 已关闭 */
.esg-portal-flow {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 4px 0 2px;
}

.esg-portal-flow-node {
  flex: 1 1 0;
  min-width: 62px;
  text-align: center;
  position: relative;
}

.esg-portal-flow-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 auto 6px;
  border: 2px solid #e2e8f0;
  background: #fff;
  position: relative;
  z-index: 1;
}

.esg-portal-flow-node.is-done .esg-portal-flow-dot {
  border-color: #4338ca;
  background: #4338ca;
}

.esg-portal-flow-node.is-current .esg-portal-flow-dot {
  border-color: #4338ca;
  background: #fff;
  box-shadow: 0 0 0 3px #e0e7ff;
}

.esg-portal-flow-node.is-rejected .esg-portal-flow-dot {
  border-color: #dc2626;
  background: #dc2626;
}

/* 节点之间的连接线：绝对定位在圆点垂直中心 */
.esg-portal-flow-node::before {
  content: '';
  position: absolute;
  top: 5px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
}

.esg-portal-flow-node:first-child::before {
  display: none;
}

.esg-portal-flow-node.is-done::before,
.esg-portal-flow-node.is-current::before {
  background: #4338ca;
}

.esg-portal-flow-label {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
}

.esg-portal-flow-node.is-done .esg-portal-flow-label,
.esg-portal-flow-node.is-current .esg-portal-flow-label {
  color: #4338ca;
  font-weight: 600;
}

.esg-portal-flow-node.is-rejected .esg-portal-flow-label {
  color: #dc2626;
  font-weight: 600;
}

/* 附件条目（抽屉内 / 填报弹窗内） */
.esg-portal-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #eef1f6;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
}

.esg-portal-file-item + .esg-portal-file-item {
  margin-top: 6px;
}

.esg-portal-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.esg-portal-file-meta {
  flex: none;
  color: #94a3b8;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* 附件面板标题行 */
.esg-portal-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1e1b4b;
  margin-bottom: 8px;
}

/* ============================================================
 * 资料上传页
 * ============================================================ */

.esg-portal-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 1080px) {
  .esg-portal-upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.esg-portal-upload-dragger .ant-upload-drag {
  background: #fafbff;
  border-color: #c7d2fe;
}

.esg-portal-upload-dragger .ant-upload-drag:hover {
  border-color: #4338ca;
  background: #eef2ff;
}

/* 已选待上传文件列表 */
.esg-portal-upload-pending {
  margin-top: 8px;
}

/* 上传结果提示（失败文件逐条列出） */
.esg-portal-upload-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  font-size: 12px;
  color: #b91c1c;
  line-height: 1.8;
}

@media (max-width: 760px) {
  .esg-portal-todo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================================
 * 消息中心
 *
 * 未读 = 左侧 4px 类型色竖条 + 标题加粗 + 右侧蓝点；
 * 已读 = 无竖条 + 常规字重 + 文字整体灰化（#94A3B8）。
 * ============================================================ */

.esg-portal-msg-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.esg-portal-msg-stat {
  background: #fff;
  border: 1px solid #e5e7f0;
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
}

.esg-portal-msg-stat-label {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.esg-portal-msg-stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.esg-portal-msg-stat-hint {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 2px;
}

.esg-portal-msg-card {
  padding: 8px 16px 14px;
}

/* Tab 与类型下拉同一行 */
.esg-portal-msg-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #eef1f6;
}

.esg-portal-msg-tabs .ant-tabs-nav {
  margin-bottom: 0;
}

.esg-portal-msg-tabs .ant-tabs-nav::before {
  border-bottom: none;
}

.esg-portal-msg-filter-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.esg-portal-msg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

/* 消息卡片：默认（已读）态 */
.esg-portal-msg-item {
  border: 1px solid #eef1f6;
  border-left: 4px solid transparent;
  border-radius: 9px;
  padding: 11px 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.esg-portal-msg-item:hover {
  border-color: #c7d2fe;
  background: #fafbff;
  box-shadow: 0 2px 8px rgba(67, 56, 202, 0.07);
}

/* 未读：左侧竖条颜色由内联 style 按类型着色 */
.esg-portal-msg-item.is-unread {
  background: #fdfdff;
}

.esg-portal-msg-item.is-unread .esg-portal-msg-title {
  font-weight: 600;
  color: #1e1b4b;
}

.esg-portal-msg-item.is-unread .esg-portal-msg-content {
  color: #475569;
}

.esg-portal-msg-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

/* 类型 Tag：颜色由 meta 内联下发，这里只管形状 */
.esg-portal-msg-type-tag {
  flex: none;
  display: inline-block;
  font-size: 11px;
  line-height: 18px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.esg-portal-msg-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 未读蓝点 */
.esg-portal-msg-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* 内容：最多 2 行省略 */
.esg-portal-msg-content {
  margin-top: 5px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.esg-portal-msg-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  font-size: 11px;
  color: #94a3b8;
}

.esg-portal-msg-time {
  font-variant-numeric: tabular-nums;
}

.esg-portal-msg-more {
  flex: none;
  color: #4338ca;
  font-weight: 500;
}

.esg-portal-msg-item.is-unread .esg-portal-msg-more {
  font-weight: 600;
}

/* 分页条（超过一页时才出现） */
.esg-portal-msg-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 2px;
}

/* ---------- 详情抽屉 ---------- */

.esg-portal-msg-detail-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e1b4b;
  line-height: 1.6;
  margin: 0 0 6px;
  word-break: break-word;
}

.esg-portal-msg-detail-time {
  font-size: 12px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f6;
}

/* 正文必须保留后端 content 里的换行 */
.esg-portal-msg-detail-body {
  margin-top: 12px;
  font-size: 13px;
  color: #334155;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.esg-portal-msg-detail-link {
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px dashed #c7d2fe;
  border-radius: 8px;
  background: #fafbff;
  font-size: 12px;
  color: #64748b;
  line-height: 1.8;
}

/* 侧边栏徽标：靠右对齐 */
.esg-portal-nav-item .esg-portal-nav-badge {
  margin-left: auto;
}

@media (max-width: 760px) {
  .esg-portal-msg-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .esg-portal-msg-stat {
    padding: 10px 12px;
  }
  .esg-portal-msg-stat-value {
    font-size: 22px;
  }
  .esg-portal-msg-stat-hint {
    display: none;
  }
}

@media (max-width: 900px) {
  .esg-portal-login-left {
    display: none;
  }
  .esg-portal-login-card,
  .esg-portal-login-card.is-wide {
    max-width: 460px;
    min-height: auto;
  }
  .esg-portal-mobile-brand {
    display: flex;
  }
  .esg-portal-login-right {
    padding: 30px 24px;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .esg-portal-sider {
    display: none;
  }
  .esg-portal-content {
    padding: 14px 12px 22px;
  }
  .esg-portal-supplier-name {
    display: none;
  }
}
/* ============================================================
 * 核查员门户（第三套身份体系）样式
 *
 * 与内部（青蓝 #0E7490）、供应商门户（深蓝紫 #4338CA）的视觉区分：
 * 核查员主色为深青 #0F766E。登录页用深青品牌区，工作台用浅灰底 +
 * 白色顶栏 + 左侧窄导航 + 顶部只读标识。
 *
 * 所有类名以 esg-verifier- 前缀隔离，避免与内部页面、门户样式互相污染。
 * ============================================================ */

/* ---------- 登录页 ---------- */

.esg-verifier-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 16%, rgba(15, 118, 110, 0.34), transparent 44%),
    radial-gradient(circle at 88% 84%, rgba(17, 94, 89, 0.36), transparent 46%),
    linear-gradient(135deg, #042f2e 0%, #115e59 54%, #0f766e 100%);
}

.esg-verifier-login-card {
  width: 100%;
  max-width: 920px;
  min-height: 470px;
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(4, 47, 46, 0.44);
}

.esg-verifier-login-left {
  flex: 1;
  padding: 40px 36px;
  color: #ccfbf1;
  background: linear-gradient(155deg, #042f2e 0%, #0f766e 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.esg-verifier-login-right {
  flex: 1.1;
  padding: 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: 92vh;
  overflow-y: auto;
}

.esg-verifier-brand {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.esg-verifier-slogan {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(204, 251, 241, 0.86);
}

.esg-verifier-points {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.esg-verifier-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: rgba(204, 251, 241, 0.9);
}

.esg-verifier-mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 17px;
  font-weight: 700;
  color: #042f2e;
}

.esg-verifier-login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.8;
}

.esg-verifier-login-footer a {
  color: #0f766e;
  font-weight: 500;
}

.esg-verifier-login-footer a:hover {
  color: #0d9488;
}

/* 登录页底部「邀请制」说明块 */
.esg-verifier-notice {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  font-size: 12px;
  color: #115e59;
  line-height: 1.7;
}

/* ---------- 工作台布局 ---------- */

.esg-verifier-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f7f8;
}

.esg-verifier-header {
  height: 56px;
  flex: none;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.esg-verifier-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #042f2e;
  white-space: nowrap;
  min-width: 0;
}

.esg-verifier-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* 顶栏机构名：过长时省略，不挤压右侧按钮 */
.esg-verifier-org {
  font-size: 13px;
  color: #334155;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 顶栏只读标识 */
.esg-verifier-readonly {
  font-size: 11px;
  font-weight: 500;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  padding: 1px 8px;
  line-height: 18px;
  white-space: nowrap;
}

.esg-verifier-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.esg-verifier-sider {
  width: 186px;
  flex: none;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 12px 10px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.esg-verifier-nav-group {
  font-size: 11px;
  color: #94a3b8;
  padding: 10px 12px 6px;
  letter-spacing: 0.4px;
}

.esg-verifier-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s ease;
  user-select: none;
}

.esg-verifier-nav-item:hover {
  background: #f0fdfa;
  color: #0f766e;
}

.esg-verifier-nav-item.is-active {
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 600;
}

.esg-verifier-content {
  flex: 1;
  min-width: 0;
  padding: 18px 20px 28px;
}

/* 侧边栏底部只读说明 */
.esg-verifier-sider-note {
  margin-top: auto;
  padding: 10px 12px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.8;
  border-top: 1px solid #f1f5f9;
}

/* ---------- 工作台统计卡 ---------- */

.esg-verifier-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.esg-verifier-stat {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
}

/* 左侧色条：用 ::after 而非 border-left，避免与圆角冲突 */
.esg-verifier-stat::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #0f766e;
}

.esg-verifier-stat.is-danger::after {
  background: #dc2626;
}

.esg-verifier-stat.is-warning::after {
  background: #b45309;
}

.esg-verifier-stat.is-success::after {
  background: #15803d;
}

.esg-verifier-stat-label {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esg-verifier-stat-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
  color: #042f2e;
  font-variant-numeric: tabular-nums;
}

.esg-verifier-stat.is-danger .esg-verifier-stat-value {
  color: #dc2626;
}

.esg-verifier-stat-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.5;
}

/* ---------- 任务表格区 ---------- */

.esg-verifier-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px 6px;
}

.esg-verifier-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.esg-verifier-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 筛选标签文字 */
.esg-verifier-filter-label {
  font-size: 12px;
  color: #64748b;
}

/* 说明列：最多两行省略，避免长 remark 把行撑高 */
.esg-verifier-remark {
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* 编号列：等宽字体 + 轻微字色，便于对齐比对 */
.esg-verifier-no {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 12px;
  color: #1e293b;
  letter-spacing: 0.2px;
}

/* ---------- 意见提交弹窗 ---------- */

/* 弹窗顶部「对象」条 */
.esg-verifier-modal-object {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  font-size: 12px;
  color: #115e59;
  margin-bottom: 16px;
  line-height: 1.7;
  flex-wrap: wrap;
}

/* 留痕警告条 */
.esg-verifier-modal-warn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  color: #92400e;
  line-height: 1.7;
}

/* 结论单选项：整块可点，选中时左侧描边高亮 */
.esg-verifier-conclusion-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.esg-verifier-conclusion-group .ant-radio-wrapper {
  margin-inline-end: 0;
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-size: 13px;
}

.esg-verifier-conclusion-group .ant-radio-wrapper:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
}

/* ---------- 意见详情（只读查看） ---------- */

.esg-verifier-detail-block {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.esg-verifier-detail-block + .esg-verifier-detail-block {
  margin-top: 10px;
}

.esg-verifier-detail-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.esg-verifier-detail-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
  .esg-verifier-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .esg-verifier-login-left {
    display: none;
  }
  .esg-verifier-login-card {
    max-width: 460px;
    min-height: auto;
  }
  .esg-verifier-mobile-brand {
    display: flex;
  }
  .esg-verifier-login-right {
    padding: 30px 24px;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .esg-verifier-sider {
    display: none;
  }
  .esg-verifier-content {
    padding: 14px 12px 22px;
  }
  .esg-verifier-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .esg-verifier-org {
    display: none;
  }
}
/* ============================================================
   第一层令牌：CSS 变量
   ------------------------------------------------------------
   浅深两套值成对维护。--esg-primary 及其派生色由 personalize store
   在运行时用 style.setProperty 覆盖（用户改主色后立即生效），
   这里的值只是首屏兜底，与默认主色 #0E7490 对齐。
   ============================================================ */
:root {
  /* 主色系 */
  --esg-primary: #0e7490;
  --esg-primary-hover: #0c6480; /* 主色压深 8% */
  --esg-primary-weak: rgba(14, 116, 144, 0.08); /* 选中底、标签底 */
  /* 主色底上的文字色：浅色模式白字；深色模式由 store 覆盖为深字（对比度达标） */
  --esg-on-primary: #ffffff;
  /* 背景 */
  --esg-bg-layout: #f5f7fa;
  --esg-bg-container: #ffffff;
  /* 文字 */
  --esg-text: #1f2937;
  --esg-text-secondary: #64748b;
  /* 边框 */
  --esg-border: #e5e7eb;
  /* 侧栏（由 siderTheme 覆盖，默认深青） */
  --esg-sider-bg: #0b3b47;
  --esg-sider-sub-bg: #082e37;
  --esg-sider-text: rgba(226, 245, 248, 0.82);
  --esg-sider-border: rgba(255, 255, 255, 0.07);
  --esg-sider-brand: #e6f7fb;
  /* 密度：表格行高与卡片内边距 */
  --esg-row-height: 40px;
  --esg-card-padding: 18px;
}

[data-theme='dark'] {
  --esg-primary: #149bbe; /* 主色提亮 15% */
  --esg-primary-hover: #17a8ce; /* 提亮 8% */
  --esg-primary-weak: rgba(20, 155, 190, 0.18);
  --esg-bg-layout: #0b1220;
  --esg-bg-container: #131c2e;
  --esg-text: #e5eaf2;
  --esg-text-secondary: #9aa8bf;
  --esg-border: #26324a;
}

/* 密度三档：切 data-density 即换行高与内边距 */
[data-density='compact'] {
  --esg-row-height: 32px;
  --esg-card-padding: 12px;
}
[data-density='standard'] {
  --esg-row-height: 40px;
  --esg-card-padding: 18px;
}
[data-density='loose'] {
  --esg-row-height: 48px;
  --esg-card-padding: 24px;
}

/* ============ 全局基础样式 ============ */
* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--esg-bg-layout);
  color: var(--esg-text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--esg-primary);
  text-decoration: none;
}

a:hover {
  color: var(--esg-primary-hover);
}

/* ============ 页面骨架 ============ */
.esg-page {
  padding: 16px 18px 24px;
  /* 内容最大宽度：由 data-width 切换 */
  transition: max-width 0.2s ease;
}

[data-width='full'] .esg-page {
  max-width: none;
}
[data-width='wide'] .esg-page {
  max-width: 1200px;
  margin: 0 auto;
}
[data-width='fixed'] .esg-page {
  max-width: 1000px;
  margin: 0 auto;
}

.esg-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.esg-page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--esg-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.esg-page-sub {
  font-size: 13px;
  color: var(--esg-text-secondary);
  margin-top: 2px;
}

/* ============ 筛选栏 ============ */
.esg-filter-bar {
  background: var(--esg-bg-container);
  border: 1px solid var(--esg-border);
  border-radius: 8px;
  padding: 14px 16px 4px;
  margin-bottom: 12px;
}

.esg-filter-bar .ant-form-item {
  margin-bottom: 12px;
}

/* ============ 统计卡 ============ */
.esg-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--esg-border);
  background: var(--esg-bg-container);
  padding: 16px var(--esg-card-padding);
  height: 100%;
}

.esg-stat-card::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--esg-primary);
}

.esg-stat-card.is-green::after {
  background: #16a34a;
}
.esg-stat-card.is-yellow::after {
  background: #d97706;
}
.esg-stat-card.is-red::after {
  background: #dc2626;
}
.esg-stat-card.is-cyan::after {
  background: var(--esg-primary);
}

.esg-stat-label {
  font-size: 13px;
  color: var(--esg-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.esg-stat-value {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 6px;
  color: var(--esg-text);
  font-variant-numeric: tabular-nums;
}

.esg-stat-extra {
  font-size: 12px;
  color: var(--esg-text-secondary);
  margin-top: 4px;
}

/* ============ 按用途分布胶囊 ============ */
.esg-usage-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--esg-bg-container);
  border: 1px solid var(--esg-border);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 12px;
}

.esg-usage-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--esg-text-secondary);
  white-space: nowrap;
}

.esg-usage-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 14px;
  border: 1px solid var(--esg-border);
  background: var(--esg-bg-container);
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.esg-usage-chip:hover {
  box-shadow: 0 1px 6px rgb(15 47 56 / 12%);
  transform: translateY(-1px);
}

.esg-usage-chip.is-active {
  font-weight: 600;
  box-shadow: 0 1px 6px rgb(15 47 56 / 12%);
}

.esg-usage-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.esg-usage-chip-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ============ 三色状态标签 ============ */
.esg-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}

.esg-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ============ 板块色标 ============ */
.esg-pillar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 19px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.esg-pillar .bar {
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: currentColor;
}

/* ============ 表格工具条 ============ */
.esg-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.esg-table-card {
  background: var(--esg-bg-container);
  border: 1px solid var(--esg-border);
  border-radius: 8px;
  padding: 14px 16px 4px;
}

.esg-muted {
  color: var(--esg-text-secondary);
}

.esg-mono {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 12px;
}

.esg-hash {
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  color: var(--esg-primary);
  background: var(--esg-primary-weak);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ============ 证据链时间线 ============ */
.esg-chain-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 22px;
}

.esg-chain-item::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: #d7e6ea;
}

.esg-chain-item:last-child::before {
  display: none;
}

.esg-chain-dot {
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0e7490;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ============ 登录页 ============ */
.esg-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 12% 20%, rgba(8, 145, 178, 0.28), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(14, 116, 144, 0.3), transparent 46%),
    linear-gradient(135deg, #062a33 0%, #0b3b47 48%, #0e4e5e 100%);
  padding: 24px;
}

.esg-login-card {
  width: 100%;
  max-width: 1000px;
  min-height: 480px;
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(3, 22, 28, 0.42);
  background: #fff;
}

.esg-login-left {
  flex: 1.05;
  padding: 40px 38px;
  color: #e6f7fb;
  background: linear-gradient(150deg, #0b3b47 0%, #0e7490 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.esg-login-right {
  flex: 1;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.esg-login-brand {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.esg-login-slogan {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(224, 247, 252, 0.86);
}

.esg-login-points {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.esg-login-point {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: rgba(224, 247, 252, 0.9);
}

/* 窄屏品牌标识（左侧品牌区隐藏时展示） */
.esg-login-mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 17px;
  font-weight: 700;
  color: #0f2f38;
}

/* ============ 登录方式切换 ============ */
/* 8 种方式：4 列 × 2 行；窄屏降为 2 列 × 4 行（见媒体查询） */
.esg-login-methods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef3f5;
}

.esg-login-method {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.esg-login-method .anticon,
.esg-login-method svg {
  font-size: 17px;
  line-height: 1;
  flex: none;
}

/* 名称过长时省略，避免撑破网格 */
.esg-login-method > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esg-login-method:hover {
  background: #f1f9fb;
  border-color: #cff0f5;
}

.esg-login-method.is-active {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(14, 116, 144, 0.12);
}

/* ============ 扫码登录 ============ */
.esg-qr-box {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 10px;
  border: 1px solid #d8e6ea;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.esg-qr-box img {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.esg-qr-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  text-align: center;
  color: #64748b;
  background: repeating-linear-gradient(
    45deg,
    #f8fcfd,
    #f8fcfd 8px,
    #f1f8fa 8px,
    #f1f8fa 16px
  );
  width: 100%;
  height: 100%;
}

.esg-qr-mask {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  text-align: center;
  padding: 12px;
}

/* ============ 页脚声明 ============ */
.esg-login-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.7;
}

.esg-login-footer a {
  color: #0e7490;
}

@media (max-width: 860px) {
  .esg-login-left {
    display: none;
  }
  .esg-login-card {
    max-width: 420px;
    min-height: auto;
  }
  .esg-login-mobile-brand {
    display: flex;
  }
  .esg-login-right {
    padding: 32px 24px;
  }
  /* 8 种方式在窄屏改为 2 列 × 4 行 */
  .esg-login-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .esg-login-wrap {
    padding: 12px;
    align-items: flex-start;
    padding-top: 24px;
  }
  .esg-login-card {
    max-width: 100%;
    border-radius: 12px;
  }
  .esg-login-right {
    padding: 24px 16px;
  }
  .esg-login-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .esg-login-method {
    font-size: 11px;
    padding: 8px 4px;
  }
}

/* ============ 顶部导航 ============ */
.esg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  background: var(--esg-bg-container);
  border-bottom: 1px solid var(--esg-border);
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.esg-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.esg-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  color: var(--esg-primary);
  white-space: nowrap;
}

.esg-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.esg-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--esg-text-secondary);
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.esg-header-icon:hover {
  background: var(--esg-primary-weak);
  color: var(--esg-primary);
}

/* 键盘焦点环：只在键盘导航时出现，鼠标点击不显示 */
.esg-header-icon:focus-visible {
  outline: 2px solid var(--esg-primary);
  outline-offset: 1px;
}

.esg-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.esg-user-chip:hover {
  background: var(--esg-primary-weak);
}

/* ============ 侧栏：明暗由 siderTheme 决定 ============ */
/* Sider 容器本身的背景：antd 的 siderBg token 只覆盖一部分，
   侧栏底部（菜单未填满时）会露出默认深青，必须显式覆盖。 */
.esg-sider,
.esg-sider .ant-layout-sider-children {
  background: var(--esg-sider-bg) !important;
}

.esg-sider .ant-menu,
.esg-sider .ant-menu-dark,
.esg-sider .ant-menu-light {
  background: var(--esg-sider-bg) !important;
  color: var(--esg-sider-text);
}

.esg-sider .ant-menu-dark .ant-menu-sub,
.esg-sider .ant-menu-dark .ant-menu-inline.ant-menu-sub {
  background: var(--esg-sider-sub-bg) !important;
}

/* 浅色侧栏：白底深字，选中项仍用主色 */
[data-sider='light'] .esg-sider .ant-menu-item,
[data-sider='light'] .esg-sider .ant-menu-submenu-title {
  color: #334155 !important;
}

[data-sider='light'] .esg-sider .ant-menu-item-selected {
  background: var(--esg-primary-weak) !important;
  color: var(--esg-primary) !important;
  font-weight: 600;
}

[data-sider='light'] .esg-sider .ant-menu-item:hover,
[data-sider='light'] .esg-sider .ant-menu-submenu-title:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  color: var(--esg-primary) !important;
}

[data-sider='light'] .esg-sider .ant-menu-submenu-arrow {
  color: #64748b !important;
}

/* 深色侧栏的悬停/选中：用主色，保证与全站一致。
   文字色用 --esg-on-primary：深色模式下主色是提亮后的浅青，
   白字对比不足 4.5:1，store 会自动把它切成深字。 */
.esg-sider .ant-menu-dark .ant-menu-item-selected {
  background: var(--esg-primary) !important;
  color: var(--esg-on-primary) !important;
}

.esg-sider .ant-menu-dark .ant-menu-item:hover,
.esg-sider .ant-menu-dark .ant-menu-submenu-title:hover {
  color: var(--esg-on-primary) !important;
}

/* ============ 侧栏 · 靛紫档（对标北森 Beisen 蓝紫）============
   底 #1E1B4B（Indigo 950）+ 选中 #6366F1（Indigo 500）+ 白字。
   与 dark 档的区别只在「底色与选中色」，文字/边框/悬停规则复用。 */
[data-sider='indigo'] .esg-sider .ant-menu,
[data-sider='indigo'] .esg-sider .ant-menu-dark {
  background: var(--esg-sider-bg) !important;
}

[data-sider='indigo'] .esg-sider .ant-menu-dark .ant-menu-sub,
[data-sider='indigo'] .esg-sider .ant-menu-dark .ant-menu-inline.ant-menu-sub {
  background: var(--esg-sider-sub-bg) !important;
}

[data-sider='indigo'] .esg-sider .ant-menu-item,
[data-sider='indigo'] .esg-sider .ant-menu-submenu-title {
  color: var(--esg-sider-text) !important;
}

/* 选中：靛紫 500 底 + 白字（4.9:1），左侧加一道浅紫指示条 */
[data-sider='indigo'] .esg-sider .ant-menu-item-selected {
  background: #6366F1 !important;
  color: #FFFFFF !important;
  font-weight: 600;
  position: relative;
}

[data-sider='indigo'] .esg-sider .ant-menu-item-selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 0 2px 2px 0;
  background: #A5B4FC;
}

/* 悬停：半透明白，比选中浅一档 */
[data-sider='indigo'] .esg-sider .ant-menu-item:hover,
[data-sider='indigo'] .esg-sider .ant-menu-submenu-title:hover {
  background: rgba(165, 180, 252, 0.12) !important;
  color: #FFFFFF !important;
}

[data-sider='indigo'] .esg-sider .ant-menu-submenu-arrow {
  color: rgba(165, 180, 252, 0.75) !important;
}

[data-sider='indigo'] .esg-sider .esg-sider-brand {
  border-bottom-color: var(--esg-sider-border);
}

.esg-sider-brand {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--esg-sider-border);
}

[data-sider='light'] .esg-sider-brand {
  color: var(--esg-primary);
}

[data-sider='dark'] .esg-sider-brand {
  color: var(--esg-sider-brand, #e6f7fb);
}

[data-sider='indigo'] .esg-sider-brand {
  color: var(--esg-sider-brand, #e0e7ff);
}

/* ============ 内容区滚动 ============ */
.esg-content {
  min-height: calc(100vh - 56px);
  overflow-x: hidden;
  background: var(--esg-bg-layout);
}

/* ============ 403 ============ */
.esg-403 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  gap: 10px;
  text-align: center;
}

/* ============ 案例卡片 ============ */
.esg-case-card {
  height: 100%;
  border-radius: 10px;
  border: 1px solid #e5edf0;
  transition: box-shadow 0.2s, transform 0.2s;
}

.esg-case-card:hover {
  box-shadow: 0 8px 24px rgba(14, 116, 144, 0.12);
  transform: translateY(-2px);
}

/* ============ 章节树 ============ */
.esg-chapter-tree .ant-tree-node-content-wrapper {
  width: 100%;
}

/* ============ 披露标准库：标准卡片 ============ */
.esg-standard-card {
  position: relative;
  border: 1px solid #e5edf0;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.esg-standard-card:hover {
  border-color: #a5f3fc;
  box-shadow: 0 6px 18px rgba(14, 116, 144, 0.1);
}

.esg-standard-card.is-active {
  border-color: #0e7490;
  background: #f0fafc;
  box-shadow: inset 3px 0 0 #0e7490;
}

.esg-standard-code {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 13px;
  font-weight: 600;
  color: #0e7490;
  letter-spacing: 0.3px;
}

.esg-standard-name {
  font-size: 13px;
  font-weight: 500;
  color: #0f2f38;
  margin-top: 6px;
  line-height: 1.5;
}

.esg-standard-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.6;
}

/* ============ 指标模板库：模板卡片 ============ */
.esg-template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 208px;
  background: #fff;
  border: 1px solid #e5edf0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.esg-template-card:hover {
  box-shadow: 0 8px 24px rgba(14, 116, 144, 0.12);
  transform: translateY(-2px);
  border-color: #a5f3fc;
}

.esg-template-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.esg-template-desc {
  font-size: 12px;
  line-height: 1.85;
  color: #64748b;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

.esg-template-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
}

.esg-template-scope {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esg-template-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed #eef2f6;
}

/* ============ 指标模板库：详情抽屉统计条 ============ */
.esg-template-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.esg-template-summary-item {
  flex: 1 1 140px;
  border: 1px solid #e5edf0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 14px;
}

/* ============ 披露标准库：Markdown 原文 ============ */
.esg-md-pre {
  margin: 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e5edf0;
  border-radius: 8px;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 12px;
  line-height: 1.85;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* ============ 披露池：披露要求提示条 ============ */
.esg-req-bar {
  border: 1px solid #a5f3fc;
  background: #f0fafc;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.esg-req-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.esg-req-label {
  font-size: 12px;
  font-weight: 600;
  color: #0e7490;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.esg-req-body {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.9;
  color: #334155;
  white-space: pre-wrap;
}

/* ============ 披露池：沟通记录 ============ */
.esg-comm-item {
  padding: 9px 11px;
  border: 1px solid #e5edf0;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.esg-comm-item.is-caliber {
  border-color: #67e8f9;
  background: #f0fafc;
  box-shadow: inset 3px 0 0 #0e7490;
}

.esg-comm-title {
  font-size: 13px;
  font-weight: 500;
  color: #0f2f38;
  line-height: 1.5;
}

.esg-comm-content {
  font-size: 12px;
  color: #64748b;
  line-height: 1.75;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.esg-comm-meta {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ 质检证书：超限行 ============ */
.qc-row-overlimit > td {
  background: #fef2f2 !important;
}

/* ============ 签章面板 ============ */
.esg-sign-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5edf0;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.esg-sign-row + .esg-sign-row {
  margin-top: 8px;
}

.esg-sign-row.is-signed {
  border-color: #86efac;
  background: #f6fef9;
}

.esg-sign-row.is-pending {
  background: #fbfdfe;
}

.esg-sign-badge {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #cbd5e1;
  margin-top: 1px;
}

.esg-sign-row.is-signed .esg-sign-badge {
  background: #16a34a;
}

.esg-sign-row.is-pending .esg-sign-badge {
  background: #cbd5e1;
}

.esg-sign-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f2f38;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.esg-sign-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.7;
  word-break: break-all;
}

/* ============ 指纹 ============ */
.esg-fingerprint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 12px;
  color: #0e7490;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 6px;
  padding: 4px 8px;
  word-break: break-all;
}

/* ============ 公开验证页（独立布局，无侧边栏） ============ */
.esg-verify-wrap {
  min-height: 100vh;
  padding: 40px 20px 56px;
  background:
    radial-gradient(circle at 8% 8%, rgba(8, 145, 178, 0.16), transparent 40%),
    radial-gradient(circle at 92% 92%, rgba(14, 116, 144, 0.14), transparent 42%),
    linear-gradient(180deg, #f2f9fb 0%, #eaf4f7 100%);
}

.esg-verify-shell {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.esg-verify-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #0e7490;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
}

.esg-verify-brand span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 400;
}

.esg-verify-card {
  background: #fff;
  border: 1px solid #e0eef2;
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(11, 59, 71, 0.1);
  overflow: hidden;
}

.esg-verify-card-head {
  padding: 30px 32px 24px;
  text-align: center;
  background: linear-gradient(160deg, #0b3b47 0%, #0e7490 100%);
  color: #e6f7fb;
}

.esg-verify-card-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin: 0;
}

.esg-verify-card-sub {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(224, 247, 252, 0.8);
  line-height: 1.7;
}

.esg-verify-card-body {
  padding: 26px 32px 30px;
}

.esg-verify-result {
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  border: 1px solid transparent;
}

.esg-verify-result.is-success {
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  border-color: #86efac;
}

.esg-verify-result.is-error {
  background: linear-gradient(180deg, #fef2f2 0%, #fef6f6 100%);
  border-color: #fca5a5;
}

.esg-verify-result.is-warning {
  background: linear-gradient(180deg, #fffbeb 0%, #fefce8 100%);
  border-color: #fcd34d;
}

.esg-verify-result-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(15, 47, 56, 0.14);
}

.esg-verify-result.is-success .esg-verify-result-icon {
  background: linear-gradient(150deg, #16a34a 0%, #15803d 100%);
}

.esg-verify-result.is-error .esg-verify-result-icon {
  background: linear-gradient(150deg, #dc2626 0%, #b91c1c 100%);
}

.esg-verify-result.is-warning .esg-verify-result-icon {
  background: linear-gradient(150deg, #f59e0b 0%, #d97706 100%);
}

.esg-verify-result-title {
  font-size: 21px;
  font-weight: 700;
  color: #0f2f38;
  letter-spacing: 0.5px;
}

.esg-verify-result-desc {
  margin-top: 8px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.8;
}

.esg-verify-section {
  margin-top: 24px;
}

.esg-verify-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #0e7490;
  padding-left: 9px;
  border-left: 3px solid #0891b2;
  line-height: 1.2;
  margin-bottom: 12px;
}

.esg-verify-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #e5edf0;
  border: 1px solid #e5edf0;
  border-radius: 8px;
  overflow: hidden;
}

.esg-verify-info-cell {
  background: #fff;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  gap: 8px;
  min-height: 42px;
  align-items: center;
}

.esg-verify-info-cell.is-wide {
  grid-column: 1 / -1;
}

/* 奇数个签署人时，末项占满整行，避免右侧留下空格子 */
.esg-verify-signers .esg-verify-info-cell:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.esg-verify-info-label {
  color: #94a3b8;
  flex: none;
  min-width: 76px;
}

.esg-verify-info-value {
  color: #0f2f38;
  word-break: break-word;
}

@media (max-width: 720px) {
  .esg-verify-info {
    grid-template-columns: minmax(0, 1fr);
  }
  .esg-verify-card-head,
  .esg-verify-card-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}

.esg-verify-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  line-height: 2;
}

.esg-verify-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: #64748b;
}

.esg-verify-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ============ 角色权限：左栏角色卡片 ============ */
.esg-role-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #e5edf0;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.esg-role-card:hover {
  border-color: #a5f3fc;
  background: #fafdfe;
  transform: translateX(1px);
}

.esg-role-card:focus-visible {
  outline: 2px solid #0891b2;
  outline-offset: 1px;
}

.esg-role-card.is-active {
  border-color: #67e8f9;
}

.esg-role-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f2f38;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esg-role-card-code {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.2px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============ 角色权限：详情区块标题 ============ */
.esg-role-section-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin: 18px 0 9px;
  padding-left: 9px;
  border-left: 3px solid #0891b2;
  font-size: 13px;
  font-weight: 600;
  color: #0f2f38;
  line-height: 1.3;
}

/* 角色详情里的折叠面板：标题不换行挤压，内容留白收紧 */
.esg-role-collapse .ant-collapse-header {
  align-items: center !important;
}

.esg-role-collapse .ant-collapse-content-box {
  padding: 8px 12px 12px !important;
}

/* ============ 打印/滚动条 ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

::-webkit-scrollbar-track {
  background: transparent;
}


/* ============================================================
   左侧菜单：多级菜单缩进与文字完整显示
   ------------------------------------------------------------
   背景：侧边栏宽 260px，三级菜单（一级 → 分组 → 页面）展开后
        每级都有左内边距，长文案（如「供应商 ESG 评级」）易被截断。
   方案：收紧各级左内边距，文字不省略、超长时换行显示。
   ============================================================ */

/* 一级菜单项 */
.ant-layout-sider .ant-menu-inline > .ant-menu-item,
.ant-layout-sider .ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
  padding-left: 20px !important;
  padding-right: 12px !important;
}

/* 二级菜单项（分组内的页面） */
.ant-layout-sider .ant-menu-inline .ant-menu-sub .ant-menu-item,
.ant-layout-sider .ant-menu-inline .ant-menu-sub .ant-menu-submenu-title {
  padding-left: 38px !important;
  padding-right: 12px !important;
}

/* 三级菜单项（如负责任矿产 → 风控执行 → 供应商 ESG 评级） */
.ant-layout-sider .ant-menu-inline .ant-menu-sub .ant-menu-sub .ant-menu-item,
.ant-layout-sider .ant-menu-inline .ant-menu-sub .ant-menu-sub .ant-menu-submenu-title {
  padding-left: 56px !important;
  padding-right: 12px !important;
}

/* 菜单文字：不省略号，超长换行 */
.ant-layout-sider .ant-menu-title-content {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.4;
  word-break: break-word;
}

/* 菜单项高度自适应（换行时不被裁切） */
.ant-layout-sider .ant-menu-inline .ant-menu-item,
.ant-layout-sider .ant-menu-inline .ant-menu-submenu-title {
  height: auto !important;
  min-height: 40px;
  line-height: 40px;
  display: flex;
  align-items: center;
  margin-block: 2px;
}

/* 叶子菜单的图标与文字间距（仅有星标的两个重点功能） */
.ant-layout-sider .ant-menu-item .anticon + .ant-menu-title-content {
  margin-inline-start: 8px;
}

/* 收起状态保持居中 */
.ant-layout-sider-collapsed .ant-menu-inline .ant-menu-item,
.ant-layout-sider-collapsed .ant-menu-inline .ant-menu-submenu-title {
  padding-left: 24px !important;
  justify-content: center;
}

/* ============ 指标「适用章节」（指标详情 / 列表共用） ============ */
.esg-chapter-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.esg-chapter-group {
  min-width: 0;
  border: 1px solid #e5edf0;
  border-radius: 8px;
  background: #fcfefe;
  padding: 10px 12px;
}

.esg-chapter-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px dashed #e5edf0;
}

.esg-chapter-group-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.esg-chapter-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 4px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}

.esg-chapter-row:hover {
  background: #f0fafc;
}

.esg-chapter-branch {
  color: #cbd5e1;
  font-size: 11px;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  flex: none;
}

.esg-chapter-title {
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
  word-break: break-word;
}

.esg-chapter-level {
  font-size: 11px;
  flex: none;
  margin-left: auto;
}

.esg-chapter-tag {
  flex: none;
}

/* 列表列中的「+N」折叠按钮 */
.esg-chapter-more {
  display: inline-block;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 20px;
  color: #0e7490;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.esg-chapter-more:hover {
  background: #cffafe;
  border-color: #67e8f9;
}

/* ============ 通用附件面板 ============ */
.esg-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.esg-attach-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #eef3f5;
  border-radius: 8px;
  background: #fbfdfe;
  transition: border-color 0.15s, background 0.15s;
}

.esg-attach-item:hover {
  border-color: #bae6fd;
  background: #f0fafc;
}

.esg-attach-item.is-compact {
  padding: 6px 8px;
  gap: 8px;
}

.esg-attach-icon {
  font-size: 20px;
  line-height: 1;
  flex: none;
  margin-top: 2px;
}

.esg-attach-item.is-compact .esg-attach-icon {
  font-size: 17px;
}

.esg-attach-main {
  flex: 1;
  min-width: 0;
}

.esg-attach-name {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.esg-attach-filename {
  font-size: 13px;
  color: #0f2f38;
  font-weight: 500;
  word-break: break-all;
}

.esg-attach-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
}

.esg-attach-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  word-break: break-word;
}

.esg-attach-actions {
  flex: none;
}

.esg-attach-pending {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 168px;
  overflow: auto;
  border: 1px solid #eef3f5;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fbfdfe;
}

.esg-attach-pending-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.esg-attach-pending-name {
  flex: 1;
  min-width: 0;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.esg-attach-pending-size {
  flex: none;
  color: #94a3b8;
  font-size: 11px;
}

.esg-attach-skipped {
  font-size: 12px;
  line-height: 1.7;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 10px;
}

/* ============================================================
   披露标准库：紧凑列表 + 说明分组卡片（2026-11-21 重构）
   ============================================================ */

/* 左栏紧凑列表 */
.esg-std-compact-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.esg-std-compact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.esg-std-compact-item:hover {
  background: #f0fdfa;
  border-color: #ccfbf1;
}
.esg-std-compact-item.is-active {
  background: #ecfeff;
  border-color: #0e7490;
}
.esg-std-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.esg-std-code {
  font-size: 12px;
  font-weight: 600;
  color: #0e7490;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  flex: 0 0 auto;
  min-width: 58px;
}
.esg-std-name {
  flex: 1 1 auto;
  font-size: 12px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.esg-std-compact-item.is-active .esg-std-name {
  color: #0e7490;
  font-weight: 600;
}
.esg-std-count {
  flex: 0 0 auto;
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 9px;
  padding: 0 7px;
  line-height: 17px;
  min-width: 24px;
  text-align: center;
}
.esg-std-legend {
  display: flex;
  gap: 12px;
  padding: 8px 8px 2px;
  margin-top: 6px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11px;
  color: #64748b;
}
.esg-std-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.esg-std-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* 右侧标准说明：基本信息条 */
.esg-std-info-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.esg-std-info-bar > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.esg-std-info-bar .k {
  font-size: 11px;
  color: #94a3b8;
}
.esg-std-info-bar .v {
  font-size: 12px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧标准说明：分组块 */
.esg-std-block {
  height: 100%;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  overflow: hidden;
}
.esg-std-block-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 10px;
  border-bottom: 1px solid #eef2f6;
}
.esg-std-block-body {
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.75;
  color: #475569;
  white-space: pre-wrap;
}

/* 各分组配色 */
.esg-std-block.is-strength .esg-std-block-title {
  color: #b91c1c;
  background: #fef2f2;
}
.esg-std-block.is-target .esg-std-block-title {
  color: #0e7490;
  background: #ecfeff;
}
.esg-std-block.is-scope .esg-std-block-title {
  color: #15803d;
  background: #f0fdf4;
}
.esg-std-block.is-framework .esg-std-block-title {
  color: #7c3aed;
  background: #f5f3ff;
}
.esg-std-block.is-core .esg-std-block-title {
  color: #b45309;
  background: #fffbeb;
}
.esg-std-block.is-points .esg-std-block-title {
  color: #4338ca;
  background: #eef2ff;
}

/* 标准对比表 */
.esg-std-compare-wrap {
  overflow-x: auto;
}
.esg-std-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.esg-std-compare-table th {
  text-align: left;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.esg-std-compare-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.esg-std-compare-table tbody tr:hover {
  background: #f0fdfa;
}

/* ============================================================
   供应商角色说明卡（2026-11-21）
   ============================================================ */
.esg-role-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.esg-role-guide-item {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 12px 14px;
  background: #fff;
}
.esg-role-guide-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.esg-role-guide-code {
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.esg-role-guide-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}
.esg-role-guide-perms {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.85;
}
.esg-role-guide-perms li {
  list-style: disc;
}

/* ============================================================
   附件在线预览（2026-11-21）
   ============================================================ */

/* PDF */
.esg-preview-pdf-wrap {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
}
.esg-preview-pdf {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* 图片 */
.esg-preview-image-wrap {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}
.esg-preview-image-toolbar {
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  flex: 0 0 auto;
}
.esg-preview-zoom {
  font-size: 12px;
  color: #475569;
  min-width: 44px;
  text-align: center;
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
.esg-preview-image-canvas {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.esg-preview-image-canvas img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
}

/* 文本 */
.esg-preview-text-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: auto;
  background: #f8fafc;
}
.esg-preview-text {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.75;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 不支持预览 */
.esg-preview-unsupported {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

/* 附件条目上的「预览」按钮 */
.esg-attach-preview-btn {
  padding: 0 4px;
  font-size: 12px;
  color: #0e7490;
  cursor: pointer;
  border: none;
  background: transparent;
}
.esg-attach-preview-btn:hover {
  color: #0891b2;
  text-decoration: underline;
}

/* ============ 投料对账（/indicator/reconcile） ============ */
/* 差异明细行高亮：重大差异浅红、未在计划内浅紫。
   必须带 !important：antd 的 hover / 斑马纹规则优先级更高，否则悬停时高亮会被盖掉。 */
.esg-reconcile-table .esg-row-major > td {
  background: #fef2f2 !important;
}
.esg-reconcile-table .esg-row-unplanned > td {
  background: #faf5ff !important;
}
.esg-reconcile-table .esg-row-major:hover > td {
  background: #fee2e2 !important;
}
.esg-reconcile-table .esg-row-unplanned:hover > td {
  background: #f3e8ff !important;
}

/* 概览表当前选中产品：左侧青色标记条，明确「下面两张图和明细属于这一行」 */
.esg-row-selected > td {
  background: var(--esg-primary-weak) !important;
}
.esg-row-selected > td:first-child {
  box-shadow: inset 3px 0 0 var(--esg-primary);
}

/* ============================================================
   密度：表格行高随 data-density 联动
   ------------------------------------------------------------
   只改单元格内边距与行高，字号仍由字号档位控制，
   保证「密度」与「字号」两个维度互不干扰。
   ============================================================ */
[data-density='compact'] .ant-table-tbody > tr > td {
  padding: 6px 12px;
}
[data-density='standard'] .ant-table-tbody > tr > td {
  padding: 10px 12px;
}
[data-density='loose'] .ant-table-tbody > tr > td {
  padding: 16px 12px;
}

[data-density='compact'] .ant-table-thead > tr > th {
  padding: 7px 12px;
}
[data-density='standard'] .ant-table-thead > tr > th {
  padding: 11px 12px;
}
[data-density='loose'] .ant-table-thead > tr > th {
  padding: 15px 12px;
}

/* 统计卡内边距也跟密度走 */
.esg-stat-card {
  padding: 16px var(--esg-card-padding);
}

/* ============================================================
   深色模式兜底
   ------------------------------------------------------------
   页面里仍有大量写死的浅色背景（#fff / #f8fafc 等），逐条改成本高、
   风险大。这里按「容器类选择器统一换底」兜底，让深色模式下不出现
   白块；后续逐页改造时再删掉对应条目。
   ============================================================ */
[data-theme='dark'] .esg-standard-card,
[data-theme='dark'] .esg-template-card,
[data-theme='dark'] .esg-comm-item,
[data-theme='dark'] .esg-sign-row,
[data-theme='dark'] .esg-role-card,
[data-theme='dark'] .esg-role-guide-item,
[data-theme='dark'] .esg-std-block,
[data-theme='dark'] .esg-attach-item,
[data-theme='dark'] .esg-chapter-group,
[data-theme='dark'] .esg-preview-image-toolbar,
[data-theme='dark'] .esg-verify-card,
[data-theme='dark'] .esg-login-card {
  background: var(--esg-bg-container);
  border-color: var(--esg-border);
}

[data-theme='dark'] .esg-std-info-bar,
[data-theme='dark'] .esg-md-pre,
[data-theme='dark'] .esg-template-summary-item,
[data-theme='dark'] .esg-attach-pending,
[data-theme='dark'] .esg-preview-text-wrap,
[data-theme='dark'] .esg-preview-image-wrap,
[data-theme='dark'] .esg-preview-unsupported,
[data-theme='dark'] .esg-preview-pdf-wrap {
  background: #18223a;
  border-color: var(--esg-border);
  color: var(--esg-text);
}

[data-theme='dark'] .esg-standard-name,
[data-theme='dark'] .esg-comm-title,
[data-theme='dark'] .esg-sign-title,
[data-theme='dark'] .esg-role-card-name,
[data-theme='dark'] .esg-role-section-title,
[data-theme='dark'] .esg-chapter-title,
[data-theme='dark'] .esg-attach-filename,
[data-theme='dark'] .esg-std-info-bar .v,
[data-theme='dark'] .esg-std-block-body,
[data-theme='dark'] .esg-std-compare-table td,
[data-theme='dark'] .esg-preview-text,
[data-theme='dark'] .esg-req-body,
[data-theme='dark'] .esg-attach-pending-name {
  color: var(--esg-text);
}

[data-theme='dark'] .esg-standard-meta,
[data-theme='dark'] .esg-template-desc,
[data-theme='dark'] .esg-comm-content,
[data-theme='dark'] .esg-comm-meta,
[data-theme='dark'] .esg-sign-meta,
[data-theme='dark'] .esg-role-card-code,
[data-theme='dark'] .esg-std-info-bar .k,
[data-theme='dark'] .esg-attach-meta,
[data-theme='dark'] .esg-attach-desc,
[data-theme='dark'] .esg-template-scope,
[data-theme='dark'] .esg-std-name,
[data-theme='dark'] .esg-chapter-branch {
  color: var(--esg-text-secondary);
}

[data-theme='dark'] .esg-std-compare-table th {
  background: #18233a;
  border-color: var(--esg-border);
  color: #c7d2e3;
}

[data-theme='dark'] .esg-std-compare-table td,
[data-theme='dark'] .esg-chapter-group-head {
  border-color: var(--esg-border);
}

[data-theme='dark'] .esg-std-count {
  background: #1e293b;
  color: var(--esg-text-secondary);
}

[data-theme='dark'] .esg-std-compact-item:hover,
[data-theme='dark'] .esg-chapter-row:hover {
  background: #18223a;
}

[data-theme='dark'] .esg-std-compact-item.is-active,
[data-theme='dark'] .esg-standard-card.is-active,
[data-theme='dark'] .esg-req-bar,
[data-theme='dark'] .esg-comm-item.is-caliber {
  background: var(--esg-primary-weak);
  border-color: var(--esg-primary);
}

[data-theme='dark'] .esg-comm-item.is-caliber {
  box-shadow: inset 3px 0 0 var(--esg-primary);
}

[data-theme='dark'] .esg-fingerprint {
  background: var(--esg-primary-weak);
  border-color: var(--esg-primary);
  color: var(--esg-primary);
}

[data-theme='dark'] .esg-chapter-more {
  background: var(--esg-primary-weak);
  border-color: var(--esg-primary);
  color: var(--esg-primary);
}

[data-theme='dark'] .esg-std-compact-item.is-active .esg-std-name,
[data-theme='dark'] .esg-std-code,
[data-theme='dark'] .esg-standard-code,
[data-theme='dark'] .esg-req-label {
  color: var(--esg-primary);
}

[data-theme='dark'] .esg-verify-info {
  background: var(--esg-border);
  border-color: var(--esg-border);
}

[data-theme='dark'] .esg-verify-info-cell {
  background: var(--esg-bg-container);
}

[data-theme='dark'] .esg-verify-info-value,
[data-theme='dark'] .esg-verify-result-title {
  color: var(--esg-text);
}

[data-theme='dark'] .esg-verify-info-label,
[data-theme='dark'] .esg-verify-result-desc {
  color: var(--esg-text-secondary);
}

/* 深色下滚动条 */
[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background: #33415c;
}
[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ============================================================
   外观与个人设置抽屉（PersonalizeDrawer）
   ============================================================ */
.esg-pz-drawer .ant-drawer-body {
  padding: 0;
  background: var(--esg-bg-container);
  color: var(--esg-text);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.esg-pz-drawer .ant-drawer-header {
  border-bottom: 1px solid var(--esg-border);
  background: var(--esg-bg-container);
}

.esg-pz-drawer .ant-drawer-title {
  color: var(--esg-text);
  font-weight: 600;
}

.esg-pz-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 20px 16px;
  outline: none;
}

.esg-pz-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--esg-border);
  background: var(--esg-bg-container);
}

.esg-pz-group {
  padding: 14px 0;
  border-bottom: 1px solid var(--esg-border);
}

.esg-pz-group:last-child {
  border-bottom: none;
}

.esg-pz-group:focus {
  outline: none;
}

.esg-pz-group:focus-visible {
  outline: 2px solid var(--esg-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.esg-pz-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--esg-text);
  margin-bottom: 4px;
}

.esg-pz-group-head .anticon {
  color: var(--esg-primary);
}

.esg-pz-group-desc {
  font-size: 12px;
  color: var(--esg-text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.esg-pz-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.esg-pz-row-label {
  font-size: 13px;
  color: var(--esg-text);
  flex: none;
}

.esg-pz-row-hint {
  font-size: 11px;
  color: var(--esg-text-secondary);
  margin-top: 2px;
  line-height: 1.6;
}

/* 明暗三张预览卡 */
.esg-pz-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.esg-pz-mode-card {
  position: relative;
  border: 1px solid var(--esg-border);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--esg-bg-container);
  font-family: inherit;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.esg-pz-mode-card:hover {
  border-color: var(--esg-primary);
}

.esg-pz-mode-card.is-active {
  border-color: var(--esg-primary);
  box-shadow: 0 0 0 1px var(--esg-primary);
}

.esg-pz-mode-card:focus-visible {
  outline: 2px solid var(--esg-primary);
  outline-offset: 2px;
}

.esg-pz-mode-card[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

/* 上半部配色预览 */
.esg-pz-mode-preview {
  height: 46px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  border-bottom: 1px solid var(--esg-border);
  overflow: hidden;
}

.esg-pz-mode-preview .bar {
  height: 5px;
  border-radius: 3px;
  display: block;
  width: 100%;
}

.esg-pz-mode-preview .bar:first-child {
  width: 62%;
}

/* 跟随系统：左右两半各画一组，直观表达「半浅半深」 */
.esg-pz-mode-preview.is-system {
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.esg-pz-mode-preview.is-system .half {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  min-width: 0;
}

.esg-pz-mode-preview.is-light {
  background: #f7f9fb;
}
.esg-pz-mode-preview.is-light .bar {
  background: #cfd8e3;
}
.esg-pz-mode-preview.is-light .bar:first-child {
  background: #9fb0c4;
}

.esg-pz-mode-preview.is-dark {
  background: #101a2b;
}
.esg-pz-mode-preview.is-dark .bar {
  background: #2c3a52;
}
.esg-pz-mode-preview.is-dark .bar:first-child {
  background: #465872;
}

.esg-pz-mode-preview.is-system .half:first-child {
  background: #f7f9fb;
}
.esg-pz-mode-preview.is-system .half:first-child .bar {
  background: #cfd8e3;
}
.esg-pz-mode-preview.is-system .half:first-child .bar:first-child {
  background: #9fb0c4;
}

.esg-pz-mode-preview.is-system .half:last-child {
  background: #101a2b;
}
.esg-pz-mode-preview.is-system .half:last-child .bar {
  background: #2c3a52;
}
.esg-pz-mode-preview.is-system .half:last-child .bar:first-child {
  background: #465872;
}

.esg-pz-mode-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 4px;
  font-size: 12px;
  color: var(--esg-text);
}

.esg-pz-mode-card.is-active .esg-pz-mode-label {
  color: var(--esg-primary);
  font-weight: 600;
}

.esg-pz-mode-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--esg-primary);
  color: #fff;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 预设色块 */
.esg-pz-swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.esg-pz-swatch {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.esg-pz-swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
}

.esg-pz-swatch.is-active {
  box-shadow: 0 0 0 2px var(--esg-bg-container), 0 0 0 4px var(--esg-primary);
}

.esg-pz-swatch:focus-visible {
  outline: 2px solid var(--esg-primary);
  outline-offset: 3px;
}

.esg-pz-swatch-check {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.esg-pz-color-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.esg-pz-color-hex {
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--esg-primary-weak);
  color: var(--esg-primary);
  letter-spacing: 0.3px;
}

.esg-pz-color-usage {
  font-size: 11px;
  color: var(--esg-text-secondary);
  line-height: 1.6;
  flex: 1 1 auto;
  min-width: 0;
}

/* 字号三档 */
.esg-pz-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.esg-pz-seg-btn {
  border: 1px solid var(--esg-border);
  border-radius: 7px;
  background: var(--esg-bg-container);
  color: var(--esg-text);
  padding: 7px 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.4;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.esg-pz-seg-btn:hover {
  border-color: var(--esg-primary);
  color: var(--esg-primary);
}

.esg-pz-seg-btn.is-active {
  border-color: var(--esg-primary);
  background: var(--esg-primary-weak);
  color: var(--esg-primary);
  font-weight: 600;
}

.esg-pz-seg-btn:focus-visible {
  outline: 2px solid var(--esg-primary);
  outline-offset: 2px;
}

.esg-pz-seg-btn .sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--esg-text-secondary);
  margin-top: 1px;
}

.esg-pz-seg-btn.is-active .sub {
  color: var(--esg-primary);
  opacity: 0.8;
}

/* 账号与安全入口 */
.esg-pz-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esg-pz-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--esg-border);
  border-radius: 8px;
  background: var(--esg-bg-container);
  color: var(--esg-text);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.esg-pz-link:hover {
  border-color: var(--esg-primary);
  background: var(--esg-primary-weak);
  color: var(--esg-primary);
}

.esg-pz-link:focus-visible {
  outline: 2px solid var(--esg-primary);
  outline-offset: 2px;
}

.esg-pz-link .anticon {
  color: var(--esg-primary);
}

.esg-pz-link .grow {
  flex: 1 1 auto;
  min-width: 0;
}

.esg-pz-link .arrow {
  color: var(--esg-text-secondary);
  font-size: 11px;
}

.esg-pz-link.is-danger .anticon,
.esg-pz-link.is-danger:hover {
  color: #b91c1c;
}

.esg-pz-link.is-danger:hover {
  border-color: #fca5a5;
  background: rgba(185, 28, 28, 0.06);
}

/* 日期格式预览 */
.esg-pz-preview-line {
  font-size: 12px;
  color: var(--esg-text-secondary);
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--esg-primary-weak);
  border: 1px dashed var(--esg-border);
  line-height: 1.7;
}

.esg-pz-preview-line b {
  color: var(--esg-primary);
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
  font-weight: 600;
}

.esg-pz-note {
  font-size: 11px;
  color: var(--esg-text-secondary);
  line-height: 1.7;
  margin-top: 6px;
}

/* 窄屏：抽屉全屏（由组件设 width="100%"，这里补齐内边距） */
@media (max-width: 767px) {
  .esg-pz-body {
    padding: 4px 14px 16px;
  }
  .esg-pz-footer {
    padding: 10px 14px;
  }
  .esg-pz-mode-grid {
    gap: 8px;
  }
  .esg-pz-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 深色模式下抽屉内 antd 控件的边线 */
[data-theme='dark'] .esg-pz-drawer .ant-select-selector,
[data-theme='dark'] .esg-pz-drawer .ant-color-picker-trigger {
  background: var(--esg-bg-container);
  border-color: var(--esg-border);
}

/* ============================================================
   知识库（/kb）
   ------------------------------------------------------------
   三块：标签云、左侧文档列表、右侧文档详情 / 检索结果。
   全部走 --esg-* 令牌，深色模式只需在下方补少数几条覆盖。
   ============================================================ */

/* 检索命中高亮：浅色模式淡黄底深字，深色模式降到暗琥珀，避免刺眼亮黄 */
:root {
  --esg-kb-mark-bg: #fef08a;
  --esg-kb-mark-text: #0f2f38;
  --esg-kb-mark-border: #facc15;
  /* 文档卡片选中/悬停底色 */
  --esg-kb-item-hover: #f0fdfa;
  --esg-kb-item-active: #ecfeff;
  /* 切片卡片底色 */
  --esg-kb-chunk-bg: #f8fafc;
}

[data-theme='dark'] {
  --esg-kb-mark-bg: #7a5c05;
  --esg-kb-mark-text: #fef3c7;
  --esg-kb-mark-border: #a16207;
  --esg-kb-item-hover: #18223a;
  --esg-kb-item-active: var(--esg-primary-weak);
  --esg-kb-chunk-bg: #18223a;
}

/* ---------- 标签云 ---------- */
.esg-kb-tagcloud {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esg-kb-taggroup {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.esg-kb-taggroup-label {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 24px;
  color: var(--esg-text-secondary);
  min-width: 34px;
}

.esg-kb-tagchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 9px;
  border-radius: 12px;
  border: 1px solid var(--esg-border);
  background: var(--esg-bg-container);
  font-size: 12px;
  line-height: 22px;
  color: var(--esg-text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.esg-kb-tagchip:hover {
  border-color: var(--esg-primary);
  color: var(--esg-primary);
}

.esg-kb-tagchip.is-active {
  font-weight: 600;
}

.esg-kb-tagchip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.esg-kb-tagchip-count {
  font-size: 11px;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

/* ---------- 左侧文档列表 ---------- */
.esg-kb-doc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* 8 份文档尚可，后续导入更多时列表需要独立滚动，避免把右栏挤出视口 */
  max-height: 760px;
  overflow-y: auto;
  padding-right: 2px;
}

.esg-kb-doc-item {
  position: relative;
  padding: 8px 10px 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.esg-kb-doc-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background 0.15s;
}

.esg-kb-doc-item:hover {
  background: var(--esg-kb-item-hover);
}

.esg-kb-doc-item.is-active {
  background: var(--esg-kb-item-active);
  border-color: var(--esg-primary);
}

.esg-kb-doc-item.is-active::before {
  background: var(--esg-primary);
}

.esg-kb-doc-item:focus-visible {
  outline: 2px solid var(--esg-primary);
  outline-offset: 1px;
}

.esg-kb-doc-title {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--esg-text);
}

.esg-kb-doc-item.is-active .esg-kb-doc-title {
  color: var(--esg-primary);
}

.esg-kb-doc-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--esg-text-secondary);
  font-variant-numeric: tabular-nums;
}

.esg-kb-doc-tags {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ---------- 右侧详情 ---------- */
.esg-kb-detail-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--esg-border);
}

.esg-kb-detail-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--esg-text);
  line-height: 1.4;
}

.esg-kb-detail-sub {
  font-size: 12px;
  color: var(--esg-text-secondary);
  margin-top: 2px;
}

.esg-kb-detail-summary {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--esg-text-secondary);
  margin-top: 8px;
}

.esg-kb-detail-facts {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 11.5px;
  color: var(--esg-text-secondary);
  font-variant-numeric: tabular-nums;
}

.esg-kb-detail-facts b {
  color: var(--esg-text);
  font-weight: 600;
}

/* 切片卡片 */
.esg-kb-chunk {
  border: 1px solid var(--esg-border);
  border-radius: 8px;
  background: var(--esg-kb-chunk-bg);
  padding: 9px 12px 8px;
}

.esg-kb-chunk + .esg-kb-chunk {
  margin-top: 8px;
}

.esg-kb-chunk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.esg-kb-chunk-no {
  font-size: 12px;
  font-weight: 600;
  color: var(--esg-primary);
  font-variant-numeric: tabular-nums;
}

.esg-kb-chunk-page {
  font-size: 11px;
  color: var(--esg-text-secondary);
  font-variant-numeric: tabular-nums;
}

.esg-kb-chunk-body {
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--esg-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.esg-kb-chunk-toggle {
  font-size: 11.5px;
  padding: 0;
  height: auto;
  line-height: 1.6;
}

/* 命中高亮：<<关键词>> 渲染成 mark */
.esg-kb-mark {
  background: var(--esg-kb-mark-bg);
  color: var(--esg-kb-mark-text);
  border-radius: 2px;
  padding: 0 2px;
  box-shadow: inset 0 -1px 0 var(--esg-kb-mark-border);
  font-weight: 600;
}

/* ---------- 检索结果 ---------- */
.esg-kb-hit-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* 20 条命中若全部铺开会把页面拉成十几屏，这里让结果区独立滚动，
     右栏文档详情保持在视口内，便于对照「检索命中 ↔ 原文」 */
  max-height: 760px;
  overflow-y: auto;
  padding-right: 4px;
}

.esg-kb-hit {
  border: 1px solid var(--esg-border);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--esg-bg-container);
  transition: border-color 0.15s;
}

.esg-kb-hit:hover {
  border-color: var(--esg-primary);
}

.esg-kb-hit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.esg-kb-hit-source {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--esg-text-secondary);
}

.esg-kb-hit-doc {
  font-weight: 600;
  color: var(--esg-text);
}

.esg-kb-hit-body {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--esg-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.esg-kb-hit-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.esg-kb-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--esg-text-secondary);
  font-variant-numeric: tabular-nums;
}

.esg-kb-score-bar {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--esg-border);
  overflow: hidden;
}

.esg-kb-score-bar > i {
  display: block;
  height: 100%;
  background: var(--esg-primary);
  border-radius: 2px;
}

/* 引用弹窗里的来源摘录 */
.esg-kb-quote {
  font-size: 12px;
  line-height: 1.85;
  color: var(--esg-text-secondary);
  background: var(--esg-kb-chunk-bg);
  border: 1px dashed var(--esg-border);
  border-left: 3px solid var(--esg-primary);
  border-radius: 6px;
  padding: 8px 11px;
  max-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================
 * 反向链接定位高亮（2026-11-22）
 * URL 参数定位到某行时，短暂高亮帮用户找到位置
 * ============================================================ */
.esg-row-highlight > td {
  background: rgba(14, 116, 144, 0.12) !important;
  animation: esg-row-flash 1.2s ease-in-out 2;
}

@keyframes esg-row-flash {
  0%, 100% { background: rgba(14, 116, 144, 0.12); }
  50% { background: rgba(14, 116, 144, 0.28); }
}

[data-theme='dark'] .esg-row-highlight > td {
  background: rgba(34, 211, 238, 0.16) !important;
}

/* ============================================================
   路由懒加载占位淡入（2026-12-01）
   ------------------------------------------------------------
   用途：PageLoading 组件用 animation: esg-fade-in 淡入，
        避免切换页面时文字「啪」一下出现。

   尊重「减少动效」偏好：prefers-reduced-motion 时不播放动画。
   ============================================================ */
@keyframes esg-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  @keyframes esg-fade-in {
    from {
      opacity: 1;
    }
    to {
      opacity: 1;
    }
  }
}

/* ============================================================
   登录页加载动画（2026-12-01）
   ------------------------------------------------------------
   用途：App.tsx 的 LoginLoading 组件用 animation: boot-spin。
        index.html 里也定义了同名 keyframe（首屏 splash 用），
        但 index.html 的内联样式在 React 挂载后仍生效，
        这里再定义一次是为了不依赖 index.html。

   与 index.html 里的定义保持一致（0.85s linear infinite）。
   ============================================================ */
@keyframes boot-spin {
  to {
    transform: rotate(360deg);
  }
}
