:root {
  --bg: #f5f6f8; --card: #fff; --text: #1c2430; --muted: #6b7686;
  --accent: #2563eb; --border: #dde2ea; --green: #16a34a; --red: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); }
nav { display: flex; gap: 14px; align-items: center; padding: 10px 20px;
  background: #101828; color: #fff; flex-wrap: wrap; }
nav a { color: #cbd5e1; text-decoration: none; }
nav a:hover { color: #fff; }
nav .brand { font-weight: 700; color: #fff; margin-right: 8px; }
nav .right { margin-left: auto; }
main { max-width: 1200px; margin: 20px auto; padding: 0 16px; }
h1 { font-size: 22px; }
table { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left;
  vertical-align: middle; }
th { background: #eef1f5; font-size: 13px; }
tr:last-child td { border-bottom: none; }
input, select, textarea { padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 6px; font: inherit; width: 100%; }
input.num { width: 90px; }
td input[type=checkbox] { width: auto; }
label { display: block; margin: 10px 0; font-size: 14px; }
button, .btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: #fff; cursor: pointer; font: inherit; text-decoration: none;
  color: var(--text); display: inline-block; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.link { background: none; border: none; color: #cbd5e1; padding: 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; margin: 14px 0; }
.row { display: flex; gap: 10px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.row input { width: auto; }
.filters { display: flex; gap: 8px; margin: 12px 0; }
.filters input, .filters select { width: auto; }
.inline { display: inline; }
.muted { color: var(--muted); }
.error { color: var(--red); }
.errorbox { border-color: var(--red); }
.clip { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #e2e8f0; }
.badge.green { background: #dcfce7; color: var(--green); }
.badge.red { background: #fee2e2; color: var(--red); }
.badge.gray { background: #e2e8f0; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.msg { max-width: 70%; padding: 8px 12px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--border); white-space: pre-wrap; }
.msg.out { align-self: flex-end; background: #e8f0fe; }
.msg .meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.reply textarea { margin-bottom: 8px; }
.login-box { max-width: 360px; margin: 60px auto; background: var(--card);
  padding: 24px; border-radius: 10px; border: 1px solid var(--border); }
code { background: #eef1f5; padding: 2px 6px; border-radius: 4px; font-size: 13px;
  word-break: break-all; }
