/* Minecraft command center — local fonts and icons, no third-party requests. */
:root {
  --bg: #171918;
  --bg2: #1b1e1c;
  --sidebar: #141615;
  --card: #202320;
  --card2: #292e2a;
  --border: #343b35;
  --text: #eef2eb;
  --muted: #a2ada3;
  --green: #7be4b0;
  --green-dark: #27ae60;
  --green-dim: rgba(123, 228, 176, 0.10);
  --red: #e74c3c;
  --red-dim: rgba(231, 76, 60, 0.12);
  --amber: #f1a93b;
  --amber-dim: rgba(241, 169, 59, 0.12);
  --blue: #74cbd8;
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 16px;
  --radius-sm: 9px;
  --sidebar-w: 256px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
::selection { background: rgba(46, 204, 113, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2c333d; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #39424e; }

/* ── layout ──────────────────────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; }
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#content { flex: 1; padding: 28px 32px 60px; max-width: 1160px; width: 100%; margin: 0 auto; }

/* ── sidebar ─────────────────────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}
.side-head {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; letter-spacing: 0.2px;
}
.side-brand .cube {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--green-dim); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.side-brand .cube svg { width: 18px; height: 18px; }
.side-state {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 999px;
}
nav.side-nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active { background: var(--green-dim); color: var(--green); }
.nav-sep {
  margin: 12px 12px 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: #5b6570;
}
.side-foot {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-dim); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who .role { font-size: 11.5px; color: var(--muted); }
.icon-btn {
  background: none; border: none; color: var(--muted);
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.icon-btn:hover { background: var(--card); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

/* status dot */
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: var(--green); box-shadow: 0 0 7px rgba(46, 204, 113, 0.8); }
.dot.red { background: var(--red); box-shadow: 0 0 7px rgba(231, 76, 60, 0.7); }
.dot.amber { background: var(--amber); box-shadow: 0 0 7px rgba(241, 169, 59, 0.7); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

/* ── topbar (mobile) ─────────────────────────────────────────────────────── */
#topbar {
  display: none;
  align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
#topbar .title { font-weight: 700; flex: 1; }

/* ── page scaffolding ────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; font-weight: 700; }
.page-head .spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card h3 {
  margin: 0 0 4px; font-size: 11.5px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.card .big { font-size: 19px; font-weight: 700; margin-top: 2px; word-break: break-all; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

/* ── status banner ───────────────────────────────────────────────────────── */
.status-banner {
  display: flex; align-items: center; gap: 16px;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 18px;
  border: 1px solid;
  flex-wrap: wrap;
}
.status-banner .label { font-size: 21px; font-weight: 800; letter-spacing: 0.3px; }
.status-banner .sub { color: var(--muted); font-size: 13px; }
.status-banner .spacer { flex: 1; }
.status-banner.online { background: var(--green-dim); border-color: rgba(46, 204, 113, 0.45); }
.status-banner.online .label { color: var(--green); }
.status-banner.offline { background: var(--red-dim); border-color: rgba(231, 76, 60, 0.45); }
.status-banner.offline .label { color: var(--red); }
.status-banner.starting, .status-banner.stopping { background: var(--amber-dim); border-color: rgba(241, 169, 59, 0.45); }
.status-banner.starting .label, .status-banner.stopping .label { color: var(--amber); }
.status-banner .dot { width: 13px; height: 13px; }

/* notice banners */
.banner {
  display: flex; align-items: center; gap: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  padding: 11px 16px;
  margin-bottom: 14px;
  font-size: 13.5px;
}
.banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.banner .spacer { flex: 1; }
.banner.warn { background: var(--amber-dim); border-color: rgba(241, 169, 59, 0.4); color: var(--amber); }
.banner.danger { background: var(--red-dim); border-color: rgba(231, 76, 60, 0.4); color: var(--red); }
.banner.info { background: rgba(52, 152, 219, 0.1); border-color: rgba(52, 152, 219, 0.35); color: #6db3e0; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 700;
  cursor: pointer;
  background: var(--card2); color: var(--text);
  transition: filter 0.12s, background 0.12s;
  font-family: inherit;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--green); color: #0b1510; }
.btn.danger { background: var(--red); color: #fff; }
.btn.outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn.outline-danger { background: transparent; border-color: rgba(231, 76, 60, 0.5); color: var(--red); }
.btn.outline-danger:hover:not(:disabled) { background: var(--red-dim); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.icon-only { padding: 8px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.3px;
}
.pill.green { background: var(--green-dim); color: var(--green); }
.pill.red { background: var(--red-dim); color: var(--red); }
.pill.amber { background: var(--amber-dim); color: var(--amber); }
.pill.gray { background: var(--card2); color: var(--muted); }

/* ── forms ───────────────────────────────────────────────────────────────── */
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); }
input[type="number"] { width: 110px; }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
label.field input, label.field select { width: 100%; }

/* iOS-style toggle */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .track {
  position: absolute; inset: 0;
  background: #3a4350;
  border-radius: 999px;
  transition: background 0.18s;
  cursor: pointer;
}
.switch .track::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:disabled + .track { opacity: 0.45; cursor: not-allowed; }

/* ── tables / list rows ──────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 11px 14px; border-bottom: 1px solid #20262e; font-size: 13.5px; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.card.flush { padding: 4px 0; overflow: hidden; }
.empty {
  text-align: center; color: var(--muted);
  padding: 38px 20px; font-size: 13.5px;
}
.empty svg { width: 34px; height: 34px; opacity: 0.4; display: block; margin: 0 auto 10px; }

/* ── console ─────────────────────────────────────────────────────────────── */
.console-wrap { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 380px; }
.console-out {
  flex: 1;
  background: #0a0c0e;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 16px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 12.7px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}
.console-out .line { color: #c7d0d9; }
.console-out .line.warn { color: var(--amber); }
.console-out .line.error { color: #ff7b6e; }
.console-out .line.panel { color: var(--green); }
.console-out .line.editable { cursor: text; border-radius: 3px; }
.console-out .line.editable:hover { background: rgba(255, 255, 255, 0.05); }
.console-out .console-line-edit {
  width: 100%;
  background: #11151a;
  color: var(--text);
  border: 1px solid var(--green);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 12.7px;
  line-height: 1.5;
}
.console-out .console-line-edit:focus { outline: none; }
.console-in {
  display: flex; gap: 0;
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--bg2);
  overflow: hidden;
}
.console-in .prompt {
  display: flex; align-items: center;
  padding: 0 4px 0 14px;
  color: var(--green); font-family: var(--mono); font-weight: 700;
}
.console-in input {
  flex: 1; border: none; border-radius: 0; background: transparent;
  font-family: var(--mono); font-size: 13px; padding: 13px 10px;
}
.console-in button {
  border: none; background: transparent; color: var(--green);
  padding: 0 18px; cursor: pointer;
}
.console-in button:hover { background: var(--green-dim); }
.console-in button svg { width: 17px; height: 17px; }
.jump-btn {
  position: fixed;
  bottom: 96px; right: 46px;
  z-index: 5;
}

/* ── log viewer ──────────────────────────────────────────────────────────── */
.log-view pre {
  background: #0a0c0e;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  max-height: 420px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12.3px;
  margin: 12px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.log-view textarea.log-edit {
  width: 100%;
  min-height: 420px;
  resize: vertical;
  background: #0a0c0e;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--mono);
  font-size: 12.3px;
  line-height: 1.5;
}
.log-view textarea.log-edit:focus { outline: none; border-color: var(--green); }

/* ── sidebar server switcher ─────────────────────────────────────────────── */
.side-servers { padding: 10px 14px 12px; border-bottom: 1px solid var(--border); }
.side-servers-label {
  display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 7px;
}
.side-servers-label svg { width: 13px; height: 13px; }
.server-select {
  width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; cursor: pointer;
}
.server-select:hover, .server-select:focus { border-color: var(--green); outline: none; }
.side-servers-empty {
  display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  padding: 7px 10px; border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.side-servers-empty:hover { border-color: var(--green); }
.side-servers-empty svg { width: 15px; height: 15px; }

/* ── file explorer ───────────────────────────────────────────────────────── */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; }
.crumbs a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); padding: 4px 8px; border-radius: var(--radius-sm); }
.crumbs a:hover { color: var(--text); background: var(--card2); }
.crumbs a:last-child { color: var(--green); font-weight: 600; }
.crumbs .sep { color: var(--border); }
.crumbs svg { width: 14px; height: 14px; }
.file-list.drop-over { outline: 2px dashed var(--green); outline-offset: -2px; }
.file-name { cursor: pointer; display: flex; align-items: center; gap: 10px; }
tr.file-row:hover td { background: rgba(255, 255, 255, 0.02); }
.fi { display: inline-flex; }
.fi svg { width: 17px; height: 17px; }
.fi.dir { color: var(--amber); }
.fi.file { color: var(--muted); }
.file-editor {
  width: 100%; min-height: 380px; margin-top: 12px; resize: vertical;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; font-family: var(--mono);
  font-size: 12.5px; line-height: 1.55; tab-size: 2;
}
.file-editor:focus { outline: none; border-color: var(--green); }

/* ── login: register link ────────────────────────────────────────────────── */
.login-alt { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.login-alt a { font-weight: 600; margin-left: 5px; }

/* ── performance sliders (Server page) ───────────────────────────────────── */
.perf-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.perf-row .lbl { width: 200px; flex-shrink: 0; font-weight: 600; font-size: 13px; }
.perf-row input[type="range"] { flex: 1; min-width: 160px; accent-color: var(--green); cursor: pointer; }
.perf-row .val { width: 86px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── server installer (Servers page) ─────────────────────────────────────── */
.sw-card { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.sw-card:hover { border-color: var(--green); transform: translateY(-1px); }
.sw-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sw-icon svg { width: 24px; height: 24px; }

/* ── dropzone ────────────────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 16px;
}
.dropzone:hover, .dropzone.over { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.dropzone svg { width: 34px; height: 34px; margin-bottom: 8px; }
.dropzone .hint { font-size: 12.5px; margin-top: 4px; }

.progress {
  height: 7px;
  background: var(--bg2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
}
.progress .bar { height: 100%; background: var(--green); border-radius: 999px; transition: width 0.15s; }
.upload-row { padding: 10px 0; border-bottom: 1px solid #20262e; }
.upload-row:last-child { border-bottom: none; }

/* ── options page ────────────────────────────────────────────────────────── */
.opt-group-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
  margin: 26px 0 10px 4px;
}
.opt-row {
  display: flex; align-items: center; gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  margin-bottom: 8px;
}
.opt-row.dirty { border-color: rgba(46, 204, 113, 0.55); }
.opt-row .meta { flex: 1; min-width: 0; }
.opt-row .meta .name { font-weight: 600; font-size: 14px; }
.opt-row .meta .key { font-family: var(--mono); font-size: 11px; color: #5b6570; }
.opt-row .meta .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.opt-row select, .opt-row input[type="text"] { width: 220px; }
@media (max-width: 700px) {
  .opt-row { flex-wrap: wrap; }
  .opt-row select, .opt-row input[type="text"] { width: 100%; }
}
.save-bar {
  position: sticky;
  bottom: 16px;
  display: flex; align-items: center; gap: 14px;
  background: var(--card2);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-top: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.save-bar .spacer { flex: 1; }

/* ── access page ─────────────────────────────────────────────────────────── */
.user-card { margin-bottom: 16px; }
.user-card .head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-card .head .name { font-size: 16px; font-weight: 700; }
.user-card .head .spacer { flex: 1; }
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 22px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.perm-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; }
.perm-item .lbl { flex: 1; color: var(--text); }
.perm-item .grp { font-size: 10.5px; color: #5b6570; display: block; }

/* ── activity page ───────────────────────────────────────────────────────── */
.act-row {
  display: flex; gap: 14px; align-items: baseline;
  padding: 10px 16px;
  border-bottom: 1px solid #20262e;
  font-size: 13px;
}
.act-row:last-child { border-bottom: none; }
.act-row .time { color: #5b6570; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; }
.act-row .user { font-weight: 700; white-space: nowrap; }
.act-row .user.admin { color: var(--green); }
.act-row .what { color: var(--muted); white-space: nowrap; }
.act-row .details { color: var(--text); word-break: break-word; }
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filters select, .filters input { min-width: 150px; }

/* ── players ─────────────────────────────────────────────────────────────── */
.player-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
}

/* ── toasts ──────────────────────────────────────────────────────────────── */
#toasts {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
  width: 340px; max-width: calc(100vw - 36px);
}
.toast {
  display: flex;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: toast-in 0.22s ease-out;
}
@keyframes toast-in { from { transform: translateX(40px); opacity: 0; } }
.toast.hide { transition: opacity 0.25s, transform 0.25s; opacity: 0; transform: translateX(30px); }
.toast .bar { width: 4px; flex-shrink: 0; background: var(--green); }
.toast.error .bar { background: var(--red); }
.toast.warn .bar { background: var(--amber); }
.toast.activity .bar { background: var(--blue); }
.toast .body { padding: 11px 14px; flex: 1; min-width: 0; }
.toast .title { font-weight: 700; font-size: 13px; }
.toast .msg { font-size: 12.5px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.toast .close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 10px; align-self: flex-start;
}
.toast .close svg { width: 13px; height: 13px; }

/* ── modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 7, 9, 0.72);
  backdrop-filter: blur(3px);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade-in 0.15s ease-out;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 440px; max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px;
  animation: modal-in 0.18s ease-out;
}
@keyframes modal-in { from { transform: translateY(14px) scale(0.98); opacity: 0; } }
.modal h2 { margin: 0 0 6px; font-size: 17px; }
.modal .modal-msg { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal .err { color: var(--red); font-size: 12.5px; min-height: 16px; margin-top: 8px; }

/* ── login page ──────────────────────────────────────────────────────────── */
body.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: radial-gradient(1100px 500px at 50% -10%, #15241b 0%, var(--bg) 55%);
}
.login-card {
  width: 360px; max-width: calc(100vw - 40px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 32px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.login-card .logo {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--green-dim); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.login-card .logo svg { width: 28px; height: 28px; }
.login-card h1 { font-size: 19px; text-align: center; margin: 0 0 4px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.login-card .btn { width: 100%; padding: 11px; margin-top: 6px; }
.login-card .err { color: var(--red); font-size: 13px; text-align: center; min-height: 18px; margin-top: 12px; }

/* ── responsive ──────────────────────────────────────────────────────────── */
.backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 45;
}
@media (max-width: 900px) {
  #topbar { display: flex; }
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
  }
  body.nav-open #sidebar { transform: translateX(0); }
  body.nav-open .backdrop { display: block; }
  #content { padding: 20px 16px 50px; }
  .console-wrap { height: calc(100vh - 220px); }
  .jump-btn { right: 28px; }
}

/* ── v2 additions: tabs, charts, chips, schedules, modrinth, wizard ───────── */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--text); border-color: #39424e; }
.tab.active { background: var(--green-dim); border-color: rgba(46, 204, 113, 0.45); color: var(--green); }
.tab-count {
  background: var(--card2); color: var(--muted); border-radius: 999px;
  font-size: 11px; padding: 1px 7px; min-width: 18px; text-align: center;
}
.tab.active .tab-count { background: rgba(46, 204, 113, 0.2); color: var(--green); }

.player-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 8px; flex-wrap: wrap;
}
.player-row .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 800px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.chart-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.chart-value { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.chart-svg { width: 100%; height: 120px; display: block; }

.server-icon-img { width: 48px; height: 48px; border-radius: 8px; image-rendering: pixelated; border: 1px solid var(--border); }

.quick-cmds {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 10px;
  border-top: 1px solid var(--border); background: var(--bg2);
}
.quick-cmds .btn { font-family: var(--mono); font-size: 12px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 6px 4px 12px; font-size: 12.5px;
}
.chip-x {
  background: none; border: none; color: var(--muted); cursor: pointer;
  display: inline-flex; padding: 2px; border-radius: 50%;
}
.chip-x:hover { color: var(--red); background: var(--red-dim); }
.chip-x svg { width: 13px; height: 13px; }

.sched-card { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.sched-icon {
  display: inline-flex; padding: 10px; border-radius: 10px;
  background: var(--green-dim); color: var(--green);
}
.sched-icon svg { width: 20px; height: 20px; }

.mr-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-top: 1px solid var(--border);
}
.mr-row:first-child { border-top: none; }
.mr-icon { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; object-fit: cover; background: var(--card2); }
.mr-icon-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.mr-icon-empty svg { width: 20px; height: 20px; }
.mr-desc { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.wizard-adv { margin: 4px 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.wizard-adv summary {
  cursor: pointer; padding: 10px 12px; color: var(--muted); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; gap: 6px; list-style: none;
}
.wizard-adv summary svg { width: 15px; height: 15px; }
.wizard-adv[open] summary { border-bottom: 1px solid var(--border); color: var(--text); }
.wizard-adv > div { padding: 10px 12px; }
.wizard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
@media (max-width: 560px) { .wizard-grid { grid-template-columns: 1fr; } }
.wizard-grid .field { margin-bottom: 8px; }

/* default size for bare icons — specific containers above override this */
svg { width: 16px; height: 16px; flex-shrink: 0; }

/* server cards (Servers page) */
.srv-card { display: flex; flex-direction: column; gap: 12px; }
.srv-card.active { border-color: rgba(46, 204, 113, 0.45); }
.srv-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.srv-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.srv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.srv-actions .btn:first-child { flex: 1; justify-content: center; }

/* crash report modal */
.crash-modal { max-width: 100%; }
.fix-card {
  background: var(--bg2); border: 1px solid var(--border); border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px;
}
.fix-title { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.fix-title svg { color: var(--amber); }
.fix-evidence {
  margin: 8px 0 0; padding: 6px 8px; background: var(--bg); border-radius: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
.crash-log {
  margin: 0; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--mono); font-size: 11.5px; line-height: 1.45;
  max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-all;
}
.modal:has(.crash-modal) { width: 760px; }

/* ── players page (roster + detail modal) ─────────────────────────────────── */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.p-card { display: flex; align-items: center; gap: 12px; cursor: pointer; transition: border-color 0.12s, transform 0.12s; }
.p-card:hover { border-color: rgba(46, 204, 113, 0.45); transform: translateY(-1px); }
.p-card.online { border-color: rgba(46, 204, 113, 0.3); }
.p-card-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p-card-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-card-pills { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; flex-shrink: 0; }
.p-avatar { border-radius: 8px; flex-shrink: 0; image-rendering: pixelated; background: var(--card2); }
.p-avatar.letter { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--green); background: var(--green-dim); }
.pill.blue { background: rgba(52, 152, 219, 0.14); color: var(--blue); }

.modal.wide { width: 720px; }
.p-head { display: flex; gap: 14px; align-items: center; }
.p-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.p-sec-title { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.p-sec-title h3 { font-size: 14.5px; }
.p-flex-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.field.inline { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.field.inline > span { margin: 0; }

.vital-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.vital-icon { display: inline-flex; color: var(--red); flex-shrink: 0; }
.vital-icon svg { width: 17px; height: 17px; }
.vital-row:nth-of-type(2) .vital-icon { color: var(--amber); }
.vital-label { width: 60px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.vital-value { width: 36px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.vital-row input[type="range"] { flex: 1; accent-color: var(--green); min-width: 100px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat-chip { display: flex; gap: 10px; align-items: center; background: var(--card2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; }
.stat-chip svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.stat-val { font-weight: 700; font-size: 14px; }
.stat-label { font-size: 11.5px; color: var(--muted); }

.inv-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }
.inv-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; margin-bottom: 4px; max-width: 560px; }
.inv-slot { position: relative; aspect-ratio: 1; background: var(--card2); border: 1px solid var(--border); border-radius: 6px; padding: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.inv-slot.empty { opacity: 0.45; }
.inv-slot:not(.empty):hover { border-color: rgba(46, 204, 113, 0.5); }
.inv-name { font-size: 9.5px; line-height: 1.15; text-align: center; word-break: break-word; text-transform: capitalize; max-height: 100%; overflow: hidden; }
.inv-count { position: absolute; right: 2px; bottom: 1px; font-size: 10.5px; font-weight: 800; color: var(--green); text-shadow: 0 1px 2px #000; }
.inv-hint { position: absolute; font-size: 9px; color: var(--muted); opacity: 0.7; }

/* ── modpack page ─────────────────────────────────────────────────────────── */
.mp-head { display: flex; gap: 16px; align-items: flex-start; }
.mp-icon { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--card2); flex-shrink: 0; }
.mp-icon-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--border); }
.mp-icon-empty svg { width: 26px; height: 26px; }
.mp-row { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); }
.mp-row:first-child { border-top: none; }
.mp-row.off { opacity: 0.55; }
.mp-list-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mp-results { max-height: 320px; overflow-y: auto; }
.row-off td { opacity: 0.55; }

@media (max-width: 560px) {
  .inv-row { grid-template-columns: repeat(9, 1fr); gap: 2px; }
  .p-head { flex-wrap: wrap; }
}

/* ── polish pass ──────────────────────────────────────────────────────────── */
/* smoother interactive feedback */
.btn { transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.08s; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.card { transition: border-color 0.15s; }
.sw-card, .srv-card { transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.sw-card:hover { border-color: rgba(46, 204, 113, 0.45); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); cursor: pointer; }
.srv-card:hover { border-color: rgba(46, 204, 113, 0.3); }
.mr-row { transition: background 0.12s; }
.mr-row:hover, .mp-row:hover { background: rgba(255, 255, 255, 0.025); }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.nav-item { transition: background 0.12s, color 0.12s; }
.tab { transition: background 0.12s, color 0.12s, border-color 0.12s; }

/* visible keyboard focus */
:focus-visible { outline: 2px solid rgba(46, 204, 113, 0.6); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

/* slimmer, themed scrollbars */
* { scrollbar-width: thin; scrollbar-color: #39424e transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #39424e; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: #4a5563; }
*::-webkit-scrollbar-track { background: transparent; }

/* modal: soft backdrop blur + slightly springier entrance */
.modal-overlay { backdrop-filter: blur(3px); }

/* range sliders that match the theme */
input[type="range"] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; background: var(--card2); border: 1px solid var(--border); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 3px solid #0e1411; box-shadow: 0 1px 4px rgba(0,0,0,0.5); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 3px solid #0e1411; }
input[type="range"]:disabled { opacity: 0.45; cursor: default; }
input[type="range"]:disabled::-webkit-slider-thumb { background: var(--muted); }

/* drop zones pop a little when dragging over */
.dropzone { transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.dropzone.over { transform: scale(1.01); }

/* ── light theme (per-user, via <html data-theme="light">) ───────────────── */
:root[data-theme="light"] {
  --bg: #f3f5f7;
  --bg2: #ffffff;
  --sidebar: #ffffff;
  --card: #ffffff;
  --card2: #eef1f4;
  --border: #d8dee5;
  --text: #1a2230;
  --muted: #5b6675;
}
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c4ccd4; }
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #aab4bf; }

/* ── account: accent swatches ─────────────────────────────────────────────── */
.accent-swatch {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; transition: transform 0.1s, border-color 0.1s;
}
.accent-swatch:hover { transform: scale(1.1); }
.accent-swatch.on { border-color: var(--text); }
.accent-swatch svg { width: 15px; height: 15px; }

/* ── account: shortcut & device rows ──────────────────────────────────────── */
.shortcut-row, .device-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card2); margin-bottom: 8px;
}
.shortcut-row > svg, .device-row > svg { flex-shrink: 0; color: var(--muted); }
.shortcut-row .lbl, .device-row .lbl { flex: 1; min-width: 0; }
.shortcut-row .grp, .device-row .grp { display: block; color: var(--muted); font-size: 12px; }
.device-row .grp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── sidebar shortcuts block ──────────────────────────────────────────────── */
.side-shortcuts { margin-top: 4px; }

/* Command-center layout */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
button, input, select, textarea { font: inherit; }
input[type="search"] { background: var(--bg2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 13px; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 1000; background: var(--green); color: #121b16; padding: 12px 18px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }
#main { background: radial-gradient(ellipse at 90% 0%, rgba(123, 228, 176, .025), transparent 55%), var(--bg); }
#content { max-width: 1440px; padding: 32px 40px 60px; }
#sidebar { border-right-color: var(--border); }
.side-head { padding: 25px 20px 22px; }
.side-brand { align-items: center; gap: 11px; }
.side-brand .cube { width: 38px; height: 40px; border-radius: 11px; border: 1px solid rgba(123, 228, 176, .2); }
.side-brand .cube svg { width: 23px; height: 23px; stroke-width: 1.7; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.brand-copy > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-kicker { font-size: 9px; letter-spacing: 1.8px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.side-state { background: transparent; border: none; padding: 0; border-radius: 0; margin: 17px 0 0 2px; font-size: 11px; }
.dot { width: 6px; height: 6px; }
.dot.green, .dot.red { box-shadow: none; }
nav.side-nav { padding: 8px 12px; }
.nav-sep { color: var(--muted); font-size: 9px; margin: 18px 12px 10px; letter-spacing: 1.5px; }
.nav-item { padding: 10px 12px; margin: 3px 0; font-size: 13px; font-weight: 500; border: 1px solid transparent; }
.nav-item.active { background: var(--green-dim); border-color: rgba(123, 228, 176, .14); }
.nav-item.active:after { content: ''; width: 5px; height: 5px; background: var(--green); border-radius: 50%; margin-left: auto; }
.nav-item svg { width: 17px; height: 17px; stroke-width: 1.7; }
.side-foot { padding: 16px 15px; gap: 9px; }
.avatar { border-radius: 11px; width: 34px; height: 36px; }
.side-foot .icon-btn { width: 27px; }
.side-servers { padding: 16px 18px; }
.side-servers-label { font-size: 10px; letter-spacing: .5px; }
.server-select { font-size: 12px; padding: 9px; }
#topbar { display: flex; height: 69px; padding: 0 40px; background: var(--bg); gap: 20px; border-color: var(--border); }
.nav-toggle { display: none; }
.topbar-breadcrumb { display: flex; align-items: center; gap: 12px; font-size: 12px; flex: 1; min-width: 0; }
.topbar-breadcrumb > svg { width: 12px; color: var(--muted); opacity: .5; }
#topbar .title { font-size: 12px; font-weight: 600; }
.topbar-search { display: inline-flex; align-items: center; gap: 10px; background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 11px; }
.topbar-search:hover { color: var(--text); border-color: var(--muted); }
kbd { font: 10px var(--mono); border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px; color: var(--muted); }
.live-connection { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.live-connection.reconnecting { color: var(--amber); }
.transport-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }
.transport-badge svg { width: 12px; height: 12px; }
.transport-badge.secure { color: var(--green); border-color: rgba(123, 228, 176, .18); background: var(--green-dim); }
.transport-badge.insecure { color: var(--amber); }
.connection-notice { display: flex; align-items: flex-start; gap: 12px; padding: 15px; background: var(--amber-dim); border: 1px solid rgba(241, 169, 59, .4); border-radius: 10px; margin-bottom: 20px; }
.connection-notice > svg { color: var(--amber); margin-top: 3px; width: 18px; height: 18px; }
.connection-notice > div { flex: 1; }
.connection-notice strong { color: var(--amber); font-size: 12px; }
.connection-notice p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.connection-notice .btn { align-self: center; }
.workspace-notice { margin: 16px 40px 0; }
.navigation-search { width: 100%; margin: 8px 0 12px; }
.navigation-results { max-height: 52vh; overflow: auto; }
.navigation-result { display: flex; align-items: center; gap: 12px; padding: 11px; margin-bottom: 3px; border-radius: 8px; color: var(--text); font-size: 13px; }
.navigation-result > span { flex: 1; }
.navigation-result > svg:first-child { color: var(--muted); }
.navigation-result > svg:last-child { width: 13px; color: var(--muted); }
.navigation-result:hover { background: var(--green-dim); color: var(--green); }
.boot-error { max-width: 560px; margin: 15vh auto; padding: 40px; text-align: center; }
.boot-error h1 { font-size: 24px; }
.empty-icon { display: inline-flex; padding: 18px; border-radius: 16px; background: var(--green-dim); color: var(--green); }
.empty-icon svg { width: 26px; height: 26px; }
.card { box-shadow: 0 2px 4px rgba(0, 0, 0, .035); }
.card h3 { font-size: 10px; letter-spacing: .7px; }
.btn { min-height: 38px; padding: 9px 15px; font-size: 12px; font-weight: 650; }
.btn.sm { min-height: 31px; font-size: 11px; }
.btn.primary { color: #13271c; }
.btn.danger { background: #a3433b; }
.table { font-size: 13px; }
.pill { padding: 4px 9px; font-size: 10px; letter-spacing: 0; }

/* Overview */
.overview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { color: var(--muted); font-size: 9px; letter-spacing: 1.7px; font-weight: 650; text-transform: uppercase; }
.overview-head h1 { margin: 7px 0 7px; font-size: 32px; line-height: 1.2; letter-spacing: -1px; font-weight: 650; }
.overview-head p { font-size: 12px; color: var(--muted); margin: 0; }
.dashboard-freshness { color: var(--muted); font-size: 10px; white-space: nowrap; margin-top: 31px; }
.dashboard-freshness:before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; background: var(--green); }
.dashboard-freshness.paused:before { background: var(--amber); }
.dashboard-freshness.paused { color: var(--amber); }
.status-banner { padding: 28px; min-height: 151px; gap: 20px; margin-bottom: 20px; }
.status-banner.online { background: linear-gradient(115deg, rgba(123, 228, 176, .075), var(--card) 70%); border-color: rgba(123, 228, 176, .23); }
.status-banner.offline { background: var(--card); border-color: var(--border); }
.status-banner.starting, .status-banner.stopping { background: var(--card); border-color: rgba(241, 169, 59, .3); }
.status-banner.pending { background: var(--card); border-color: var(--border); }
.server-hero-icon { width: 67px; height: 74px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(123, 228, 176, .18); border-radius: 15px; background: var(--green-dim); color: var(--green); flex-shrink: 0; }
.server-hero-icon svg { width: 34px; height: 34px; stroke-width: 1.5; }
.status-banner.offline .server-hero-icon { color: var(--muted); background: var(--card2); border-color: var(--border); }
.server-hero-copy { min-width: 0; }
.server-hero-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.status-banner .label { margin: 7px 0 6px; font-weight: 650; font-size: 24px; color: var(--text) !important; letter-spacing: -.5px; overflow-wrap: anywhere; }
.status-banner .sub { font-size: 11px; }
.status-banner .pill .dot { width: 5px; height: 5px; }
.server-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.server-controls > .danger:last-child:not(:first-child) { color: var(--muted); background: transparent; border-color: var(--border); font-size: 10px; }
.server-controls > .danger:last-child:not(:first-child):hover { color: var(--red); border-color: var(--red); }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 21px; }
.metric-card { padding: 18px 20px 15px; }
.metric-label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.metric-label svg { width: 14px; color: var(--muted); opacity: .7; }
.metric-value { font-size: 29px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -1px; margin: 12px 0 6px; line-height: 1.1; }
.metric-hint { font-size: 9px; color: var(--muted); min-height: 27px; }
.metric-meter { height: 3px; border-radius: 5px; background: var(--card2); margin-top: 7px; overflow: hidden; }
.metric-meter span { display: block; height: 100%; background: var(--green); border-radius: 5px; width: 0; transition: width .25s; }
.metric-card:nth-child(2) .metric-meter span { background: var(--blue); }
.metric-card:last-child .metric-meter { visibility: hidden; }
.dashboard-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 27px; }
.dashboard-shortcut { display: flex; align-items: center; gap: 12px; padding: 13px 11px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--border); color: var(--text); min-width: 0; transition: background .15s, border-color .15s; }
.dashboard-shortcut:hover { background: var(--card2); border-color: rgba(123, 228, 176, .45); }
.shortcut-icon { display: inline-flex; color: var(--green); padding: 8px; border-radius: 8px; background: var(--green-dim); }
.shortcut-icon svg { width: 16px; height: 16px; stroke-width: 1.7; }
.dashboard-shortcut > div { flex: 1; min-width: 0; }
.dashboard-shortcut strong { display: block; font-size: 11px; font-weight: 600; }
.dashboard-shortcut > div > span { display: block; font-size: 9px; line-height: 1.5; color: var(--muted); margin-top: 3px; }
.dashboard-shortcut > svg { width: 12px; color: var(--muted); }
.server-details { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 7px; }
.server-details .card { padding: 18px 20px; }
.server-details .big { font-size: 17px; margin-top: 9px; font-weight: 600; word-break: normal; overflow-wrap: anywhere; }
.address-card .big { color: var(--green); }
.address-card .btn { font-size: 10px; padding: 5px 9px; }
.address-card .pill { padding: 3px 6px; font-size: 9px; }
.dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dashboard-section-heading h2 { font-size: 14px; margin: 0 0 3px; font-weight: 600; }
.dashboard-section-heading .small { font-size: 10px; }
.chart-grid { gap: 18px; margin-top: 21px; }
.chart-box { padding: 14px 16px 9px; }
.chart-label { font-size: 9px; letter-spacing: .5px; }
.chart-value { font-size: 13px; }
.chart-svg { height: 138px; background-image: linear-gradient(to bottom, transparent calc(100% - 1px), var(--border) 1px); background-size: 100% 25%; }
.dashboard-loading, .dashboard-load-error { margin-top: 14px; color: var(--muted); font-size: 12px; }
.dashboard-load-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Sign-in */
body.login-body { background: radial-gradient(ellipse at 15% 50%, rgba(123, 228, 176, .045), transparent 55%), #171918; padding: 40px 24px; }
.login-shell { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 635px; width: min(1010px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.login-story { position: relative; overflow: hidden; background: linear-gradient(145deg, #242e26, #19201b); border-right: 1px solid var(--border); padding: 36px 40px; display: flex; flex-direction: column; }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; }
.brand-mark { width: 36px; height: 38px; display: flex; align-items: center; justify-content: center; color: var(--green); border: 1px solid rgba(123, 228, 176, .25); border-radius: 10px; background: var(--green-dim); }
.brand-mark svg { width: 23px; height: 23px; }
.login-story-copy { margin-top: 66px; position: relative; z-index: 1; }
.login-story-copy .eyebrow { color: #b2c0b1; font-size: 9px; }
.login-story-copy h2 { font-size: 37px; line-height: 1.19; letter-spacing: -1.4px; font-weight: 550; margin: 18px 0; }
.login-story-copy p { max-width: 335px; color: #b4c2b5; font-size: 12px; line-height: 1.85; }
.login-story-foot { color: #9ba99b; font-size: 10px; margin-top: auto; padding-top: 30px; position: relative; z-index: 1; }
.login-card { width: auto; max-width: none; background: var(--card); border: none; border-radius: 0; box-shadow: none; padding: 58px 48px 40px; align-self: center; }
.login-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 35px; }
.login-card-top .eyebrow { font-size: 8px; letter-spacing: 1.4px; }
.login-card h1 { text-align: left; font-size: 29px; letter-spacing: -.7px; font-weight: 600; margin-bottom: 9px; line-height: 1.2; }
.login-card .sub { text-align: left; margin: 0 0 28px; font-size: 12px; }
.login-card label.field span, .password-field > label { color: var(--text); font-size: 11px; font-weight: 500; display: block; margin: 0 0 8px; }
.login-card .field { margin-bottom: 18px; }
.login-card input { min-height: 46px; background: var(--bg2); border-color: var(--border); padding: 12px 13px; font-size: 12px; }
.login-card input::placeholder { color: #7f8a80; }
.password-input { display: flex; position: relative; }
.password-input input { width: 100%; padding-right: 65px; }
.password-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; padding: 0 12px; background: transparent; border: 0; color: var(--muted); font-size: 10px; cursor: pointer; border-radius: 6px; }
.password-toggle:hover { color: var(--green); background: var(--green-dim); }
.field-hint { color: var(--muted); font-size: 10px; margin-top: 7px; }
.login-card .btn.login-submit { margin-top: 4px; padding: 13px; min-height: 46px; font-size: 12px; justify-content: center; font-weight: 700; }
.login-card .btn.login-submit span { margin-left: 8px; }
.login-card .err { text-align: left; font-size: 11px; line-height: 1.6; margin: -2px 0 12px; min-height: 0; }
.login-card .err:empty { display: none; }
.login-alt { margin-top: 24px; text-align: center; color: var(--muted); font-size: 11px; }
.login-alt a { font-weight: 600; }
.login-help { text-align: center; color: var(--muted); font-size: 10px; line-height: 1.6; margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--border); }
.login-card .connection-notice { flex-wrap: wrap; padding: 12px; }
.login-card .connection-notice p { font-size: 10px; }
.login-card .connection-notice .btn { width: auto; padding: 8px 12px; margin-left: 28px; font-size: 10px; }
.login-world { position: absolute; height: 265px; left: 0; right: 0; bottom: 58px; overflow: hidden; opacity: .8; }
.world-grid { position: absolute; width: 570px; height: 250px; left: -50px; bottom: -100px; background-image: linear-gradient(#7be4b010 1px, transparent 1px), linear-gradient(90deg, #7be4b010 1px, transparent 1px); background-size: 34px 34px; transform: perspective(350px) rotateX(56deg) rotateZ(-20deg); }
.world-cube { position: absolute; width: 95px; height: 95px; background: linear-gradient(140deg, #6c9874, #355640); transform: rotate(-30deg) skew(12deg); border: 1px solid #88b895; border-radius: 3px; box-shadow: 21px 25px 0 #24402d, 22px 26px 0 #3c6045; }
.cube-main { bottom: 74px; left: 206px; }
.cube-back { width: 47px; height: 47px; bottom: 166px; left: 307px; background: #314e3a; opacity: .65; box-shadow: 13px 15px 0 #213625; }
.cube-front { width: 56px; height: 56px; bottom: 29px; left: 121px; background: #4e7758; opacity: .8; box-shadow: 13px 15px 0 #294333; }
.world-star { position: absolute; width: 3px; height: 3px; background: #a3e2b5; border-radius: 50%; box-shadow: 0 0 12px #7be4b080; }
.star-one { left: 165px; top: 57px; }.star-two { left: 356px; top: 96px; }.star-three { left: 77px; top: 134px; }

@media (max-width: 1200px) {
  #content { padding: 28px 26px 50px; }
  #topbar { padding: 0 26px; gap: 14px; }
  .dashboard-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .address-card { grid-column: 1 / -1; }
  .status-banner { padding: 24px; gap: 15px; }
  .server-controls { width: 100%; justify-content: flex-start; padding-left: 82px; }
  .metric-card { padding: 17px 14px; }
  .metric-value { font-size: 25px; }
}
@media (max-width: 900px) {
  #topbar { height: 61px; padding: 0 20px; gap: 14px; }
  .nav-toggle { display: flex; }
  #sidebar { width: 270px; box-shadow: 10px 0 50px rgba(0, 0, 0, .3); }
  .topbar-breadcrumb > .muted, .topbar-breadcrumb > svg { display: none; }
  .server-controls { width: auto; padding-left: 0; margin-left: auto; }
  .overview-head h1 { font-size: 29px; }
  #content { padding: 26px 24px 50px; }
  .login-shell { width: min(840px, 100%); grid-template-columns: .95fr 1fr; min-height: 585px; }
  .login-story { padding: 30px; }
  .login-card { padding: 42px 30px; }
  .login-story-copy h2 { font-size: 31px; }
  .login-world { left: -55px; opacity: .65; }
}
@media (max-width: 680px) {
  .topbar-search { padding: 8px; border: none; }
  .topbar-search span, .topbar-search kbd { display: none; }
  .live-connection { font-size: 9px; gap: 5px; }
  .transport-badge { font-size: 9px; padding: 3px 5px; }
  #topbar { padding: 0 14px; gap: 9px; }
  #content { padding: 23px 16px 40px; }
  .overview-head { display: block; margin-bottom: 23px; }
  .overview-head p { line-height: 1.7; max-width: 320px; font-size: 11px; }
  .dashboard-freshness { display: block; margin-top: 12px; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { padding: 16px; }
  .metric-hint { font-size: 9px; }
  .status-banner { padding: 20px; gap: 14px; }
  .status-banner .label { font-size: 21px; }
  .server-hero-icon { width: 50px; height: 60px; border-radius: 12px; }
  .server-hero-icon svg { width: 27px; }
  .server-hero-copy { flex: 1; }
  .server-hero-eyebrow { flex-wrap: wrap; gap: 5px; }
  .server-controls { width: 100%; justify-content: flex-start; margin-top: 5px; }
  .dashboard-shortcuts { gap: 10px; margin-bottom: 20px; }
  .dashboard-shortcut { padding: 13px 10px; gap: 9px; }
  .dashboard-shortcut > div > span, .dashboard-shortcut > svg { display: none; }
  .server-details { gap: 10px; }
  .server-details .card { padding: 15px 12px; }
  .server-details .big { font-size: 13px; }
  .server-details .server-icon-img { width: 35px; height: 35px; }
  .server-details .icon-only { padding: 5px; }
  .server-details .card:last-child > div { flex-wrap: wrap; gap: 6px !important; }
  .server-details .card:last-child > div > div { margin-left: 0 !important; }
  .chart-grid { grid-template-columns: 1fr; }
  .workspace-notice { margin: 12px 16px 0; }
  .connection-notice { flex-wrap: wrap; }
  body.login-body { padding: 22px 16px; align-items: flex-start; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; max-width: 450px; border-radius: 18px; }
  .login-story { border-right: none; border-bottom: 1px solid var(--border); padding: 23px 28px; }
  .login-story-copy, .login-world, .login-story-foot { display: none; }
  .login-card { padding: 28px; }
  .login-card-top { margin-bottom: 25px; }
  .login-card h1 { font-size: 27px; }
  .login-help { margin-top: 26px; }
  .modal { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
:root[data-theme="light"] #main { background: var(--bg); }
:root[data-theme="light"] .status-banner.online { background: linear-gradient(115deg, rgba(123, 228, 176, .12), var(--card) 80%); }
:root[data-theme="light"] .metric-meter { background: #e4e9e3; }
:root[data-theme="light"] { --red: #b22e26; --amber: #8d5900; --blue: #15687c; }
.boot-loading { margin-top: 15vh; }
.account-form-row input { max-width: 100%; }
.shortcut-row .grp { overflow-wrap: anywhere; }
@media (max-width: 680px) { .status-banner > .spacer { display: none; } }
