:root {
  color-scheme: dark;
  --bg: #101418;
  --panel: #192027;
  --line: #303b45;
  --text: #edf2f6;
  --muted: #9aa8b4;
  --good: #45c486;
  --bad: #ff6f6f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, sans-serif;
}
main { max-width: 1400px; margin: auto; padding: 24px; }
h1, h2 { margin-top: 0; }
nav {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}
nav a, a.button {
  padding: 9px 13px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
nav a.active, a.button { background: #176aa9; }
.panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.entry {
  display: grid;
  grid-template-columns: 110px 1fr 1fr 100px auto;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
label { display: block; margin: 8px 0 4px; color: var(--muted); }
input, textarea, select, button {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #11171c;
  font: inherit;
}
textarea { min-height: 260px; font-family: ui-monospace, monospace; }
button { width: auto; cursor: pointer; background: #176aa9; }
button.danger { background: #6d2929; }
.token-prefix {
  min-height: 0;
  padding: 4px 7px;
  background: transparent;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.profile-filters {
  display: grid;
  grid-template-columns:
    minmax(140px, 0.7fr)
    minmax(260px, 1.25fr)
    minmax(220px, 1fr)
    auto;
  gap: 12px;
  align-items: end;
}
.profile-filters > div { min-width: 0; }
.filter-actions { display: flex; gap: 8px; align-items: end; }
.filter-actions .button {
  display: inline-flex;
  align-items: center;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.muted { color: var(--muted); }
.flash { border-radius: 7px; padding: 11px 14px; margin-bottom: 12px; }
.flash.success { background: #173c2d; }
.flash.error { background: #522626; }
code { color: #b9ddff; }
@media (max-width: 800px) {
  main { padding: 14px; }
  .grid, .fields, .entry, .profile-filters { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
