/* ---------------------------------------------------------------- tokens */

:root {
  --font: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --row: 34px;
  --gap: 16px;
  --sidebar: 236px;
  --console-size: 12.5px;
  --speed: 0.14s;

  --accent: #5b9a4f;
  --accent-ink: #fff;
}

/* Linen: warm light, the default */
:root,
[data-theme='linen'] {
  color-scheme: light;
  --bg: #f4f1ea;
  --bg-2: #ece8de;
  --surface: #fbf9f4;
  --surface-2: #f1ede4;
  --surface-3: #e7e2d6;
  --line: #e0dacd;
  --line-2: #cfc7b7;
  --text: #24211c;
  --text-2: #6c665c;
  --text-3: #9b9486;
  --ok: #3f8a4a;
  --warn: #b7791f;
  --err: #c0453a;
  --info: #3a72b0;
  --console-bg: #1e1c19;
  --console-text: #e6e1d7;
  --console-dim: #8c857a;
  --shadow: 0 1px 2px rgba(60, 50, 30, 0.06), 0 8px 24px rgba(60, 50, 30, 0.08);
  --overlay: rgba(36, 33, 28, 0.32);
}

[data-theme='paper'] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f6f6f5;
  --surface: #ffffff;
  --surface-2: #f4f4f3;
  --surface-3: #e9e9e7;
  --line: #e6e6e3;
  --line-2: #d2d2ce;
  --text: #161616;
  --text-2: #5e5e5b;
  --text-3: #92928e;
  --ok: #2f8040;
  --warn: #a8700e;
  --err: #c23a30;
  --info: #2f6db0;
  --console-bg: #151515;
  --console-text: #e8e8e6;
  --console-dim: #8a8a86;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.07);
  --overlay: rgba(0, 0, 0, 0.28);
}

[data-theme='graphite'] {
  color-scheme: dark;
  --bg: #151515;
  --bg-2: #111111;
  --surface: #1c1c1c;
  --surface-2: #232323;
  --surface-3: #2c2c2c;
  --line: #2a2a2a;
  --line-2: #393939;
  --text: #e9e7e3;
  --text-2: #a19d96;
  --text-3: #6f6c67;
  --ok: #6bbf74;
  --warn: #d9a441;
  --err: #e26a5f;
  --info: #6aa2dc;
  --console-bg: #0f0f0f;
  --console-text: #dedbd5;
  --console-dim: #77736c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
  --overlay: rgba(0, 0, 0, 0.55);
}

[data-theme='ink'] {
  color-scheme: dark;
  --bg: #10141d;
  --bg-2: #0c1018;
  --surface: #161b26;
  --surface-2: #1c2230;
  --surface-3: #252c3c;
  --line: #222a39;
  --line-2: #313b4e;
  --text: #e2e7f0;
  --text-2: #96a0b3;
  --text-3: #636d81;
  --ok: #67c08a;
  --warn: #dcaa4c;
  --err: #e46e6e;
  --info: #72a7ec;
  --console-bg: #0a0d14;
  --console-text: #d7deea;
  --console-dim: #6b7487;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
  --overlay: rgba(4, 6, 12, 0.6);
}

[data-theme='moss'] {
  color-scheme: dark;
  --bg: #121612;
  --bg-2: #0e120e;
  --surface: #181e18;
  --surface-2: #1f261f;
  --surface-3: #283028;
  --line: #253025;
  --line-2: #344134;
  --text: #e3eadf;
  --text-2: #9aa894;
  --text-3: #687563;
  --ok: #7cc46f;
  --warn: #d6aa4a;
  --err: #e0705f;
  --info: #79a8cf;
  --console-bg: #0b0e0b;
  --console-text: #d9e2d4;
  --console-dim: #6f7d6a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
  --overlay: rgba(2, 6, 2, 0.6);
}

[data-theme='ember'] {
  color-scheme: dark;
  --bg: #181311;
  --bg-2: #130f0d;
  --surface: #1f1916;
  --surface-2: #27201c;
  --surface-3: #312824;
  --line: #2f2622;
  --line-2: #42362f;
  --text: #eee4dc;
  --text-2: #ab9d92;
  --text-3: #786b61;
  --ok: #8cc06d;
  --warn: #e0a64a;
  --err: #e6705c;
  --info: #84a8cf;
  --console-bg: #100c0a;
  --console-text: #e6dbd2;
  --console-dim: #7f7067;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
  --overlay: rgba(8, 4, 2, 0.6);
}

[data-density='compact'] {
  --row: 28px;
  --gap: 12px;
}

[data-motion='reduce'] {
  --speed: 0s;
}

