/* QuickForm 样式 —— 浅色 + 蓝色主题 */
:root {
  --bg: oklch(98.6% 0.004 250);
  --panel: oklch(100% 0 0);
  --line: oklch(92% 0.008 250);
  --line-strong: oklch(86% 0.012 250);
  --text: oklch(28% 0.02 255);
  --text-dim: oklch(52% 0.018 255);
  --text-mute: oklch(66% 0.015 255);
  --brand: oklch(56% 0.16 256);
  --brand-dark: oklch(46% 0.16 256);
  --brand-soft: oklch(96% 0.025 256);
  --teal: oklch(64% 0.13 195);
  --ok: oklch(60% 0.14 150);
  --ok-soft: oklch(96% 0.03 150);
  --err: oklch(58% 0.18 25);
  --err-soft: oklch(96% 0.03 25);
  --warn: oklch(70% 0.15 70);
  --radius: 12px;
  --shadow: 0 1px 2px oklch(60% 0.02 255 / 0.08), 0 8px 24px oklch(60% 0.02 255 / 0.06);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶部导航 */
.nav {
  background: oklch(100% 0 0 / 0.85);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
}
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--text-dim); font-size: 13.5px; }
.nav-user { color: var(--text-dim); font-size: 13px; }

/* 布局 */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; }
.wrap-narrow { max-width: 430px; margin: 60px auto; padding: 0 20px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.2px; }
.page-head .sub { color: var(--text-dim); font-size: 13px; margin: 0; }
.page-head .spacer { flex: 1; }

