/* Owlcade admin: the hub's Nocturne colours, system fonts, made for a laptop and fine on a phone. */
:root {
  --bg: #161826;
  --surface: #232532;
  --surface-2: #2b2e3d;
  --text: #e9e9ed;
  --muted: #9397ab;
  --accent: #9184d9;
  --accent-strong: #b5abfc;
  --line: color-mix(in srgb, #e9e9ed 14%, transparent);
  --danger: #e07a73;
  --ok: #6cc28a;
  --warn: #f0b45c;
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent-strong); }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 13px; margin: 8px 0 0; }

.top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; border-bottom: 1px solid var(--line); background: #1b1d2b;
  position: sticky; top: 0; z-index: 2;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand b { color: var(--accent-strong); }
.eyes { display: inline-flex; gap: 3px; }
.eyes span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 2.5px #1b1d2b; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--warn); color: #1b1d2b; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--surface-2); color: var(--text); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--accent); color: #161826; font-size: 12px; font-weight: 700; text-align: center; }
.who { margin-left: auto; display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 14px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-strong); font: inherit; cursor: pointer; text-decoration: underline; }

.main { max-width: 1180px; margin: 0 auto; padding: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.card.error { border-color: var(--danger); }
.gate { max-width: 440px; margin: 10vh auto 0; text-align: center; }
.gate .button { margin-top: 8px; }

.button {
  appearance: none; border: 0; border-radius: 9px; padding: 9px 16px; cursor: pointer;
  background: var(--accent); color: #161826; font: inherit; font-weight: 600;
}
.button:hover { background: var(--accent-strong); }
.button.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.button.ghost:hover { background: var(--surface-2); }
.button:disabled { opacity: .55; cursor: progress; }
.buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.more { display: block; margin: 14px auto 0; }

.bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px;
  padding: 5px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.chips.small .chip { font-size: 13px; padding: 4px 10px; }
.chips.small { margin-bottom: 10px; }
.search input {
  width: min(340px, 100%); padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit;
}
.search { flex: 0 1 340px; }
.note { margin: -4px 0 12px; color: var(--muted); }

.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.row:hover { border-color: var(--accent); }
.row-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.ref { font-variant-numeric: tabular-nums; }
.cat { color: var(--text); }
.game { color: var(--muted); }
.when { margin-left: auto; color: var(--muted); }
.excerpt { margin: 6px 0 2px; white-space: pre-line; overflow-wrap: anywhere; }
.from { margin: 0; color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.s-new { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.s-open { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent-strong); }
.s-done { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.s-dismissed { background: var(--surface-2); color: var(--muted); }

.back { margin: 0 0 6px; }
.back a { text-decoration: none; color: var(--muted); }
.title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.title h1 { margin: 0; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.meta { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.message.sent { padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 15px; }
.row-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-card p { margin: 0; color: var(--muted); }
textarea {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; resize: vertical;
}
textarea:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--muted); font-size: 14px; }
.notice { margin: 14px 0; padding: 10px 14px; border-radius: 9px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.notice.bad { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }

dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.errors { margin: 10px 0 0; padding: 10px; background: var(--bg); border-radius: 8px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.others { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td .fine { margin: 0; }

@media (max-width: 820px) {
  .top { padding: 10px 16px; gap: 10px; }
  .who { margin-left: 0; width: 100%; justify-content: space-between; }
  .main { padding: 16px; }
  .detail { grid-template-columns: 1fr; }
  .search { flex-basis: 100%; }
  .search input { width: 100%; }
  .when { margin-left: 0; }
}
