* { box-sizing: border-box; }

body {
  font-family: system-ui, sans-serif;
  background: #14151a;
  color: #e6e6e6;
  margin: 0;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 32px 0 12px; }

.login-box {
  max-width: 320px;
  margin: 80px auto;
  padding: 24px;
  background: #1e1f26;
  border-radius: 8px;
}

form { display: flex; flex-direction: column; gap: 8px; }

.filter-form {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  background: #1e1f26;
  padding: 12px;
  border-radius: 8px;
}

.filter-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #9aa0a6;
  flex-direction: row;
}

.user-form {
  max-width: 360px;
  background: #1e1f26;
  padding: 16px;
  border-radius: 8px;
}

.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

input, button {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #3a3b44;
  background: #26272f;
  color: #e6e6e6;
  font-size: 14px;
}

input[type="checkbox"] { width: auto; padding: 0; }

button { cursor: pointer; background: #3b5bdb; border: none; }
button:hover { background: #4c6ef5; }

.btn-ghost {
  background: transparent;
  border: 1px solid #3a3b44;
}
.btn-ghost:hover { background: #26272f; }

.btn-ghost-link {
  color: #9aa0a6;
  font-size: 13px;
  align-self: center;
}

.btn-danger {
  background: #c0392b;
}
.btn-danger:hover { background: #e74c3c; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #2a2b33;
}

td.nowrap { white-space: nowrap; }

code { font-size: 12px; color: #9aa0a6; }

.error { color: #ff6b6b; }
.success { color: #51cf66; }
.muted { color: #9aa0a6; }
.small { font-size: 11px; font-weight: normal; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #1e1f26;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar a { color: #c9cbd1; text-decoration: none; font-size: 14px; }
.topbar a:hover { color: #fff; }
.topbar .brand { font-weight: 700; color: #fff; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tab {
  padding: 6px 12px;
  border-radius: 999px;
  background: #1e1f26;
  color: #c9cbd1;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid #2a2b33;
}

.tab:hover { border-color: #4c6ef5; }
.tab.active { background: #3b5bdb; color: #fff; border-color: #3b5bdb; }
.tab .count { color: #9aa0a6; font-size: 11px; }
.tab.active .count { color: #d6dcff; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #26272f;
  border: 1px solid #3a3b44;
  font-size: 12px;
}

.pagination { display: flex; gap: 16px; margin-top: 16px; }
.pagination a { color: #4c6ef5; }

.invite-link-box {
  background: #16331f;
  border: 1px solid #2f6b45;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.link-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 6px;
}

.link-row input {
  flex: 1;
  font-family: monospace;
  font-size: 12px;
}

.invite-token {
  font-size: 11px;
  word-break: break-all;
}

.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #1e1f26; }

.sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-link:hover { color: #4c6ef5; }
.sort-arrow { font-size: 11px; color: #9aa0a6; }

.identifier {
  font-size: 12px;
  color: #d0d4d9;
  background: #26272f;
  padding: 2px 6px;
  border-radius: 4px;
}

td.data-preview, .data-preview {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

.back-link {
  display: inline-block;
  color: #9aa0a6;
  text-decoration: none;
  margin-bottom: 16px;
  font-size: 13px;
}
.back-link:hover { color: #fff; }

.detail-card {
  background: #1e1f26;
  border-radius: 10px;
  padding: 24px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.badge-lg { font-size: 14px; padding: 4px 12px; }

.detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 12px;
  column-gap: 12px;
  margin: 0 0 24px;
}

.detail-grid dt { color: #9aa0a6; font-size: 13px; }
.detail-grid dd { margin: 0; font-size: 14px; }

.btn-small { padding: 3px 8px; font-size: 12px; margin-left: 8px; }

.json-block {
  background: #14151a;
  border: 1px solid #2a2b33;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  overflow-x: auto;
  color: #c9cbd1;
}

.json-block-inline {
  margin: 4px 0 0;
  padding: 8px 10px;
  font-size: 12px;
}

.raw-data {
  margin-top: 8px;
}

.raw-data summary {
  cursor: pointer;
  color: #9aa0a6;
  font-size: 13px;
  margin-bottom: 8px;
}

.raw-data summary:hover { color: #fff; }