/* 卡片 */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.card h2 { font-size: 15px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card h2 .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

.grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* 统计块 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow);
}
.stat .k { font-size: 12px; color: var(--text-mute); margin-bottom: 6px; }
.stat .v { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat .v.small { font-size: 15px; font-weight: 600; }
.stat.brand .v { color: var(--brand); }

/* 表单 */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
label.field .hint { color: var(--text-mute); font-size: 12px; font-weight: 400; }
/* 输入控件统一样式。注意要把 number / date / tel / url 这些类型都列进来，
   否则它们不吃这套样式，会按浏览器默认尺寸渲染（表现为高度明显偏小）。 */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"], input[type="date"],
input[type="time"], input[type="month"], input[type="week"], input[type="datetime-local"],
textarea, select {
  width: 100%; padding: 9px 12px; font: inherit; color: var(--text);
  background: oklch(99.5% 0.002 250);
  border: 1px solid var(--line-strong); border-radius: 9px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
/* 单行文本框统一高度（textarea 不加，否则会被压扁） */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"], input[type="date"],
input[type="time"], input[type="month"], input[type="week"], input[type="datetime-local"] {
  height: 38px; line-height: 20px;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
input[type="number"]:focus, input[type="tel"]:focus, input[type="url"]:focus,
input[type="search"]:focus, input[type="date"]:focus, input[type="time"]:focus,
input[type="month"]:focus, input[type="week"]:focus, input[type="datetime-local"]:focus,
textarea:focus, select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px oklch(56% 0.16 256 / 0.12);
  background: #fff;
}
input[type="file"] {
  width: 100%; padding: 8px 11px; font: inherit; font-size: 12.5px; color: var(--text-dim);
  background: oklch(99.2% 0.004 250);
  border: 1px dashed var(--line-strong); border-radius: 9px; outline: none;
}
input[type="file"]:focus { border-color: var(--brand); border-style: solid; }

/* 预设分组字段：名称已在字段定义里写死，一行一项，填的人只填数值 */
.gf-list { display: grid; gap: 8px; margin-bottom: 8px; }
.gf-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 11px; background: oklch(99.2% 0.004 250);
  border: 1px solid var(--line); border-radius: 9px;
}
.gf-row:hover { border-color: var(--line-strong); }
.gf-row .gf-name {
  flex: 0 0 auto; min-width: 92px;
  font-size: 13px; font-weight: 650; color: var(--text-dim);
}
.gf-row input[type="number"], .gf-row input[type="text"] { flex: 1 1 auto; width: auto; }
/* 分组字段 · 单选 / 多选：第 5 列每个名称各一行，行内摆这道题的选项 */
.gf-choice { display: grid; gap: 8px; margin-bottom: 8px; }
.gf-crow {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 11px; background: oklch(99.2% 0.004 250);
  border: 1px solid var(--line); border-radius: 9px;
}
.gf-crow:hover { border-color: var(--line-strong); }
.gf-crow .gf-name {
  flex: 0 0 auto; min-width: 92px; padding-top: 2px;
  font-size: 13px; font-weight: 650; color: var(--text-dim);
}
.gf-copts { display: flex; flex-wrap: wrap; gap: 6px 16px; flex: 1 1 auto; }
.gf-copts .gf-copt { display: flex; align-items: center; gap: 5px; font-size: 13.5px; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--brand); width: 15px; height: 15px; }
textarea { resize: vertical; min-height: 96px; font-size: 13px; }
textarea.mono { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 16px; font: inherit; font-size: 13.5px; font-weight: 600;
  border-radius: 9px; border: 1px solid var(--brand); background: var(--brand);
  color: #fff; cursor: pointer; transition: background .15s, border-color .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--text); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.btn.danger { background: #fff; color: var(--err); border-color: oklch(88% 0.06 25); }
.btn.danger:hover { background: var(--err-soft); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.row-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* 提示条 */
.flash { padding: 10px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: var(--ok-soft); border-color: oklch(86% 0.06 150); color: oklch(38% 0.1 150); }
.flash.error { background: var(--err-soft); border-color: oklch(88% 0.07 25); color: oklch(45% 0.15 25); }

.url-label { font-size: 12.5px; color: var(--text-dim); font-weight: 600; margin-bottom: 7px; }
.url-label .hint { font-weight: 400; }

/* 地址框 */
.urlbox {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: oklch(97.5% 0.01 256); border: 1px dashed var(--line-strong);
  border-radius: 9px; padding: 10px 12px;
}
.urlbox code {
  font-family: var(--mono); font-size: 12.5px; color: var(--brand-dark);
  word-break: break-all; flex: 1; min-width: 220px;
}

/* 表格 */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  background: oklch(97.8% 0.006 250); font-weight: 600; color: var(--text-dim);
  font-size: 12.5px; white-space: nowrap; position: sticky; top: 0;
}
tbody tr:hover { background: oklch(98.8% 0.008 256); }
tbody tr:last-child td { border-bottom: none; }
td.mono, th.mono { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
td.wrap-cell { max-width: 320px; word-break: break-word; }

/* 任务列表 */
.task-list { display: grid; gap: 12px; }
.task-item {
  display: flex; align-items: center; gap: 16px; padding: 15px 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.task-item:hover { border-color: oklch(80% 0.06 256); }
.task-item .tname { font-weight: 650; font-size: 14.5px; color: var(--text); }
.task-item .tmeta { font-size: 12px; color: var(--text-mute); margin-top: 3px; }
.task-item .tkey {
  font-family: var(--mono); font-size: 11.5px; color: var(--brand-dark);
  background: var(--brand-soft); padding: 2px 7px; border-radius: 6px;
}
.task-item .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.badge.on { background: var(--ok-soft); color: oklch(42% 0.12 150); }
.badge.off { background: oklch(95% 0.01 250); color: var(--text-mute); }
.count { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; color: var(--brand); }
.count small { font-weight: 500; font-size: 11.5px; color: var(--text-mute); margin-left: 2px; }

/* 字段分析 */
.analysis { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.an-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: oklch(99.4% 0.003 250); }
.an-item .an-name { font-weight: 650; margin-bottom: 3px; font-size: 13.5px; word-break: break-all; }
.an-item .an-meta { font-size: 11.5px; color: var(--text-mute); margin-bottom: 11px; }
.an-bar { margin-bottom: 8px; }
.an-bar .bl { display: flex; justify-content: space-between; font-size: 12px; gap: 8px; margin-bottom: 3px; }
.an-bar .bl span:first-child { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar .bl span:last-child { color: var(--text-mute); font-variant-numeric: tabular-nums; }
.an-bar .track { height: 6px; border-radius: 4px; background: oklch(94% 0.01 256); overflow: hidden; }
.an-bar .fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--teal)); }
.an-num { display: flex; gap: 14px; font-size: 12px; color: var(--text-dim); margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.an-num b { color: var(--text); font-variant-numeric: tabular-nums; }
.an-empty { color: var(--text-mute); font-size: 12px; }

/* 分页 */
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 32px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center;
  justify-content: center; border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--text-dim); font-size: 13px;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager .cur { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .dis { opacity: .45; }

/* 空状态 */
.empty { text-align: center; padding: 46px 20px; color: var(--text-mute); }
.empty .big { font-size: 30px; margin-bottom: 10px; }

/* 首页 */
.hero { text-align: center; padding: 54px 20px 34px; }
.hero h1 { font-size: 34px; margin: 0 0 12px; letter-spacing: -0.8px; }
.hero p { color: var(--text-dim); font-size: 15px; margin: 0 auto 26px; max-width: 620px; }
.hero .grad { background: linear-gradient(100deg, var(--brand), var(--teal)); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.codeblock {
  background: oklch(24% 0.02 256); color: oklch(92% 0.02 250); border-radius: 10px;
  padding: 15px 17px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75;
  overflow-x: auto; text-align: left; white-space: pre;
}
.codeblock .c1 { color: oklch(72% 0.12 195); }
.codeblock .c2 { color: oklch(78% 0.12 130); }
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 30px; }
.feat .f { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); text-align: left; }
.feat .f .fi { font-size: 20px; margin-bottom: 8px; }
.feat .f h3 { margin: 0 0 6px; font-size: 14.5px; }
.feat .f p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }

