:root {
  --bg: #0f1419;
  --card: #171e26;
  --text: #e8eef5;
  --muted: #8b9aab;
  --accent: #3d8bfd;
  --line: #273241;
  --ok: #3ecf8e;
  --warn: #f0b429;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2740, var(--bg));
  color: var(--text);
  min-height: 100vh;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 20px; }
.brand { letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-size: 12px; }
h1 { margin: 4px 0 0; font-size: 28px; font-weight: 650; }
.links { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.links a { color: var(--accent); }
a.btn {
  display: inline-block;
  background: var(--accent);
  color: white !important;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
}
.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code { font-size: 12px; color: var(--warn); }
h2 { margin-top: 0; font-size: 18px; }
.card {
  background: color-mix(in srgb, var(--card) 92%, black);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
label { display: grid; gap: 6px; margin: 10px 0; font-size: 13px; color: var(--muted); }
input, select, textarea, button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1218;
  color: var(--text);
  padding: 10px 12px;
}
button { background: var(--accent); border-color: transparent; cursor: pointer; color: white; font-weight: 600; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.linkish {
  background: transparent;
  border: none;
  color: var(--accent);
  padding: 0;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filters label { margin: 0; }
.layout { display: grid; grid-template-columns: 340px 1fr; gap: 14px; }
.list { max-height: 70vh; overflow: auto; padding: 8px; }
.item {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}
.item:hover, .item.active { background: #121922; border-color: var(--line); }
.item .title { font-weight: 600; margin-bottom: 4px; }
.item .meta { font-size: 12px; color: var(--muted); }
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #243041;
  margin-right: 6px;
}
.badge.new { background: #3a2a12; color: var(--warn); }
.badge.replied { background: #123526; color: var(--ok); }
.detail pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0d1218;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.replies { display: grid; gap: 8px; margin: 12px 0; }
.reply {
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  background: #121922;
  border-radius: 0 8px 8px 0;
}
textarea { width: 100%; min-height: 110px; resize: vertical; }
.actions { display: flex; gap: 8px; margin-top: 10px; }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .list { max-height: 40vh; }
}