/* ---------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 1px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 20px;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 14px;
}

p {
  margin: 0;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0 4px;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--gap) 0;
}

svg.i {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.muted {
  color: var(--text-2);
}

.faint {
  color: var(--text-3);
}

.small {
  font-size: 12.5px;
}

.tiny {
  font-size: 11.5px;
}

.nowrap {
  white-space: nowrap;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.grow {
  flex: 1;
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row.wrap {
  flex-wrap: wrap;
}

.row.top {
  align-items: flex-start;
}

.row.between {
  justify-content: space-between;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stack > * + * {
  margin-top: var(--gap);
}

.hidden {
  display: none !important;
}

.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  font-weight: 500;
}

/* ---------------------------------------------------------------- layout */

.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  height: 100vh;
}

.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
}

.brand-mark svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.side-search {
  margin: 0 12px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.side-search:hover {
  border-color: var(--line-2);
}

.side-search .kbd {
  margin-left: auto;
}

.side-nav {
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side-scroll {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius);
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  min-width: 0;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav-item .count {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.side-foot {
  border-top: 1px solid var(--line);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  flex: none;
  color: var(--text-2);
}

.main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100vh;
}

.main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.page {
  padding: 24px 32px 48px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.page.wide {
  max-width: none;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head p {
  margin-top: 4px;
}

.mobile-bar {
  display: none;
}

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--speed), border-color var(--speed), color var(--speed);
  user-select: none;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  background: var(--surface-3);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

.btn.primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
}

.btn.danger {
  color: var(--err);
}

.btn.danger:hover {
  background: color-mix(in srgb, var(--err) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--err) 45%, var(--line-2));
}

.btn.danger.solid {
  background: var(--err);
  color: #fff;
  border-color: transparent;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}

.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn.sm {
  height: 26px;
  padding: 0 9px;
  font-size: 12.5px;
}

.btn.icon {
  width: 30px;
  padding: 0;
}

.btn.icon.sm {
  width: 26px;
}

.btn.ok {
  color: var(--ok);
}

.btn-group {
  display: inline-flex;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn + .btn {
  margin-left: -1px;
}

.btn-group .btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--speed), box-shadow var(--speed);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.input.mono,
.textarea.mono {
  font-family: var(--mono);
  font-size: 12.5px;
}

.textarea {
  height: auto;
  min-height: 80px;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.5;
}

.select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > .i {
  position: absolute;
  left: 9px;
  color: var(--text-3);
  pointer-events: none;
}

.input-wrap .input {
  padding-left: 30px;
}

.input-group {
  display: flex;
}

.input-group > * {
  border-radius: 0;
}

.input-group > :first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.input-group > :last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group > * + * {
  margin-left: -1px;
}

.input-addon {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.field-label {
  font-size: 13px;
  font-weight: 500;
}

.field .hint {
  font-size: 12.5px;
  color: var(--text-2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--line-2);
  transition: background var(--speed);
}

.switch span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform var(--speed);
}

.switch input:checked + span {
  background: var(--accent);
}

.switch input:checked + span::after {
  transform: translateX(14px);
}

.switch input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

.check {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  margin: 0;
  cursor: pointer;
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row .title {
  font-weight: 500;
}

.toggle-row .desc {
  color: var(--text-2);
  font-size: 12.5px;
  margin-top: 2px;
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  gap: 2px;
}

.segmented button {
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}

.segmented button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.range {
  width: 100%;
  accent-color: var(--accent);
}

.kbd {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  color: var(--text-2);
  background: var(--surface);
}

/* ---------------------------------------------------------------- surfaces */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 48px;
}

.card-body {
  padding: 16px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.grid {
  display: grid;
  gap: var(--gap);
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.auto {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
}

.notice .i {
  margin-top: 2px;
}

.notice.warn {
  border-color: color-mix(in srgb, var(--warn) 40%, var(--line));
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.notice.warn > .i {
  color: var(--warn);
}

.notice.err {
  border-color: color-mix(in srgb, var(--err) 40%, var(--line));
  background: color-mix(in srgb, var(--err) 7%, var(--surface));
}

.notice.err > .i {
  color: var(--err);
}

.notice.ok > .i {
  color: var(--ok);
}

.notice.info > .i {
  color: var(--info);
}

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-2);
}

.empty > .i {
  width: 28px;
  height: 28px;
  color: var(--text-3);
  margin-bottom: 10px;
  stroke-width: 1.4;
}

.empty h3 {
  color: var(--text);
  margin-bottom: 4px;
}

.empty .btn {
  margin-top: 14px;
}

/* ---------------------------------------------------------------- tables & lists */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}

.table th.sortable {
  cursor: pointer;
}

.table th.sortable:hover {
  color: var(--text);
}

.table td {
  padding: 0 12px;
  height: var(--row);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table tr.selected {
  background: color-mix(in srgb, var(--accent) 9%, transparent) !important;
}

.table td.num,
.table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.table .actions .btn {
  opacity: 0;
}

.table tr:hover .actions .btn,
.table .actions .btn.keep {
  opacity: 1;
}

.list {
  display: flex;
  flex-direction: column;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 52px;
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item:hover {
  background: var(--surface-2);
}

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 7px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  white-space: nowrap;
}

.badge.ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
  background: color-mix(in srgb, var(--ok) 9%, var(--surface));
}

.badge.warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
  background: color-mix(in srgb, var(--warn) 9%, var(--surface));
}

