/* dsh-sites · 与 DSH 一致的托管页面基础样式
 * 色值取自 DSH 的设计 token(与 DSH 登录页同一套)。可以只用变量自己写样式。 */
:root {
  color-scheme: light;
      --dsh-bg: #fff;
      --dsh-surface: #f9fafb;
      --dsh-fg: #0f1115;
      --dsh-muted: #61666b;
      --dsh-dim: #81858c;
      --dsh-line: #0000001a;
      --dsh-brand: #4176e6;
      --dsh-accent: #4176e6;
      --dsh-accent-fg: #fff;
      --dsh-danger: #ec1313;
  --dsh-radius: 8px;
  --dsh-radius-pill: 4096px;
  --dsh-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-dsh-theme="light"]) {
    color-scheme: dark;
      --dsh-bg: #151517;
      --dsh-surface: #1b1b1c;
      --dsh-fg: #f9fafb;
      --dsh-muted: #cfd3d6;
      --dsh-dim: #adb2b8;
      --dsh-line: #ffffff1f;
      --dsh-brand: #5686fe;
      --dsh-accent: #5686fe;
      --dsh-accent-fg: #0f1115;
      --dsh-danger: #f25a5a;
  }
}
:root[data-dsh-theme="dark"] {
  color-scheme: dark;
      --dsh-bg: #151517;
      --dsh-surface: #1b1b1c;
      --dsh-fg: #f9fafb;
      --dsh-muted: #cfd3d6;
      --dsh-dim: #adb2b8;
      --dsh-line: #ffffff1f;
      --dsh-brand: #5686fe;
      --dsh-accent: #5686fe;
      --dsh-accent-fg: #0f1115;
      --dsh-danger: #f25a5a;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--dsh-bg);
  color: var(--dsh-fg);
  font-family: var(--dsh-font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--dsh-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .dsh-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* 布局 */
.dsh-page { max-width: 860px; margin: 0 auto; padding: 32px 24px 64px; }
.dsh-row { display: flex; align-items: center; gap: 8px; }
.dsh-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dsh-col { display: flex; flex-direction: column; gap: 8px; }
.dsh-muted { color: var(--dsh-muted); }
.dsh-dim { color: var(--dsh-dim); font-size: 13px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 8px; font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 17px; margin-top: 28px; }
h3 { font-size: 15px; margin-top: 20px; }
p { margin: 0 0 12px; }

/* 卡片 */
.dsh-card {
  border: 1px solid var(--dsh-line);
  border-radius: var(--dsh-radius);
  background: var(--dsh-surface);
  padding: 16px;
  margin-bottom: 12px;
}

/* 按钮 */
.dsh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius);
  background: var(--dsh-bg); color: var(--dsh-fg);
  font: inherit; font-size: 14px; cursor: pointer;
}
.dsh-btn:hover:not(:disabled) { border-color: var(--dsh-brand); color: var(--dsh-brand); }
.dsh-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.dsh-btn-primary {
  background: var(--dsh-accent); border-color: var(--dsh-accent); color: var(--dsh-accent-fg);
}
.dsh-btn-primary:hover:not(:disabled) { background: var(--dsh-accent); border-color: var(--dsh-accent); color: var(--dsh-accent-fg); opacity: 0.9; }

/* 输入 */
.dsh-input, .dsh-textarea, .dsh-select {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--dsh-line); border-radius: var(--dsh-radius);
  background: var(--dsh-bg); color: var(--dsh-fg);
  font: inherit; font-size: 14px;
}
.dsh-textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.dsh-input:focus, .dsh-textarea:focus, .dsh-select:focus { outline: none; border-color: var(--dsh-brand); }

/* 表格 */
.dsh-table { width: 100%; border-collapse: collapse; }
.dsh-table th, .dsh-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--dsh-line); font-size: 14px; }
.dsh-table th { font-weight: 500; color: var(--dsh-muted); font-size: 13px; }

/* 徽标 */
.dsh-badge {
  display: inline-block; padding: 1px 7px;
  border: 1px solid var(--dsh-line); border-radius: 4px;
  background: var(--dsh-surface); color: var(--dsh-muted);
  font-size: 12px; line-height: 18px;
}
.dsh-badge-brand { color: var(--dsh-brand); border-color: var(--dsh-brand); }

/* 会话式输出的两个区块: 思考与正文是分开的(对应 DSH 的 reasoning-delta / text-delta) */
.dsh-think {
  border-left: 2px solid var(--dsh-line); padding: 2px 0 2px 10px;
  color: var(--dsh-dim); font-size: 13px; white-space: pre-wrap;
}
.dsh-output { white-space: pre-wrap; }
.dsh-error { color: var(--dsh-danger); font-size: 13px; }
