/* 域名停靠 · 设计系统 v2.5.0 */
/* 这是全站（后台 + 前台）唯一的视觉基座。所有页面的配色、间距、圆角、阴影、 */
/* 字号都必须从这里取值，不允许再写死十六进制色值或魔法像素。 */
/* 为什么要有这一层： */
/* 在此之前 style.css 里散落着 900+ 行硬编码样式，同一类按钮在不同页面 */
/* 有 4 种圆角、6 种蓝色。改一处配色要全文搜索替换，且必然漏改。 */
/* 有了 design token 之后，换肤只需要覆盖 :root 里的变量。 */
/* 命名约定： */
/* ds-{类别}-{语义}-{档位} */
/* 例：--ds-color-primary 主色 / --ds-space-4 间距第4档 / --ds-radius-md */
/* 加载顺序：本文件必须在 style.css 之前加载（style.css 里有历史样式需要覆盖） */

:root {
  /* 品牌色 */
  --ds-color-primary:        #2563eb;
  --ds-color-primary-hover:  #1d4ed8;
  --ds-color-primary-active: #1e40af;
  --ds-color-primary-soft:   #eff6ff;
  --ds-color-primary-border: #bfdbfe;

  /* 语义色 */
  --ds-color-success:        #16a34a;
  --ds-color-success-soft:   #f0fdf4;
  --ds-color-success-border: #bbf7d0;
  --ds-color-success-text:   #166534;

  --ds-color-warning:        #d97706;
  --ds-color-warning-soft:   #fffbeb;
  --ds-color-warning-border: #fde68a;
  --ds-color-warning-text:   #92400e;

  --ds-color-danger:         #dc2626;
  --ds-color-danger-soft:    #fef2f2;
  --ds-color-danger-border:  #fecaca;
  --ds-color-danger-text:    #991b1b;

  --ds-color-info:           #2563eb;
  --ds-color-info-soft:      #eff6ff;
  --ds-color-info-border:    #bfdbfe;
  --ds-color-info-text:      #1e40af;

  --ds-color-purple:         #7c3aed;
  --ds-color-purple-soft:    #f5f3ff;

  /* 前台品牌色（与后台 primary 蓝区分：前台主行动色为品牌红） */
  --ds-color-brand:          #dc2626;
  --ds-color-brand-deep:     #1e40af;

  /* 中性色（文字/背景/描边） */
  --ds-color-text:           #0f172a;
  --ds-color-text-strong:    #1e293b;
  --ds-color-text-body:      #334155;
  --ds-color-text-muted:     #64748b;
  --ds-color-text-faint:     #94a3b8;
  --ds-color-text-invert:    #ffffff;

  --ds-color-bg:             #f5f7fa;
  --ds-color-surface:        #ffffff;
  --ds-color-surface-alt:    #f8fafc;
  --ds-color-surface-sunken: #f1f5f9;

  --ds-color-border:         #e8edf5;
  --ds-color-border-strong:  #d7dfeb;
  --ds-color-border-soft:    #f1f5f9;

  /* 后台侧边栏（深色） */
  --ds-color-nav-bg:         #1e293b;
  --ds-color-nav-bg-sub:     #16202e;
  --ds-color-nav-text:       #cbd5e1;
  --ds-color-nav-muted:      #94a3b8;
  --ds-color-nav-hover:      #334155;
  --ds-color-nav-active:     #2563eb;

  /* 间距（4px 基准栅格） */
  --ds-space-1:  4px;
  --ds-space-2:  8px;
  --ds-space-3:  12px;
  --ds-space-4:  16px;
  --ds-space-5:  20px;
  --ds-space-6:  24px;
  --ds-space-8:  32px;
  --ds-space-10: 40px;
  --ds-space-12: 48px;

  /* 圆角 */
  --ds-radius-sm:   6px;
  --ds-radius-md:   9px;
  --ds-radius-lg:   12px;
  --ds-radius-xl:   16px;
  --ds-radius-full: 999px;
  --ds-radius-card: 8px;   /* 前台卡片历史圆角（等值收敛档） */

  /* 阴影 */
  --ds-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --ds-shadow-sm: 0 1px 3px rgba(15, 23, 42, .05);
  --ds-shadow-md: 0 6px 18px rgba(15, 23, 42, .07);
  --ds-shadow-lg: 0 10px 30px rgba(15, 23, 42, .10);
  --ds-shadow-primary: 0 8px 24px rgba(37, 99, 235, .22);

  /* 字体 */
  --ds-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                  "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ds-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ds-text-xs:   11.5px;
  --ds-text-sm:   12.5px;
  --ds-text-base: 13.5px;
  --ds-text-md:   14px;
  --ds-text-lg:   16px;
  --ds-text-xl:   18px;
  --ds-text-2xl:  22px;
  --ds-text-3xl:  26px;

  --ds-weight-normal: 400;
  --ds-weight-medium: 500;
  --ds-weight-bold:   600;
  --ds-weight-black:  700;

  /* 层级 */
  --ds-z-dropdown: 100;
  --ds-z-sticky:   200;
  --ds-z-drawer:   300;
  --ds-z-modal:    400;
  --ds-z-toast:    500;

  /* 过渡 */
  --ds-transition: .16s ease;
  --ds-transition-slow: .25s ease;

  /* 布局尺寸 */
  --ds-sidebar-w: 220px;
  --ds-content-max: 1280px;
}

