*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d1117;
  --sidebar-bg:  #161b22;
  --surface:     #1c2128;
  --border:      #30363d;
  --text:        #e6edf3;
  --muted:       #7d8590;
  --accent:      #6366f1;
  --accent-h:    #4f52d3;
  --green:       #3fb950;
  --red:         #f85149;
  --yellow:      #d29922;
  --blue:        #58a6ff;
  --purple:      #bc8cff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  height: 100vh;
  position: relative;
}
.layout.panel-open { grid-template-columns: 272px 1fr; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-header h1 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }

.endpoint-list { overflow-y: auto; flex: 1; }

.endpoint-item {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
  border-left: 3px solid transparent;
}
.endpoint-item:hover { background: rgba(99,102,241,.07); }
.endpoint-item.active {
  background: rgba(99,102,241,.12);
  border-left-color: var(--accent);
}

.ep-name { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.ep-desc { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ep-path {
  font-family: monospace;
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }

/* ── Main content ────────────────────────────────────────────────────────── */
.content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.content-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  min-height: 64px;
}

.placeholder { color: var(--muted); font-size: 14px; }

.header-title h2 { font-size: 15px; font-weight: 600; }
.header-url {
  font-family: monospace;
  font-size: 11.5px;
  color: var(--accent);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.refresh-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.refresh-label input { cursor: pointer; accent-color: var(--accent); }

/* ── Event list ──────────────────────────────────────────────────────────── */
.event-list { overflow-y: auto; flex: 1; }

.event-row {
  display: grid;
  grid-template-columns: 90px 68px 1fr 130px 90px;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .1s;
}
.event-row:hover { background: rgba(255,255,255,.03); }

.event-row.thead {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  cursor: default;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}
.event-row.thead:hover { background: var(--surface); }

.event-time { font-size: 12px; color: var(--muted); font-family: monospace; }
.event-preview {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-ip { font-size: 12px; color: var(--muted); font-family: monospace; }

/* ── Method badges ───────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.m-GET    { color: var(--green);  background: rgba(63,185,80,.12); }
.m-POST   { color: var(--blue);   background: rgba(88,166,255,.12); }
.m-PUT    { color: var(--yellow); background: rgba(210,153,34,.12); }
.m-PATCH  { color: var(--purple); background: rgba(188,140,255,.12); }
.m-DELETE { color: var(--red);    background: rgba(248,81,73,.12); }
.m-HEAD, .m-OPTIONS { color: var(--muted); background: rgba(125,133,144,.1); }

.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 1px 5px;
  border-radius: 3px;
}
.tag-on  { background: rgba(63,185,80,.15);  color: var(--green); }
.tag-off { background: rgba(125,133,144,.12); color: var(--muted); }
.tag-fwd { background: rgba(63,185,80,.1);   color: var(--green); }

/* ── Detail panel ────────────────────────────────────────────────────────── */
.detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 500px;
  background: var(--sidebar-bg);
  border-left: 1px solid var(--border);
  display: none;
  flex-direction: column;
  z-index: 50;
  box-shadow: -8px 0 32px rgba(0,0,0,.4);
}
.detail-panel.open { display: flex; }

.detail-content {
  overflow-y: auto;
  flex: 1;
  padding: 20px 20px 32px;
}

.detail-section { margin-bottom: 22px; }
.detail-section h3 {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.meta-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  font-size: 12.5px;
}
.meta-key { color: var(--muted); }
.meta-val { font-family: monospace; word-break: break-all; }

.headers-table { width: 100%; font-size: 11.5px; border-collapse: collapse; }
.headers-table td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.headers-table td:first-child {
  color: var(--muted);
  font-family: monospace;
  white-space: nowrap;
  width: 38%;
}
.headers-table td:last-child { font-family: monospace; word-break: break-all; }

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  color: #79c0ff;
  line-height: 1.5;
}

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

.forward-row { display: flex; gap: 8px; margin-top: 6px; }
.forward-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 13px;
}
.forward-row input:focus { outline: none; border-color: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-h); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background .1s;
}
.btn-secondary:hover { background: rgba(255,255,255,.05); }

.btn-sm {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  transition: all .1s;
  white-space: nowrap;
}
.btn-sm:hover { color: var(--text); border-color: var(--accent); }
.btn-sm.danger:hover { color: var(--red); border-color: var(--red); }

