/* 何易维新面板内测平台 · 简洁样式 */
:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --border: #dcdcdc;
  --border-strong: #c8c8c8;
  --text: #24292e;
  --muted: #6a737d;
  --brand: #2c5aa0;
  --brand-dark: #244c88;
  --brand-soft: #eef3fa;
  --danger: #c0392b;
  --ok: #2c7a4b;
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 22px; margin: 0 0 12px; font-weight: 600; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 600; }
h3 { font-size: 14px; margin: 16px 0 6px; font-weight: 600; color: var(--muted); }

p { margin: 0 0 10px; }

/* ---------- Nav ---------- */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { font-weight: 600; font-size: 16px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 16px; margin-left: auto; flex-wrap: wrap; }
.nav-links > a { color: var(--muted); font-size: 14px; }
.nav-links > a:hover { color: var(--brand); text-decoration: none; }
.nav-links .who { color: var(--text); font-weight: 600; font-size: 14px; }

/* ---------- Layout ---------- */
.container { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 560px; margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.danger { color: var(--danger); }
.count { display: inline-block; min-width: 20px; text-align: center; font-weight: 600; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head h1 { margin: 0; }
.page-head-tags { display: flex; gap: 8px; align-items: center; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card > :last-child { margin-bottom: 0; }
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.card-head h2 { margin: 0; }
.card-warn { background: #fdfaf3; border-color: #e6d9b8; }
.center-card { text-align: center; }

/* ---------- 首页横幅（朴素版） ---------- */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
}
.hero h1 { font-size: 24px; margin-bottom: 6px; }
.hero .subtitle { color: var(--muted); margin-bottom: 18px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-stat { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-ghost { background: var(--surface); color: var(--brand); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #a93226; border-color: #a93226; }
.btn-block { width: 100%; margin-top: 6px; }

.quick-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Flash ---------- */
.flash {
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid var(--border);
}
.flash-ok { background: #eef7f1; color: #276749; border-color: #bfe0cb; }
.flash-err { background: #fbeeee; color: #a93226; border-color: #eec4c0; }

/* ---------- Stats ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  display: block;
}
.stat-link:hover { border-color: var(--brand); text-decoration: none; }
.stat-num { font-size: 24px; font-weight: 600; color: var(--text); line-height: 1.3; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.rating-q { color: #6a3fb5; border-color: #d8c8ef; background: #f5f0fb; }
.rating-S { color: #a93226; border-color: #eec4c0; background: #fbeeee; }
.rating-A { color: #9c6500; border-color: #ecd8a8; background: #fdf7ea; }
.rating-B { color: #8a7300; border-color: #e8e0a8; background: #fbfaec; }
.rating-C { color: #276749; border-color: #bfe0cb; background: #eef7f1; }
.rating-E { color: #6a737d; }

.status-pending { color: #9c6500; border-color: #ecd8a8; background: #fdf7ea; }
.status-approved,
.status-valid,
.status-active { color: #276749; border-color: #bfe0cb; background: #eef7f1; }
.status-rejected,
.status-invalid,
.status-banned { color: #a93226; border-color: #eec4c0; background: #fbeeee; }
.status-duplicate { color: #6a737d; }
.status-cannot_repro { color: #3d5a94; border-color: #c9d6ea; background: #eef3fa; }

.cat-bug { color: #3d5a94; border-color: #c9d6ea; background: #eef3fa; }
.cat-vuln { color: #a9326b; border-color: #edc6db; background: #fbf0f5; }

/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
}
.table th, .table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
.table th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table-rank .is-me { background: var(--brand-soft); }
.table-rank .is-me:hover { background: #e4ecf7; }

.rank-badge { display: inline-block; min-width: 22px; text-align: center; font-weight: 600; color: var(--muted); }
.rank-1 { color: #9c6500; }
.rank-2 { color: #56606b; }
.rank-3 { color: #8a5a2b; }

.dist { display: flex; gap: 10px; flex-wrap: wrap; }
.dist-item { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Filter chips ---------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  padding: 4px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.chip:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.active:hover { color: #fff; }

/* ---------- Forms ---------- */
.form { display: block; }
.form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
}
.form label:first-of-type { margin-top: 0; }
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="number"],
.form select,
.form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.form input:focus,
.form select:focus,
.form textarea:focus { outline: none; border-color: var(--brand); }
.form textarea { resize: vertical; }
.form-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline; }
.inline-form .btn-block { margin-top: 12px; }

.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.req { color: var(--danger); font-size: 12px; font-weight: 600; margin-left: 4px; }

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 4px;
}
.review-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.comment-form { margin-top: 16px; }
.comment-form textarea { margin-bottom: 10px; }

/* ---------- Rating choices ---------- */
.rating-choices { display: grid; gap: 6px; margin-bottom: 6px; }
.rating-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin: 0 !important;
  font-weight: 400 !important;
}
.rating-choice:hover { border-color: var(--brand); }
.rating-choice input { margin: 0; }
.rating-choice-left { display: flex; align-items: center; gap: 10px; }
.rating-choice input:checked + span + .rating-choice-label { color: var(--brand); font-weight: 600; }
.rating-choice-label { font-size: 13px; color: var(--muted); }

.rating-legend { display: flex; gap: 18px; flex-wrap: wrap; }
.rating-item { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

/* ---------- Prose / notice / lists ---------- */
.list { margin: 0; padding-left: 20px; }
.list li { margin-bottom: 6px; }

.prose {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 12px;
}

.notice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  margin-top: 14px;
}
.notice .prose { margin: 8px 0 0; }

/* ---------- Meta rows / app cards ---------- */
.meta-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}
.meta-row b { color: var(--text); }

.app-card { margin-bottom: 16px; }
.app-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.app-head > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-user { font-size: 16px; }
.qq { color: var(--danger); font-family: ui-monospace, monospace; }

/* ---------- Comments ---------- */
.comments { list-style: none; padding: 0; margin: 0; }
.comment {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--surface-2);
}
.comment.is-admin { background: var(--brand-soft); border-color: #ccd7f7; }
.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  font-size: 13px;
}
.comment-body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.tag-admin {
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- Auth ---------- */
.auth-wrap { max-width: 420px; margin: 24px auto; }
.auth-wrap .card { padding: 24px; }
.auth-wrap h1 { text-align: center; }

.big-ok {
  width: 48px;
  height: 48px;
  line-height: 48px;
  border-radius: 50%;
  background: #eef7f1;
  color: var(--ok);
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 12px;
}
.auth-wrap .btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 20px 16px 32px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-inner { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 10px; }
  .nav-links { margin-left: 0; gap: 12px; }
  .hero { padding: 20px 16px; }
  .hero h1 { font-size: 20px; }
  .container { padding: 18px 12px 36px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
}