.badge.err {
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 35%, var(--line));
  background: color-mix(in srgb, var(--err) 9%, var(--surface));
}

.badge.accent {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.dot.online {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent);
}

.dot.starting,
.dot.stopping,
.dot.installing {
  background: var(--warn);
  animation: pulse 1.2s ease-in-out infinite;
}

.dot.crashed {
  background: var(--err);
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.state-badge.online {
  color: var(--ok);
}

.state-badge.crashed {
  color: var(--err);
}

.state-badge.starting,
.state-badge.stopping,
.state-badge.installing {
  color: var(--warn);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text-2);
}

.chip:hover {
  border-color: var(--line-2);
  color: var(--text);
}

.chip.on {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text);
}

.copy-chip {
  font-family: var(--mono);
  font-size: 12.5px;
}

.bar {
  height: 4px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.4s;
}

.bar.warn > span {
  background: var(--warn);
}

.bar.err > span {
  background: var(--err);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  height: 14px;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  height: 38px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- overlays */

.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  z-index: 50;
  animation: fade var(--speed) ease-out;
  overflow-y: auto;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: rise 0.16s ease-out;
}

.modal.wide {
  max-width: 760px;
}

.modal.xwide {
  max-width: 980px;
}

@keyframes rise {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.menu {
  position: fixed;
  z-index: 60;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px;
  animation: fade 0.08s ease-out;
}

.menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.menu button:hover,
.menu button.hover {
  background: var(--surface-2);
}

.menu button.danger {
  color: var(--err);
}

.menu button:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.menu .sep {
  height: 1px;
  background: var(--line);
  margin: 4px 2px;
}

.menu .menu-label {
  padding: 6px 9px 4px;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 70;
  max-width: min(380px, calc(100vw - 32px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: rise 0.16s ease-out;
}

.toast.ok > .i {
  color: var(--ok);
}

.toast.err > .i {
  color: var(--err);
}

.toast.warn > .i {
  color: var(--warn);
}

.toast .i {
  margin-top: 2px;
}

.palette {
  max-width: 560px;
  padding: 0;
}

.palette .input {
  border: 0;
  height: 46px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: none !important;
  padding-left: 40px;
}

.palette-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13.5px;
}

.palette-item.active {
  background: var(--surface-2);
}

.palette-item .hint {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
}

.palette-group {
  padding: 8px 10px 4px;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------- auth pages */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-box {
  width: 100%;
  max-width: 380px;
}

.auth-box .brand {
  justify-content: center;
  padding: 0 0 20px;
  font-size: 16px;
}

.auth-box .card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-foot {
  text-align: center;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------------------------------------------------------------- dashboard */

.host-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.host-strip > div {
  background: var(--surface);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.host-strip .value {
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.server-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color var(--speed);
  position: relative;
  overflow: hidden;
}

.server-card:hover {
  border-color: var(--line-2);
}

.server-card .stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.server-card .top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px 10px;
}

.server-icon {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: var(--surface-3);
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  image-rendering: pixelated;
  color: var(--text-3);
}

.server-icon img {
  width: 100%;
  height: 100%;
}

.server-card .meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 10px 16px 14px;
}

.meter .label {
  margin-bottom: 4px;
}

.meter .v {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 5px;
}

.server-card .foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 8px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.new-card {
  border-style: dashed;
  display: grid;
  place-items: center;
  min-height: 170px;
  color: var(--text-2);
  text-decoration: none;
  gap: 6px;
  align-content: center;
}

.new-card:hover {
  color: var(--text);
  border-color: var(--line-2);
}

/* ---------------------------------------------------------------- server shell */

.server-head {
  padding: 20px 32px 0;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.server-head.wide {
  max-width: none;
}

.server-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.server-title .server-icon {
  width: 40px;
  height: 40px;
}

.server-title .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-2);
}

.server-title .power {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

/* ---------------------------------------------------------------- console */

.console-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--gap);
  align-items: start;
}

.console {
  background: var(--console-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 250px);
  min-height: 380px;
  overflow: hidden;
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--console-text) 10%, transparent);
  color: var(--console-dim);
}