/* 基础重置（只做必要的收敛，不破坏历史样式） */

.ds-scope *, .ds-scope *::before, .ds-scope *::after { box-sizing: border-box; }

/* 组件：按钮 */
/* 用法：<button class="ds-btn ds-btn-primary">保存</button> */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-bold);
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ds-transition), border-color var(--ds-transition), box-shadow var(--ds-transition);
  -webkit-appearance: none;
  appearance: none;
}
.ds-btn:disabled,
.ds-btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.ds-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }

.ds-btn-primary { background: var(--ds-color-primary); color: var(--ds-color-text-invert); }
.ds-btn-primary:hover { background: var(--ds-color-primary-hover); }
.ds-btn-primary:active { background: var(--ds-color-primary-active); }
.ds-btn-primary:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, .28); }

.ds-btn-ghost { background: var(--ds-color-surface-sunken); color: var(--ds-color-text-body); border-color: var(--ds-color-border-strong); }
.ds-btn-ghost:hover { background: #e8eef7; }

.ds-btn-outline { background: var(--ds-color-surface); color: var(--ds-color-primary); border-color: var(--ds-color-primary-border); }
.ds-btn-outline:hover { background: var(--ds-color-primary-soft); }

.ds-btn-danger { background: var(--ds-color-danger); color: var(--ds-color-text-invert); }
.ds-btn-danger:hover { background: #b91c1c; }

.ds-btn-danger-soft { background: var(--ds-color-danger-soft); color: var(--ds-color-danger); border-color: var(--ds-color-danger-border); }
.ds-btn-danger-soft:hover { background: #fee2e2; }

.ds-btn-success { background: var(--ds-color-success); color: var(--ds-color-text-invert); }
.ds-btn-success:hover { background: #15803d; }

.ds-btn-warning { background: var(--ds-color-warning); color: var(--ds-color-text-invert); }
.ds-btn-warning:hover { background: #b45309; }

.ds-btn-sm { padding: 5px 11px; font-size: var(--ds-text-sm); border-radius: var(--ds-radius-sm); }
.ds-btn-xs { padding: 3px 9px; font-size: var(--ds-text-xs); border-radius: var(--ds-radius-sm); }
.ds-btn-lg { padding: 12px 24px; font-size: var(--ds-text-md); }
.ds-btn-block { width: 100%; }

/* 按钮组：多个按钮贴在一起 */
.ds-btn-group { display: inline-flex; gap: var(--ds-space-2); flex-wrap: wrap; align-items: center; }

/* 组件：卡片 / 面板 */

.ds-card {
  background: var(--ds-color-surface);
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
}
.ds-card-pad { padding: var(--ds-space-5) var(--ds-space-6); }
.ds-card-hover { transition: box-shadow var(--ds-transition), border-color var(--ds-transition); }
.ds-card-hover:hover { box-shadow: var(--ds-shadow-md); border-color: var(--ds-color-border-strong); }

.ds-panel {
  background: var(--ds-color-surface);
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-lg);
  padding: var(--ds-space-5) var(--ds-space-6);
  margin-bottom: var(--ds-space-4);
  box-shadow: var(--ds-shadow-sm);
  /* 宽表格/代码块在窄屏可横向滚动，避免撑破面板（与旧 .panel 行为一致） */
  overflow-x: auto;
}
.ds-panel-title {
  margin: 0 0 var(--ds-space-1);
  font-size: var(--ds-text-lg);
  font-weight: var(--ds-weight-black);
  color: var(--ds-color-text);
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
  flex-wrap: wrap;
}
.ds-panel-desc {
  font-size: var(--ds-text-sm);
  color: var(--ds-color-text-muted);
  margin-bottom: var(--ds-space-4);
  line-height: 1.7;
}

/* 统计指标卡网格 */
.ds-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--ds-space-4);
  margin-bottom: var(--ds-space-4);
}
.ds-stat {
  background: var(--ds-color-surface);
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-lg);
  padding: var(--ds-space-4) var(--ds-space-5);
  box-shadow: var(--ds-shadow-xs);
  transition: box-shadow var(--ds-transition), border-color var(--ds-transition);
}
.ds-stat:hover { box-shadow: var(--ds-shadow-md); border-color: var(--ds-color-border-strong); }
.ds-stat-label { font-size: var(--ds-text-sm); color: var(--ds-color-text-muted); font-weight: var(--ds-weight-bold); }
.ds-stat-value { font-size: var(--ds-text-2xl); font-weight: var(--ds-weight-black); color: var(--ds-color-text); margin-top: var(--ds-space-2); letter-spacing: -.4px; line-height: 1.2; }
.ds-stat-value small { font-size: var(--ds-text-base); font-weight: var(--ds-weight-bold); color: var(--ds-color-text-muted); letter-spacing: 0; }
.ds-stat-meta { font-size: var(--ds-text-sm); color: var(--ds-color-text-faint); margin-top: var(--ds-space-2); }

/* 组件：表格 */

.ds-table-wrap { overflow-x: auto; border-radius: var(--ds-radius-lg); }
.ds-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--ds-text-base);
  background: var(--ds-color-surface);
}
.ds-table th {
  text-align: left;
  padding: 11px 12px;
  background: var(--ds-color-surface-alt);
  color: var(--ds-color-text-muted);
  font-weight: var(--ds-weight-black);
  font-size: var(--ds-text-sm);
  border-bottom: 1px solid var(--ds-color-border);
  white-space: nowrap;
}
.ds-table th:first-child { border-radius: var(--ds-radius-md) 0 0 0; }
.ds-table th:last-child  { border-radius: 0 var(--ds-radius-md) 0 0; }
.ds-table td {
  padding: 12px;
  border-bottom: 1px solid var(--ds-color-border-soft);
  color: var(--ds-color-text-body);
  vertical-align: middle;
}
.ds-table tbody tr:hover td { background: #fafcff; }
.ds-table tbody tr:last-child td { border-bottom: none; }
.ds-table .ds-num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.ds-table .ds-actions { white-space: nowrap; text-align: right; }
.ds-table .ds-ellipsis { max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 组件：标签 / 徽章 */

.ds-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-1);
  padding: 2px 8px;
  border-radius: var(--ds-radius-sm);
  font-size: var(--ds-text-xs);
  font-weight: var(--ds-weight-black);
  line-height: 1.7;
  white-space: nowrap;
}
.ds-tag-primary { background: var(--ds-color-primary-soft); color: var(--ds-color-primary); }
.ds-tag-success { background: var(--ds-color-success-soft); color: var(--ds-color-success); }
.ds-tag-warning { background: var(--ds-color-warning-soft); color: var(--ds-color-warning-text); }
.ds-tag-danger  { background: var(--ds-color-danger-soft);  color: var(--ds-color-danger); }
.ds-tag-info    { background: var(--ds-color-info-soft);    color: var(--ds-color-info-text); }
.ds-tag-purple  { background: var(--ds-color-purple-soft);  color: var(--ds-color-purple); }
.ds-tag-neutral { background: var(--ds-color-surface-sunken); color: var(--ds-color-text-muted); }

