:root {
  color-scheme: dark;
  --bg: #0f1216;
  --panel: #161b22;
  --line: #262d36;
  --text: #e6edf3;
  --muted: #9aa7b4;
  --accent: #4da3ff;
  --good: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }

h1 { font-size: 22px; margin: 0; }
h2 { font-size: 17px; margin: 32px 0 12px; font-weight: 600; }
h3 { font-size: 16px; margin: 0; }

.muted { color: var(--muted); font-weight: 400; font-size: 14px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.notes {
  background: #1b2a3a;
  border: 1px solid #2c4159;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.notes p { margin: 4px 0; overflow-wrap: anywhere; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card .label { color: var(--muted); font-size: 13px; }
.card strong { font-size: 19px; }
.card form { margin-top: 6px; }

.users { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.user {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--good); vertical-align: middle;
}

.figures { display: flex; gap: 20px; margin: 0; }
.figures dt { color: var(--muted); font-size: 12px; }
.figures dd { margin: 0; font-variant-numeric: tabular-nums; }

.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }

input[type=text], input[type=password] {
  background: #0d1117;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  width: 100%;
}
input:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  background: var(--accent);
  color: #08121e;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button.danger { background: transparent; color: var(--bad); border-color: #5a2a2a; }
button.small { padding: 6px 10px; font-size: 13px; font-weight: 500; }
button:hover { filter: brightness(1.1); }

details summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details[open] summary { margin-bottom: 8px; }

.qr {
  width: 200px; height: 200px;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
}

.inline { display: flex; gap: 8px; margin-bottom: 8px; }
.inline input { flex: 1; min-width: 0; }

.add {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.add input { flex: 1; min-width: 160px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
td { font-variant-numeric: tabular-nums; }

.gate {
  max-width: 340px;
  margin: 12vh auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gate label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }

@media (max-width: 520px) {
  .figures { gap: 14px; }
  .top h1 { font-size: 19px; }
}