.console-bar .btn.ghost {
  color: var(--console-dim);
}

.console-bar .btn.ghost:hover,
.console-bar .btn.ghost.on {
  background: color-mix(in srgb, var(--console-text) 9%, transparent);
  color: var(--console-text);
}

.console-bar .input {
  background: transparent;
  border-color: color-mix(in srgb, var(--console-text) 14%, transparent);
  color: var(--console-text);
  height: 26px;
  font-size: 12.5px;
}

.console-log {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  font-family: var(--console-font, var(--mono));
  font-size: var(--console-size);
  line-height: 1.55;
  color: var(--console-text);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-anchor: none;
}

.console-log.nowrap {
  white-space: pre;
  word-break: normal;
}

.console-log .l {
  min-height: 1.55em;
}

.console-log .l .ts {
  color: var(--console-dim);
  margin-right: 8px;
  user-select: none;
}

.console-log .l.warn {
  color: #e7c26a;
}

.console-log .l.error,
.console-log .l.err {
  color: #f08a7e;
}

.console-log .l.panel {
  color: #8fb6e8;
}

.console-log .l.cmd {
  color: var(--console-text);
  font-weight: 600;
}

.console-log .l.cmd::before {
  content: '> ';
  color: var(--accent);
}

.console-log .l.chat {
  color: #b8d9a8;
}

.console-log .l.join {
  color: #9fd39a;
}

.console-log mark {
  background: rgba(240, 200, 80, 0.35);
  color: inherit;
  border-radius: 2px;
}

.console-jump {
  position: absolute;
  right: 16px;
  bottom: 60px;
}

.console-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid color-mix(in srgb, var(--console-text) 10%, transparent);
  position: relative;
}

.console-input .prompt {
  color: var(--accent);
  font-family: var(--mono);
}

.console-input input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--console-text);
  font-family: var(--mono);
  font-size: 13px;
  height: 26px;
}

.console-input input::placeholder {
  color: var(--console-dim);
}

.suggest {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 4px);
  min-width: 260px;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  z-index: 5;
}

.suggest div {
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.suggest div.active {
  background: var(--surface-2);
}

.suggest small {
  color: var(--text-3);
  font-family: var(--font);
}

.stat-card {
  padding: 12px 14px;
}

.stat-card .value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 6px;
}

.stat-card svg.spark {
  width: 100%;
  height: 34px;
  display: block;
}

.side-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------------------------------------------------------------- files */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  font-size: 13.5px;
  min-width: 0;
}

.breadcrumbs a,
.breadcrumbs span {
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-2);
  cursor: pointer;
}

.breadcrumbs a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.breadcrumbs .cur {
  color: var(--text);
  font-weight: 500;
  cursor: default;
}

.breadcrumbs .sep {
  color: var(--text-3);
  padding: 0;
}

.file-row td:first-child {
  width: 34px;
  padding-right: 0;
}

.file-name {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  min-width: 0;
}

.file-name .i {
  color: var(--text-3);
}

.file-name.dir .i {
  color: var(--accent);
}

.file-name:hover .n {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropzone {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--accent) 10%, var(--overlay));
  display: grid;
  place-items: center;
  pointer-events: none;
}