/* 组件：键值对列表（kv-list）
 *
 * v2.8.5 补定义。**这是一批已存在但从未生效的类**：
 * license_center.php / license_codes.php / node_settings.php / upgrade_center.php
 * 四个页面早就写了 <div class="kv-list"><div class="kv-row"><span class="kv-key">…
 * 但全项目 CSS 里没有任何 .kv-* 定义，于是这些行渲染成一坨没有间距的连续文本，
 * 标签和值挤在一起、长短不齐也无法对齐，看着像"样式坏了一半"。
 * 这几个页面本身样式（.lc-grid / .lc-stat）都写在各自的 <style> 里，唯独漏了 kv-*，
 * 属于典型的"复制粘贴时只带走了结构、没带走样式"。
 *
 * 设计：两列网格，第一列固定宽度放标签（浅色、稍小），第二列放值（深色、加粗感）。
 * 用 grid 而非 flex 是为了让同一面板内多个 .kv-row 的冒号位置严格对齐 —— 这正是
 * 原来缺失样式时最难看的点。窄屏下标签列收窄，避免挤压长值。
 */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.kv-row {
  display: grid;
  grid-template-columns: minmax(88px, 132px) 1fr;
  gap: var(--ds-space-3);
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--ds-color-border-soft);
  font-size: var(--ds-text-base);
  line-height: 1.7;
}
.kv-row:first-child { padding-top: 2px; }
.kv-row:last-child { border-bottom: none; padding-bottom: 2px; }
.kv-key {
  color: var(--ds-color-text-muted);
  font-size: var(--ds-text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kv-val {
  color: var(--ds-color-text);
  word-break: break-word;
  min-width: 0;
}
@media (max-width: 520px) {
  .kv-row { grid-template-columns: 1fr; gap: 2px; }
  .kv-key { white-space: normal; }
}

/* 组件：提示条 */

.ds-alert {
  padding: var(--ds-space-3) var(--ds-space-4);
  border-radius: var(--ds-radius-lg);
  font-size: var(--ds-text-base);
  line-height: 1.75;
  margin-bottom: var(--ds-space-4);
  display: flex;
  gap: var(--ds-space-3);
  align-items: flex-start;
}
.ds-alert > .ds-alert-icon { flex-shrink: 0; font-size: var(--ds-text-lg); line-height: 1.5; }
.ds-alert > .ds-alert-body { flex: 1; min-width: 0; }
/* v2.8.5 修复：.ds-alert 是 flex 容器，但全站有 31 处直接往里塞行内内容
   （「🔐 <b>标题</b>：<code>url</code><br>…」这种写法），没有包 .ds-alert-icon / .ds-alert-body。
   此时每个行内子元素都变成 flex item 被挤到最小宽度，
   表现为「官方授权站」这种词被竖排成一字一行。
   这里在缺少标准结构时回退为块级流，让行内内容正常换行。 */
.ds-alert:not(:has(> .ds-alert-icon)):not(:has(> .ds-alert-body)) { display: block; }
.ds-alert > br { display: block; }
.ds-alert-success { background: var(--ds-color-success-soft); border: 1px solid var(--ds-color-success-border); color: var(--ds-color-success-text); }
.ds-alert-warning { background: var(--ds-color-warning-soft); border: 1px solid var(--ds-color-warning-border); color: var(--ds-color-warning-text); }
.ds-alert-danger  { background: var(--ds-color-danger-soft);  border: 1px solid var(--ds-color-danger-border);  color: var(--ds-color-danger-text); }
.ds-alert-info    { background: var(--ds-color-info-soft);    border: 1px solid var(--ds-color-info-border);    color: var(--ds-color-info-text); }

/* 组件：表单 */

.ds-field { margin-bottom: var(--ds-space-4); }
.ds-field > label {
  display: block;
  font-size: var(--ds-text-sm);
  font-weight: var(--ds-weight-black);
  color: var(--ds-color-text-body);
  margin-bottom: var(--ds-space-2);
}
.ds-field .ds-req { color: var(--ds-color-danger); }
.ds-input,
.ds-select,
.ds-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--ds-color-border-strong);
  border-radius: var(--ds-radius-md);
  font-size: var(--ds-text-base);
  font-family: var(--ds-font-sans);
  color: var(--ds-color-text);
  background: var(--ds-color-surface);
  transition: border-color var(--ds-transition), box-shadow var(--ds-transition);
}
.ds-input:focus,
.ds-select:focus,
.ds-textarea:focus {
  outline: none;
  border-color: var(--ds-color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.ds-input:disabled, .ds-select:disabled, .ds-textarea:disabled { background: var(--ds-color-surface-sunken); color: var(--ds-color-text-faint); cursor: not-allowed; }
.ds-input-sm { padding: 5px 9px; font-size: var(--ds-text-sm); border-radius: var(--ds-radius-sm); }
.ds-textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
.ds-field .ds-tip { font-size: var(--ds-text-sm); color: var(--ds-color-text-faint); margin-top: var(--ds-space-1); line-height: 1.65; }
.ds-field-narrow .ds-input, .ds-field-narrow .ds-select { max-width: 360px; }

/* 开关块：卡片里的一整行可勾选项 */
.ds-switch {
  display: flex;
  align-items: flex-start;
  gap: var(--ds-space-3);
  padding: var(--ds-space-3) var(--ds-space-4);
  background: var(--ds-color-surface-alt);
  border: 1px solid var(--ds-color-border-soft);
  border-radius: var(--ds-radius-lg);
  margin-bottom: var(--ds-space-3);
}
.ds-switch input[type=checkbox],
.ds-switch input[type=radio] {
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
  cursor: pointer; accent-color: var(--ds-color-primary);
}
.ds-switch .ds-switch-title { font-size: var(--ds-text-base); font-weight: var(--ds-weight-black); color: var(--ds-color-text); }
.ds-switch .ds-switch-desc { font-size: var(--ds-text-sm); color: var(--ds-color-text-muted); margin-top: 3px; line-height: 1.65; }

/* 两列/三列表单 */
.ds-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 var(--ds-space-5); }
.ds-form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* 组件：折叠面板 */

.ds-acc {
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-lg);
  margin-top: var(--ds-space-3);
  overflow: hidden;
  background: var(--ds-color-surface);
}
.ds-acc > summary {
  padding: var(--ds-space-3) var(--ds-space-5);
  cursor: pointer;
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-black);
  color: var(--ds-color-text-body);
  background: var(--ds-color-surface-alt);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.ds-acc > summary::-webkit-details-marker { display: none; }
