/* The admin's game log (/admin-games.html). */
:root { --bg: #0e1a21; --surface: #16242d; --surface-2: #1d303b; --fg: #e6eef2; --muted: #9fb2bd; --line: #26404d; --gold: #e2c374; --good: #5fbf7f; --warn: #e0a24a; --bad: #e07a6c; --live: #6fb7e0; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
h1 { margin: 0; font: 700 24px Georgia, 'Times New Roman', serif; color: var(--gold); }
.ag-muted { color: var(--muted); margin: 4px 0 0; }
.ag-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.ag-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ag-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.ag-filters select, .ag-filters input { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; min-width: 120px; }
.ag-filters button, .ag-more { background: var(--gold); color: #2a2005; border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.ag-error { margin: 16px 20px; padding: 10px 12px; border-radius: 8px; background: rgba(224, 122, 108, .18); color: #ffd9d3; }
.ag-main { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px 20px 40px; align-items: flex-start; }
.ag-list { flex: 999 1 640px; min-width: 0; overflow-x: auto; }
.ag-detail { flex: 1 1 380px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.sel { background: var(--surface-2); }
tbody tr:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
td.t { white-space: nowrap; color: var(--muted); }
.g { font-weight: 700; white-space: nowrap; }
.g .s { color: var(--gold); }
.p { display: inline-block; margin: 0 6px 2px 0; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: 3px; }
.st { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.st.finished { background: rgba(95, 191, 127, .16); color: var(--good); }
.st.ended { background: rgba(224, 162, 74, .16); color: var(--warn); }
.st.interrupted { background: rgba(224, 122, 108, .16); color: var(--bad); }
.st.live { background: rgba(111, 183, 224, .16); color: var(--live); }
.ag-more { margin-top: 12px; }
.ag-detail h2 { margin: 0 0 4px; font: 700 18px Georgia, 'Times New Roman', serif; }
.ag-detail h3 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ag-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 0; }
.ag-detail dt { color: var(--muted); }
.ag-detail dd { margin: 0; }
.hand { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-word; }
.moves { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.moves li { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--line); }
.moves time { flex: none; width: 48px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.close { float: right; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 8px; padding: 2px 9px; cursor: pointer; font: inherit; }