.close-btn {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  line-height: 1;
}
.close-btn:hover { background: var(--border); color: var(--text); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 460px;
  padding: 24px;
  position: relative;
}

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-header h2 { font-size: 17px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}
.required { color: var(--red); }
.form-group input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 13.5px;
  transition: border-color .1s;
}
.form-group input:focus { outline: none; border-color: var(--accent); }
.form-group small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.copy-field { display: flex; gap: 8px; }
.copy-field input { flex: 1; font-family: monospace; font-size: 12.5px; }

.btn-copy {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all .1s;
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }

.success-banner {
  background: rgba(63,185,80,.1);
  border: 1px solid rgba(63,185,80,.3);
  color: var(--green);
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  flex-wrap: wrap;
  min-height: 44px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-icon {
  position: absolute;
  left: 9px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
}

.search-wrap input[type="search"] {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 28px 5px 28px;
  color: var(--text);
  font-size: 12.5px;
  width: 220px;
  transition: border-color .15s, width .2s;
  -webkit-appearance: none;
}

.search-wrap input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  width: 280px;
}

.search-wrap input[type="search"]::-webkit-search-cancel-button { display: none; }

.search-clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  display: none;
}
.search-clear:hover { color: var(--text); }
.search-wrap.has-value .search-clear { display: block; }

