* { box-sizing: border-box; }
body {
  margin: 0; font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f1216; color: #d7dde5;
}
a { color: #4ea1ff; text-decoration: none; }
a:hover { text-decoration: underline; }
header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: #161b22; border-bottom: 1px solid #232a33;
  position: sticky; top: 0; z-index: 5;
}
.brand a { font-size: 16px; font-weight: 600; color: #e6edf3; }
.brand .sub { margin-left: 8px; font-size: 12px; color: #6b7684; }
header nav a { margin-left: 16px; color: #a9b4c2; }
main { padding: 20px; max-width: 1500px; margin: 0 auto; }
h2 { margin: 0 0 14px; font-size: 20px; }
h3 { margin: 18px 0 8px; font-size: 15px; color: #c9d3df; }
footer { padding: 16px 20px 30px; color: #5f6a78; font-size: 12px; text-align: center; }

.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.inline { display: flex; gap: 8px; align-items: center; }
input, select, button {
  background: #161b22; color: #d7dde5; border: 1px solid #2c3540;
  border-radius: 6px; padding: 7px 10px; font-size: 13px;
}
input { min-width: 180px; }
button, .btn { cursor: pointer; background: #1f6feb; border-color: #1f6feb; color: #fff; }
button:hover { background: #2b7fff; }
.btn.tiny { padding: 3px 8px; font-size: 12px; }
.btn.revealed { background: #23303f; border-color: #2f3e50; font-family: ui-monospace, monospace; color: #7ee787; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin: 8px 0 22px; }
.cards.small { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 12px 0 16px; }
.card { background: #161b22; border: 1px solid #232a33; border-radius: 10px; padding: 12px 14px; }
.card .k { color: #8b97a6; font-size: 12px; }
.card .v { font-size: 22px; font-weight: 600; margin: 4px 0 2px; color: #e6edf3; }
.card .s { color: #6b7684; font-size: 12px; }
.card.warn { border-color: #5b4a1f; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

table.list { width: 100%; border-collapse: collapse; background: #12161c; border: 1px solid #232a33; border-radius: 8px; overflow: hidden; }
table.list th, table.list td { padding: 8px 10px; border-bottom: 1px solid #1e252e; text-align: left; vertical-align: top; }
table.list th { background: #161b22; color: #8b97a6; font-weight: 500; font-size: 12px; white-space: nowrap; }
table.list tr:hover td { background: #161d26; }
table.wide td { font-size: 13px; }
.ellipsis { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, monospace; }
.muted { color: #6b7684; }
.small { font-size: 12px; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #232a33; color: #a9b4c2; }
.pill.s1 { background: #3d2b12; color: #f0b35b; }
.pill.s2 { background: #123d2b; color: #57d98a; }
.pill.s3 { background: #1b2a4a; color: #6ea8ff; }
.pill.s4 { background: #262b31; color: #7d8894; }

.panel { background: #12161c; border: 1px solid #232a33; border-radius: 10px; padding: 14px 16px; margin: 10px 0; }
.panel.reply { border-left: 3px solid #2c3540; }
.panel.reply.admin { border-left-color: #2f81f7; }
.meta { display: flex; flex-wrap: wrap; gap: 14px; color: #8b97a6; font-size: 12px; margin-bottom: 8px; }
pre.content { white-space: pre-wrap; word-break: break-word; margin: 0; font-family: inherit; color: #c9d3df; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
form.login { background: #161b22; border: 1px solid #232a33; border-radius: 12px; padding: 30px; width: 320px; display: flex; flex-direction: column; gap: 12px; }
form.login h1 { margin: 0; font-size: 20px; }
form.login .muted { margin: 0; font-size: 12px; }
form.login input, form.login button { width: 100%; padding: 10px; }
.err { color: #ff7b72; font-size: 13px; }
