:root {
  /* Dark mode, white + gold theme */
  --bg: #0b0b0d;
  --panel: #141417;
  --panel-2: #1b1b20;
  --line: #2b2b32;
  --text: #f4f4f6;
  --muted: #9a9aa4;
  --accent: #e3b94a;        /* gold */
  --accent-ink: #1c1606;    /* dark text for on-gold surfaces */
  --very-high: #ff3b4e;
  --high: #ff8a3d;
  --elevated: #ffd23d;
  --low: #57c785;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif;
}
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.logo { font-weight: 800; letter-spacing: 1px; font-size: 18px; color: var(--text); text-decoration: none; }
.logo b { color: var(--accent); font-weight: 800; }
.tag {
  font-size: 12px; color: var(--bg); background: var(--accent);
  padding: 2px 8px; border-radius: 4px; font-weight: 700; text-transform: uppercase;
}
.meta { color: var(--muted); font-size: 13px; flex: 1; }
.notice { display: flex; align-items: center; justify-content: center; gap: 12px;
  background: rgba(227,185,74,.10); border-bottom: 1px solid var(--line);
  padding: 8px 16px; font-size: 13px; }
.notice[hidden] { display: none; }
.notice span { color: var(--muted); }
.notice-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; flex: 0 0 auto; }
.notice-x:hover { color: var(--text); }
.topctrl { display: flex; align-items: center; gap: 8px; }
.admin-state { color: var(--low); font-weight: 700; font-size: 12px; }
.btn {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px;
  padding: 8px 14px; font-weight: 700; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn:disabled { opacity: .5; cursor: default; }

.bands { display: flex; gap: 12px; padding: 16px 20px 4px; flex-wrap: wrap; }
.bandcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 16px; min-width: 120px; border-left: 4px solid var(--line);
}
.bandcard .n { font-size: 22px; font-weight: 800; }
.bandcard .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.bandcard.very-high { border-left-color: var(--very-high); }
.bandcard.high { border-left-color: var(--high); }
.bandcard.elevated { border-left-color: var(--elevated); }
.bandcard.low { border-left-color: var(--low); }
.bandcard.smurf { border-left-color: #b06bff; }

.layout { display: flex; gap: 16px; padding: 12px 20px 40px; align-items: flex-start; }
main { flex: 1; min-width: 0; }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.controls input[type=search], .controls select, .controls input[type=number] {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 7px 10px;
}
.controls input[type=search] { min-width: 200px; }
.minscore { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 13px; }
.minscore input { width: 64px; }
.count { color: var(--muted); margin-left: auto; }

.tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--panel-2); }
tbody tr.sel { background: #18222f; }
.pname { font-weight: 700; }
.psub { color: var(--muted); font-size: 12px; }
.score-pill {
  display: inline-block; min-width: 38px; text-align: center; font-weight: 800;
  padding: 2px 8px; border-radius: 6px; color: #0a0d12;
}
.score-pill.very-high { background: var(--very-high); }
.score-pill.high { background: var(--high); }
.score-pill.elevated { background: var(--elevated); }
.score-pill.low { background: var(--low); }
.reasons { color: var(--muted); font-size: 12.5px; }
.reasons li { margin: 1px 0; }
.reasons ul { margin: 0; padding-left: 16px; }

/* tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tab { background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  padding: 8px 20px; border-radius: 8px 8px 0 0; cursor: pointer; font-weight: 700; }
.tab.on { background: var(--panel-2); color: var(--text); border-bottom: 2px solid var(--accent); }

/* grade pills + big grade in detail */
.grade-pill { display: inline-block; padding: 2px 10px; border-radius: 6px; font-weight: 800;
  font-size: 12px; color: #0a0d12; white-space: nowrap; }
.grade-pill.confirmed, .grade-big.confirmed { }
.grade-pill.confirmed { background: var(--very-high); }
.grade-pill.extremely-likely { background: #ff5a3d; }
.grade-pill.likely { background: var(--high); }
.grade-pill.possible { background: var(--elevated); }
.grade-pill.unlikely { background: var(--low); color: #0a0d12; }
.grade-pill.smurf { background: #b06bff; }
.grade-pill.potential-smurf { background: transparent; color: #b06bff; border: 1px solid #b06bff; }
.grade-pill.banned { background: #2a2f3a; color: var(--very-high); border: 1px solid var(--very-high); }
.grade-big { font-size: 26px; font-weight: 800; margin: 2px 0; }
.grade-big.confirmed { color: var(--very-high); }
.grade-big.extremely-likely { color: #ff5a3d; }
.grade-big.likely { color: var(--high); }
.grade-big.possible { color: var(--elevated); }
.grade-big.unlikely { color: var(--low); }
.grade-big.smurf { color: #b06bff; }
.grade-big.likely-smurf { color: #b06bff; }
.grade-big.possible-smurf { color: #c79bff; }
.grade-big.banned { color: var(--very-high); }
/* cheating-confidence % */
.conf { margin-left: 7px; font-size: 11px; font-weight: 700; color: var(--muted); vertical-align: middle; }
.grade-col { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.conf-big { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.bandcard.confirmed { border-left-color: var(--very-high); }
.bandcard.extremely-likely { border-left-color: #ff5a3d; }
.bandcard.likely { border-left-color: var(--high); }
.bandcard.possible { border-left-color: var(--elevated); }
.bandcard.unlikely { border-left-color: var(--low); }
.why ul { margin: 4px 0 0; padding-left: 18px; }
.why li { margin: 3px 0; }

/* player profile page */
.profile { max-width: 940px; margin: 0 auto; padding: 20px; }
.profile-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.profile-head h1 { margin: 0; font-size: 28px; }
.profile-head .sub { color: var(--muted); margin-top: 4px; }
.pill-row { display: flex; gap: 6px; margin: 8px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat-n { font-size: 26px; font-weight: 800; }
.stat-l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.stat-s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.profile-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 12px 0; }
.profile-card h3 { margin: 0 0 10px; font-size: 15px; }
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { margin: 0; }
.range-tabs { display: flex; gap: 4px; }
.range-tabs button { background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.range-tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.profile-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.why-list { margin: 0; padding-left: 18px; } .why-list li { margin: 4px 0; }
.acct-line { margin-top: 10px; font-size: 13px; }
.links-list div { margin: 5px 0; font-size: 13px; }
.links-list a { color: #b06bff; }
.review.big { display: flex; gap: 6px; margin-bottom: 10px; }
.review.big button { padding: 6px 12px; }
.profile-actions { display: flex; gap: 10px; margin: 16px 0 40px; }
.elo-t { fill: var(--muted); font-size: 11px; }
@media (max-width: 720px) { .stat-grid, .profile-cols { grid-template-columns: 1fr; } }

/* interactive ELO chart */
.chart-wrap { position: relative; }
.elo-grid { stroke: var(--line); stroke-width: 1; }
.elo-pt { cursor: pointer; transition: r .1s ease; stroke: var(--bg); stroke-width: 1.5; }
.elo-pt:hover { r: 5.5; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; pointer-events: none;
  white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.55); z-index: 5; }
.tip-rs { font-weight: 800; }
.tip-g { font-size: 12px; font-weight: 700; }
.tip-t { color: var(--muted); font-size: 11px; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.chart-legend span::before { content: "●"; margin-right: 4px; }
.lbl { font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 700; }
.lbl.cheater { background: var(--very-high); color: #0a0d12; }
.lbl.legit { background: var(--low); color: #0a0d12; }
.lbl.unsure { background: var(--elevated); color: #0a0d12; }
.lbl.smurf { background: #b06bff; color: #0a0d12; }
.lbl.smurf-maybe, .lbl.possible-smurf { background: transparent; color: #b06bff; border: 1px solid #b06bff; }
.lbl.likely-smurf { background: #8a4bd6; color: #fff; }
.grade-pill.smurf { background: #b06bff; color: #0a0d12; }
.grade-pill.likely-smurf { background: #8a4bd6; color: #fff; }
.grade-pill.possible-smurf { background: transparent; color: #b06bff; border: 1px solid #b06bff; }
.lbl.reported { background: transparent; color: var(--high); border: 1px solid var(--high); }
.lbl.renamed { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.reported-text { color: var(--high); }
.bandcard.reported { border-left-color: var(--high); }
.bandcard.banned { border-left-color: var(--very-high); }
.score-pill.banned { background: #2a2f3a; color: var(--very-high); border: 1px solid var(--very-high); font-size: 11px; }
.banned-row { opacity: .8; }
.banned-row .pname { text-decoration: line-through; text-decoration-color: var(--very-high); }
.bigscore.banned-big { color: var(--very-high); font-size: 30px; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-start;
  justify-content: center; padding: 60px 16px; z-index: 50; overflow: auto; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: 560px;
  max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal .x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.modal-body { padding: 16px 18px; }
.modal-body label { display: block; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 6px; padding: 8px 10px; }
.modal-body h4 { margin: 16px 0 6px; }
.modal-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.report-warn { background: rgba(255,138,61,.12); border: 1px solid var(--high); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 6px 0 2px; }
.muted { color: var(--muted); }
.overview { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 12.5px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.overview > div { grid-column: span 2; }
.ins-row { display: grid; grid-template-columns: 1fr 70px 70px 90px; gap: 8px; align-items: center; font-size: 13px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.ins-row b { text-align: right; }
.ins-row .muted { text-align: right; }
.ins-head { color: var(--muted); font-size: 11px; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.ins-hot { color: var(--very-high); }
.ins-up { color: var(--very-high); font-size: 11px; font-weight: 700; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; cursor: pointer; }
.toggle input { width: auto; }
.set-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.set-row label { flex: 0 0 150px; margin: 0; color: var(--text); font-size: 13px; }
.set-row input { width: 90px; }

/* reports */
.reports-list { max-height: 60vh; overflow: auto; }
.rep { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.rep.reviewed { opacity: .65; } .rep.dismissed { opacity: .5; }
.rep.accepted { border-left: 3px solid var(--low); }
.rep.dismissed { border-left: 3px solid var(--muted); }
.reports-section { font-size: 14px; margin: 16px 0 6px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.rep-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-ev { margin: 8px 0; white-space: pre-wrap; font-size: 13px; color: var(--text);
  background: var(--panel-2); border-radius: 6px; padding: 8px; }
.rep-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rep-act button { background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 5px; padding: 4px 8px; cursor: pointer; font-size: 12px; }
.rep-act button:hover { border-color: var(--accent); }
.rep-act .deny-reason { flex: 1 1 220px; min-width: 180px; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); border-radius: 5px; padding: 5px 8px; font-size: 12px; }
.rep-deny { margin: 6px 0; font-size: 12.5px; font-style: italic; color: var(--muted); }
.detail-reports { margin: 12px 0; border-top: 1px solid var(--line); padding-top: 10px; }

/* sign-in / no-access gate */
.gate { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 20px; }
.gate[hidden] { display: none; }
.gate-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px; max-width: 460px; width: 100%; }
.gate-card .logo { font-size: 20px; margin-bottom: 16px; display: block; }
.gate-card label { display: block; color: var(--muted); font-size: 12px; margin: 12px 0 4px; }
.gate-card input { width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 8px 10px; }
.gate-card a.btn { display: inline-block; text-decoration: none; }

/* reviewer report panel + users panel */
#reviewer { max-width: 820px; margin: 0 auto; padding: 20px; }
.reports-head { display: flex; align-items: baseline; justify-content: space-between; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.user-row select { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 5px 8px; }

.review { display: flex; gap: 4px; }
.review button {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  border-radius: 5px; padding: 3px 7px; cursor: pointer; font-size: 12px;
}
.review button.on.cheater { background: var(--very-high); color: #0a0d12; border-color: var(--very-high); }
.review button.on.smurf { background: #b06bff; color: #0a0d12; border-color: #b06bff; }
.review button.on.legit { background: var(--low); color: #0a0d12; border-color: var(--low); }
.review button.on.unsure { background: var(--elevated); color: #0a0d12; border-color: var(--elevated); }

.detail {
  width: 360px; flex: 0 0 360px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px; position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow: auto;
}
.detail.empty .hint { color: var(--muted); }
.detail h2 { margin: 0 0 2px; font-size: 18px; }
.detail .sub { color: var(--muted); margin-bottom: 12px; font-size: 13px; }
.bigscore { font-size: 40px; font-weight: 800; line-height: 1; }
.contrib { margin: 12px 0; }
.contrib .row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; margin: 6px 0; align-items: start; }
.contrib .pts { font-weight: 800; color: var(--accent); }
.bar { height: 6px; background: var(--accent); border-radius: 3px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 4px 8px; font-size: 13px; margin: 10px 0; }
.kv .k { color: var(--muted); }
.links a { color: var(--accent); display: block; margin: 4px 0; font-size: 13px; }
.smurf-link { color: #b06bff; font-weight: 700; cursor: pointer; }
.smurf-link:hover { text-decoration: underline; }
footer { color: var(--muted); font-size: 12px; text-align: center; padding: 0 20px 30px; }
footer b { color: var(--text); }
.detail .review { margin: 12px 0; }
.detail .review button { padding: 6px 12px; }
.note { width: 100%; margin-top: 8px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 6px; padding: 8px; resize: vertical; }