footer.site {
  border-top: 1px solid var(--line); padding: 18px 20px; text-align: center;
  color: var(--text-mute); font-size: 12.5px; margin-top: 30px;
}
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button {
  padding: 9px 14px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); font: inherit; font-size: 13.5px; cursor: pointer; font-weight: 500;
}
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }
.tabpane { display: none; }
.tabpane.active { display: block; }
.muted { color: var(--text-mute); font-size: 12.5px; }

/* 审核状态 / 角色标记 */
.pill {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px;
  border-radius: 20px; white-space: nowrap; line-height: 1.7;
}
.pill.pending { background: oklch(96% 0.05 80); color: oklch(48% 0.13 65); }
.pill.approved { background: var(--ok-soft); color: oklch(42% 0.12 150); }
.pill.rejected { background: var(--err-soft); color: oklch(48% 0.15 25); }
.pill.disabled { background: oklch(95% 0.008 260); color: oklch(48% 0.018 260); }

.tag-admin {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: 6px; margin-left: 6px; background: var(--brand-soft);
  color: var(--brand-dark); border: 1px solid oklch(88% 0.05 256);
}
.tag-wait {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px;
  border-radius: 6px; margin-left: 6px; background: oklch(96% 0.05 80);
  color: oklch(48% 0.13 65); border: 1px solid oklch(90% 0.07 80);
}
.badge-count {
  display: inline-block; min-width: 17px; padding: 0 5px; margin-left: 5px;
  font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
  border-radius: 9px; background: var(--err); color: #fff; vertical-align: 1px;
}

/* 审核页 */
.reason-box {
  text-align: left; background: var(--err-soft); border: 1px solid oklch(90% 0.05 25);
  border-radius: 10px; padding: 13px 15px; margin: 18px 0 0;
}
.reason-label { font-size: 12px; color: var(--text-mute); margin-bottom: 5px; }
.reason-text { font-size: 14px; color: oklch(42% 0.12 25); line-height: 1.6; word-break: break-word; }
.reason-inline { color: oklch(48% 0.13 25); font-size: 11.5px; }
td.small-note { font-size: 11.5px; line-height: 1.65; }
.school-name { color: var(--text); font-size: 12.5px; margin-bottom: 2px; }

