/* 心璐后台管理系统 · 基础样式 */
:root {
  --ink: #163163;
  --ink-2: #234171;
  --ink-3: #16213f;
  --gold: #b09262;
  --gold-soft: #f3e9d7;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #1f2d3d;
  --muted: #8492a6;
  --line: #e4e8f0;
  --ok: #1f9d63;
  --err: #d64545;
  --warn: #c98a1a;
  --radius: 6px;
  --sidebar-w: 220px;
  --shadow: 0 6px 20px -12px rgba(22, 49, 99, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
code { font-family: Consolas, Monaco, monospace; background: #f2f4f8; padding: 1px 5px; border-radius: 3px; font-size: 12.5px; }

.layout { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1b2a4d 0%, var(--ink-3) 100%);
  color: rgba(255, 255, 255, 0.72);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 22px 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(176, 146, 98, 0.18);
}

.menu { flex: 1; padding: 16px 12px; overflow-y: auto; }
.menu-group + .menu-group,
.menu-group + .menu-item { margin-top: 14px; }
.menu-title {
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.38);
}
.menu-item {
  display: block;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: var(--radius);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.2s, color 0.2s;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.menu-item.active {
  background: rgba(176, 146, 98, 0.16);
  color: #f0dcb8;
  box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-foot {
  padding: 14px 22px 18px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.28);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- 主区域 ---------- */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 60px;
  padding: 0 26px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.topbar-user .who { color: var(--text); font-weight: 600; }
.topbar-user .tags { display: inline-flex; gap: 6px; }
.topbar-user .tags em {
  font-style: normal;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
}
.topbar-user a { color: var(--ink-2); }
.topbar-user a:hover { color: var(--gold); }
.topbar-user .logout { color: var(--muted); }

.content { padding: 24px 26px 40px; }

.page-foot {
  margin-left: var(--sidebar-w);
  padding: 16px 26px 24px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 15px; color: var(--ink); }
.card-body { padding: 18px 20px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.stat { padding: 20px 22px; margin-bottom: 0; }
.stat-label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }
.stat-value { font-size: 30px; font-weight: 600; color: var(--ink); line-height: 1.3; margin: 6px 0 2px; }
.stat-sub { font-size: 12px; color: var(--muted); }

.line { margin-bottom: 8px; color: var(--text); }
.line:last-child { margin-bottom: 0; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th,
.table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th {
  background: #fafbfd;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
.table tbody tr:hover { background: #fafcff; }
.table tr:last-child td { border-bottom: 0; }
.table .row-root td { background: #fbfcfe; }
.table .empty { padding: 40px; text-align: center; color: var(--muted); }
.mono { font-family: Consolas, Monaco, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.muted-sm { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.ops { white-space: nowrap; }
.ops .inline { display: inline; }
.ops .link + .inline { margin-left: 12px; }

.indent { display: inline-block; }
.indent-0 { width: 0; }
.indent-1 { width: 16px; }
.indent-2 { width: 32px; }
.indent-1::before,
.indent-2::before { content: "└"; color: #c8d0de; margin-right: 6px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { border-color: #c3ccdd; background: #f7f9fc; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-block { width: 100%; height: 40px; font-size: 14px; }

.link { color: var(--ink-2); font-size: 13px; }
.link:hover { color: var(--gold); }
.link-danger { color: var(--err); background: none; border: 0; padding: 0; font: inherit; font-size: 13px; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }
button.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------- 表单 ---------- */
.form { padding: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }
.field > span b { color: var(--err); font-weight: 400; }
.field input[type="text"],
.field input[type="password"],
.field input[type="email"],
.field input[type="number"],
.field select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(35, 65, 113, 0.1); }
.field input[readonly] { background: #f7f9fc; color: var(--muted); }
.field small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.form-actions { display: flex; gap: 12px; padding-top: 6px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0 18px; }
.hint { padding: 12px 20px 16px; margin: 0; font-size: 12.5px; color: var(--muted); }

.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 4px 0 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--ink); }

.perm-tree { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fcfdff; }
.perm-group + .perm-group { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.perm-children { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 10px 0 0 24px; }
.perm-children .check span { font-size: 13px; }

.search { display: inline-flex; gap: 8px; }
.search input {
  height: 34px;
  min-width: 180px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.search input:focus { border-color: var(--ink-2); }
.head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- 标签 / 徽章 / 提示 ---------- */
.tag {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 4px;
  border-radius: 3px;
  background: #eef2f9;
  color: var(--ink-2);
  font-size: 11.5px;
}
.tag-muted { background: #f2f4f8; color: var(--muted); }
.tag-gold { background: var(--gold-soft); color: #7a5f2f; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 11.5px; }
.badge-ok { background: #e8f7ef; color: var(--ok); }
.badge-off { background: #f4f5f7; color: var(--muted); }
.badge-warn { background: #fff6e6; color: #a5670a; }
.badge-menu { background: #eef2f9; color: var(--ink-2); }
.badge-btn { background: #fdf3e6; color: var(--warn); }

.alert { margin-bottom: 16px; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; }
.alert-ok { background: #eaf7f0; border: 1px solid #bfe6d1; color: #1d7a4e; }
.alert-err { background: #fdeeee; border: 1px solid #f3c7c7; color: #b93b3b; }

.pager { display: flex; gap: 6px; padding: 16px 20px; }
.page {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--muted);
  background: #fff;
}
.page:hover { border-color: #c3ccdd; color: var(--ink); }
.page.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.state { text-align: center; padding: 60px 20px; }
.state-code { font-size: 52px; font-weight: 700; color: var(--line); line-height: 1; margin-bottom: 12px; }
.state h2 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.state p { margin-bottom: 22px; }
.state .form-actions { justify-content: center; }

/* ---------- 登录页 ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(60% 60% at 85% 10%, rgba(176, 146, 98, 0.18), transparent 60%),
    linear-gradient(160deg, #1b2a4d, #0f1830);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  padding: 34px 32px 28px;
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(176, 146, 98, 0.16);
  margin-bottom: 12px;
}
.login-brand h1 { font-size: 19px; color: var(--ink); letter-spacing: 0.04em; }
.login-brand p { margin-top: 6px; font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { margin-top: 6px; }
.login-tip { margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  .brand { border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, 0.1); padding: 14px 18px; white-space: nowrap; }
  .menu { display: flex; align-items: center; padding: 8px 10px; gap: 4px; }
  .menu-group { display: flex; align-items: center; gap: 4px; }
  .menu-group + .menu-group { margin-top: 0; }
  .menu-title { display: none; }
  .menu-item { white-space: nowrap; padding: 8px 12px; }
  .sidebar-foot { display: none; }
  .layout { flex-direction: column; }
  .main { margin-left: 0; }
  .page-foot { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .topbar-user .tags { display: none; }
  .search input { min-width: 120px; }
}

/* ============ GEO 监测 ============ */
.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }

.field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 4px; font-size: 13.5px; line-height: 1.7; color: var(--ink);
  background: #fff; font-family: inherit; resize: vertical; outline: none;
}
.field textarea:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(35, 65, 113, 0.1); }

.badge-run { background: #eaf2ff; color: #2b5bb5; }

.geo-bar { height: 8px; margin: 4px 20px 0; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.geo-bar > i { display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, #2b5bb5, #4b8bf0); transition: width .35s ease; }

.geo-item { padding: 18px 0; border-top: 1px solid var(--line); }
.geo-item:first-of-type { border-top: none; }
.geo-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.geo-q .mono { font-size: 11.5px; color: var(--muted); }
.geo-q strong { font-size: 14px; color: var(--ink); font-weight: 600; }

.geo-detail { margin-top: 8px; }
.geo-detail summary { cursor: pointer; font-size: 12.5px; color: #2b5bb5; user-select: none; }
.geo-detail summary:hover { text-decoration: underline; }
.geo-answer {
  margin-top: 10px; max-height: 65vh; overflow: auto; white-space: pre-wrap;
  font-size: 13px; line-height: 1.85; color: #2b3446;
  background: #fbfcfe; border: 1px solid #e6ebf2; border-radius: 6px; padding: 14px 16px;
}
.geo-hit { background: #fff1c9; color: inherit; padding: 0 2px; border-radius: 2px; }

/* 监测范围选择（全部 / 问题集 / 单条） */
.scope-select {
  height: 32px; max-width: 280px; padding: 0 8px; margin-right: 8px;
  border: 1px solid var(--line); border-radius: 4px; background: #fff;
  font-size: 13px; color: var(--ink); vertical-align: middle; outline: none;
}
.scope-select:focus { border-color: var(--ink-2); }
.scope-select-sm { height: 26px; max-width: 140px; font-size: 12px; margin-right: 6px; }
.scope-form { display: inline-flex; align-items: center; gap: 4px; }
.ops .scope-form { display: inline-flex; }
.inline-input {
  width: 100%; height: 28px; padding: 0 8px; border: 1px solid var(--line);
  border-radius: 4px; font-size: 13px; color: var(--ink); background: #fff; outline: none;
}
.inline-input:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(35, 65, 113, 0.1); }

.run-form { padding: 0 0 4px; }
.run-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.run-row .btn { height: 34px; }
.is-hidden { display: none !important; }

/* 来源链接列表（a 标签文字 + 地址） */
.cite-list {
  margin: 8px 0 2px; padding: 10px 14px;
  background: #fbfcfe; border: 1px solid #e6ebf2; border-radius: 6px;
}
.cite-item { margin: 0; padding: 3px 0; font-size: 12.5px; line-height: 1.7; }
.cite-item .muted-sm { margin-left: 8px; word-break: break-all; }
/* 商品卡 / 直播卡截图：列表缩略图 + 正文原位大图 */
.geo-card-thumb {
  display: block; max-width: 260px; max-height: 150px; margin-top: 6px;
  border: 1px solid #e6ebf2; border-radius: 6px; background: #fff;
}
.geo-card-shot { margin: 12px 0; }
.geo-card-shot img {
  display: block; width: 100%; max-width: 420px; border: 1px solid #e6ebf2;
  border-radius: 8px; background: #fff;
}
/* 正文里没有原位占位符时，卡片统一补在末尾 */
.geo-card-extra { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e6ebf2; }
.geo-card-line { margin: 8px 0; font-size: 12.5px; color: #2b3446; word-break: break-all; }
.geo-card-line .badge { margin-right: 8px; }

/* ============ Cookie 监测 · 扫码登录 ============ */
.qr-panel { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.qr-box {
  width: 240px; padding: 20px; text-align: center;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.qr-box img { width: 200px; height: 200px; display: block; margin: 0 auto; }
.qr-box img[src=""] { visibility: hidden; }
.qr-tip { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.qr-side { flex: 1; min-width: 260px; }

@media (max-width: 720px) {
  .cards-4 { grid-template-columns: 1fr; }
  .geo-bar { margin-left: 0; margin-right: 0; }
  .qr-panel { gap: 20px; }
  .qr-box { width: 100%; }
}

/* ---------- GEO 指标与人工打标 ---------- */
.geo-metrics {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
.geo-metrics .stat {
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  box-shadow: none;
}
.geo-metrics .stat-value { font-size: 24px; }

.geo-tag {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.geo-tag-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.geo-tag-fields label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.geo-tag-fields select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}
.geo-tag-input {
  flex: 1 1 220px;
  min-width: 180px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}
.geo-tag-fields select:focus,
.geo-tag-input:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px rgba(35, 65, 113, 0.1);
}
.geo-tag .btn {
  height: 32px;
  padding: 0 14px;
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .geo-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .geo-metrics { grid-template-columns: 1fr; }
}

/* ---------- GEO 基线报告 ---------- */
.card-head .ops { display: flex; flex-wrap: wrap; gap: 8px; }
.geo-report-h3 {
  margin: 26px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
  font-size: 14px;
  color: var(--ink);
}
.geo-report-note {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 2;
  color: var(--muted);
}
.geo-report-table th,
.geo-report-table td { white-space: nowrap; }

@media print {
  body { background: #fff; }
  .sidebar,
  .topbar,
  .card-head .ops,
  .page-foot { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  .card { border: none; box-shadow: none; margin-bottom: 12px; }
  .geo-metrics { grid-template-columns: repeat(3, 1fr); }
  .geo-metrics .stat { break-inside: avoid; }
}

/* ---------- 问题库：筛选、问题集卡片 ---------- */
.geo-filter select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
}
.geo-filter select:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(35, 65, 113, 0.1); }

.badge-soft {
  background: var(--gold-soft);
  color: #8a6d3b;
  font-weight: 400;
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.group-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}
.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.group-head strong { font-size: 13.5px; color: var(--ink); }
.group-remark {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.group-edit summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-2);
  outline: none;
}
.group-edit[open] summary { margin-bottom: 8px; }
.group-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.group-form label,
.group-card--new label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
}
.group-form .btn,
.group-card--new .btn { align-self: flex-start; height: 30px; padding: 0 12px; font-size: 12.5px; }
.group-card--new { border-style: dashed; background: #fff; }
.group-card--new .inline-input { height: 30px; font-size: 12.5px; }

.group-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}
.group-actions .group-edit[open] { flex: 1 1 100%; }

/* ---------- 列表页：筛选条与分页 ---------- */
.list-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 0 20px 16px;
}
.list-filter input[type="text"] {
  height: 34px;
  min-width: 220px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  background: #fff;
}
.list-filter select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.list-filter input:focus,
.list-filter select:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px rgba(35, 65, 113, 0.1);
}
.list-filter .btn { height: 34px; padding: 0 14px; font-size: 13px; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}
.pager-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.pager .btn {
  height: 30px;
  min-width: 34px;
  padding: 0 10px;
  font-size: 12.5px;
}

/* ---------- 多选清单（问题 / 问题集） ---------- */
.check-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.check-item:last-child { border-bottom: none; }
.check-item input { margin-top: 4px; flex: none; }
.check-item span { line-height: 1.7; }
.check-item em { font-style: normal; color: var(--muted); margin-right: 6px; }
.check-all { float: right; font-size: 12px; font-weight: 400; color: var(--muted); }
.check-all input { margin-right: 4px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 28, 51, 0.45);
}
.modal-mask[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 18px 48px -20px rgba(10, 22, 44, 0.55);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 15px; color: var(--ink); }
.modal-close {
  border: 0;
  padding: 0 2px;
  background: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 18px 20px; font-size: 13px; color: var(--text); }
.modal-tip { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.modal-scope { display: flex; gap: 18px; }
.modal-scope label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.modal-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.modal-fields[hidden] { display: none; }
.modal-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.modal-fields select,
.modal-fields input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.modal-fields select:focus,
.modal-fields input:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px rgba(35, 65, 113, 0.1);
}
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 20px; }
.dropzone {
  padding: 28px 20px;
  border: 1.5px dashed #c8d0de;
  border-radius: 8px;
  background: #fafbfd;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone.dragover { border-color: var(--gold); background: var(--gold-soft); }
.dropzone p { margin: 0; }
.dropzone .link { border: 0; padding: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.modal-filename { margin-top: 8px !important; color: var(--ink-2); font-size: 12.5px; }
.modal-result {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f5f7fb;
  font-size: 13px;
  color: var(--text);
}
.modal-result ul { margin: 6px 0 0; padding-left: 18px; }
.modal-result li { margin: 3px 0; }
.modal-result.modal-ok { background: #eef8f2; color: #1b7a4f; }
.modal-result.modal-error { background: #fdf0f0; color: #b23b3b; }
.modal-result .modal-warnings { color: var(--warn); }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions[hidden] { display: none; }
body.modal-open { overflow: hidden; }