.ds-acc > summary::after { content: '▾'; color: var(--ds-color-text-faint); transition: transform var(--ds-transition-slow); }
.ds-acc[open] > summary::after { transform: rotate(180deg); }
.ds-acc > .ds-acc-body { padding: var(--ds-space-5); }

/* 组件：代码块 */

.ds-code {
  background: var(--ds-color-text);
  color: #e2e8f0;
  padding: var(--ds-space-3) var(--ds-space-4);
  border-radius: var(--ds-radius-md);
  font-family: var(--ds-font-mono);
  font-size: var(--ds-text-sm);
  overflow-x: auto;
  position: relative;
  line-height: 1.85;
  white-space: pre;
}
.ds-code .ds-copy {
  position: absolute;
  top: var(--ds-space-2);
  right: var(--ds-space-2);
  background: #334155;
  color: #cbd5e1;
  border: none;
  border-radius: var(--ds-radius-sm);
  padding: 4px 10px;
  font-size: var(--ds-text-xs);
  cursor: pointer;
  font-family: var(--ds-font-sans);
}
.ds-code .ds-copy:hover { background: #475569; }

/* 工具类 */

.ds-mono { font-family: var(--ds-font-mono); font-size: var(--ds-text-sm); }
.ds-muted { color: var(--ds-color-text-muted); }
.ds-faint { color: var(--ds-color-text-faint); }
.ds-strong { font-weight: var(--ds-weight-black); color: var(--ds-color-text); }
.ds-nowrap { white-space: nowrap; }
.ds-tr { text-align: right; }
.ds-tc { text-align: center; }
.ds-row { display: flex; align-items: center; gap: var(--ds-space-3); flex-wrap: wrap; }
.ds-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-space-4); flex-wrap: wrap; }
.ds-col { display: flex; flex-direction: column; gap: var(--ds-space-3); }
.ds-mt-0 { margin-top: 0; } .ds-mt-2 { margin-top: var(--ds-space-2); }
.ds-mt-3 { margin-top: var(--ds-space-3); } .ds-mt-4 { margin-top: var(--ds-space-4); }
.ds-mb-0 { margin-bottom: 0; } .ds-mb-2 { margin-bottom: var(--ds-space-2); }
.ds-mb-3 { margin-bottom: var(--ds-space-3); } .ds-mb-4 { margin-bottom: var(--ds-space-4); }
.ds-hidden { display: none !important; }
.ds-wrap-page { max-width: var(--ds-content-max); margin: 0 auto; padding: var(--ds-space-1) 0 var(--ds-space-10); }

