/* The admin page (admin/index.html), in the landing page's look (landing/landing.css): ink-black ground, thick ink
   outlines with hard offset shadows, the logo's slime colours as flat fills, Slime Queen headings over Rubik. Still a
   dense working tool: tables and forms stay compact, only the frame and the controls carry the style. */
@font-face { font-family: 'Slime Queen'; src: url('/assets/fonts/SlimeQueen-Regular.ttf') format('truetype'); unicode-range: U+0020, U+0041-005A, U+0061-007A; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('/assets/fonts/Rubik-latin.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  --ink: #110e19; --ink-2: #1c1729; --ink-3: #2a2340; --text: #f4efff; --dim: #b9b0d0;
  --lime: #b6ff2e; --cyan: #34e6ff; --pink: #ff3fa4; --orange: #ff7a1a; --violet: #8b5cff; --yellow: #ffd21a;
  --ok: #3ddc84; --bad: #ff4d6a; --warn: var(--yellow);
  --line: 3px; --pop: 5px; --r: 16px;
  --display: 'Slime Queen', 'Rubik', system-ui, sans-serif; --sans: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* (the old names admin.js's inline styles may still use) */
  --bg: var(--ink); --card: var(--ink-2); --muted: var(--dim); --a: var(--lime);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--text); font: 500 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
  background: radial-gradient(60vw 40vh at 85% -5%, rgba(139, 92, 255, .22), transparent 70%),
    radial-gradient(50vw 40vh at -5% 105%, rgba(182, 255, 46, .1), transparent 70%), var(--ink); background-attachment: fixed; }
code { background: var(--ink-3); padding: .05em .4em; border-radius: 6px; font-size: .92em; }
h1, h2 { margin: 0 0 .6em; font-weight: 400; font-family: var(--display); letter-spacing: .02em; line-height: 1; color: #fff;
  -webkit-text-stroke: .06em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink); }
h1 { font-size: 2.2em; }
h2 { font-size: 1.5em; color: var(--lime); }
.muted { color: var(--dim); }
.err { color: var(--bad); min-height: 1.2em; margin: .5em 0 0; font-weight: 700; }
a { color: var(--cyan); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* controls: pills with an ink outline and a hard shadow, like the landing page's buttons */
button, input, select { font: inherit; color: var(--text); }
button { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .55em 1.15em .5em; border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--lime); color: var(--ink); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; font-size: .85em; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: translate .12s, box-shadow .12s; }
button:hover:not(:disabled) { translate: -1px -1px; box-shadow: 4px 4px 0 var(--ink); }
button:active:not(:disabled) { translate: 2px 2px; box-shadow: 1px 1px 0 var(--ink); }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: var(--ink-3); color: var(--text); border-color: var(--ink); }
button.danger { background: var(--bad); color: #fff; }
button.small { padding: .3em .75em .28em; font-size: .75em; box-shadow: 2px 2px 0 var(--ink); }
input, select { min-width: 0; padding: .6em .85em; border: 2px solid var(--ink-3); border-radius: 12px; background: var(--ink); font-weight: 600; }
input::placeholder { color: #6f6789; }
input:focus, select:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(182, 255, 46, .18); }

/* the bar along the top */
.top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 1.1em; flex-wrap: wrap; padding: .6em 1.4em;
  background: rgba(17, 14, 25, .92); backdrop-filter: blur(8px); border-bottom: var(--line) solid var(--ink); box-shadow: 0 3px 0 var(--ink-3); }
