* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #1f2328;
}
.topbar {
  background: #1f2937;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-weight: 600; font-size: 16px; }
.topbar nav a {
  color: #cbd5e1;
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
}
.topbar nav a:hover, .topbar nav a.active { color: #fff; }
.topbar .logout { color: #f87171; text-decoration: none; font-size: 13px; }

.container { max-width: 880px; margin: 32px auto; padding: 0 20px; }

.card {
  background: #fff;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 17px; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-ok { background: #dcfce7; color: #16a34a; }
.status-bad { background: #fee2e2; color: #dc2626; }

label { display: block; font-size: 13px; color: #4b5563; margin: 14px 0 6px; font-weight: 500; }
input[type=text], input[type=password], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 200px; line-height: 1.6; }
.row { display: flex; gap: 16px; }
.row > div { flex: 1; }

button, .btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 18px;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: #1d4ed8; }
button.secondary { background: #6b7280; }
button.secondary:hover { background: #4b5563; }

.flash { padding: 12px 16px; border-radius: 7px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #dcfce7; color: #15803d; }
.flash-error { background: #fee2e2; color: #b91c1c; }

.login-wrap { max-width: 360px; margin: 100px auto; }

.topic-list { list-style: none; padding: 0; margin: 8px 0 0; }
.topic-list li {
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.log-box {
  background: #0f172a;
  color: #a5f3fc;
  padding: 16px;
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  max-height: 600px;
  overflow-y: auto;
  white-space: pre-wrap;
}
