/* Staff portal. Same palette and type as truecombat.eu, tuned for dense operational screens. */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin.woff2) format("woff2"); }
@font-face { font-family: "Saira Condensed"; font-weight: 600; font-display: swap; src: url(fonts/saira-condensed-600-latin.woff2) format("woff2"); }
@font-face { font-family: "Saira Condensed"; font-weight: 700; font-display: swap; src: url(fonts/saira-condensed-700-latin.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2"); }

:root {
  --bg: #0d1016; --panel: #141922; --panel-2: #1a202b; --line: #262e3b; --line-hi: #344055;
  --fg: #e8eaef; --muted: #9aa3b3; --dim: #6f7889;
  --red: #d63b3b; --red-hi: #ef5050; --amber: #e7a73c; --ok: #4fbf7a; --blue: #5b9bd5; --staff: #ff9914;
  --t-red: #e2574c; --t-blue: #5b9bd5;
  --f-display: "Saira Condensed", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", Consolas, monospace;
  --r: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 14px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--fg); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; letter-spacing: .02em; margin: 0; text-transform: uppercase; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; color: var(--muted); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--f-mono); font-size: 12px; }
.eyebrow { font: 600 12px var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: var(--red-hi); margin: 0 0 4px; }
.error { color: var(--red-hi); }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border: 1px solid var(--line-hi); border-radius: var(--r); background: var(--panel-2); color: var(--fg);
  font: 600 13px var(--f-body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); }
.btn-primary:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn-danger { border-color: #7a2a2a; color: #ffb4b4; }
.btn-small { min-height: 28px; padding: 0 10px; font-size: 12px; }
.btn-wide { width: 100%; min-height: 44px; font-size: 15px; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
input, select, textarea { width: 100%; min-height: 36px; padding: 7px 10px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line-hi); border-radius: var(--r); font: 14px var(--f-body); }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .06em; }
.check { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--fg); }
.check input { width: auto; min-height: 0; }

/* sign-in */
.signin { min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse at top, #1b2230 0%, var(--bg) 60%); }
.signin-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 32px; text-align: center; }
.signin-card h1 { font-size: 36px; margin-bottom: 8px; }
.signin-card p { margin: 0 0 20px; }
.signin-logo { margin-bottom: 12px; }
.signin-msg { background: #2a1717; border: 1px solid #5c2626; border-radius: var(--r); padding: 10px; color: #ffc9c9; }
.dev-login { margin-top: 16px; display: flex; gap: 10px; justify-content: center; font-size: 13px; flex-wrap: wrap; }

/* shell */
.app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100%; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; text-decoration: none; font: 600 17px var(--f-display); letter-spacing: .08em; }
.brand b { color: var(--red-hi); font-weight: 700; }
#nav { display: flex; flex-direction: column; padding: 8px; gap: 2px; flex: 1; overflow: auto; }
#nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: var(--r); text-decoration: none; color: var(--muted); font-weight: 500; }
#nav a:hover { background: var(--panel-2); color: var(--fg); }
#nav a.on { background: var(--panel-2); color: var(--fg); box-shadow: inset 3px 0 0 var(--red); }
.count { background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.me { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.me img { border-radius: 50%; grid-row: span 2; }
.me b { display: block; font-size: 13px; }
.me .link { grid-column: 1 / -1; justify-self: start; font-size: 12px; }
.role { font: 600 11px var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--staff); }
.main { padding: 24px 28px 48px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.panel + .panel { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: minmax(0, 1fr) 360px; }
.empty { color: var(--dim); padding: 18px 4px; text-align: center; }

/* server cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; text-decoration: none; display: block; position: relative; }
.card:hover { border-color: var(--line-hi); }
.card .title { font: 700 18px var(--f-display); letter-spacing: .03em; text-transform: uppercase; margin: 6px 0 2px; }
.card .meta { color: var(--muted); font-size: 13px; }
.card .big { font: 700 30px var(--f-display); margin-top: 10px; }
.card .big small { font-size: 15px; color: var(--muted); font-weight: 600; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font: 600 11px var(--f-display); letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line-hi); color: var(--muted); }
.tag.ok { color: var(--ok); border-color: #2b5c3d; }
.tag.warn { color: var(--amber); border-color: #6b5022; }
.tag.bad { color: var(--red-hi); border-color: #6b2a2a; }
.tag.staff { color: var(--staff); border-color: #6b4612; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--dim); margin-right: 6px; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.off { background: var(--red); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 600 11px var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.team-1 { box-shadow: inset 3px 0 0 var(--t-red); }
.team-2 { box-shadow: inset 3px 0 0 var(--t-blue); }
.pname { font-weight: 600; }
.pname a { text-decoration: none; }
.pname a:hover { text-decoration: underline; }
.flags { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }

/* chat */
.chat { display: flex; flex-direction: column; height: 560px; }
.chat-log { flex: 1; overflow-y: auto; font-size: 13px; padding-right: 4px; }
.chat-line { padding: 3px 0; border-bottom: 1px solid #1a2029; word-wrap: break-word; }
.chat-line time { color: var(--dim); font: 11px var(--f-mono); margin-right: 6px; }
.chat-line .who { font-weight: 600; margin-right: 4px; }
.chat-line.team .who::before { content: "(team) "; color: var(--muted); font-weight: 400; }
.chat-line.staff .who { color: var(--staff); }
.chat-line .srv { color: var(--dim); font-size: 11px; margin-right: 6px; text-transform: uppercase; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; }
.chat-page { height: calc(100vh - 140px); min-height: 400px; }

/* misc */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs .btn.on { border-color: var(--red); color: #fff; }
.search { display: flex; gap: 8px; max-width: 520px; }
.report-body { white-space: pre-wrap; font: 12px var(--f-mono); background: var(--bg); padding: 10px; border-radius: var(--r); max-height: 300px; overflow: auto; border: 1px solid var(--line); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--ok); }
.bar.warn > span { background: var(--amber); }
.bar.bad > span { background: var(--red); }
.stat { font: 700 26px var(--f-display); }

/* modal and toast */
.modal { position: fixed; inset: 0; background: rgba(5, 7, 10, .72); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal-card { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line-hi); border-radius: 10px; padding: 22px; max-height: 90vh; overflow: auto; }
.modal-card .muted { margin: 6px 0 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-hi);
  border-radius: var(--r); padding: 10px 16px; z-index: 30; max-width: min(560px, calc(100% - 32px)); box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.toast.bad { border-color: var(--red); }

@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } .chat { height: 420px; } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; }
  #nav { flex-direction: row; overflow-x: auto; }
  .nav-group { display: none; }
  .alert-item { grid-template-columns: minmax(0, 1fr); }
  #nav a { white-space: nowrap; }
  .main { padding: 16px; }
}
@media (max-width: 760px) {
  .me { grid-template-columns: auto 1fr auto; padding: 10px 16px; }
  .me img { grid-row: auto; }
  .me .link { grid-column: auto; }
  .row-actions .btn { min-height: 32px; }
  td, th { padding: 6px; }
}
.main:focus { outline: none; }

