:root {
  --bg: #111318;
  --panel: #1a1d24;
  --line: #2a2f3a;
  --text: #e6e8ec;
  --muted: #8b93a3;
  --accent: #5865f2;
  --ok: #3ba55d;
  --warn: #d9a400;
  --bad: #e5484d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: #8ea1ff; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9em; color: #c9cfdb; }
pre { margin: 0; white-space: pre-wrap; font: inherit; }
h1 { font-size: 1.4rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--text); }
.topbar nav { display: flex; gap: 1rem; flex: 1; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); }
.who { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.who img { width: 28px; height: 28px; border-radius: 50%; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { color: var(--text); }

main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.narrow { max-width: 520px; margin: 3rem auto; }
.center { text-align: center; }

.muted { color: var(--muted); }
.small { font-size: 0.9em; }
.notice { color: var(--ok); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font: inherit;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }

.status { font-size: 1.2rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.status .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.status-up .dot { background: var(--ok); }
.status-starting .dot { background: var(--warn); }
.status-down .dot { background: var(--bad); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.stats { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 1rem; }
.stats div { display: flex; flex-direction: column; }
.stats .num { font-size: 1.6rem; font-weight: 700; }
.stats .lbl { color: var(--muted); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
td.r, th.r { text-align: right; }
td.c, th.c { text-align: center; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.matrix { margin-bottom: 1rem; }
.matrix input { width: 18px; height: 18px; }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); margin-right: 0.5rem; }

.chips { list-style: none; padding: 0; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li { background: #252a35; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.85rem; }

.search { display: flex; gap: 0.5rem; }
.search input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font: inherit;
}

.profile { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.profile img { width: 64px; height: 64px; border-radius: 50%; }
.profile h1 { margin: 0; }

.ticket { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem; margin-bottom: 0.5rem; }
.ticket summary { cursor: pointer; }
.answers { margin: 0.75rem 0 0; }
.answers dt { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.answers dd { margin: 0; white-space: pre-wrap; }
