/* Voxelcraft admin v3 — fleet operations console. Neutral dark surface, table density,
   status colour used only for status. The game skin lives on the landing page. */
:root {
  color-scheme: dark;
  --bg: #0b0c0e; --panel: #131519; --panel-2: #191c21; --panel-3: #21252b; --sunken: #0e1013;
  --line: #262a31; --line-2: #333941;
  --ink: #e8eaed; --ink-2: #a9b0b9; --muted: #6f7883;
  --brand: #6abe30; --brand-d: #4e8f22; --brand-ink: #0d1a06;
  --good: #3fb950; --crit: #f85149; --warn: #d29922; --info: #58a6ff;
  --grid: #21252b; --axis: #333941; --border: var(--line);
  /* chart series, validated on the dark surface */
  --s1: #6abe30; --s2: #58a6ff; --s3: #f0883e; --s4: #a371f7; --s5: #2dd4bf;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  --pixel: var(--mono);
  --pad: 12px;          /* card padding, driven by the density switch */
  --rowpad: 5px 9px;    /* table cell padding */
  --shell: 1760px;
  --radius: 8px;
}
:root.dense { --pad: 9px; --rowpad: 3px 8px; }
:root.wide { --shell: none; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--info); }
h2 { font-size: 12px; font-weight: 650; letter-spacing: .02em; margin: 0 0 9px; color: var(--ink); }
h3 { font-size: 11.5px; font-weight: 650; margin: 0 0 7px; color: var(--ink-2); }
.sub { color: var(--muted); font-size: 12px; }
code { font-family: var(--mono); background: var(--sunken); border: 1px solid var(--line); padding: 0 4px; border-radius: 4px; font-size: 11.5px; color: var(--ink-2); }
.hide { display: none !important; }
.mono { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.grow { flex: 1 1 160px; } .spacer { flex: 1 1 auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
::selection { background: rgba(106,190,48,.28); }

/* ---- top bar: identity, scope, search, health ------------------------------ */
.banner { position: sticky; top: 0; z-index: 30; background: rgba(11,12,14,.88);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.banner .binner { max-width: var(--shell); margin: 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 46px; }
.banner h1 { font-size: 13.5px; font-weight: 700; margin: 0; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.banner h1 .g { color: var(--brand); }
.banner h1::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px;
  background: var(--brand); border-radius: 2px; transform: rotate(45deg) translateY(-1px); }
.banner .tag { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34ch; }
.banner .live { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.banner .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.banner .live.ok i { background: var(--good); box-shadow: 0 0 0 3px rgba(63,185,80,.15); }

/* global search trigger (⌘K) */
.omni { display: inline-flex; align-items: center; gap: 7px; min-width: 210px; height: 27px; padding: 0 8px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: 7px; color: var(--muted);
  font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.omni:hover { border-color: var(--line-2); color: var(--ink-2); }
.omni kbd { margin-left: auto; font: 10.5px var(--mono); color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; }

/* scope: whole fleet ⇄ one node */
.scopebox { position: relative; }
.scopebtn { display: inline-flex; align-items: center; gap: 7px; height: 27px; max-width: 260px; padding: 0 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 7px; color: var(--ink);
  font: inherit; font-size: 12px; cursor: pointer; }
.scopebtn:hover { border-color: var(--line-2); }
.scopebtn .sc-k { color: var(--muted); font-size: 11px; }
.scopebtn .sc-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.scopebtn::after { content: ""; }
.scopebtn::after, .srvpickbtn .cv { border: 4px solid transparent; border-top: 5px solid var(--muted); border-bottom: 0; }
.scopemenu { position: absolute; top: 32px; left: 0; z-index: 40; width: 320px; max-height: 60vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 9px; padding: 5px;
  box-shadow: 0 16px 44px rgba(0,0,0,.6); }
.scopemenu .sm-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 7px 8px 4px; }
.scopeitem { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.scopeitem:hover, .scopeitem.cur { background: var(--panel-3); color: var(--ink); }
.scopeitem .nm { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scopeitem .cnt { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- shell ----------------------------------------------------------------- */
.shell { max-width: var(--shell); margin: 0 auto; display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.side { width: 208px; flex: 0 0 208px; position: sticky; top: 60px; max-height: calc(100vh - 74px); overflow: auto; }
.main { flex: 1 1 auto; min-width: 0; }
.navbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px; }
.navlbl { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 9px 9px 4px; display: flex; gap: 6px; }
.navitem { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 6px; cursor: pointer;
  color: var(--ink-2); user-select: none; font-size: 12.5px; }
.navitem:hover { background: var(--panel-2); color: var(--ink); }
.navitem.on { background: var(--panel-3); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
/* ⚠ An icon that is a CHARACTER is an empty box wherever the machine's fonts lack it — six of
   the nine used here are tofu on a plain Linux box. The icons are real pack PNGs instead,
   off the same /textures_minecraft/ route the item pickers already read. */
.navitem .ic { width: 15px; flex: 0 0 15px; height: 15px; font-size: 0;
  background: center/14px 14px no-repeat; image-rendering: pixelated; opacity: .58; }
.navitem.on .ic { opacity: 1; }
.ic[data-ic="__home"] { background-image: url(/textures_minecraft/assets/minecraft/textures/item/spyglass.png); }
.ic[data-ic="__fleet"] { background-image: url(/textures_minecraft/assets/minecraft/textures/block/beacon.png); }
.ic[data-ic="__players"] { background-image: url(/textures_minecraft/assets/minecraft/textures/item/armor_stand.png); }
.ic[data-ic="__audit"] { background-image: url(/textures_minecraft/assets/minecraft/textures/item/writable_book.png); }
.ic[data-ic="__dash"] { background-image: url(/textures_minecraft/assets/minecraft/textures/item/clock_00.png); }
.ic[data-ic="__worlds"] { background-image: url(/textures_minecraft/assets/minecraft/textures/item/filled_map.png); }
.ic[data-ic="__mods"] { background-image: url(/textures_minecraft/assets/minecraft/textures/block/crafting_table_front.png); }
.ic[data-ic="__metrics"] { background-image: url(/textures_minecraft/assets/minecraft/textures/block/observer_front.png); }
.ic[data-ic="__ops"] { background-image: url(/textures_minecraft/assets/minecraft/textures/block/redstone_lamp_on.png); }
.ic[data-ic="__market"] { background-image: url(/textures_minecraft/assets/minecraft/textures/item/emerald.png); }
.ic[data-ic="world"], .navitem.world .ic { background-image: url(/textures_minecraft/assets/minecraft/textures/block/grass_block_side.png); }
.navitem.world.temp .ic { background-image: url(/textures_minecraft/assets/minecraft/textures/block/glass.png); }
/* The same sprites outside the sidebar (the Ctrl-K palette lists the very same places). */
.ic { width: 15px; flex: 0 0 15px; height: 15px; font-size: 0;
  background: center/14px 14px no-repeat; image-rendering: pixelated; }
.navitem .nm { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navitem .cnt { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.navitem.on .cnt { color: var(--ink-2); }
.navitem .cnt.alert { color: var(--crit); font-weight: 700; }

/* ---- cards, tiles, notices ------------------------------------------------- */
.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--pad); margin-bottom: 12px; overflow-wrap: anywhere; }
.view { display: none; } .view.on { display: block; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 12px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.grid-dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 12px; align-items: start; }
.grid-dash > .card { margin-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px; min-width: 0; }
.tile .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .v { font-size: 21px; font-weight: 600; line-height: 1.2; margin-top: 5px; color: var(--ink);
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: -.02em; }
.tile .v.warn { color: var(--warn); } .tile .v.crit { color: var(--crit); } .tile .v.good { color: var(--good); }
.tile .n { color: var(--muted); font-size: 11px; margin-top: 3px; }
.section-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.section-head h2 { margin: 0; }
.notice { padding: 8px 11px; border: 1px solid var(--line); border-left: 3px solid var(--info); border-radius: 6px;
  background: rgba(88,166,255,.06); color: var(--ink-2); font-size: 12.5px; }
.notice.warn { border-left-color: var(--warn); background: rgba(210,153,34,.07); }
.notice.crit { border-left-color: var(--crit); background: rgba(248,81,73,.09); color: #ffd5d2; }
.empty { color: var(--muted); padding: 12px 8px; }
.msg { margin-top: 7px; font-size: 12px; min-height: 15px; }
.msg.ok { color: var(--good); } .msg.err { color: var(--crit); } .msg.info { color: var(--muted); }

/* ---- tables ---------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .05em; padding: 5px 9px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
  position: sticky; top: 0; background: var(--panel); z-index: 1; }
td { padding: var(--rowpad); border-bottom: 1px solid var(--grid); vertical-align: middle; }
tbody tr:last-child td, tr:last-child td { border-bottom: none; }
tr.me td { background: rgba(106,190,48,.05); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--panel-2); }
tr.sel td { background: rgba(88,166,255,.09); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink-2); }
th.sortable::after { content: ""; }
th.sortable.asc::after { content: " ↑"; color: var(--brand); }
th.sortable.desc::after { content: " ↓"; color: var(--brand); }
.scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.scroll.tall { max-height: 62vh; overflow-y: auto; }
.actions { white-space: nowrap; } .actions button { margin: 1px 3px 1px 0; }

/* ---- controls -------------------------------------------------------------- */
button { font: inherit; font-size: 12px; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; white-space: nowrap; }
button:hover:not(:disabled) { background: var(--panel-3); border-color: #454c56; }
button:active:not(:disabled) { background: var(--sunken); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .navitem:focus-visible {
  outline: 2px solid var(--info); outline-offset: 1px; }
button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 650; }
button.primary:hover:not(:disabled) { background: #79cf3c; border-color: #79cf3c; }
button.danger { color: var(--crit); border-color: rgba(248,81,73,.4); }
button.danger:hover:not(:disabled) { background: rgba(248,81,73,.12); border-color: var(--crit); }
button.sm { padding: 2px 8px; font-size: 11.5px; }
button.tgl.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 650; }
button.link { background: none; border: none; color: var(--info); padding: 0; }
button.link:hover { background: none; text-decoration: underline; }
button.icon { padding: 3px 7px; color: var(--ink-2); }
input, select, textarea { max-width: 100%; font: inherit; font-size: 12.5px; background: var(--sunken); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px; min-width: 0; }
input::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: #4a5462; outline: none; }
textarea { width: 100%; min-height: 70px; resize: vertical; }
input[type=checkbox] { accent-color: var(--brand); }
.field { min-width: 0; }
.field label, .field .lab { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.field input, .field select, .field textarea { width: 100%; }
.field .help { color: var(--muted); font-size: 11px; margin-top: 3px; }
.field.wide { grid-column: 1 / -1; }
details.field > summary { list-style: none; color: var(--muted); padding: 4px 0; }
details.field > summary::-webkit-details-marker { display: none; }
details.field > summary::before { content: ""; display: inline-block; margin-right: 6px;
  border: 4px solid transparent; border-left: 5px solid var(--line-2); border-right: 0; }
details.field[open] > summary::before { border: 4px solid transparent; border-top: 5px solid var(--line-2); border-left-width: 4px; border-right-width: 4px; border-bottom: 0; }
details.field > summary:hover { color: var(--ink-2); }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.cfg-grid { display: grid; grid-template-columns: 150px 1fr; gap: 7px 12px; align-items: center; max-width: 700px; }
.gr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 18px; }
.gr-grid h3 { grid-column: 1 / -1; margin: 10px 0 2px; }
.gr-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 4px; border-radius: 4px; }
.gr-row .gr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-row input[type=number] { width: 90px; }
.gr-row.changed { background: rgba(255, 200, 60, .14); }
.con-out { margin: 10px 0 0; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; min-height: 1.4em; }
.cfg-grid .lab { color: var(--ink-2); font-size: 12.5px; }
.toolbar { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 9px; }
.toolbar .grow { min-width: 140px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.tabs { display: inline-flex; gap: 2px; background: var(--sunken); border: 1px solid var(--line); border-radius: 7px; padding: 2px; flex-wrap: wrap; }
.tabs button { background: transparent; border: none; padding: 2px 9px; border-radius: 5px; color: var(--muted); font-size: 11.5px; }
.tabs button.on { background: var(--panel-3); color: var(--ink); font-weight: 600; }
.tabs button:hover { background: var(--panel-2); color: var(--ink); }
.filters button.on { background: rgba(106,190,48,.15); color: var(--brand); }
.switch { position: relative; width: 32px; height: 17px; border-radius: 9px; background: var(--panel-3); border: 1px solid var(--line-2); cursor: pointer; flex: 0 0 32px; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); transition: left .12s, background .12s; }
.switch.on { background: var(--brand-d); border-color: var(--brand-d); } .switch.on::after { left: 17px; background: #fff; }
.switch:disabled { opacity: .45; cursor: default; }

/* ---- pills, chips, badges, status dots ------------------------------------- */
.pill { display: inline-block; font-size: 10.5px; line-height: 1.5; padding: 0 6px; border-radius: 5px;
  border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; vertical-align: middle; font-weight: 600; }
.pill.acc, .pill.ok { color: var(--good); border-color: rgba(63,185,80,.4); background: rgba(63,185,80,.1); }
.pill.guest, .pill.warn { color: var(--warn); border-color: rgba(210,153,34,.4); background: rgba(210,153,34,.1); }
.pill.host { color: #e3b341; border-color: rgba(227,179,65,.4); background: rgba(227,179,65,.1); }
.pill.region, .pill.info { color: var(--info); border-color: rgba(88,166,255,.4); background: rgba(88,166,255,.1); }
.pill.crit { color: var(--crit); border-color: rgba(248,81,73,.4); background: rgba(248,81,73,.1); }
.pill.off { color: var(--muted); background: var(--panel-2); }
.pills { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 1px 4px 1px 8px; margin: 0 4px 4px 0; font-size: 12px; }
.chip button { padding: 0 5px; font-size: 11px; background: none; border: none; }
.chip.tg { cursor: pointer; padding-right: 8px; }
.chip.tg.on { border-color: rgba(106,190,48,.5); background: rgba(106,190,48,.12); color: var(--brand); }
.chip.tg.busy { opacity: .5; }
.badge { display: inline-block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 0 6px; font-size: 11px; color: var(--ink-2); margin-right: 4px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--muted); }
.dot.on { background: var(--good); }
/* status dot for node/world rows: colour + a ring so it reads without colour vision */
.sdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--muted); }
.sdot.up { background: var(--good); box-shadow: 0 0 0 3px rgba(63,185,80,.14); }
.sdot.down { background: var(--crit); box-shadow: 0 0 0 3px rgba(248,81,73,.16); }
.sdot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(210,153,34,.16); }
.sdot.busy { background: var(--info); box-shadow: 0 0 0 3px rgba(88,166,255,.16); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.facts { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 3px 10px; margin: 7px 0; font-size: 12px; }
.facts .fk { color: var(--muted); } .facts .fv { min-width: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.user-location { display: block; margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; font-size: 11.5px; }
.origin { display: flex; gap: 4px; flex-wrap: wrap; }
.whead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.whead .wt { font-size: 15px; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
/* inline capacity meter inside a table cell */
.meter { display: inline-block; width: 46px; height: 4px; background: var(--panel-3); border-radius: 2px; overflow: hidden; vertical-align: middle; margin-left: 7px; }
.meter i { display: block; height: 100%; background: var(--brand); }
.meter i.hi { background: var(--warn); } .meter i.full { background: var(--crit); }

/* ---- fleet: KPI strip, node table, bulk bar -------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.kpi { background: var(--panel); padding: 10px 13px; min-width: 0; }
.kpi .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.kpi .v { font-size: 23px; font-weight: 600; line-height: 1.15; margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .n { color: var(--muted); font-size: 11px; margin-top: 3px; }
.kpi.crit .v { color: var(--crit); } .kpi.warn .v { color: var(--warn); } .kpi.good .v { color: var(--good); }
.regionbars { display: grid; gap: 7px; }
.regionbar { display: grid; grid-template-columns: 92px 1fr auto; gap: 9px; align-items: center; font-size: 12px; }
.regionbar .rb-n { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.regionbar .rb-t { height: 7px; background: var(--sunken); border-radius: 3px; overflow: hidden; display: flex; }
.regionbar .rb-t i { display: block; height: 100%; }
.regionbar .rb-v { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }
/* incident feed: what is broken right now, newest/worst first */
.incidents { display: flex; flex-direction: column; gap: 6px; }
.incident { display: flex; align-items: center; gap: 9px; padding: 7px 10px; background: var(--panel-2);
  border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 6px; cursor: pointer; }
.incident:hover { background: var(--panel-3); }
.incident.crit { border-left-color: var(--crit); }
.incident .i-n { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incident .i-d { color: var(--muted); font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.incident .i-t { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
/* bulk-action bar above the node table */
.bulkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 10px; margin-bottom: 9px;
  background: rgba(88,166,255,.09); border: 1px solid rgba(88,166,255,.3); border-radius: 6px; font-size: 12.5px; }
.bulkbar b { color: var(--info); }
.nodetbl td { white-space: nowrap; }
.nodetbl td.wrap { white-space: normal; }
.nodetbl .n-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nodetbl .n-name .nn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.nodetbl .n-dom { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.nodetbl .n-err { color: var(--crit); font-size: 11.5px; }
/* the row is wide enough to scroll sideways; its actions must not scroll away */
.nodetbl td:last-child, .nodetbl th:last-child { position: sticky; right: 0; z-index: 2;
  background: var(--panel); box-shadow: -8px 0 12px -8px rgba(0,0,0,.7); }
.nodetbl tr.click:hover td:last-child { background: var(--panel-2); }
.nodetbl input[type=checkbox] { vertical-align: middle; }

/* ---- charts ---------------------------------------------------------------- */
.chart { position: relative; min-height: 56px; }
.chart svg { display: block; width: 100%; height: auto; touch-action: none; }
.chart .tip { position: absolute; pointer-events: none; background: var(--panel-3); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 5px 8px; font-size: 11.5px; white-space: nowrap; opacity: 0; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.chart .tip .t { color: var(--muted); display: block; margin-bottom: 2px; }
.chart .tip .r { display: flex; align-items: center; gap: 6px; } .chart .tip .r b { color: var(--ink); } .chart .tip .r span { color: var(--ink-2); }
.chart .tip .r i { display: inline-block; width: 10px; height: 2px; border-radius: 1px; }
.chart .legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); margin-top: 4px; }
.chart .legend i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 5px; }
.chart .legend.bars i { height: 8px; width: 8px; border-radius: 2px; }
.chart .cempty { color: var(--muted); font-size: 12px; padding: 20px 8px; text-align: center; }
.chart.stale svg { opacity: .5; }
.chartnote { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 12px; }
.chart-grid > .card { margin-bottom: 0; }

/* ---- map ------------------------------------------------------------------- */
.maphead { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.mapwrap { position: relative; background: var(--sunken); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
#map { display: block; width: 100%; height: 420px; touch-action: none; cursor: grab; } #map.drag { cursor: grabbing; }
.maphint { position: absolute; left: 10px; bottom: 8px; font-size: 11px; color: var(--muted); pointer-events: none; text-shadow: 0 1px 2px #000; }
.maplegend { position: absolute; right: 10px; top: 8px; display: flex; gap: 10px; font-size: 11px; color: #ddd; text-shadow: 0 1px 2px #000; pointer-events: none; }
.maplegend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }

/* ---- rooms / nodes / mods cards -------------------------------------------- */
.roomgrid, .modgrid { display: grid; gap: 10px; }
.roomgrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.modgrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.roomcard, .modcard { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); }
.roomcard:hover, .modcard:hover { border-color: var(--line-2); }
.roomcard .title, .modcard .title { color: var(--ink); font-weight: 650; font-size: 13.5px; }
.modcard.off { opacity: .65; } .modcard .desc { color: var(--ink-2); font-size: 12px; margin: 5px 0; }
.modcard .cmds { display: flex; gap: 4px; flex-wrap: wrap; margin: 5px 0; }
.remote-rooms { margin: 10px 0; padding-top: 9px; border-top: 1px solid var(--line); }
.remote-room { margin-top: 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--sunken); }
.remote-room summary { padding: 7px 9px; cursor: pointer; color: var(--ink-2); overflow-wrap: anywhere; }
.remote-room[open] summary { border-bottom: 1px solid var(--line); }
.remote-room-body { padding: 9px; }
.remote-mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 5px; margin: 7px 0 9px; }
.remote-mod { display: flex; align-items: flex-start; gap: 7px; min-width: 0; padding: 5px 7px; border: 1px solid var(--line);
  border-radius: 5px; background: var(--panel-2); color: var(--ink-2); font-size: 12px; }
.remote-mod input { flex: 0 0 auto; margin-top: 3px; } .remote-mod span { min-width: 0; overflow-wrap: anywhere; }
.coverbox { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.coverpreview { width: 66px; height: 66px; flex: 0 0 66px; display: grid; place-items: center; border: 1px solid var(--line-2);
  border-radius: 6px; background: var(--sunken); color: var(--muted); font-size: 10px; overflow: hidden; }
.coverpreview img { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; }
.logbox { max-height: 380px; overflow: auto; background: var(--sunken); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 10px; margin: 0; font: 11.5px/1.5 var(--mono); white-space: pre-wrap; color: var(--ink-2); }
.logbox .warn { color: var(--warn); } .logbox .error { color: var(--crit); } .logbox .ts { color: var(--muted); }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 9px; }
.rl-box { border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); padding: 9px; font-size: 12px; }
.rl-box b { color: var(--ink); } .rl-box .rl-row { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); padding: 2px 0; }

/* ---- items: icons, picker, inventory --------------------------------------- */
.itm { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.itm img { width: 20px; height: 20px; image-rendering: pixelated; flex: 0 0 20px; object-fit: contain; }
.itm .ibadge { display: inline-grid; place-items: center; width: 20px; height: 20px; font-size: 8px; font-family: var(--mono);
  color: var(--muted); border: 1px dashed var(--line-2); border-radius: 4px; }
.itm .iname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itm .icnt { color: var(--muted); font-variant-numeric: tabular-nums; }
.inv { display: grid; grid-template-columns: repeat(auto-fill, 38px); gap: 4px; }
.inv .slot { width: 38px; height: 38px; position: relative; background: var(--sunken); border: 1px solid var(--line-2); border-radius: 4px; display: grid; place-items: center; }
.inv .slot img { width: 27px; height: 27px; image-rendering: pixelated; object-fit: contain; }
.inv .slot .ibadge { font-size: 7px; font-family: var(--mono); color: var(--muted); text-align: center; overflow: hidden; padding: 2px; word-break: break-all; }
.inv .slot .c { position: absolute; right: 2px; bottom: 0; font-size: 10.5px; color: #fff; text-shadow: 1px 1px 0 #000; font-variant-numeric: tabular-nums; }
.itemrows { display: flex; flex-direction: column; gap: 6px; }
.itemrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.itemrow .pickbtn { min-width: 180px; justify-content: flex-start; display: inline-flex; align-items: center; gap: 6px; text-align: left; }
.itemrow input[type=number] { width: 76px; }
.picker { width: min(460px, 100%); }
.picker .plist { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--sunken); margin-top: 8px; }
.picker .prow { display: flex; align-items: center; gap: 8px; padding: 5px 8px; cursor: pointer; border-bottom: 1px solid var(--grid); }
.picker .prow:hover, .picker .prow.on { background: rgba(88,166,255,.12); }
.picker .prow .pid { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-left: auto; }

/* ---- command palette (⌘K) --------------------------------------------------- */
.cmdk { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: flex; justify-content: center; padding: 12vh 16px 16px; }
.cmdkbox { width: min(600px, 100%); max-height: 62vh; display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 24px 64px rgba(0,0,0,.7); overflow: hidden; }
.cmdkbox input { border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
  padding: 13px 14px; font-size: 14px; }
.cmdkbox input:focus { border-color: var(--line); }
.cmdklist { overflow: auto; padding: 5px; }
.cmdkgrp { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 9px 4px; }
.cmdkrow { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.cmdkrow.on { background: var(--panel-3); color: var(--ink); }
.cmdkrow .cr-i { width: 15px; text-align: center; color: var(--muted); font-size: 11px; }
.cmdkrow .cr-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdkrow .cr-s { color: var(--muted); font-size: 11px; white-space: nowrap; }
.cmdkfoot { border-top: 1px solid var(--line); padding: 6px 12px; color: var(--muted); font-size: 11px; display: flex; gap: 14px; }

/* ---- modal, drawer, toasts -------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.66); }
.modalbox { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 15px; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
.modalbox .field { margin-top: 10px; }
.drawer-bg { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(760px, 100%); background: var(--panel);
  border-left: 1px solid var(--line-2); box-shadow: -16px 0 48px rgba(0,0,0,.6); display: flex; flex-direction: column; }
.drawer .dhead { padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.drawer .dhead .dname { font-size: 14px; font-weight: 650; color: var(--ink); }
.drawer .dtabs { padding: 7px 14px 0; border-bottom: 1px solid var(--line); }
.drawer .dbody { padding: 12px 14px; overflow: auto; flex: 1 1 auto; }
.drawer .dbody .card { background: var(--panel-2); }
.toasts { position: fixed; right: 14px; bottom: 14px; z-index: 60; display: flex; flex-direction: column; gap: 7px; max-width: min(420px, calc(100vw - 28px)); }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--info); border-radius: 6px;
  padding: 8px 12px; font-size: 12.5px; box-shadow: 0 10px 28px rgba(0,0,0,.5); animation: tin .12s ease-out; }
.toast.ok { border-left-color: var(--good); } .toast.err { border-left-color: var(--crit); }
@keyframes tin { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.gate { max-width: 420px; margin: 12vh auto; }

/* ---- misc ------------------------------------------------------------------- */
.byhour { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; align-items: end; height: 68px; margin-top: 8px; }
.byhour i { display: block; background: var(--s2); border-radius: 2px 2px 0 0; min-height: 2px; }
.byhour i:hover { background: #79b8ff; }
.byhour-lbl { display: grid; grid-template-columns: repeat(24, 1fr); font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.byhour-lbl span:nth-child(3n+2), .byhour-lbl span:nth-child(3n) { visibility: hidden; }
.kv { display: inline-flex; gap: 6px; align-items: baseline; margin-right: 14px; }
.kv b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; } .kv span { color: var(--muted); font-size: 11.5px; }
.setfield { display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto; gap: 7px 12px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--grid); }
.setfield .sk { color: var(--ink-2); font-size: 12.5px; } .setfield .sk small { display: block; color: var(--muted); font-size: 11px; }
.setfield .sv input:not([type=checkbox]), .setfield .sv select, .setfield .sv textarea { width: 100%; max-width: 420px; }
.setfield .so { color: var(--muted); font-size: 11px; white-space: nowrap; }
.setfield.ovr .sk::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin-right: 5px; vertical-align: 1px; }


/* ---- server context bar ---------------------------------------------------- */
/* Every server-scoped page (worlds, mods, metrics, process) is stamped with the
   server it belongs to, so a mod or a world never floats free of its owner. */
.srvbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.srvbar .srv-n { font-weight: 650; font-size: 13px; letter-spacing: -.01em; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srvbar .srv-m { color: var(--muted); font-size: 11.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srvtabs { flex: 0 0 auto; max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
.srvtabs button { white-space: nowrap; }
.navlbl.srv { align-items: center; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: 11.5px;
  font-weight: 650; border-top: 1px solid var(--line); margin-top: 5px; padding-top: 10px; }
.navlbl.srv .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navlbl.srv .sdot { flex: 0 0 8px; }

/* ---- headroom card: the one number the overview exists to show -------------- */
.headroom { padding: 0; overflow: hidden; }
.hr-main { display: flex; align-items: center; gap: 18px; padding: 16px 18px; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(106,190,48,.06), transparent); }
.hr-num { font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--brand);
  font-variant-numeric: tabular-nums; }
.hr-num.warn { color: var(--warn); } .hr-num.crit { color: var(--crit); }
.hr-txt { min-width: 0; flex: 1 1 220px; }
.hr-t { font-size: 14px; font-weight: 600; color: var(--ink); }
.hr-gauge { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
/* headroom trend: sparkline + delta, this server's own recorded history */
.hr-trend { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.hr-trend svg { display: block; }
.hr-trend .hr-tv { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hr-trend .hr-tl { font-size: 10.5px; color: var(--muted); }
.hr-gauge .hg { width: 88px; height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.hr-gauge .hg i { display: block; height: 100%; background: var(--brand); }
.res-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.resm { background: var(--panel); padding: 10px 14px; min-width: 0; }
.resm .rk { display: flex; align-items: baseline; gap: 6px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; }
.resm .rk b { margin-left: auto; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums;
  text-transform: none; letter-spacing: 0; }
.resm .rt { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; margin: 7px 0 5px; display: flex; }
.resm .rt i { display: block; height: 100%; background: var(--brand); }
.resm .rt i.hi { background: var(--warn); } .resm .rt i.full { background: var(--crit); }
.resm .rn { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }

/* ---- player skin viewer ---------------------------------------------------- */
/* The real skin PNG, nearest-neighbour and cropped to the model's regions — never a
   drawn stand-in. The face layers head + hat exactly the way the game does. */
.skinbox { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.skinfig { position: relative; flex: 0 0 auto; width: 128px; height: 256px; background: var(--sunken);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.skinfig .sp, .skinface .sp { position: absolute; image-rendering: pixelated; background-repeat: no-repeat; }
.skinface { width: 72px; height: 72px; flex: 0 0 72px; position: relative; background: var(--sunken);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.skinmeta { min-width: 0; flex: 1 1 170px; }
/* player row: face beside the name */
.nameline { display: flex; align-items: center; gap: 9px; min-width: 0; }
.nameline .skinface { border-radius: 4px; }
.skinmeta .srow { margin-top: 9px; display: flex; gap: 7px; flex-wrap: wrap; }
.skinerr { color: var(--muted); font-size: 12px; padding: 10px 0; }

/* ---- server picker: the section's subject, chosen in place ------------------- */
.srvpick { position: relative; border-top: 1px solid var(--line); margin-top: 5px; padding-top: 7px; }
.srvpickbtn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 7px;
  color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; text-align: left; }
.srvpickbtn:hover { border-color: #454c56; background: var(--panel-3); }
.srvpickbtn .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srvpickbtn .cv { font-size: 0; }
.srvpickmenu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 9px; padding: 5px; box-shadow: 0 16px 44px rgba(0,0,0,.6); }
/* a section this server cannot serve yet reads as unavailable, not as broken */
.navitem.na, .srvtabs button.na { opacity: .42; }
.navitem.na .nm::after, .srvtabs button.na::after { content: " *"; color: var(--warn); }
.view.gapped { display: none !important; }

/* ---- mobile: off-canvas nav ------------------------------------------------ */
.burger { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 34px; height: 30px;
  padding: 0 8px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 7px; cursor: pointer; }
.burger i { display: block; height: 2px; border-radius: 1px; background: var(--ink-2); }
.sidebg { display: none; position: fixed; inset: 0; z-index: 34; background: rgba(0,0,0,.55); }
.sidebg.on { display: block; }

/* Eight status tiles in one row read as seven cramped ones plus an orphan, so on a
   wide screen they lay out four across and the last row stays a whole row. */
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .grid-dash { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .burger { display: flex; }
  .shell { padding: 10px; gap: 0; }
  /* The sidebar leaves the flow entirely: on a phone it is a drawer, not a column. */
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 268px; max-width: 84vw; max-height: none;
    z-index: 35; padding: 10px; overflow-y: auto; background: var(--bg); border-right: 1px solid var(--line);
    transform: translateX(-102%); transition: transform .18s ease; flex: none; }
  .side.open { transform: none; box-shadow: 0 0 44px rgba(0,0,0,.7); }
  .navitem { padding: 9px 10px; font-size: 13.5px; }
  .navitem .ic { width: 18px; flex-basis: 18px; height: 18px; background-size: 16px 16px; }
  .banner .binner { height: 52px; min-width: 0; gap: 8px; }
  .banner h1 { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .banner .tag, .banner #densityBtn { display: none; }
  .banner .live span { display: none; }
  /* The label and the shortcut hint do not fit; the button becomes its glyph. */
  .omni { min-width: 0; width: 36px; flex: 0 0 36px; justify-content: center; }
  .omni span, .omni kbd { display: none; }
  .omni::after { content: ""; width: 17px; height: 17px; image-rendering: pixelated;
    background: center/17px 17px no-repeat url(/textures_minecraft/assets/minecraft/textures/item/spyglass.png); }
  .scopebox { min-width: 0; }
  .scopebtn { max-width: 150px; } .scopebtn .sc-k { display: none; }
  .cfg-grid, .formgrid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .setfield { grid-template-columns: 1fr; }
  #map { height: clamp(240px, 48vh, 400px); }
  .hr-num { font-size: 38px; }
}
@media (max-width: 720px) {
  .card { padding: 11px; }
  .tiles, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .v { font-size: 18px; } .kpi .v { font-size: 19px; }
  .chart-grid, .grid2 { grid-template-columns: 1fr; }
  .drawer { width: 100%; max-width: none; }
  .byhour-lbl span:nth-child(2n) { visibility: hidden; }
  .scopemenu { width: min(320px, calc(100vw - 28px)); }
  .regionbar { grid-template-columns: 78px 1fr auto; }
  .scroll.tall { max-height: none; }
  /* Touch targets, and 16px inputs so iOS does not zoom the page on focus. */
  button { min-height: 32px; padding: 5px 11px; }
  button.sm { min-height: 28px; }
  input, select, textarea { font-size: 16px; padding: 6px 9px; }
  .toolbar > input, .toolbar > select { flex: 1 1 100%; }
  .pager { justify-content: space-between; }
  /* Below this width the top bar cannot hold the scope switcher too; the drawer
     already navigates everywhere it points at. */
  .scopebox { display: none !important; }
  .toasts { left: 10px; right: 10px; max-width: none; }

  /* Wide tables stop being tables: each row becomes a labelled card. The labels come
     from the header row (js stamps data-l), so no table needs its own mobile markup. */
  table[data-cards="1"] { display: block; }
  table[data-cards="1"] tr.thead { display: none; }
  table[data-cards="1"] tbody, table[data-cards="1"] tr { display: block; }
  table[data-cards="1"] tr { background: var(--panel-2); border: 1px solid var(--line);
    border-radius: 7px; padding: 4px 2px; margin-bottom: 7px; }
  table[data-cards="1"] tr:hover td, table[data-cards="1"] tr.click:hover td { background: none; }
  table[data-cards="1"] td { display: flex; gap: 10px; align-items: baseline; padding: 4px 10px;
    border-bottom: none; text-align: left; white-space: normal; }
  table[data-cards="1"] td::before { content: attr(data-l); flex: 0 0 38%; max-width: 38%;
    color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
  table[data-cards="1"] td:not([data-l])::before, table[data-cards="1"] td[data-l=""]::before { content: none; }
  table[data-cards="1"] td.empty { display: block; }
  table[data-cards="1"] td.empty::before { content: none; }
  table[data-cards="1"] td.num { justify-content: flex-start; }
  table[data-cards="1"] td.actions { flex-wrap: wrap; }
  .nodetbl td { white-space: normal; }
}
@media (max-width: 400px) {
  .tiles, .kpis { grid-template-columns: 1fr; }
  .hr-num { font-size: 34px; }
  .skinfig { width: 104px; height: 208px; }
}

/* Upload progress for the world import: the browser knows how many bytes of the file have
   left, and a 76 MB map over a home uplink is minutes — a button that just greys out says
   nothing about that. */
.progress { position: relative; margin-top: 10px; height: 20px; border: 1px solid var(--line);
  border-radius: 4px; background: var(--sunken); overflow: hidden; }
.progress[hidden] { display: none; }
.progress-bar { height: 100%; width: 0; background: var(--info); transition: width .15s linear; }
.progress-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink); text-shadow: 0 1px 2px rgba(0,0,0,.7); }
