:root {
  --bg: #f6f7f9; --panel: #ffffff; --text: #1d232b; --muted: #66707c; --line: #d9dde3;
  --accent: #2f6fd6; --accent-text: #ffffff; --danger: #c23b3b; --ok: #2c8a4b; --warn: #b7791f;
  --banner: #fdecec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d; --panel: #1c2128; --text: #e3e7ec; --muted: #9aa4b0; --line: #333b45;
    --accent: #5b93ec; --accent-text: #0d1117; --danger: #ec6b6b; --ok: #5cc57e; --warn: #e0a84a;
    --banner: #3a1f22;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, "Segoe UI", sans-serif; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
h1 { font-size: 17px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 10px; }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
label { display: block; margin-bottom: 10px; font-weight: 600; }
.hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input, textarea, select { display: block; width: 100%; margin-top: 4px; padding: 6px 8px; font: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; }
textarea { resize: vertical; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1 1 200px; }
button { font: inherit; padding: 6px 12px; border-radius: 5px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button.danger { color: var(--danger); border-color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { margin: 0; flex: 1; }
.section-head input { width: 200px; margin: 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.wrap { white-space: normal; min-width: 120px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
td select, .actions select { margin: 0; width: auto; }
.pill { padding: 1px 8px; border-radius: 10px; font-size: 12px; border: 1px solid currentColor; }
.s-invited { color: var(--muted); } .s-downloaded { color: var(--accent); } .s-activated { color: var(--ok); }
.s-expired { color: var(--warn); } .s-revoked { color: var(--danger); }
.status { min-height: 20px; margin-bottom: 10px; color: var(--muted); }
.status.error { color: var(--danger); }
.banner { background: var(--banner); color: var(--danger); border: 1px solid var(--danger); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; }
.result { border-top: 1px solid var(--line); padding: 8px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.result .what { flex: 1; min-width: 200px; }
dialog { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text);
  width: min(640px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
pre.mail { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
  padding: 8px; max-height: 320px; overflow: auto; font: 13px/1.4 ui-monospace, Consolas, monospace; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.choice { font-weight: 400; }
.choice input { display: inline; width: auto; margin: 0 6px 0 0; }
dialog { overflow-x: hidden; }
dialog form { max-width: 100%; }
dialog.wide { width: min(1000px, calc(100vw - 32px)); }
/* The tabs (the user, 2026-11-15) */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.count:not(:empty) { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent);
  color: var(--accent-text); font-size: 11px; text-align: center; }
.section-head select { width: auto; margin: 0; }
.choice.inline { margin: 0; }
.tag { display: inline-block; padding: 0 7px; margin: 1px 3px 1px 0; border-radius: 4px; background: var(--bg);
  border: 1px solid var(--line); font-size: 12px; }
button.link { padding: 0; border: 0; background: none; color: var(--accent); text-align: left; cursor: pointer; font: inherit; }
button.link:hover { text-decoration: underline; }
td.title { min-width: 280px; max-width: 520px; }
tr.detail td { background: var(--bg); }
tr.dim td { opacity: .55; }
.callsigns ol { margin: 4px 0; padding-left: 22px; }
.st-open { color: var(--danger); } .st-investigating { color: var(--warn); } .st-fixed { color: var(--ok); } .st-wont_fix { color: var(--muted); }
pre.content { max-height: 360px; }
img.shot { display: block; max-width: 100%; max-height: 420px; margin: 8px 0; border: 1px solid var(--line); border-radius: 5px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0 0 8px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