/* 待审核页：已提交信息 */
.info-list {
  text-align: left; background: oklch(98.6% 0.006 250); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 15px; margin: 16px 0 0;
}
.info-list .info-row { display: flex; gap: 12px; font-size: 13px; line-height: 2; }
.info-list .info-row .k { color: var(--text-mute); width: 72px; flex: none; }
.info-list .info-row .v { color: var(--text); word-break: break-all; }
tr.reject-row td { background: oklch(98.6% 0.012 25); }
tr.reset-row td { background: oklch(98.4% 0.012 256); }
.rule-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-dim); line-height: 2; }
.rule-list li { margin-bottom: 2px; }
.rule-list b { color: var(--text); }
details summary { cursor: pointer; color: var(--text-dim); font-size: 13px; }

/* ---------- 新建任务弹窗（dashboard）---------- */
.btn.disabled {
  opacity: .55; cursor: not-allowed; pointer-events: none;
  background: var(--line-strong); border-color: var(--line-strong); color: oklch(100% 0 0);
}

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: none;
  justify-content: center;
  padding: 56px 18px 32px;
  overflow-y: auto;
}
/* 两种打开方式：点按钮走 URL 片段，校验失败回跳走 .open */
.modal:target,
.modal.open { display: flex; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: -1;
  background: oklch(30% 0.02 256 / .44);
  backdrop-filter: blur(2px);
}

.modal-box {
  position: relative;
  width: 100%; max-width: 580px; height: fit-content;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px oklch(40% 0.03 256 / .22);
  padding: 22px 24px 24px;
  animation: modal-in .18s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}

.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close {
  margin-left: auto; width: 30px; height: 30px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--text-mute);
  font-size: 21px; line-height: 1; text-decoration: none;
}
.modal-close:hover { background: var(--brand-soft); color: var(--brand-dark); }

@media (max-width: 620px) {
  .modal { padding: 20px 12px 24px; }
  .modal-box { padding: 18px 16px 20px; border-radius: 13px; }
}

/* ===== 去 AI 生成网页 ===== */
.ai-cta {
  margin-top: 16px; padding: 14px 16px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(100deg, oklch(97.2% 0.028 256), oklch(97.2% 0.032 195));
  border: 1px solid oklch(90% 0.05 250); border-radius: 12px;
}
.ai-cta-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 3px; }
.ai-cta-text b { font-size: 13.5px; }
.ai-cta-text span { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.ai-btn {
  flex: none; padding: 10px 18px; font-size: 14px; color: #fff; border: none;
  background: linear-gradient(135deg, var(--brand), oklch(62% 0.14 195));
  box-shadow: 0 4px 14px oklch(56% 0.16 256 / 0.28);
}
.ai-btn:hover { filter: brightness(1.07); }

.ai-box { max-width: 760px; }
.ai-steps { margin: 0 0 14px; padding-left: 20px; font-size: 13px; color: var(--text-dim); }
.ai-steps li { margin-bottom: 4px; line-height: 1.6; }
.ai-steps li::marker { color: var(--brand); font-weight: 700; }
.ai-steps code, .ai-foot code { font-family: var(--mono); font-size: 12px;
  background: var(--brand-soft); padding: 1px 5px; border-radius: 5px; }
.ai-prompt {
  width: 100%; resize: vertical; padding: 12px 13px; font-size: 12.5px; line-height: 1.62;
  background: oklch(98.6% 0.006 250); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text);
}
.ai-prompt:focus { outline: 2px solid oklch(80% 0.08 250 / .55); outline-offset: 1px; }
.ai-copy-row { margin-top: 11px; }
.ai-sites-label { margin: 17px 0 9px; font-size: 12.5px; color: var(--text-mute); letter-spacing: .3px; }
.ai-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.ai-site {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 10px 8px; text-align: center; text-decoration: none; transition: .16s;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 13px; font-weight: 600;
}
.ai-site:hover {
  text-decoration: none; transform: translateY(-1px);
  border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft);
  box-shadow: 0 6px 16px oklch(56% 0.16 256 / 0.13);
}
.ai-site em { font-style: normal; font-size: 11px; font-weight: 400; color: var(--text-mute); }
.ai-foot { font-size: 12px; line-height: 1.65; margin: 14px 0 0; }

