:root {
  --bg: #f6f7f9; --surface: #fff; --text: #17191c; --muted: #6b7280; --line: #e3e6ea;
  --accent: #2563eb; --accent-bg: #e8f0ff; --danger: #b42318; --danger-bg: #fdecea;
  --ok: #18794e; --ok-bg: #e6f6ed; --warn: #8a5a00; --warn-bg: #fff4d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317; --surface: #1a1d23; --text: #e8eaed; --muted: #9aa3af; --line: #2c313a;
    --accent: #7aa7ff; --accent-bg: #1c2b4a; --danger: #ff8f85; --danger-bg: #3a1c19;
    --ok: #6fd3a0; --ok-bg: #16301f; --warn: #f2c35a; --warn-bg: #3a2e10;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.pad { padding: 24px; }
.muted { color: var(--muted); }
header { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header h1 { font-size: 16px; font-weight: 600; margin: 0; }
header nav { display: flex; gap: 4px; }
header nav a { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
header nav a.on { background: var(--accent-bg); color: var(--accent); }
header .who { margin-left: auto; color: var(--muted); }
main { max-width: 1100px; margin: 0 auto; padding: 16px 24px 48px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: end; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
textarea { width: 100%; resize: vertical; min-height: 72px; }
button { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--danger); }
button:disabled { opacity: .6; cursor: default; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 500; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--bg); }
td.clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.pill.new { background: var(--warn-bg); color: var(--warn); }
.pill.accepted { background: var(--ok-bg); color: var(--ok); }
.pill.rejected { background: var(--danger-bg); color: var(--danger); }
.pill.unverified { background: var(--danger-bg); color: var(--danger); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; }
.card h2 { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 13px; }
.meta b { color: var(--text); font-weight: 500; }
.msg { display: flex; margin: 6px 0; }
.msg.out { justify-content: flex-end; }
.bubble { max-width: 75%; padding: 8px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.out .bubble { background: var(--accent-bg); border-color: transparent; }
.bubble small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { padding: 8px 12px; border-radius: 8px; background: var(--danger-bg); color: var(--danger); margin-bottom: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.error { color: var(--danger); margin-top: 8px; min-height: 20px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; color: var(--muted); }
code.key { display: block; padding: 10px; background: var(--bg); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
a { color: var(--accent); }
