/* ============================================================
   适配器 · thesis（供应链管理专业毕业论文选题系统）
   必须在 tokens.css 之后加载。
   这套系统的变量前缀是 --theme-*，另外还派生了一批短名
   （--bg --ink --line --blue …），两套都要接上：
   --theme-* 是源头，短名是从它派生的，所以先把源头改掉。
   ============================================================ */

:root, html {
  /* ---- 源头：--theme-* ---- */
  --theme-ink:    var(--t-text);
  --theme-muted:  var(--t-text-muted);
  --theme-line:   var(--t-line);
  /* 原来是两条渐变，直接压成实底 */
  --theme-surface:        var(--t-surface);
  --theme-surface-strong: var(--t-surface);

  --theme-blue:   var(--t-brand);
  --theme-cyan:   var(--t-info);
  --theme-green:  var(--t-ok);
  --theme-violet: var(--t-info);
  --theme-amber:  var(--t-warn);
  --theme-red:    var(--t-bad);

  --theme-shadow:        var(--t-e2);
  --theme-shadow-strong: var(--t-e3);
  --theme-radius:    var(--t-r-md);
  --theme-radius-lg: var(--t-r-lg);

  /* ---- 派生短名（部分模板直接用） ---- */
  --bg:            var(--t-bg);
  --ink:           var(--t-text);
  --line:          var(--t-line);
  --muted:         var(--t-text-muted);
  --panel:         var(--t-surface);
  --panel-soft:    var(--t-surface-2);
  --panel-strong:  var(--t-surface);
  --blue:  var(--t-brand);
  --cyan:  var(--t-info);
  --green: var(--t-ok);
  --violet:var(--t-info);
  --amber: var(--t-warn);
  --red:   var(--t-bad);
  --teal:  var(--t-info);
  --shadow:        var(--t-e2);
  --shadow-strong: var(--t-e3);
}

/* theme.css 里 body 的渐变换带了 !important，必须同级覆盖 */
body {
  background: var(--t-bg) !important;
  color: var(--t-text) !important;
  font-family: var(--t-font) !important;
  font-size: var(--t-f2) !important;
}
/* theme.css 在 body 上叠了一层白色渐变遮罩，去掉 */
body::before { display: none !important; }

/* 卡片面板统一：白底 + 1px 描边 + 一档浅阴影 */
.card, .panel, .glass-card, .glass-card-dark, .stat-card, .project-card,
.rpt-section, .chart-box, .chart-card, .loc-area-card, .comp-card {
  background: var(--t-surface) !important;
  border: 1px solid var(--t-line) !important;
  border-radius: var(--t-r-md) !important;
  box-shadow: var(--t-e1) !important;
  backdrop-filter: none !important;
  color: var(--t-text) !important;
}

/* 原来用蓝紫渐变做的按钮/首屏，收成主色实底 */
.btn-primary, button.primary, .hero, .login-card button {
  background: var(--t-brand) !important;
  border-radius: var(--t-r-sm) !important;
  box-shadow: none !important;
}
.btn-primary:hover, button.primary:hover, .login-card button:hover {
  background: var(--t-brand-strong) !important;
}

/* 表格统一 */
.data-table th, table th {
  background: var(--t-surface-2) !important;
  color: var(--t-text-muted) !important;
  font-weight: var(--t-fw-medium) !important;
}
.data-table td, table td { border-color: var(--t-line) !important; }
table { font-variant-numeric: tabular-nums; }