/* ===== 导出弹窗 ===== */
label.field.checkbox { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
label.field.checkbox > span { display: inline; margin: 0; font-size: 13px; color: var(--text-dim); }
label.field.checkbox input { width: auto; margin: 0; }

.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 9px; }
.radio-cards label {
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--panel); transition: .15s;
}
.radio-cards label:hover { border-color: var(--brand); background: var(--brand-soft); }
.radio-cards label:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.radio-cards input { margin: 0 0 4px; }
.radio-cards b { font-size: 13.5px; }
.radio-cards em { font-style: normal; font-size: 11.5px; color: var(--text-mute); line-height: 1.5; }

.col-checks {
  display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: oklch(99% 0.004 250);
  max-height: 148px; overflow-y: auto;
}
.col-checks label {
  display: flex; align-items: center; gap: 5px; font-size: 12.5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 9px; cursor: pointer; color: var(--text-dim);
}
.col-checks label:has(input:checked) { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.col-checks input { margin: 0; }

/* ===== 提交趋势 ===== */
.trend {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 10px;
  margin-bottom: 16px; background: oklch(99.3% 0.004 250);
}
.trend-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.trend-head b { font-size: 13.5px; }
.trend-head .muted { font-size: 12px; }
.trend-bars { display: flex; align-items: flex-end; gap: 3px; height: 96px; }
.tl-col { flex: 1 1 0; min-width: 4px; height: 100%; display: flex; align-items: flex-end; }
.tl-bar {
  width: 100%; min-height: 3px; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--brand), var(--teal));
  transition: filter .15s;
}
.tl-col:hover .tl-bar { filter: brightness(1.12); }
.trend-axis {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 11.5px; color: var(--text-mute); font-family: var(--mono);
}