.chips {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.chips + .chips {
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.chip {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.active {
  background: rgba(99,102,241,.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* Method-coloured active chips */
.chip.active[data-method="GET"]    { background: rgba(63,185,80,.1);  border-color: var(--green);  color: var(--green); }
.chip.active[data-method="POST"]   { background: rgba(88,166,255,.1); border-color: var(--blue);   color: var(--blue); }
.chip.active[data-method="PUT"]    { background: rgba(210,153,34,.1); border-color: var(--yellow); color: var(--yellow); }
.chip.active[data-method="PATCH"]  { background: rgba(188,140,255,.1);border-color: var(--purple); color: var(--purple); }
.chip.active[data-method="DELETE"] { background: rgba(248,81,73,.1);  border-color: var(--red);    color: var(--red); }

.filter-count {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  margin-left: auto;
}
.filter-count.filtered { color: var(--accent); font-weight: 600; }

.filter-clear-all {
  font-size: 11.5px;
  color: var(--red);
  border-color: rgba(248,81,73,.35);
}
.filter-clear-all:hover { background: rgba(248,81,73,.08); border-color: var(--red); color: var(--red); }

/* ── Empty / Loading ─────────────────────────────────────────────────────── */
.loading { padding: 20px; color: var(--muted); font-size: 13.5px; text-align: center; }
.empty-state { padding: 64px 24px; text-align: center; color: var(--muted); }
.empty-state h3 { font-size: 15px; color: var(--text); margin-bottom: 8px; }
.empty-state p  { font-size: 13px; }
.empty-state code {
  font-family: monospace;
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok  { border-color: rgba(63,185,80,.4); color: var(--green); }
.toast.err { border-color: rgba(248,81,73,.4);  color: var(--red); }

/* ── Auth page ───────────────────────────────────────────────────────────── */
body.auth-page {
  height: 100vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #08080f;
  background-image: radial-gradient(ellipse 100% 55% at 50% 0%, rgba(99,102,241,.13) 0%, transparent 70%);
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
  padding: 24px 16px;
}

.auth-card {
  background: #0d0d1a;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,.55);
}

/* Brand mark */
.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
}

.auth-bolt { font-size: 20px; }

.auth-brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.2px;
}

/* View headings */
.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.4px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

/* Input overrides for the auth card */
body.auth-page .form-group {
  margin-bottom: 16px;
}

body.auth-page .form-group label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}

body.auth-page .form-group input {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
}

body.auth-page .form-group input:focus {
  border-color: rgba(99,102,241,.55);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

.auth-error {
  font-size: 12.5px;
  color: var(--red);
  min-height: 18px;
  margin-bottom: 10px;
}

.btn-full {
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 4px;
}

/* Sign in / create account toggle */
.auth-toggle {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

.auth-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}
.auth-link:hover { color: #818cf8; text-decoration: underline; text-underline-offset: 3px; }
.auth-link.inline { float: right; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.auth-link.inline:hover { color: var(--text); text-decoration: none; }
.auth-link.block-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}
.auth-link.block-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.auth-hint {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.auth-hint strong { color: var(--text); }

/* Spacer for the first form-group inside the confirm-reset section */
.fp-confirm-first { margin-top: 20px; }

/* ── Endpoint header signing-secret row ──────────────────────────────────── */
.header-secret {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.secret-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.secret-input {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  width: 220px;
  flex-shrink: 1;
}

/* ── Signed-in email under the Webhooks title in the dashboard sidebar ─────── */
.signed-in-as {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* ── Stats cards ─────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
}
.stat-card-wide { grid-column: span 2; text-align: left; }
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-value-sm { font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
.stat-label {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

/* ── Sidebar dashboard / admin additions ─────────────────────────────────── */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 4px 7px;
  cursor: pointer;
  font-size: 14px;
  transition: background .12s;
}
.btn-icon:hover { background: rgba(255,255,255,.06); }

.sidebar-admin-link {
  display: none; /* shown by JS for users in the "admins" Cognito group */
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-admin-link a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .15s;
}
.sidebar-admin-link a:hover { color: var(--accent); }

/* ── Dashboard view (inside main content area) ───────────────────────────── */
.dashboard-wrap { padding: 0 24px 32px; }
.dashboard-heading { padding: 20px 24px 0; }
.dashboard-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin: 24px 0 12px;
}

/* ── Admin page layout ───────────────────────────────────────────────────── */
body.admin-page {
  height: auto;
  min-height: 100vh;
  display: block;
  background: var(--bg);
}
.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-brand { font-size: 15px; font-weight: 600; color: var(--text); }
.admin-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  background: rgba(99,102,241,.2);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,.35);
  border-radius: 4px;
  padding: 2px 7px;
}
.admin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-email { font-size: 12.5px; color: var(--muted); }

.admin-main {
  flex: 1;
  padding: 28px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ── Admin table ─────────────────────────────────────────────────────────── */
.admin-section { margin-top: 8px; }
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.admin-section-header h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.admin-table th.num,
.admin-table td.num { text-align: right; }
.admin-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(99,102,241,.05); }
.user-email-cell { font-weight: 500; }
.user-actions { display: flex; gap: 6px; justify-content: flex-end; }
.admin-events-mini td { padding: 6px 8px; font-size: 12px; }

/* ── Admin slide-in detail panel ─────────────────────────────────────────── */
.admin-detail-panel {
  position: fixed;
  top: 0; right: 0;
  width: 560px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  z-index: 100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.admin-detail-panel.open { transform: translateX(0); }
.admin-detail-inner {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 32px;
  position: relative;
}
.admin-detail-header { margin: 28px 0 20px; }
.admin-detail-email { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.admin-detail-uid { font-size: 11.5px; font-family: var(--mono, monospace); }
.admin-detail-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin: 0 0 12px;
}

/* ── Admin endpoint list (inside detail panel) ───────────────────────────── */
.admin-ep-list { display: flex; flex-direction: column; gap: 10px; }
.admin-ep-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.admin-ep-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-ep-top .ep-name { font-weight: 600; font-size: 13.5px; flex: 1; }
.admin-ep-events { font-size: 12px; color: var(--muted); margin-left: auto; }
.admin-ep-url { font-size: 12px; margin-top: 4px; }
.admin-ep-events-list { margin-top: 10px; }
.admin-ev-loading { padding: 8px 0; }
.admin-ev-empty   { padding: 6px 0 0; }
.admin-ev-err     { padding: 6px 0; }

/* ── Utility classes (CSP-safe replacements for inline styles) ───────────── */

/* Sidebar header button group */
.sidebar-header-actions { display: flex; gap: 6px; align-items: center; }

/* Event detail panel — top meta row */
.detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-right: 36px;
}
.detail-meta-date { font-size: 12px; color: var(--muted); }

/* Generic colour helpers */
.text-muted { color: var(--muted); }
.text-err   { color: var(--red); }

/* Search highlight mark */
mark {
  background: rgba(99,102,241,.35);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

/* JSON syntax highlighting (VS Code Dark+ palette) */
.jh-key   { color: #9cdcfe; } /* property names  — light blue */
.jh-str   { color: #ce9178; } /* string values   — salmon     */
.jh-num   { color: #b5cea8; } /* numbers         — pale green */
.jh-kw    { color: #569cd6; } /* true/false/null — blue       */
.jh-punct { color: #d4d4d4; } /* braces/brackets — light grey */

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
