:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel2: #1c232c;
  --line: #2a3340;
  --text: #e6edf3;
  --muted: #8b96a5;
  --accent: #3b82f6;
  --green: #2ea043;
  --amber: #d29922;
  --red: #f85149;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
header.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; background: rgba(14,17,22,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top h1 { font-size: 16px; margin: 0; font-weight: 700; letter-spacing: .2px; }
header.top .sp { flex: 1; }
header.top .pill { font-size: 12px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; }
main { max-width: 1200px; margin: 0 auto; padding: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi .lab { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.kpi .val { font-size: 26px; font-weight: 700; margin-top: 6px; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { color: var(--muted); font-size: 12px; display: block; margin-bottom: 4px; }
input, select, button, textarea {
  font: inherit; color: var(--text); background: var(--panel2);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
button { cursor: pointer; background: #222b36; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: default; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tr:hover td { background: var(--panel2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); }
.tag.green { color: #3fb950; border-color: #1f6f36; }
.tag.amber { color: #e3b341; border-color: #6b5314; }
.tag.red { color: #ff7b72; border-color: #6e2b2b; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 18px; }
.chart .bar i { display: block; width: 100%; background: linear-gradient(180deg,#3b82f6,#1d4ed8); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .bar span { font-size: 10px; color: var(--muted); white-space: nowrap; transform: rotate(-45deg); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border-radius: 999px; padding: 6px 14px; }
.tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.hidden { display: none !important; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #1f2937; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 13px; z-index: 50; }
.toast.err { border-color: var(--red); color: #ffb4ab; }
.toast.ok { border-color: var(--green); color: #7ee787; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 60; }
.modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: min(520px, 92vw); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.auth-card { max-width: 420px; margin: 12vh auto 0; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }
.note { color: var(--muted); font-size: 12px; }
.member-shell { max-width: 560px; margin: 0 auto; }
.big-result { font-size: 15px; font-weight: 600; }

.pt-high { display: inline-block; color: #0b6b2e !important; background: #d7f5dd;
  border: 1px solid #7bd39a; border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.highbonus { display:inline-block; font-size:12px; color:#0b6b2e; background:#d7f5dd;
  border:1px solid #7bd39a; border-radius:999px; padding:2px 10px; margin-left:8px; }


/* ---- Backup acc table: gon, khong wrap, scroll ngang ---- */
#tab-backup .bk-scroll { width: 100%; overflow-x: auto; }
#tab-backup table { min-width: 1180px; table-layout: fixed; }
#tab-backup th, #tab-backup td { white-space: nowrap; font-size: 12px; padding: 6px 8px; vertical-align: middle; }
#tab-backup th { font-size: 11px; letter-spacing: .3px; }
#tab-backup td.ell { overflow: hidden; text-overflow: ellipsis; }
#tab-backup col.c-id { width: 60px; }
#tab-backup col.c-time { width: 92px; }
#tab-backup col.c-member { width: 62px; }
#tab-backup col.c-acc { width: 250px; }
#tab-backup col.c-user { width: 150px; }
#tab-backup col.c-email { width: 250px; }
#tab-backup col.c-nick { width: 150px; }
#tab-backup col.c-dev { width: 110px; }
#tab-backup col.c-flag { width: 92px; }
#tab-backup col.c-act { width: 70px; }
#tab-backup .bk-btn { padding: 2px 8px; height: 24px; white-space: nowrap; }