/* ===== AI 分析 ===== */
.ai-run {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  border: 1px solid oklch(90% 0.05 250); border-radius: 12px; padding: 15px 17px;
  background: linear-gradient(100deg, oklch(97.2% 0.028 256), oklch(97.2% 0.032 195));
}
.ai-run-text { flex: 1 1 320px; }
.ai-run-text b { font-size: 14px; }
.warn-line { margin: 6px 0 0; font-size: 12.5px; color: oklch(52% 0.13 60); }
.warn-line a { font-weight: 600; }
.sub-block { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.sub-block textarea { width: 100%; font-size: 12.5px; line-height: 1.6; }
.sub-block.flash {
  box-shadow: 0 0 0 3px oklch(68% 0.14 250 / 0.28);
  border-radius: 10px;
  transition: box-shadow .5s ease-out;
}
.sub-block h2 .hint { font-weight: 400; font-style: normal; }

/* 字段类型速查表：常驻在「字段定义」输入框下方（不放 placeholder，开始输入也不会消失） */
.type-guide {
  margin-top: 10px; padding: 13px 15px 15px;
  border: 1px solid var(--line); border-radius: 11px;
  background: oklch(98.6% 0.008 250);
}
.type-guide h3 {
  font-size: 12.5px; font-weight: 650; color: var(--text-dim);
  margin: 0 0 9px; letter-spacing: .2px;
}
.type-guide-grid {
  max-height: 262px; overflow: auto;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.type-guide table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.type-guide th, .type-guide td {
  padding: 5px 10px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top;
}
.type-guide thead th {
  position: sticky; top: 0; z-index: 1;
  background: oklch(97.4% 0.012 250); color: var(--text-mute);
  font-size: 11.5px; font-weight: 650;
}
.type-guide tbody tr:last-child td { border-bottom: none; }
.type-guide td.mono { font-family: var(--mono); color: var(--brand-dark); font-size: 12px; }
.tg-note { font-size: 12px; color: var(--text-mute); margin: 11px 0 0; line-height: 1.7; }
.tg-note code {
  font-family: var(--mono); font-size: 11.5px; padding: 1px 5px;
  background: oklch(94.5% 0.012 250); border-radius: 5px; color: var(--text-dim);
}
.tg-demo {
  margin: 8px 0 0; padding: 10px 12px; background: #fff; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 12px; line-height: 1.75; white-space: pre; overflow-x: auto;
}

.ai-loading {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 14px 16px; font-size: 13px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.spin {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid oklch(88% 0.03 250); border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ai-result { margin-top: 16px; }
.ai-result-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--ok-soft); color: oklch(40% 0.1 150);
}
.ai-result-head .btn { margin-left: auto; }

/* ===== Markdown 报告正文 ===== */
.markdown { font-size: 14.5px; line-height: 1.78; color: var(--text); max-width: 900px; }
.markdown h2, .markdown h3, .markdown h4 {
  margin: 22px 0 8px; line-height: 1.4; letter-spacing: -0.2px;
}
.markdown h2 { font-size: 19px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.markdown h3 { font-size: 16.5px; }
.markdown h4 { font-size: 15px; color: var(--text-dim); }
.markdown h2:first-child, .markdown h3:first-child { margin-top: 0; }
.markdown p { margin: 9px 0; }
.markdown ul, .markdown ol { margin: 9px 0; padding-left: 22px; }
.markdown li { margin: 4px 0; }
.markdown li::marker { color: var(--brand); }
.markdown strong { font-weight: 700; color: oklch(32% 0.09 256); }
.markdown code {
  font-family: var(--mono); font-size: 12.8px; padding: 1.5px 5px; border-radius: 5px;
  background: var(--brand-soft); color: oklch(42% 0.12 256);
}
.markdown pre {
  background: oklch(96.5% 0.008 250); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; overflow-x: auto; margin: 12px 0;
}
.markdown pre code { background: none; padding: 0; font-size: 12.5px; line-height: 1.6; }
.markdown blockquote {
  margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--brand);
  background: var(--brand-soft); border-radius: 0 8px 8px 0; color: var(--text-dim);
}
.markdown hr { border: none; border-top: 1px dashed var(--line-strong); margin: 20px 0; }
.markdown .md-table { overflow-x: auto; margin: 14px 0; }
.markdown table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.markdown th {
  text-align: left; padding: 9px 12px; background: var(--brand-soft);
  border-bottom: 1px solid var(--line-strong); font-weight: 650; white-space: nowrap;
}
.markdown td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.markdown tr:hover td { background: oklch(98.6% 0.006 250); }



/* ---------- 团队（组织）---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }

.section-title { font-size: 15px; font-weight: 650; margin: 24px 0 12px; color: var(--text-dim); }
.small-title { font-size: 13.5px; font-weight: 650; margin: 0 0 10px; color: var(--text-dim); }

.team-list { display: flex; flex-direction: column; gap: 10px; }
.team-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: inherit; text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.team-item:hover {
  border-color: var(--line-strong); text-decoration: none;
  box-shadow: 0 3px 12px oklch(56% 0.16 256 / 0.07);
}
.team-mark {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), oklch(62% 0.13 195));
}

.found-team {
  margin-top: 14px; padding: 13px 15px; border-radius: 11px;
  border: 1px solid oklch(88% 0.05 250); background: oklch(97.6% 0.022 250);
}
.found-head { display: flex; align-items: center; gap: 10px; }

.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }

.tag-me {
  display: inline-block; font-size: 11px; padding: 1px 7px; margin-left: 6px;
  border-radius: 20px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
}
.modal-narrow { max-width: 460px; }

/* ---------- 团队加入申请（审核制）---------- */
.pending-box {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 11px; font-size: 13px;
  background: oklch(97.6% 0.022 250); border: 1px solid oklch(88% 0.05 250);
}
.pending-box > span:first-child { font-weight: 620; color: var(--text-dim); flex: none; }

/* ---------- 接口调试：发送一条测试数据（内容可编辑）---------- */
.test-box { max-width: 660px; }
.test-url {
  font-size: 12px; padding: 8px 11px; border-radius: 9px;
  background: oklch(24% 0.02 256); color: oklch(92% 0.02 250);
  overflow-x: auto; white-space: nowrap;
}
.test-hint { font-size: 12.5px; line-height: 1.62; margin: 10px 0 9px; }
.test-hint b { color: var(--brand-dark); }
.test-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; font-size: 12px; }
.test-fields code {
  font-family: var(--mono); background: var(--brand-soft); color: var(--brand-dark);
  padding: 2px 6px; border-radius: 6px;
}
.test-fields em { font-style: normal; color: var(--text-mute); font-size: 11.5px; margin: 0 4px 0 -2px; }
.test-body { min-height: 190px; }
.test-opt { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 11px; }
.test-opt .field.checkbox { margin: 0; flex: 1 1 300px; font-size: 12.5px; }
.test-opt .field.checkbox code {
  font-family: var(--mono); background: var(--brand-soft); padding: 1px 5px; border-radius: 5px;
}
.test-hint code {
  font-family: var(--mono); font-size: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
  padding: 1px 5px; border-radius: 5px;
}

/* ---------- 数据大屏配置 ---------- */
.board-global {
  display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center;
  padding: 12px 14px; margin-bottom: 16px; min-width: 0;
  background: var(--brand-soft); border: 1px solid var(--line);
  border-radius: 10px; font-size: 13px;
}
/* 开关项：文字永远单行、项永远不窄于内容（min-width: max-content）——
   放不下时由外层 flex-wrap 把「整项」挪到下一行，绝不把里面的字折断 */
.board-global .bg-item,
.bs-flags .bg-item { display: flex; align-items: center; gap: 7px; cursor: pointer; flex: 0 0 auto; min-width: max-content; }
.board-global .bg-item > span,
.bs-flags .bg-item > span { white-space: nowrap; }
/* 勾选框 / 下拉框按固有宽度显示，不参与收缩 */
.board-global .bg-item > input,
.board-global .bg-item > select { flex: none; }
.board-global .bg-item .hint { font-style: normal; font-size: 11.5px; color: var(--text-mute); margin-left: 2px; }
/* 附加面板开关 + 刷新频率绑成一组：宽屏整组同一行（刷新频率紧跟「分组对比」右侧）；
   整组放不下时先整组换行，再不够则「组内整项换行」——
   .bg-row 自身允许收缩（flex: 0 1 auto + min-width: 0）才不会顶出容器，
   但组内的 .bg-item 一律 flex: 0 0 auto，所以换行换的是整个开关项，不是项里的字 */
.board-global .bg-row { display: flex; align-items: center; gap: 10px 20px; flex: 0 1 auto; min-width: 0; max-width: 100%; flex-wrap: wrap; }
/* 唯一例外：窗口窄到单个开关项都放不下（手机竖屏 <420px）时，
   才放开折字，免得整项顶出屏幕。能整项换行的宽度区间内绝不折字 */
@media (max-width: 420px) {
  .board-global .bg-item,
  .bs-flags .bg-item { flex: 0 1 auto; min-width: 0; }
  .board-global .bg-item > span,
  .bs-flags .bg-item > span { white-space: normal; overflow-wrap: anywhere; }
}
/* 「刷新频率」是全局设置，跟前面的面板开关之间留一段稳定的空白（不用 margin-left:auto，
   那会把它推到框最右；也不加 padding/border，免得再引入视觉错位） */
.board-global .bg-refresh { cursor: default; margin-left: 20px; }
.board-global select { padding: 4px 8px; font-size: 12.5px; border-radius: 7px; }
/* 「刷新频率」后面的下拉框：宽度 8em —— 留足「每 30 秒」文本 + 原生下拉箭头的空间，
   6em 会把文字挤到截断（实测差约 8px），8em 才显示完整 */
.board-global #bgRefresh { width: 8em; min-width: 0; }

.board-table { font-size: 13px; }
.board-table th {
  font-size: 12px; font-weight: 600; color: var(--text-dim); text-align: left;
  padding: 6px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.board-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.board-table tr.off td { opacity: .45; }
.board-table tr.off td:first-child { opacity: .75; }
.board-table td select,
.board-table td input[type="number"] { padding: 5px 8px; font-size: 12.5px; border-radius: 7px; width: 100%; }
.board-table td input[type="number"] { max-width: 86px; }
.bc-name { font-weight: 600; color: var(--text); }
/* 大屏排列顺序：↑↓ 调整，行序即大屏面板顺序 */
.bc-order { white-space: nowrap; }
.bc-order .bc-mv {
  width: 22px; height: 20px; padding: 0; margin-right: 3px; line-height: 1;
  font-size: 12px; cursor: pointer; color: var(--text-dim);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px;
}
.bc-order .bc-mv:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.bc-order .bc-mv:disabled { opacity: .35; cursor: not-allowed; }
.bc-order .bc-pos { font-size: 11px; color: var(--text-mute); margin-top: 3px; }
.bc-sub { font-size: 11.5px; color: var(--text-mute); line-height: 1.5; }
.bc-sub.mono { font-family: var(--mono); }
.bc-desc span { color: var(--text-mute); font-size: 11.5px; line-height: 1.45; display: block; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 38px; height: 21px; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer; border-radius: 999px;
  background: var(--line-strong); transition: background .18s;
}
.switch .slider::before {
  content: ''; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .18s;
  box-shadow: 0 1px 3px oklch(40% 0.02 255 / .28);
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(17px); }
.switch input:disabled + .slider { opacity: .45; cursor: not-allowed; }

/* ---------- 大屏：标题与风格 ---------- */
.board-style {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 16px; background: var(--brand-soft);
}
.bs-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 11px; flex-wrap: wrap; }
.bs-head b { font-size: 13.5px; }
.bs-head .muted { font-size: 12px; }
.bs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 10px 14px; }
.bs-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bs-item.bs-wide { grid-column: 1 / -1; }
.bs-label { font-size: 12px; color: var(--text-dim); }
.bs-item input[type="text"], .bs-item select { padding: 5px 8px; font-size: 12.5px; border-radius: 7px; }
.bs-flags {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
  margin-top: 12px; font-size: 12.5px;
}
.bs-preview {
  min-height: 46px; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin-top: 12px; border: 1px solid var(--line); border-radius: 9px;
  min-width: 0; overflow: hidden; transition: background .2s, border-color .2s;
}
.bs-pv-swatch { margin-left: auto; display: flex; gap: 3px; flex: none; }
.bs-pv-swatch i { width: 12px; height: 12px; border-radius: 3px; display: block; }
.bs-preview-note {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 8px; font-size: 12px;
}
.bs-preview-note .muted { flex: 1 1 auto; }
.bs-item input[type="color"] {
  padding: 2px; height: 30px; width: 100%; border-radius: 7px; cursor: pointer;
}
.bs-pv-mark { font-size: 17px; flex: none; }
.bs-pv-title {
  flex: 0 1 auto; min-width: 0; font-weight: 700; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bs-pv-meta { flex: none; font-size: 10.5px; opacity: .75; letter-spacing: .3px; }

/* ===== 分享在线表单（复制链接 + 海报）===== */
.share-box { max-width: 840px; }
.share-box .url-label { margin-bottom: 6px; }
.share-warn {
  margin: -4px 0 14px; padding: 11px 14px; font-size: 13px; line-height: 1.6;
  background: oklch(97% 0.05 85); border: 1px solid oklch(84% 0.09 80);
  border-radius: 10px; color: oklch(38% 0.06 70);
}
.share-warn code {
  background: oklch(100% 0 0 / .7); padding: 1px 5px; border-radius: 5px;
}
.share-poster {
  display: flex; gap: 22px; align-items: flex-start;
  margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line-strong);
}
.share-form { flex: 1 1 300px; min-width: 0; }
.share-form .field { margin-bottom: 12px; }
.share-actions { margin-top: 4px; }
.share-tip { font-size: 12.5px; margin: 10px 0 0; line-height: 1.6; }
.share-preview {
  flex: 0 0 300px; display: flex; justify-content: center;
  background: var(--brand-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px;
}
#posterCanvas {
  width: 100%; max-width: 276px; height: auto; display: block;
  border-radius: 8px; box-shadow: 0 6px 18px oklch(50% 0.03 256 / .16);
  background: #fff;
}
@media (max-width: 720px) {
  .share-poster { flex-direction: column; }
  .share-preview { flex: none; width: 100%; }
  #posterCanvas { max-width: 240px; }
}