.dropzone div {
  padding: 24px 32px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.uploads {
  position: fixed;
  left: calc(var(--sidebar) + 16px);
  bottom: 16px;
  width: 340px;
  z-index: 45;
}

.upload-item {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.upload-item:last-child {
  border-bottom: 0;
}

.editor {
  display: flex;
  height: calc(100vh - 230px);
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.editor .gutter {
  padding: 10px 8px 10px 12px;
  text-align: right;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  user-select: none;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  overflow: hidden;
  min-width: 48px;
  white-space: pre;
}

.editor textarea {
  flex: 1;
  border: 0;
  outline: none;
  resize: none;
  padding: 10px 12px;
  background: transparent;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

.editor textarea.wrap {
  white-space: pre-wrap;
}

/* ---------------------------------------------------------------- mods */

.mod-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.mod-card:last-child {
  border-bottom: 0;
}

.mod-card:hover {
  background: var(--surface-2);
}

.mod-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-3);
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.mod-icon.sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.mod-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-title {
  font-weight: 600;
  cursor: pointer;
}

.mod-title:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mod-desc {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.mod-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mod-meta .i {
  width: 13px;
  height: 13px;
}

.markdown {
  font-size: 13.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.markdown img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 6px;
}

.markdown h1,
.markdown h2,
.markdown h3 {
  margin: 16px 0 6px;
}

.markdown p,
.markdown ul,
.markdown ol {
  margin: 0 0 10px;
}

.markdown ul,
.markdown ol {
  padding-left: 20px;
}

.markdown pre {
  background: var(--surface-2);
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
}

.markdown table {
  border-collapse: collapse;
  margin: 0 0 10px;
}

.markdown td,
.markdown th {
  border: 1px solid var(--line);
  padding: 4px 8px;
}

.markdown blockquote {
  margin: 0 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--line-2);
  color: var(--text-2);
}

.source-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.source-dot.modrinth {
  background: #1bd96a;
}

.source-dot.curseforge {
  background: #f16436;
}

.gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery img {
  height: 120px;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

/* ---------------------------------------------------------------- players */

.head {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  image-rendering: pixelated;
  background: var(--surface-3);
  flex: none;
}

.head.lg {
  width: 40px;
  height: 40px;
  border-radius: 7px;
}

/* ---------------------------------------------------------------- motd preview */

.motd-preview {
  background: #1f1f1f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect width='16' height='16' fill='%23252525'/%3E%3Crect width='8' height='8' fill='%23222'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%23222'/%3E%3C/svg%3E");
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
  color: #aaa;
  border: 1px solid var(--line);
}

.motd-preview .icon {
  width: 48px;
  height: 48px;
  background: #3a3a3a;
  image-rendering: pixelated;
  flex: none;
}

.motd-preview .name {
  color: #fff;
}

.motd-preview .lines {
  white-space: pre;
  line-height: 1.35;
}

/* ---------------------------------------------------------------- theme picker */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.theme-swatch {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: none;
  padding: 0;
  text-align: left;
}

.theme-swatch.on {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.theme-swatch .preview {
  height: 64px;
  display: grid;
  grid-template-columns: 34px 1fr;
}

.theme-swatch .preview .s {
  border-right: 1px solid rgba(128, 128, 128, 0.2);
}

.theme-swatch .preview .m {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.theme-swatch .preview .m i {
  display: block;
  height: 6px;
  border-radius: 3px;
}

.theme-swatch .name {
  padding: 7px 10px;
  font-size: 12.5px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.accent-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.accent-dot.on {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- wizard */

.steps {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-3);
}

.step .line {
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}

.step.on {
  color: var(--text);
}

.step.on .line,
.step.done .line {
  background: var(--accent);
}

.step.done {
  color: var(--text-2);
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.pick {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pick:hover {
  border-color: var(--line-2);
}

.pick.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.pick .t {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pick .d {
  font-size: 12.5px;
  color: var(--text-2);
}

.dns-table td {
  height: auto;
  padding-top: 9px;
  padding-bottom: 9px;
}

.copyable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  cursor: pointer;
  padding: 2px 6px;
  margin: -2px -6px;
  border-radius: 4px;
  word-break: break-all;
}

.copyable:hover {
  background: var(--surface-3);
}

.copyable .i {
  width: 13px;
  height: 13px;
  color: var(--text-3);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .console-wrap {
    grid-template-columns: 1fr;
  }

  .side-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    order: -1;
  }
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    z-index: 55;
    transform: translateX(-100%);
    transition: transform 0.18s;
    box-shadow: var(--shadow);
  }

  .app.nav-open .sidebar {
    transform: none;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .page,
  .server-head {
    padding-left: 16px;
    padding-right: 16px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .host-strip {
    grid-template-columns: 1fr 1fr;
  }

  .side-stats {
    grid-template-columns: 1fr 1fr;
  }

  .uploads {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .server-title .power {
    margin-left: 0;
    width: 100%;
  }

  .console {
    height: 60vh;
  }

  .table .actions .btn {
    opacity: 1;
  }

  .hide-sm {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .grid.two,
  .grid.three,
  .grid.four,
  .host-strip {
    grid-template-columns: 1fr;
  }
}

.server-icon-edit {
  position: relative;
  display: inline-flex;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 7px;
  cursor: pointer;
  flex: none;
  overflow: hidden;
}

.server-icon-edit .server-icon {
  width: 100%;
  height: 100%;
}

.server-icon-edit .icon-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  opacity: 0;
  transition: opacity var(--speed);
}

.server-icon-edit:hover .icon-overlay,
.server-icon-edit:focus-visible .icon-overlay {
  opacity: 1;
}