/* 页头 */
.ds-page-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-4);
  flex-wrap: wrap;
  margin-bottom: var(--ds-space-5);
}
/* v2.8.5 修复：页面标题此前只定义了 h2，导致 5 个页面用 <h1> 时落到浏览器默认样式
   （32px/700/纯黑/上下 21px 外边距），与其它页面的 22px/800/-0.3px/主题色完全不一致。
   简介同理：样式挂在 .ds-sub 上，而页面普遍直接写裸 <p>，同样吃不到样式。
   这里统一覆盖 h1/h2，并让裸 <p> 与 .ds-sub 同规格。 */
.ds-page-hd h1,
.ds-page-hd h2 { margin: 0; font-size: var(--ds-text-2xl); font-weight: 800; color: var(--ds-color-text); letter-spacing: -.3px; line-height: 1.35; }
.ds-page-hd > div > p,
.ds-page-hd .ds-sub { font-size: var(--ds-text-base); color: var(--ds-color-text-muted); margin: 5px 0 0; line-height: 1.7; }
.ds-page-hd > div > p:last-child,
.ds-page-hd .ds-sub:last-child { margin-bottom: 0; }

/* 空状态 */
.ds-empty { padding: var(--ds-space-12) var(--ds-space-5); text-align: center; color: var(--ds-color-text-faint); }
.ds-empty .ds-empty-icon { font-size: 40px; display: block; margin-bottom: var(--ds-space-3); opacity: .55; }
.ds-empty .ds-empty-title { font-size: var(--ds-text-lg); font-weight: var(--ds-weight-black); color: var(--ds-color-text-body); margin-bottom: var(--ds-space-2); }
.ds-empty .ds-empty-desc { font-size: var(--ds-text-base); line-height: 1.8; max-width: 520px; margin: 0 auto; }