.brand { display: flex; align-items: center; gap: .55em; }
.brand img { display: block; width: auto; height: 38px; }
.brand span { padding: .3em .7em .25em; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff; font: 900 .7em/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink); }
nav { display: flex; gap: .35em; flex-wrap: wrap; }
nav button { background: transparent; color: var(--dim); border-color: transparent; box-shadow: none; }
nav button:hover:not(:disabled) { translate: none; box-shadow: none; color: #fff; background: var(--ink-3); }
nav button.on, nav button.on:hover:not(:disabled) { background: var(--lime); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.host { margin-left: auto; color: var(--dim); font-size: .85em; font-weight: 700; }
main { max-width: 1240px; margin: 0 auto; padding: 1.6em 1.4em 3em; }

/* cards */
.card { position: relative; margin-bottom: 1.2em; padding: 1.1em 1.2em; overflow: auto; border: var(--line) solid var(--ink); border-radius: var(--r);
  background: var(--ink-2); box-shadow: var(--pop) var(--pop) 0 var(--ink-3); }
.narrow { max-width: 480px; margin: 9vh auto; padding: 1.8em; text-align: center; box-shadow: 8px 8px 0 var(--lime); }
.narrow p { margin: 0 0 1.2em; }
.login__logo { display: block; width: 240px; max-width: 80%; height: auto; margin: -.4em auto .6em; }
.row { display: flex; gap: .7em; margin-bottom: 1.1em; flex-wrap: wrap; align-items: center; }
.row input[type="search"] { flex: 1; min-width: 220px; }
#loginForm { display: flex; gap: .7em; }
#loginForm input { flex: 1; }

/* stats tiles: each in one of the slime colours, cycling */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .9em; margin-bottom: 1.3em; }
.tile { --t: var(--lime); position: relative; padding: .85em 1em .8em; border: var(--line) solid var(--ink); border-radius: var(--r); background: var(--ink-2); box-shadow: var(--pop) var(--pop) 0 var(--t); }
.tile:nth-child(5n+2) { --t: var(--cyan); } .tile:nth-child(5n+3) { --t: var(--pink); } .tile:nth-child(5n+4) { --t: var(--orange); } .tile:nth-child(5n+5) { --t: var(--violet); }
.tile b { display: block; font: 900 1.9em/1.05 var(--sans); color: var(--t); font-variant-numeric: tabular-nums; }
.tile small { color: var(--dim); font-weight: 700; font-size: .78em; letter-spacing: .06em; text-transform: uppercase; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 1.2em; }
.bars i { position: relative; flex: 1; min-width: 4px; max-width: 36px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--lime); }
.bars i:nth-child(even) { background: var(--cyan); }
.bars i:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; translate: -50% -6px; white-space: nowrap; padding: .25em .6em; border: 2px solid var(--ink); border-radius: 8px; background: var(--yellow); color: var(--ink); font: 800 .78em/1.2 var(--sans); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5em .65em; border-bottom: 2px solid var(--ink-3); vertical-align: top; }
th { color: var(--dim); font-weight: 800; font-size: .74em; letter-spacing: .1em; text-transform: uppercase; }
tr.pick { cursor: pointer; }
tr.pick:hover { background: var(--ink-3); }
tr.pick.on { background: rgba(182, 255, 46, .12); box-shadow: inset 4px 0 0 var(--lime); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: .12em .6em .08em; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink-3); font: 800 .74em/1.3 var(--sans); letter-spacing: .05em; }
.tag.bad { background: var(--bad); color: #fff; }
.tag.ok { background: var(--ok); color: var(--ink); }
.tag.warn { background: var(--yellow); color: var(--ink); }

/* one player */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.2em; align-items: start; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35em 1.1em; margin-bottom: 1em; }
.kv dt { color: var(--dim); font-weight: 700; }
.kv dd { margin: 0; word-break: break-all; }
.box { margin: .9em 0; padding: .9em 1em; border: 2px solid var(--ink-3); border-radius: 12px; background: rgba(17, 14, 25, .5); }
.box.danger { border-color: var(--bad); background: rgba(255, 77, 106, .07); }
.box .row { margin: .6em 0 0; }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 12px/1.45 ui-monospace, Consolas, monospace; color: var(--dim); }
details summary { margin: .7em 0; color: var(--dim); font-weight: 700; cursor: pointer; }

/* tickets */
.ticket { margin-bottom: .9em; padding: .9em 1.1em; border: var(--line) solid var(--ink); border-radius: var(--r); background: var(--ink-2); box-shadow: 4px 4px 0 var(--ink-3); }
.ticket header { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; margin-bottom: .45em; }
.ticket p { margin: .45em 0; white-space: pre-wrap; word-break: break-word; }
.ticket.done { opacity: .6; }
.notes { margin: .5em 0; padding-left: 1em; border-left: 3px solid var(--violet); color: var(--dim); }
.notes p { margin: .25em 0; }

/* the code form */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9em; margin-bottom: .8em; }
.grid label { display: flex; flex-direction: column; gap: .35em; color: var(--dim); font-size: .82em; font-weight: 800; letter-spacing: .04em; }

.toast { position: fixed; bottom: 1.4em; left: 50%; translate: -50% 0; z-index: 5; padding: .65em 1.3em; border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--lime); color: var(--ink); font-weight: 800; box-shadow: 4px 4px 0 var(--ink); }
.toast.bad { background: var(--bad); color: #fff; }

.dot { display: inline-block; width: .65em; height: .65em; margin-right: .45em; border: 2px solid var(--ink); border-radius: 50%; background: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: .4em; }
.chips span { padding: .15em .65em; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink-3); font-size: .85em; font-weight: 700; }

/* live: one heading per region when the site has several */
h2.region { margin: 1.4em 0 .7em; font-size: 1.6em; }
h2.region:first-child { margin-top: 0; }

@media (max-width: 800px) {
  .split, .two { grid-template-columns: 1fr; }
  .top { padding: .55em 16px; }
  main { padding: 1.2em 16px 3em; }
  .host { display: none; }
  /* the tabs scroll sideways in one row instead of wrapping under the logo */
  .top { flex-wrap: nowrap; gap: .7em; }
  nav { flex: 1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 4px 5px 2px; }
  nav button { flex: none; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
