:root {
  --bg: #070b10;
  --panel: #141c27;
  --line: #2a3545;
  --text: #e8eef6;
  --muted: #8b9aab;
  --acc: #66c0f4;
  --ok: #3dd68c;
  --bad: #f07178;
  --warn: #ffb86c;
  --shell: 1200px;
}
* { box-sizing: border-box; }
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font: 13px/1.45 "Segoe UI", system-ui, sans-serif;
  background: #070b10;
  color: var(--text);
  min-height: 100vh;
  position: relative;
}
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #070b10;
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}
.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 16, 0.62), rgba(7, 11, 16, 0.82) 48%, rgba(7, 11, 16, 0.94)),
    radial-gradient(1000px 520px at 14% -12%, rgba(27, 40, 56, 0.5), transparent 60%);
}
body.page-hub .page-bg { background-image: url("/static/bg/hub.jpg"); }
body.page-minecraft .page-bg { background-image: url("/static/bg/minecraft.jpg"); }
body.page-minecraft .page-bg::after {
  background:
    linear-gradient(180deg, rgba(6, 14, 10, 0.55), rgba(7, 12, 14, 0.78) 50%, rgba(7, 11, 16, 0.94)),
    radial-gradient(900px 480px at 80% 10%, rgba(61, 214, 140, 0.12), transparent 55%),
    radial-gradient(700px 420px at 10% 0%, rgba(102, 192, 244, 0.1), transparent 50%);
}
body.page-arma .page-bg { background-image: url("/static/bg/arma.jpg"); }
body.page-arma .page-bg::after {
  background:
    linear-gradient(180deg, rgba(12, 14, 8, 0.58), rgba(10, 12, 10, 0.8) 52%, rgba(7, 11, 16, 0.94)),
    radial-gradient(900px 460px at 70% 8%, rgba(255, 184, 108, 0.14), transparent 55%),
    radial-gradient(700px 400px at 8% 0%, rgba(110, 130, 70, 0.12), transparent 50%);
}
body.page-network .page-bg { background-image: url("/static/bg/network.jpg"); }
body.page-network .page-bg::after {
  background:
    linear-gradient(180deg, rgba(5, 14, 18, 0.58), rgba(7, 12, 16, 0.82) 50%, rgba(7, 11, 16, 0.94)),
    radial-gradient(900px 480px at 78% 0%, rgba(102, 192, 244, 0.16), transparent 55%);
}
body.page-vms .page-bg { background-image: url("/static/bg/hub.jpg"); }
body.page-vms .page-bg::after {
  background:
    linear-gradient(180deg, rgba(10, 10, 18, 0.6), rgba(8, 11, 16, 0.84) 50%, rgba(7, 11, 16, 0.94)),
    radial-gradient(900px 480px at 20% -10%, rgba(180, 140, 255, 0.12), transparent 55%);
}
body.page-staff .page-bg { background-image: url("/static/bg/hub.jpg"); }
body.page-staff .page-bg::after {
  background:
    linear-gradient(180deg, rgba(12, 10, 8, 0.58), rgba(9, 11, 14, 0.82) 50%, rgba(7, 11, 16, 0.94)),
    radial-gradient(900px 480px at 85% 0%, rgba(255, 184, 108, 0.12), transparent 55%);
}
body.page-login .page-bg { background-image: url("/static/bg/login.jpg"); }
body.page-login .page-bg::after {
  background:
    linear-gradient(180deg, rgba(7, 11, 16, 0.45), rgba(7, 11, 16, 0.72) 55%, rgba(7, 11, 16, 0.9)),
    radial-gradient(700px 420px at 50% 20%, rgba(102, 192, 244, 0.14), transparent 60%);
}
a { color: var(--acc); text-decoration: none; }
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0.75rem 0.75rem 2.5rem;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: clip;
}
.topbar {
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(10px);
  background: rgba(8, 12, 18, 0.88);
  border-bottom: 1px solid var(--line);
  max-width: 100%;
  overflow-x: clip;
}
.topbar-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.35rem 0.75rem; flex-wrap: wrap;
  box-sizing: border-box;
  min-width: 0;
}
.brand { font-weight: 700; color: var(--text); letter-spacing: 0.04em; font-size: 0.95rem; }
.topbar nav { display: flex; gap: 0.85rem; flex: 1; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--text); }
.who { display: flex; align-items: center; gap: 0.55rem; color: var(--muted); }
.rank {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.5rem; color: var(--acc);
}
.rank-owner { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.rank-admin { color: var(--acc); }
.rank-mod { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.staff-panel { margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.staff-panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
}
.staff-panel-head h2 { margin: 0; }
.staff-blurb { margin: 0; font-size: 0.92rem; }
.staff-list { display: flex; flex-direction: column; gap: 0.28rem; }
.staff-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.35);
  min-width: 0;
}
.staff-meta {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 0.4rem 0.55rem;
  min-width: 0; flex: 1; overflow: hidden;
}
.staff-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-meta .mono {
  flex: 0 1 auto; font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.staff-actions { display: flex; flex-wrap: nowrap; gap: 0.3rem; flex: 0 0 auto; }
.staff-add {
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 820px) {
  .staff-grid { grid-template-columns: 1fr; }
}
.card {
  background: rgba(20, 28, 39, 0.88);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 0.75rem 0;
  backdrop-filter: blur(8px);
}
.login-body {
  min-height: 100vh; display: grid; place-items: center; padding: 1rem;
}
.login-card {
  width: min(440px, 100%); text-align: center; padding: 2rem 1.6rem;
  position: relative; z-index: 1;
}
.login-card h1 { margin: 0 0 0.4rem; font-size: 1.6rem; }
.sub, .muted { color: var(--muted); }
.err { color: var(--bad); }
.notice { color: var(--ok, #3d9a6a); }
.steam-btn {
  display: inline-block; margin-top: 1rem; padding: 0.7rem 1.1rem; border-radius: 8px;
  background: linear-gradient(180deg, #1b2838, #171a21);
  border: 1px solid #2a475e; color: #fff; font-weight: 600;
}
.login-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.25rem 0 0.85rem; color: var(--muted); font-size: 0.8rem;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--border, #333) 80%, transparent);
}
.local-auth { text-align: left; margin-top: 0.25rem; }
.local-auth-title { font-size: 0.95rem; margin: 0 0 0.55rem; }
.local-form {
  display: grid; gap: 0.45rem;
}
.local-form label {
  display: grid; gap: 0.2rem; font-size: 0.8rem; color: var(--muted);
}
.local-form input {
  width: 100%; box-sizing: border-box;
  padding: 0.45rem 0.55rem; border-radius: 6px;
  border: 1px solid var(--border, #333); background: color-mix(in srgb, var(--bg, #111) 70%, #000);
  color: inherit;
}
.local-btn { margin-top: 0.25rem; width: 100%; }
.local-register { margin-top: 0.85rem; }
.local-register summary {
  cursor: pointer; color: var(--muted); font-size: 0.85rem; user-select: none;
}
.local-register[open] summary { margin-bottom: 0.55rem; }
.local-hint { margin: 0.35rem 0 0; font-size: 0.75rem; }
.local-access-card { margin-bottom: 0.85rem; }
.local-request-list { display: grid; gap: 0.85rem; margin-top: 0.75rem; }
.local-request {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card, #1a1a1a) 88%, #000);
}
.local-request-meta {
  display: flex; flex-wrap: wrap; gap: 0.45rem 0.75rem; align-items: baseline; margin-bottom: 0.55rem;
}
.local-approve-form { display: grid; gap: 0.55rem; }
.local-sys-rank { display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; }
.local-server-assigns { display: grid; gap: 0.35rem; }
.local-server-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.45rem; align-items: center;
  font-size: 0.85rem;
}
.local-request-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
h1 { font-size: 1.35rem; margin: 0 0 0.35rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.server-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.server-card .card-body { padding: 0.9rem 1rem 0.55rem; flex: 1; }
.server-card .card-title-row {
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.65rem;
}
.server-card .card-title-row h2 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}
.server-card .card-title-row .badge {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-start;
}
.server-card .card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem 0.65rem;
  border-top: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.35);
}
.server-card .foot-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.server-card .edit-vm {
  font-size: 12px;
  border-color: rgba(102, 192, 244, 0.35);
  color: var(--acc);
  margin-left: auto;
}
.server-card .remove-vm,
.server-card .foot-left .btn-start,
.server-card .foot-left .btn-stop {
  font-size: 12px;
  padding: 0.3rem 0.6rem;
}
.server-card .remove-vm {
  background: rgba(240, 113, 120, 0.1);
  border-color: rgba(240, 113, 120, 0.45);
  color: #f8a0a5;
}
.presence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.55rem 0 0.15rem;
}
.server-card .presence .map-btn {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 12px;
  padding: 0.28rem 0.65rem;
}
.mc-pact { font-size: 11px; padding: 0.2rem 0.45rem; }
.presence-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #101821;
  font-size: 12px;
}
.presence-label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; }
.presence-pill strong { font-variant-numeric: tabular-nums; font-size: 14px; }
.row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; min-width: 0; }
.between { justify-content: space-between; }
.badge {
  font-size: 11px; border-radius: 999px; padding: 0.15rem 0.55rem;
  border: 1px solid var(--line); text-transform: uppercase; letter-spacing: 0.04em;
}
.badge.on { background: rgba(61,214,140,.2); color: var(--ok); box-shadow: 0 0 0 1px rgba(61,214,140,.35); }
.badge.off { background: rgba(240,113,120,.18); color: var(--bad); }
.badge.warn { background: rgba(255,160,60,.14); color: var(--warn); }
button, .btn {
  appearance: none; border: 1px solid #3a4a5c; background: #1e2a38; color: var(--text);
  padding: 0.35rem 0.7rem; border-radius: 8px; cursor: pointer; font: inherit; text-decoration: none;
}
button.primary, .btn.primary {
  background: rgba(102,192,244,.14); border-color: rgba(102,192,244,.45); color: var(--acc);
}
button.danger { background: rgba(240,113,120,.12); border-color: rgba(240,113,120,.4); color: #f8a0a5; }
.btn-start { background: rgba(132,255,80,.16); border-color: rgba(132,255,80,.55); color: #b8ff7a; }
.btn-stop { background: rgba(240,113,120,.12); border-color: rgba(240,113,120,.4); color: #f8a0a5; }
.btn-restart { background: rgba(255,160,60,.14); border-color: rgba(255,160,60,.5); color: #ffb86c; }
.btn-wipe {
  background: rgba(240,113,120,.18);
  border-color: rgba(240,113,120,.65);
  color: #ffb0b4;
  font-weight: 650;
}
a.btn-logout {
  background: rgba(180,140,255,.12); border-color: rgba(180,140,255,.45); color: #d4b8ff;
  padding: 0.35rem 0.7rem; border-radius: 8px; border: 1px solid;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.server-card .actions {
  flex-wrap: nowrap;
  align-items: stretch;
}
.server-card .actions .btn {
  flex: 1 1 0;
  text-align: center;
  white-space: nowrap;
  padding: 0.35rem 0.5rem;
  font-size: 12px;
}
.inline { display: inline; }
.form-grid {
  display: grid; gap: 0.65rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
.form-grid > .full {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}
label { display: grid; gap: 0.25rem; color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%; background: #0a0f16; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 0.42rem 0.55rem; font: 12px ui-monospace, Consolas, monospace;
}
.table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.table th, .table td { text-align: left; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); }
.mono { font: 12px ui-monospace, Consolas, monospace; }
.console {
  margin-top: 0.75rem; background: #0a0f16; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.6rem; min-height: 80px; overflow: auto; color: #9aa7b8; white-space: pre-wrap;
}
.mod-list { display: grid; gap: 0.45rem; margin-top: 0.75rem; }
.mod {
  display: flex; justify-content: space-between; gap: 0.6rem; align-items: flex-start;
  padding: 0.45rem 0.55rem; border: 1px solid var(--line); border-radius: 8px; background: #101821;
}
.hero-strip { margin-bottom: 0.35rem; }
.hero-strip h1 { margin: 0; font-size: 1.05rem; }
.hero-strip .sub { margin: 0.15rem 0 0; font-size: 0.8rem; }
.host-meters {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.55rem 0.75rem;
}
.mc-meters {
  margin: 0 0 0.55rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  padding: 0.4rem 0.65rem 0.35rem;
}
.mc-meters-head { display: none; }
.mc-meters-assigned {
  margin: 0.25rem 0 0;
  font-size: 10px;
  line-height: 1.3;
}
.mc-meters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.85rem;
  min-width: 0;
}
.mc-meters-grid-vm {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem 0.65rem;
}
.mc-meters-col {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}
.meter-section-label {
  margin: 0 0 0.1rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.meter-seg.used {
  background: linear-gradient(90deg, #2a6fad, #66c0f4);
}
.meter-seg.java {
  background: linear-gradient(90deg, #b45309, #ffb86c);
}
@media (max-width: 900px) {
  .mc-meters-grid { grid-template-columns: minmax(0, 1fr); }
  .mc-meters-grid-vm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}
.meter-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 2rem;
}
.meter-meta { color: var(--text); font-size: 10px; }
.meter-track {
  height: 5px;
  border-radius: 999px;
  background: #0a0f16;
  border: 1px solid var(--line);
  overflow: hidden;
}
.meter-track.stacked { display: flex; flex-direction: row; }
.meter-seg {
  height: 100%;
  width: 0;
  transition: width 0.6s ease;
  min-width: 0;
}
.meter-seg.ai { background: linear-gradient(90deg, #7c5cbf, #b794f6); }
.meter-seg.assigned { background: linear-gradient(90deg, #2a6fad, #66c0f4); }
.meter-seg.other { background: linear-gradient(90deg, #4a5568, #8b9aab); }
.meter-seg.free { background: linear-gradient(90deg, #1f6b4a, #3dd68c); }
.meter-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  margin-top: 0.15rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.meter-key .swatch {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  margin-right: 0.3rem;
  vertical-align: middle;
}
.meter-key .swatch.ai { background: #b794f6; }
.meter-key .swatch.assigned { background: #66c0f4; }
.meter-key .swatch.free { background: #3dd68c; }
label.check { display: flex; align-items: center; gap: 0.45rem; color: var(--text); }
label.check input { width: auto; }
details summary { cursor: pointer; margin: 0.5rem 0; }

.launch-head { margin-bottom: 0.75rem; }
.game-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}
.game-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #101821;
  color: var(--text);
  cursor: pointer;
  min-height: 72px;
}
.game-tile:hover {
  border-color: rgba(102, 192, 244, 0.55);
  background: #152033;
}
.game-tile-title { font-weight: 650; font-size: 13px; }
.game-tile-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.launch-modal {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: #0e1520;
  color: var(--text);
  width: min(860px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.launch-plugins {
  margin-top: 0.75rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.65rem;
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.launch-plugins .modgrid {
  display: grid;
  gap: 0.35rem;
  max-height: 280px;
  overflow: auto;
  margin-top: 0.4rem;
  width: 100%;
  min-width: 0;
}
.launch-plugins .mod {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid var(--line);
  width: 100%;
  box-sizing: border-box;
}
.launch-plugins .mod-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}
.launch-plugins .mod-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #152032;
}
.launch-plugins .mod-meta p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.launch-plugin-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.launch-plugin-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  background: #121a26;
}
.launch-plugin-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.launch-modal::backdrop { background: rgba(4, 8, 14, 0.72); }
.launch-modal-inner { padding: 1rem 1.1rem 1.15rem; }
.launch-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.launch-modal-head h2 { margin: 0; }
.launch-section {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0 0.35rem;
  margin-top: 0.35rem;
}
.launch-section h3 {
  margin: 0 0 0.55rem;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.launch-publish { margin: 0.65rem 0 0.35rem; }
.launch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.75rem;
}
.launch-log { max-height: 180px; font-size: 11px; }
.specs-section-title {
  margin: 0.85rem 0 0.45rem;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
#specs .form-grid { margin-bottom: 0.25rem; }
#specs .check { color: var(--text); font-size: 0.9rem; }

.net-modal { width: min(640px, calc(100vw - 1.5rem)); }
.mc-staff-modal { width: min(420px, calc(100vw - 1.5rem)); }
.mc-staff-modal .staff-add {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.net-dns-grid { grid-template-columns: 1.2fr 1fr; }
.net-fqdn-row {
  display: flex; align-items: center; gap: 0.35rem;
}
.net-fqdn-row input { flex: 1; min-width: 0; }
.net-port-toolbar { display: flex; gap: 0.4rem; margin-bottom: 0.45rem; }
.net-port-list {
  display: flex; flex-direction: column; gap: 0.35rem;
  max-height: 240px; overflow: auto;
  margin-bottom: 0.55rem;
}
.net-port-row {
  display: grid;
  grid-template-columns: auto minmax(4rem, 1fr) 4.5rem auto 4.5rem 5.5rem;
  gap: 0.35rem;
  align-items: center;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.35);
  margin: 0;
}
.net-port-row input[type="number"],
.net-port-row select { width: 100%; }
.net-port-name { font-weight: 600; }
.net-port-add {
  margin-top: 0.25rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 640px) {
  .net-dns-grid { grid-template-columns: 1fr; }
  .net-port-row {
    grid-template-columns: auto 1fr;
  }
  .net-port-row .net-port-int,
  .net-port-row .net-port-ext,
  .net-port-row .net-port-proto { grid-column: 1 / -1; }
}

/* Minecraft panel — Arma-like layout */
.mc-panel {
  margin-top: 0.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  box-sizing: border-box;
}
.mc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.mc-head h1 { margin: 0; font-size: 0.98rem; letter-spacing: 0.02em; line-height: 1.2; }
.mc-head .sub {
  color: var(--muted);
  font-size: 0.72rem;
  margin: 0.1rem 0 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mc-head-actions { flex-wrap: wrap; max-width: 100%; }
.mc-server-pick { display: grid; gap: 0.2rem; font-size: 11px; min-width: 0; }
.mc-server-pick select { min-width: 0; max-width: 100%; width: min(12rem, 100%); }
.mc-main {
  display: grid;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  /* Single column by default — side-by-side was blowing past the viewport with long log lines */
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "console"
    "ai"
    "players"
    "staff"
    "mods";
}
.mc-main > .card {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}
.mc-main .card-console { grid-area: console; }
.mc-main .card-ai { grid-area: ai; }
.mc-main .card-players { grid-area: players; }
.mc-main .card-staff { grid-area: staff; }
.mc-main .card-mods { grid-area: mods; }
@media (min-width: 1100px) {
  .mc-main {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-areas:
      "console players"
      "ai staff"
      "mods mods";
  }
}
.card-staff,
.card-players { padding: 0.55rem 0.7rem 0.65rem; }
.mc-staff-list,
.mc-players-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(28vh, 220px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.35);
  padding: 0.15rem 0;
  font: 11px/1.35 ui-monospace, Consolas, monospace;
  color: #9aa7b8;
}
.mc-staff-list > .muted,
.mc-players-list > .muted {
  margin: 0.35rem 0.55rem;
  font: inherit;
}
.mc-staff-row,
.mc-player-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  padding: 0.18rem 0.55rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
  font: inherit;
}
.mc-staff-row + .mc-staff-row,
.mc-player-row + .mc-player-row {
  border-top: 1px solid rgba(42, 53, 69, 0.45);
}
.mc-staff-meta,
.mc-player-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font: inherit;
}
.mc-staff-meta strong,
.mc-player-meta strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
  font: inherit;
  font-weight: 650;
  color: var(--text);
}
.mc-player-meta .mono {
  font: inherit;
  flex: 0 0 auto;
}
.mc-player-acts {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.mc-player-acts .btn,
.mc-player-acts .mc-pact {
  font-size: 10px;
  line-height: 1.35;
  padding: 0.1rem 0.35rem;
}
.mc-staff-id {
  font: inherit;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}
.mc-staff-row .mc-staff-remove {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1.35;
  padding: 0.1rem 0.35rem;
}
.mc-staff-row .rank {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1.35;
  padding: 0.06rem 0.35rem;
}
.card-ai { padding: 0.55rem 0.7rem 0.65rem; }
.mc-ai-thread {
  height: min(28vh, 240px);
  min-height: 120px;
  overflow: auto;
  margin: 0.35rem 0 0.45rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f16;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mc-ai-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-ai-msg.mc-ai-user { color: var(--acc); }
.mc-ai-msg.mc-ai-assistant { color: var(--text); }
.mc-ai-msg.mc-ai-sys { color: var(--muted); font-size: 11px; }
.mc-ai-msg.mc-ai-tool { color: #9aa7b8; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.mc-ai-msg.mc-ai-err { color: var(--bad); }
#mc-ai-status.offline { color: var(--bad); }
#mc-mod-browse.ai-highlight {
  outline: 1px solid rgba(102,192,244,.45);
  border-radius: 8px;
}
.mod-tabs .mod-tab.on {
  background: rgba(102,192,244,.14);
  border-color: rgba(102,192,244,.45);
  color: var(--acc);
}
.mod-pane .mod-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: #0a0f16;
  flex-shrink: 0;
}
.mod-page-link {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}
.mod-page-link:hover { color: var(--acc); text-decoration: underline; }
.mod-pane .mod-meta { min-width: 0; flex: 1; }
.mod-pane .mod-meta p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mod-pane .mod-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.specs-progress {
  margin: 0.75rem 0 0.25rem;
  padding: 0.65rem 0.75rem 0.6rem;
  border: 1px solid rgba(102,192,244,.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(102,192,244,.08), rgba(8,12,18,.35));
}
.specs-progress.is-done {
  border-color: rgba(61,214,140,.35);
  background: linear-gradient(180deg, rgba(61,214,140,.1), rgba(8,12,18,.35));
}
.specs-progress.is-failed {
  border-color: rgba(240,113,120,.4);
  background: linear-gradient(180deg, rgba(240,113,120,.1), rgba(8,12,18,.35));
}
.specs-steps {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.specs-step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.2rem 0;
}
.specs-step::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3a4a5c;
  flex-shrink: 0;
}
.specs-step.done { color: var(--ok); }
.specs-step.done::before { background: var(--ok); }
.specs-step.active { color: var(--acc); font-weight: 650; }
.specs-step.active::before {
  background: var(--acc);
  box-shadow: 0 0 0 3px rgba(102,192,244,.22);
}
.specs-step.failed { color: var(--bad); font-weight: 650; }
.specs-step.failed::before { background: var(--bad); }
.mc-job-progress {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem 0.5rem;
  border: 1px solid rgba(102,192,244,.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(102,192,244,.08), rgba(8,12,18,.35));
}
.mc-job-progress.is-done {
  border-color: rgba(61,214,140,.35);
  background: linear-gradient(180deg, rgba(61,214,140,.1), rgba(8,12,18,.35));
}
.mc-job-progress.is-failed {
  border-color: rgba(240,113,120,.4);
  background: linear-gradient(180deg, rgba(240,113,120,.1), rgba(8,12,18,.35));
}
.mc-job-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.mc-job-progress-title {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text);
}
.mc-job-progress-pct {
  font-size: 0.78rem;
  color: var(--acc);
}
.mc-job-progress.is-done .mc-job-progress-pct { color: var(--ok); }
.mc-job-progress.is-failed .mc-job-progress-pct { color: var(--bad); }
.mc-job-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.mc-job-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3a9fd8, #66c0f4 55%, #9ad7f8);
  transition: width 0.35s ease;
}
.mc-job-progress.is-done .mc-job-progress-fill {
  background: linear-gradient(90deg, #2aa86a, #3dd68c);
}
.mc-job-progress.is-failed .mc-job-progress-fill {
  background: linear-gradient(90deg, #c44a52, #f07178);
}
.mc-job-progress-item {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  word-break: break-word;
}
.mod-badge {
  display: inline-block;
  font-size: 10px;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  margin-left: 0.25rem;
}
.mod-badge.off { color: #e6c07b; border-color: rgba(230,192,123,.4); }
.mod-badge.folder { color: var(--acc); border-color: rgba(102,192,244,.35); }
.mc-main .card h2 { margin: 0 0 0.45rem; font-size: 0.92rem; font-weight: 650; }
.console-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  min-width: 0;
  max-width: 100%;
}
.console-toolbar-left,
.console-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
}
.console-hint,
#mc-power-hint {
  color: var(--acc);
  font-weight: 600;
  margin: 0 0 0.45rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.mc-main pre.console {
  margin: 0;
  background: #0a0f16;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem;
  height: 320px;
  min-height: 320px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-all;
  font: 11px/1.35 ui-monospace, Consolas, monospace;
  color: #9aa7b8;
  white-space: pre-wrap;
  contain: inline-size;
}
.mc-main pre.console .c-line {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: pre-wrap;
}
.mc-main pre.console * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: inherit;
}
.mc-main pre.console .c-err { color: #f07178; }
.mc-main pre.console .c-warn { color: #e6c07b; }
.mc-main pre.console .c-ok { color: #3dd68c; }
.mc-main pre.console .c-info { color: #61afef; }
.mc-main pre.console .c-chat { color: #d19a66; }
.mc-main pre.console .c-dim { color: #6b7a8d; }
.mc-main pre.console .c-time { color: #6b7a8d; }
.mc-main pre.console .c-level { font-weight: 650; }
.mc-main pre.console .c-level-info { color: #61afef; }
.mc-main pre.console .c-level-warn { color: #e6c07b; }
.mc-main pre.console .c-level-error { color: #f07178; }
.mc-main pre.console .c-level-fatal { color: #ff5370; }
.mc-main pre.console .c-level-debug { color: #c678dd; }
.mc-main pre.console .c-cmd { color: #c678dd; }
.chatrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  margin-top: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.chatrow input { min-width: 0; max-width: 100%; }
.modgrid {
  display: grid;
  gap: 0.35rem;
  max-height: 340px;
  overflow: auto;
  min-width: 0;
  max-width: 100%;
}
.mc-main .mod {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101821;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.mc-main .mod .mod-meta {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.mc-main .mod .mod-actions {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.pack-ver-pick {
  display: grid;
  gap: 0.2rem;
  margin: 0.4rem 0 0;
  font-size: 11px;
  max-width: 100%;
  min-width: 0;
}
.pack-ver-pick .pack-ver-select,
.pack-ver-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 11px;
}
.admins-wrap { max-height: 220px; overflow: auto; }
.admins-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  table-layout: fixed;
}
.admins-wrap th, .admins-wrap td {
  text-align: left;
  padding: 0.32rem 0.3rem;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-create-card .full { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .console-toolbar { align-items: stretch; }
  .console-toolbar-right { width: 100%; }
  .chatrow { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar nav { width: 100%; order: 3; }
  .mc-main pre.console { height: min(38vh, 260px); min-height: 0; padding: 0.5rem; font-size: 10px; }
  .mc-players-list,
  .mc-staff-list { max-height: min(32vh, 180px); }
  .admins-wrap { max-height: 180px; }
  .modgrid { max-height: 180px; }
  .console-toolbar-right button,
  .console-toolbar-right .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-height: 2.6rem;
    padding: 0.55rem 0.5rem;
    font-size: 0.9rem;
    text-align: center;
  }
  .chatrow button { min-height: 2.6rem; width: 100%; }
}