/* Tab 切换条 */
.ds-tabs { display: flex; gap: var(--ds-space-1); border-bottom: 1px solid var(--ds-color-border); margin-bottom: var(--ds-space-5); overflow-x: auto; }
.ds-tabs > a, .ds-tabs > button {
  padding: var(--ds-space-3) var(--ds-space-5);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-bold);
  color: var(--ds-color-text-muted);
  text-decoration: none;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ds-transition), border-color var(--ds-transition);
  font-family: var(--ds-font-sans);
}
.ds-tabs > a:hover, .ds-tabs > button:hover { color: var(--ds-color-primary); }
.ds-tabs > a.active, .ds-tabs > button.active { color: var(--ds-color-primary); border-bottom-color: var(--ds-color-primary); }

/* 分段控件 */
.ds-seg { display: inline-flex; background: var(--ds-color-surface-sunken); border-radius: var(--ds-radius-md); padding: 4px; gap: 3px; }
.ds-seg > label, .ds-seg > a {
  padding: 7px 16px;
  border-radius: var(--ds-radius-sm);
  font-size: var(--ds-text-base);
  font-weight: var(--ds-weight-bold);
  color: var(--ds-color-text-body);
  cursor: pointer;
  transition: background var(--ds-transition), color var(--ds-transition);
  text-decoration: none;
  user-select: none;
}
.ds-seg > label:hover, .ds-seg > a:hover { background: #e8eef7; }
.ds-seg > label.on, .ds-seg > a.on { background: var(--ds-color-primary); color: var(--ds-color-text-invert); }

/* 响应式 */

@media (max-width: 900px) {
  .ds-page-hd { flex-direction: column; align-items: flex-start; }
  .ds-stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .ds-form-grid, .ds-form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ds-btn { width: 100%; justify-content: center; }
  .ds-btn-group { width: 100%; }
  .ds-btn-group .ds-btn { width: auto; flex: 1; }
  .ds-panel, .ds-card-pad { padding: var(--ds-space-4); }
}

/* 打印：后台表格/报表可直接打印 */

@media print {
  .ds-btn, .admin-sidebar, .topbar, .ds-tabs { display: none !important; }
  .ds-panel, .ds-card { box-shadow: none; border-color: #ddd; }
  .admin-content { padding: 0; background: #fff; }
}
