/* ============================================================
   huatai_ai 主题层
   与魔方 V10 控制台保持一致：浅蓝灰底、白色卡片、蓝色主色、细边框。
   只覆盖视觉，不改任何结构与交互。
   ============================================================ */

:root {
  --hg-bg-page: #eef2f7;
  --hg-bg-card: #ffffff;
  --hg-bg-subtle: #f7f9fc;
  --hg-border: #e6ebf2;
  --hg-border-strong: #d8e0ea;
  --hg-text: #1f2329;
  --hg-text-secondary: #5c6673;
  --hg-text-muted: #8a94a6;
  --hg-brand: #2563eb;
  --hg-brand-hover: #1d4ed8;
  --hg-brand-soft: #eaf1ff;
  --hg-success: #16a34a;
  --hg-warning: #f59e0b;
  --hg-danger: #ef4444;
  --hg-radius: 8px;
  --hg-radius-sm: 6px;
  --hg-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);

  /* TDesign 变量映射（后台） */
  --td-brand-color: var(--hg-brand);
  --td-brand-color-hover: var(--hg-brand-hover);
  --td-brand-color-active: #1e40af;
  --td-brand-color-focus: var(--hg-brand-soft);
  --td-brand-color-light: var(--hg-brand-soft);
  --td-brand-color-light-hover: #dfe9ff;
  --td-bg-color-page: var(--hg-bg-page);
  --td-bg-color-container: var(--hg-bg-card);
  --td-bg-color-secondarycontainer: var(--hg-bg-subtle);
  --td-component-stroke: var(--hg-border);
  --td-component-border: var(--hg-border-strong);
  --td-text-color-primary: var(--hg-text);
  --td-text-color-secondary: var(--hg-text-secondary);
  --td-text-color-placeholder: var(--hg-text-muted);
  --td-success-color: var(--hg-success);
  --td-warning-color: var(--hg-warning);
  --td-error-color: var(--hg-danger);
  --td-radius-default: var(--hg-radius-sm);
  --td-radius-medium: var(--hg-radius);

  /* Element Plus 变量映射（前台） */
  --el-color-primary: var(--hg-brand);
  --el-color-primary-light-3: #5b8def;
  --el-color-primary-light-5: #8fb2f5;
  --el-color-primary-light-7: #c3d6fa;
  --el-color-primary-light-9: var(--hg-brand-soft);
  --el-color-success: var(--hg-success);
  --el-color-warning: var(--hg-warning);
  --el-color-danger: var(--hg-danger);
  --el-bg-color-page: var(--hg-bg-page);
  --el-bg-color: var(--hg-bg-card);
  --el-border-color: var(--hg-border);
  --el-border-color-light: var(--hg-border);
  --el-text-color-primary: var(--hg-text);
  --el-text-color-regular: var(--hg-text-secondary);
  --el-text-color-placeholder: var(--hg-text-muted);
  --el-border-radius-base: var(--hg-radius-sm);
}

/* ---------- 页面与卡片 ---------- */

body {
  background: var(--hg-bg-page);
  color: var(--hg-text);
}

.htm-ai,
.htm-app {
  font-size: 14px;
  color: var(--hg-text);
}

.t-card,
.el-card {
  border: 1px solid var(--hg-border);
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow);
}

.t-card__header,
.el-card__header {
  border-bottom: 1px solid var(--hg-border);
  font-weight: 600;
}

.htm-group {
  border-color: var(--hg-border);
  border-radius: var(--hg-radius);
  box-shadow: var(--hg-shadow);
}

.htm-group-head {
  background: var(--hg-bg-subtle);
  border-bottom-color: var(--hg-border);
}

/* ---------- 表格 ---------- */

.t-table th,
.el-table th.el-table__cell {
  background: var(--hg-bg-subtle) !important;
  color: var(--hg-text-secondary);
  font-weight: 500;
}

.t-table td,
.el-table td.el-table__cell {
  border-bottom-color: #eef1f6;
}

.el-table {
  --el-table-border-color: #eef1f6;
  --el-table-header-bg-color: var(--hg-bg-subtle);
  --el-table-row-hover-bg-color: #f5f8ff;
}

.t-table tbody tr:hover > td {
  background: #f5f8ff;
}

.htm-route-table th {
  background: var(--hg-bg-subtle);
  color: var(--hg-text-secondary);
}

/* ---------- 按钮与标签 ---------- */

.t-button--theme-primary,
.el-button--primary {
  box-shadow: none;
}

.t-button--variant-base.t-button--theme-primary,
.el-button--primary {
  border-radius: var(--hg-radius-sm);
}

.t-tag,
.el-tag {
  border-radius: 4px;
}

/* ---------- 提示与状态 ---------- */

.htm-tip {
  color: var(--hg-text-muted);
}

.htm-warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #b45309;
  border-radius: var(--hg-radius-sm);
}

.htm-pos { color: var(--hg-success); }
.htm-neg { color: var(--hg-danger); }

.htm-section-title {
  border-bottom-color: var(--hg-border);
  color: var(--hg-text);
}

/* ---------- 分页 ---------- */

.htm-pager {
  padding: 12px 0 4px;
}

.t-pagination,
.el-pagination {
  --td-text-color-primary: var(--hg-text-secondary);
}
