:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #e6e8eb;
  --text: #1f2329;
  --muted: #6b7280;
  --brand: #ff2442;
  --brand-dark: #d81b35;
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: #f0f1f3;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
  font-family: ui-monospace, Consolas, monospace;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logo {
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 13px;
  letter-spacing: 1px;
}
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--text); }
.nav a:hover { color: var(--brand); }
.nav a.active { color: var(--brand); font-weight: 600; }
.nav .logout { color: var(--muted); }
.wrap { max-width: 1080px; margin: 28px auto; padding: 0 20px; }
.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 28px 0 36px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.card.narrow { max-width: 520px; margin: 30px auto; }
h1 { font-size: 20px; margin: 0 0 10px; }
h2 { font-size: 18px; margin: 0 0 6px; }
.muted { color: var(--muted); margin: 0 0 14px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 13px; color: var(--muted); }
input[type="text"], input[type="password"], input[name="q"], input[name="url"], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 36, 66, .12);
}
textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 12px 0 18px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
button, .button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}
button.primary, .button.primary { background: var(--brand); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--brand-dark); text-decoration: none; }
button.ghost, .button.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}
button.ghost:hover, .button.ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
button.danger-ghost { background: #fff; border-color: #f3c2c2; color: var(--bad); }
.alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
}
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.alert.ok { background: #ecfdf3; border: 1px solid #b7ebc8; color: #0f7b3d; }
.alert.bad { background: #fef2f2; border: 1px solid #f5c2c2; color: #a61b1b; }
.alert.warn { background: #fffbeb; border: 1px solid #f7dfa5; color: #92610a; }
.hidden { display: none; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 6px; }
.status-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafbfc;
}
.status-item b { display: block; font-size: 14px; }
.status-item small { color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 auto; margin-top: 6px; }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
  font-size: 14px;
  color: var(--muted);
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #fafbfc; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fff8f9; }
.title-cell { max-width: 420px; }
.tag {
  display: inline-block;
  background: #fff0f2;
  color: var(--brand);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
}
.pager { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.detail { margin-top: 24px; border-top: 1px dashed var(--line); padding-top: 20px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.desc { white-space: pre-wrap; color: #333; }
.stats { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin: 12px 0; }
.stats b { color: var(--text); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.shot { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fafbfc; aspect-ratio: 3 / 4; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-head { display: flex; gap: 18px; align-items: flex-start; }
.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.meta { margin-top: 18px; font-size: 13px; color: var(--muted); }
.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
  .nav { flex-wrap: wrap; gap: 12px; }
  .filters { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; }
  .wrap { padding: 0 12px; }
  .card { padding: 20px 16px; }
}
