* { box-sizing: border-box; }
body {
  margin: 0; background: #f5f6f8; color: #24292f;
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
a { color: #0969da; }
.topbar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid #e1e4e8; padding: 10px 24px;
}
.topbar .brand { font-weight: 600; margin-right: 12px; }
.topbar a { color: #24292f; text-decoration: none; }
.topbar a:hover { color: #0969da; }
.topbar form.inline { margin-left: auto; }
button.link { background: none; border: none; color: #888; cursor: pointer; font: inherit; }
button.link:hover { color: #0969da; }
.wrap { max-width: 1120px; margin: 24px auto; padding: 0 24px; }
.flash {
  max-width: 1072px; margin: 12px auto 0; padding: 8px 16px;
  background: #fff8e6; border: 1px solid #f0d97a; border-radius: 6px;
}
h1 { font-size: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
h2 { font-size: 16px; margin: 24px 0 8px; }
.hint { color: #888; font-size: 12px; font-weight: normal; }
.muted { color: #888; }
.err { color: #c00; }
code { background: #f3f4f6; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
td.keycell { white-space: nowrap; }
code.key { letter-spacing: .5px; }
code.key.show { user-select: all; }

table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td {
  padding: 8px 12px; border-bottom: 1px solid #eee; text-align: left; vertical-align: middle;
}
table.list th { background: #fafbfc; font-weight: 600; white-space: nowrap; }
table.list tr.row-new td { background: #fffdf5; }
table.list td.ops { white-space: nowrap; }
table.list td.ops form { display: inline; }
.empty-cell { text-align: center; color: #888; padding: 32px !important; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; text-decoration: none; white-space: nowrap; }
.badge.new { background: #fff1e0; color: #bc4c00; }
.badge.replied { background: #ddf4ff; color: #0969da; }
.badge.done { background: #dcf5e3; color: #1a7f37; }
.badge.off { background: #f3f4f6; color: #656d76; }

.toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text], .toolbar select { padding: 6px 10px; border: 1px solid #d0d7de; border-radius: 6px; font: inherit; }
.toolbar input[type=text] { min-width: 240px; }

form.card, .card {
  background: #fff; border: 1px solid #e1e4e8; border-radius: 8px;
  padding: 20px 24px; margin-bottom: 20px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 600; }
.field input[type=text], .field input[type=password], .field select, .field textarea {
  padding: 7px 10px; border: 1px solid #d0d7de; border-radius: 6px; font: inherit;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid #b6d4fe; border-color: #0969da;
}
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 4px; color: #57606a; }

.btn {
  display: inline-block; padding: 7px 18px; border-radius: 6px; cursor: pointer;
  border: 1px solid #d0d7de; background: #f6f8fa; font: inherit; text-decoration: none; color: #24292f;
}
.btn:hover { background: #eef1f4; }
.btn.primary { background: #0969da; border-color: #0969da; color: #fff; }
.btn.primary:hover { background: #0757ba; }
.btn.danger { color: #cf222e; }
.btn.danger:hover { background: #ffebe9; border-color: #cf222e; }
.btn.small { padding: 3px 10px; font-size: 12px; }

.imgs { display: flex; gap: 12px; flex-wrap: wrap; }
.imgcard { width: 160px; background: #fafbfc; border: 1px solid #e1e4e8; border-radius: 6px; padding: 6px; }
.imgcard img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; display: block; }

/* 总览 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
  background: #fff; border: 1px solid #e1e4e8; border-radius: 8px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit;
}
.stat:hover { border-color: #0969da; }
.stat b { font-size: 24px; line-height: 1.2; }
.stat span { color: #888; font-size: 12px; }
.c-new { color: #bc4c00; } .c-replied { color: #0969da; } .c-done { color: #1a7f37; }
.empty p { margin: 8px 0; }

/* 反馈线程 */
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.msg { display: flex; flex-direction: column; gap: 2px; max-width: 80%; }
.msg.admin { align-self: flex-end; align-items: flex-end; }
.msg .meta { font-size: 12px; color: #888; }
.bubble { white-space: pre-wrap; word-break: break-word; padding: 10px 14px; border-radius: 10px; }
.bubble.user { background: #fff; border: 1px solid #e1e4e8; }
.field .bubble.user { background: #fafbfc; }
.bubble.admin { background: #ddf4ff; border: 1px solid #b6e3ff; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 16px 0; }

/* 接口说明（Markdown 渲染） */
.doc { line-height: 1.75; }
.doc h1 { font-size: 22px; }
.doc h2 { font-size: 18px; margin-top: 28px; border-bottom: 1px solid #eee; padding-bottom: 4px; }
.doc h3 { font-size: 15px; margin-top: 20px; }
.doc pre { background: #0d1117; color: #e6edf3; padding: 12px 14px; border-radius: 6px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; }
.doc pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.doc table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; }
.doc th, .doc td { border: 1px solid #e1e4e8; padding: 6px 10px; text-align: left; vertical-align: top; }
.doc th { background: #fafbfc; }
.doc blockquote { margin: 8px 0; padding: 4px 14px; border-left: 4px solid #d0d7de; color: #57606a; background: #fafbfc; }

.login-box { max-width: 360px; margin: 80px auto; }
@media (max-width: 720px) {
  .grid2 { grid-template-columns: 1fr; }
  .wrap { padding: 0 12px; }
  .msg { max-width: 100%; }
}
