:root {
  --bg: #0d1512;
  --panel: #142019;
  --panel-2: #1b2b22;
  --line: #263b30;
  --ink: #e6f0ea;
  --muted: #93a89c;
  --accent: #3fb27f;
  --accent-ink: #06231a;
  --danger: #e2705f;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.error { color: var(--danger); font-size: 14px; margin: 8px 0 0; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.auth { width: min(380px, 100%); }
.auth h1 { margin: 0 0 4px; font-size: 22px; }
.auth p.muted { margin: 0 0 20px; }
.auth button[type=submit] { width: 100%; margin-top: 18px; }

label { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); }
input, select {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px; font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  background: var(--accent); color: var(--accent-ink); border: 0;
  padding: 9px 16px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button.secondary { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); }
button.link { background: none; color: var(--muted); padding: 4px 6px; font-weight: 400; text-decoration: underline; }
button.link:hover { color: var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; }

header {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: .3px; }
.tag {
  margin-left: 8px; padding: 2px 7px; font-size: 11px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); border-radius: 20px; letter-spacing: .5px;
}
nav { display: flex; gap: 6px; }
.tab { background: none; color: var(--muted); font-weight: 500; }
.tab.active { background: var(--panel-2); color: var(--ink); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.role {
  padding: 2px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; color: var(--muted);
}

main { padding: 28px 24px 60px; max-width: 1100px; margin: 0 auto; }
h2 { font-size: 18px; margin: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
}
.tile h3 { margin: 0; font-size: 16px; }
.tile p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.tile .actions { display: flex; align-items: center; gap: 10px; }
.tile.locked { opacity: .55; }
.badge {
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted);
}
.badge.live, .badge.external { color: var(--accent); border-color: var(--accent); }

.user {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px;
}
.user .head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user .email { font-weight: 600; }
.user .actions { margin-left: auto; display: flex; gap: 8px; }
.user .mods { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mod {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px;
}
.mod select { width: auto; margin: 0; padding: 2px 6px; font-size: 12px; }
.inactive { color: var(--danger); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

table.audit { width: 100%; border-collapse: collapse; font-size: 13px; }
table.audit th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line); }
table.audit td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.audit td:first-child { white-space: nowrap; color: var(--muted); }

dialog {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; width: min(420px, 92vw);
}
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h3 { margin: 0 0 8px; font-size: 17px; }
