/* Logs page + player Flags tab: the game's event history (AdminEvents_v1), its anticheat / moderation flags
   (AdminFlags) and the panel's offline edits, all in the same rows. */

.head-note { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--faint); font-size: 12.5px; max-width: 680px; }
.head-note svg { width: 14px; height: 14px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; }
.head-stat { text-align: right; padding: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift); }
.head-stat .label { font: 500 11px/1.3 var(--display); text-transform: uppercase; letter-spacing: .13em; }
.head-stat b { display: block; margin-top: 3px; font: 500 26px/1.1 var(--display); letter-spacing: .005em; font-variant-numeric: tabular-nums; }

.logbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.logbar .grow { flex: 1; }
.logbar .input { width: 280px; }
.chips { position: relative; display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); width: 100%; }
.chip-tab { position: relative; flex: none; height: 40px; padding: 0 12px; background: none; border: 0; color: var(--sub); cursor: pointer; font: 600 13px var(--sans); white-space: nowrap; transition: color .15s; }
.chip-tab:hover { color: var(--text); }
.chip-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.chip-tab .count { margin-left: 7px; padding: 0 6px; height: 18px; display: inline-flex; align-items: center; border-radius: 9px; background: rgba(255, 236, 214, .05); font-size: 11px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.chip-tab.on { color: var(--text); }
.chip-tab.on .count { background: var(--accent-dim); color: var(--accent-hi); }
.chips:not(.has-ind) .chip-tab.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.chip-tab[hidden] { display: none; }

/* ----- filters, paging ----- */
.logfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.logfilters .input, .logfilters select { width: 168px; }
.logfilters .grow { flex: 1; min-width: 200px; }
.logfilters .dates { display: inline-flex; align-items: center; gap: 6px; }
.logfilters .dates[hidden] { display: none; }
.logfilters input[type=date] { width: 150px; color-scheme: dark; }
.logs-note { margin-bottom: 12px; }
.flag-panel.busy .flaglist { opacity: .5; transition: opacity .15s; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
.pager[hidden] { display: none; }
.pager .grow { flex: 1; }

/* ----- rows ----- */
.flag-panel { overflow: clip; }
.flaglist { list-style: none; margin: 0; padding: 0; }
.flag-cols, .flaglist .frow {
  display: grid; grid-template-columns: 18px 84px minmax(150px, 200px) minmax(0, 1fr) 80px 70px;
  column-gap: 14px; align-items: center; padding: 10px 16px;
}
.flaglist.no-user .frow { grid-template-columns: 18px 84px minmax(0, 1fr) 80px 70px; }
.flag-cols { position: sticky; top: var(--top); z-index: 2; border-bottom: 1px solid var(--line-2); background: var(--panel); border-radius: var(--radius-lg) var(--radius-lg) 0 0; font: 600 11px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.frow-sk { padding: 8px 16px; list-style: none; }
.frow { border-bottom: 1px solid var(--line); transition: background .12s; }
.frow:last-child { border-bottom: 0; }
.frow:hover { background: var(--hover); }
.frow.open { background: rgba(232, 112, 26, .05); }
.frow.enter { animation: rowIn 1.2s var(--ease); }
@keyframes rowIn { from { background: rgba(232, 112, 26, 0.12); } to { background: transparent; } }

/* severity: 1-3 small rising bars, red at 3 */
.sev { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sev i { width: 3px; background: var(--line-2); border-radius: 1px; }
.sev i:nth-child(1) { height: 5px; } .sev i:nth-child(2) { height: 8px; } .sev i:nth-child(3) { height: 12px; }
.sev.s1 i:nth-child(1) { background: var(--sub); }
.sev.s2 i:nth-child(-n+2) { background: var(--amber); }
.sev.s3 i { background: var(--red); }

.flag-time { min-width: 0; cursor: default; line-height: 1.35; }
.flag-time b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.flag-time span { font: 11.5px var(--mono); color: var(--faint); }
.flag-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.flag-names { display: grid; min-width: 0; line-height: 1.3; }
.flag-names b { font-weight: 500; }
.flag-names span { color: var(--faint); font-size: 12px; }
.flag-who:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.flag-main { min-width: 0; }
.flag-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.flag-tags .kc { height: auto; min-width: 0; padding: 0; border: 0; background: none; font: 500 12.5px var(--sans); color: var(--text); text-transform: capitalize; }
.flag-tags .kc.s3 { color: var(--red); }
.flag-type { font-size: 12px; color: var(--faint); }
.flag-type.t-cheat, .flag-type.t-exploit { color: var(--red); }
.flag-type.t-moderation { color: var(--amber); }
.flag-detail { color: var(--sub); font-size: 13px; line-height: 1.45; word-break: break-word; }
.flag-who.none { color: var(--faint); font-size: 12.5px; }
/* who did it, and what changed */
.flag-by { font-size: 12px; color: var(--faint); }
.flag-by b { color: var(--sub); font-weight: 500; }
.flag-by a:hover { text-decoration: underline; text-underline-offset: 3px; }
.flag-ba { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 2px; font: 12px var(--mono); color: var(--faint); }
.flag-ba .was { text-decoration: line-through; }
.flag-ba b { color: var(--text); font-weight: 500; }
.flag-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.flag-srv a { font-size: 12px; color: var(--sub); }
.flag-srv a:hover { text-decoration: underline; text-underline-offset: 3px; }
.flag-ev {
  justify-self: end; height: 24px; padding: 0 9px; border-radius: 6px; cursor: pointer; font: 600 12px var(--sans);
  color: var(--sub); background: var(--raise); border: 1px solid var(--line-2); transition: background .15s, color .15s, border-color .15s;
}
.flag-ev:hover { color: var(--text); background: #26201B; border-color: var(--line-3); }
.flag-ev[disabled] { opacity: .35; cursor: default; }
.frow.open .flag-ev { color: var(--accent-hi); border-color: rgba(232, 112, 26, .45); background: var(--accent-dim); }

/* evidence opens below the row */
.flag-data { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .2s var(--ease); }
.flag-data > div { min-height: 0; overflow: hidden; }
.frow.open .flag-data { grid-template-rows: 1fr; }
.flag-data .label { margin-top: 10px; }
.flag-data pre.json { margin-top: 6px; padding: 10px 12px; max-height: 320px; background: var(--field); border: 1px solid var(--line); border-radius: var(--radius); }

@media (max-width: 860px) {
  .flag-cols { display: none; }
  .flaglist .frow, .flaglist.no-user .frow {
    grid-template-columns: 14px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 6px; padding: 10px 12px;
    grid-template-areas: "sev who time" "sev main main" "sev srv ev" "data data data";
  }
  .flaglist.no-user .frow { grid-template-areas: "sev main time" "sev srv ev" "data data data"; }
  .frow .sev { grid-area: sev; align-self: start; margin-top: 4px; }
  .frow .flag-time { grid-area: time; text-align: right; align-self: start; }
  .frow .flag-who { grid-area: who; }
  .frow .flag-main { grid-area: main; }
  .frow .flag-srv { grid-area: srv; }
  .frow .flag-ev { grid-area: ev; }
  .frow .flag-data { grid-area: data; }
  .logbar .input { width: 100%; }
  .logbar .grow { display: none; }
  .logfilters .input, .logfilters select, .logfilters .dates { width: 100%; }
  .logfilters input[type=date] { flex: 1; width: auto; min-width: 0; }
  .flag-diff { grid-template-columns: 1fr; }
  .chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .head-stat { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .frow.enter { animation: none; } .flag-data { transition: none; } }