/* round two: nav groups, account, alerts, live map, suspicion, settings */
.nav-group { font: 600 10px var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); padding: 12px 12px 4px; }
.me-account { background: none; border: 0; padding: 0; color: var(--fg); text-align: left; cursor: pointer; font: inherit; }
.me-account:hover b { text-decoration: underline; }
.small { font-size: 12px; }
.code-input { font: 600 24px var(--f-mono); letter-spacing: .3em; text-align: center; margin-bottom: 14px; }
.banner { background: #2a2214; border: 1px solid #6b5022; color: #ffe2b0; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px;
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.event { background: #14222a; border-color: #23506b; color: #cfe8ff; }
.banner .mono { font-size: 14px; color: #fff; }
.sus { font: 700 12px var(--f-display); letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-hi); color: var(--muted); }
.sus.mid { color: var(--amber); border-color: #6b5022; }
.sus.high { color: #fff; background: #7a2020; border-color: var(--red); }
.score { font: 700 44px var(--f-display); line-height: 1; }
.score.mid { color: var(--amber); }
.score.high { color: var(--red-hi); }
.alert-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.alert-item:last-child { border-bottom: 0; }
.alert-item .when { color: var(--dim); font-size: 12px; }
.alert-item .text { white-space: pre-wrap; color: var(--muted); font-size: 13px; }
.livemap { position: relative; margin: 10px auto 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #0a0d12; }
.livemap img { display: block; width: 100%; height: auto; opacity: .85; }
.pin { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #0a0d12; }
.pin.t1 { background: var(--t-red); }
.pin.t2 { background: var(--t-blue); }
.pin.dead { opacity: .35; }
.pin.bot { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
.pin span { position: absolute; left: 12px; top: -5px; white-space: nowrap; font: 600 11px var(--f-body); color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ladder li:last-child { border-bottom: 0; }
.steps { color: var(--dim); font-size: 12px; }
.steps b { color: var(--fg); }
.toast .btn { margin-left: 12px; }
.secret { font: 600 15px var(--f-mono); letter-spacing: .12em; word-break: break-all; background: var(--bg); border: 1px solid var(--line); padding: 10px; border-radius: var(--r); }
.cvar-name { font: 12px var(--f-mono); color: var(--dim); }
.kept { color: var(--staff); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tiles .card { padding: 12px 14px; }
.text-block { white-space: pre-wrap; }
.chat-line.flagged { background: #2a1717; }
.chat-line .flag { color: var(--red-hi); font-size: 11px; margin-left: 6px; text-transform: uppercase; letter-spacing: .08em; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }

/* public appeal page */
.appeal { min-height: 100%; display: grid; place-items: start center; padding: 40px 16px; background: radial-gradient(ellipse at top, #1b2230 0%, var(--bg) 60%); }
.appeal-card { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.appeal-card h1 { font-size: 32px; margin: 6px 0 10px; }
.appeal-card .btn-wide { margin-top: 16px; }
.appeal-result { margin-top: 18px; padding: 14px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.appeal-result.ok { border-color: #2b5c3d; }
.appeal-result.bad { border-color: #6b2a2a; }
