/* Admin console pages. One stylesheet, no scripts, no external assets (NFR-ADM-006). */
:root {
  --bg: #f4f1ea;
  --card: #fffdf8;
  --text: #292721;
  --muted: #6b665b;
  --line: #ddd7c9;
  --stripe: #f8f5ee;
  --focus: #9a6b1f;
  --good: #2f6b3a;
  --bad: #a3392b;
  --weak: #8a5a00;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a16;
    --card: #292721;
    --text: #f1ede3;
    --muted: #a9a394;
    --line: #45413a;
    --stripe: #2f2c26;
    --focus: #e0b060;
    --good: #8fcf9b;
    --bad: #f0958a;
    --weak: #e0b060;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Hiragino Sans", "Noto Sans JP", sans-serif;
}
a { color: inherit; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Top bar. */
.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  padding: 10px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 650; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 14px; flex: 1; }
.top nav a { color: var(--muted); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }
.who { display: flex; align-items: center; gap: 10px; margin: 0; }
.operator { color: var(--muted); font-size: 14px; }
button, .button {
  font: inherit;
  cursor: pointer;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}
button:hover, .button:hover { border-color: var(--text); }

main { padding: 20px; max-width: 1500px; margin: 0 auto; }
main.narrow { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; font-weight: 650; }
h2 { margin: 28px 0 8px; font-size: 18px; line-height: 1.3; font-weight: 650; }
h3 { margin: 20px 0 6px; font-size: 16px; font-weight: 650; }
.lead { margin: 0 0 14px; color: var(--muted); overflow-wrap: anywhere; }
.note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); font-weight: 400; font-size: 14px; }
.none { color: var(--muted); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.crumbs { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.notice, .warning { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.warning { border-color: var(--bad); }

/* Facts: a few numbers with their labels. */
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.facts > div { padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; min-width: 150px; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }
.facts dd .tag { font-size: 13px; font-weight: 400; }

/* An account's own fields. */
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 20px; margin: 8px 0; }
.fields > div { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.fields dt { color: var(--muted); flex: 0 0 45%; overflow-wrap: anywhere; }
.fields dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Tables. */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 6px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.data thead th { color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--stripe); }
table.data tbody th { font-weight: 600; }
table.data tbody tr:last-child > * { border-bottom: 0; }
table.data td { max-width: 420px; overflow-wrap: anywhere; }
table.data td.text { max-width: 640px; }
table.data .number { text-align: right; font-variant-numeric: tabular-nums; }
table.data .time { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.links tr.first > * { border-top: 2px solid var(--line); }
details summary { cursor: pointer; }
details pre {
  margin: 6px 0 0;
  padding: 8px;
  max-width: 640px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--stripe);
  border-radius: 8px;
  font: 13px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Tags. */
.tag { display: inline-block; padding: 0 7px; margin: 0 2px 2px 0; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; white-space: nowrap; }
.tag.weak { border-color: var(--weak); color: var(--weak); }
.tag.proven { border-color: var(--good); color: var(--good); }
.bond { display: block; }

/* Filters, tabs and section lists. */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0; }
.filters label { color: var(--muted); font-size: 14px; }
.filters input, .filters select { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text); }
.filters a[aria-current], .sections a[aria-current] { font-weight: 650; text-decoration: none; }
.filters .sep { color: var(--muted); margin-left: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 14px 0 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 6px 0; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.sections { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.sections a { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: var(--card); }
.sections a:hover, .sections a[aria-current] { border-color: var(--text); }
.sections a.empty { color: var(--muted); }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }
.pager { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; color: var(--muted); font-size: 14px; }
