:root {
  color-scheme: dark;
  --bg: #0c0f0e;
  --panel: #151a18;
  --panel-2: #111614;
  --line: #27312d;
  --text: #ecfdf5;
  --muted: #9fb1aa;
  --mint: #22c55e;
  --coral: #f97316;
  --blue: #38bdf8;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.tabs,
.summary,
.grid,
.split {
  margin-bottom: 16px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
  min-height: 76px;
  padding: 12px 16px 12px 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 18px 50%, rgb(34 197 94 / 0.12), transparent 150px),
    linear-gradient(180deg, #151a18 0%, #101513 100%);
  border-radius: 8px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--mint);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.hero.server-online::before {
  background: var(--mint);
  box-shadow: 0 0 22px rgb(34 197 94 / 0.45);
}

.hero.server-starting::before,
.hero.server-warning::before {
  background: var(--coral);
  box-shadow: 0 0 22px rgb(249 115 22 / 0.45);
}

.hero.server-offline::before {
  background: var(--danger);
  box-shadow: 0 0 22px rgb(239 68 68 / 0.45);
}

.server-mark,
.hero-actions,
.status,
.tabs,
.summary,
.panel-head,
.chart-head-actions,
.legend,
.command-form,
.quick-actions {
  display: flex;
  align-items: center;
}

.server-mark {
  gap: 12px;
  min-width: 0;
}

.server-icon {
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 7px;
  background: linear-gradient(180deg, #102018, #0b120f);
  border: 1px solid #2f4138;
  color: #86efac;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.03);
}

.server-icon::before {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  border: 3px solid #0c0f0e;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 4px rgb(100 116 139 / 0.14), 0 0 18px rgb(100 116 139 / 0.35);
}

.hero.server-online .server-icon::before {
  background: var(--mint);
  box-shadow: 0 0 0 5px rgb(34 197 94 / 0.16), 0 0 24px rgb(34 197 94 / 0.85);
  animation: serverPulse 1.8s ease-in-out infinite;
}

.hero.server-starting .server-icon::before,
.hero.server-warning .server-icon::before {
  background: var(--coral);
  box-shadow: 0 0 0 5px rgb(249 115 22 / 0.16), 0 0 24px rgb(249 115 22 / 0.85);
  animation: serverPulse 1.05s ease-in-out infinite;
}

.hero.server-offline .server-icon::before {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgb(239 68 68 / 0.16), 0 0 24px rgb(239 68 68 / 0.8);
}

@keyframes serverPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }
}

.server-icon span {
  display: block;
  position: relative;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 4px;
  background:
    linear-gradient(180deg, #48c463 0 28%, #2f8f41 28% 38%, #7a4b2b 38% 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.18),
    inset 0 -8px 0 rgb(0 0 0 / 0.1),
    0 6px 16px rgb(0 0 0 / 0.32);
  color: transparent;
  font-size: 0;
  image-rendering: pixelated;
}

.server-icon span::before,
.server-icon span::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 1px;
}

.server-icon span::before {
  top: 4px;
  left: 3px;
  background: #7bed82;
  box-shadow:
    6px -1px 0 #2fac45,
    12px 1px 0 #63d76e,
    17px -2px 0 #1f7d34,
    3px 5px 0 #26833a,
    14px 5px 0 #9be86d;
}

.server-icon span::after {
  top: 11px;
  left: 4px;
  background: #9a6239;
  box-shadow:
    7px 2px 0 #5f3822,
    15px 0 0 #b07443,
    2px 7px 0 #5a351f,
    11px 8px 0 #8a5430,
    17px 7px 0 #6d4227;
}

.server-copy {
  min-width: 0;
}

.server-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.server-state {
  padding: 2px 7px;
  border: 1px solid #2d3b36;
  border-radius: 999px;
  background: #0b100e;
  color: #bbf7d0;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.eyebrow,
.label,
small,
.muted,
.empty {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

h3 {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.tabs,
.metric,
.panel,
.ghost,
.small-button,
.quick-actions button,
.command-form button {
  border: 1px solid var(--line);
}

.hero-meta {
  display: none;
}

.hero-actions {
  align-self: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.status {
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #26332e;
  border-radius: 999px;
  background: #0f1412;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--coral);
}

.status.online .dot {
  background: var(--mint);
}

.status.offline .dot {
  background: var(--danger);
}

.language-switch {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 2px;
  padding: 3px;
  border: 1px solid #26332e;
  border-radius: 999px;
  background: #0f1412;
}

.language-switch button {
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.language-switch button.active {
  background: #22312b;
  color: var(--text);
}

.chart-head-actions {
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.range-switch {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, auto));
  gap: 2px;
  padding: 3px;
  border: 1px solid #26332e;
  border-radius: 6px;
  background: #0f1412;
}

.range-switch button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.range-switch button.active {
  background: #22312b;
  color: var(--text);
}

.ghost,
.small-button,
.quick-actions button,
.command-form button {
  min-height: 36px;
  border-radius: 6px;
  background: #18201d;
  color: var(--text);
}

.ghost,
.small-button {
  padding: 0 12px;
}

.tabs {
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #111614;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: #22312b;
  color: var(--text);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric,
.panel {
  border-radius: 8px;
  background: var(--panel);
}

.metric {
  position: relative;
  min-height: 102px;
  overflow: hidden;
  padding: 12px 14px 11px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.025), transparent 42%),
    #121816;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), transparent 72%);
  opacity: 0.45;
}

.metric:hover {
  transform: translateY(-1px);
  border-color: #365046;
  background:
    radial-gradient(circle at 12% 0%, rgb(34 197 94 / 0.09), transparent 115px),
    linear-gradient(180deg, rgb(255 255 255 / 0.03), transparent 42%),
    #121816;
}

.metric.primary {
  background:
    radial-gradient(circle at 12% 0%, rgb(34 197 94 / 0.14), transparent 130px),
    linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 42%),
    #132019;
}

.metric .label {
  display: block;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric strong {
  display: block;
  margin: 7px 0 8px;
  font-size: clamp(22px, 2vw, 27px);
  line-height: 1;
  letter-spacing: 0;
}

.metric small {
  display: block;
  margin-top: 6px;
  min-height: 15px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #26302c;
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, var(--mint));
  box-shadow: 0 0 14px rgb(34 197 94 / 0.28);
  transition: width 180ms ease;
}

.grid,
.config-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 16px;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
}

.panel {
  padding: 18px;
}

.panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head span {
  color: var(--muted);
}

.mini-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-chart {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101715;
}

.mini-chart > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-chart span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-chart strong {
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

canvas {
  display: block;
  width: 100%;
  height: 260px;
  border-radius: 6px;
}

.mini-chart canvas {
  height: 220px;
  cursor: crosshair;
}

.chart-tooltip {
  position: fixed;
  z-index: 30;
  display: grid;
  gap: 3px;
  min-width: 150px;
  padding: 9px 10px;
  border: 1px solid #355046;
  border-radius: 8px;
  background: rgb(11 16 14 / 0.96);
  color: var(--text);
  box-shadow: 0 14px 36px rgb(0 0 0 / 0.34);
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(12px, -50%);
  transition: opacity 120ms ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip strong {
  font-size: 12px;
}

.chart-tooltip span {
  color: var(--muted);
}

.legend {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
}

.swatch.mint {
  background: var(--mint);
}

.swatch.coral {
  background: var(--coral);
}

.swatch.blue {
  background: var(--blue);
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.facts div,
.config-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.console-output {
  min-height: 360px;
  max-height: 58vh;
  overflow: auto;
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 6px;
  background: #090d0b;
  color: #d1fae5;
  white-space: pre-wrap;
}

.command-form {
  gap: 8px;
}

.command-form input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1412;
  color: var(--text);
}

.command-form button,
.quick-actions button {
  padding: 0 14px;
}

.quick-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.players,
.plain-list {
  min-height: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.players-layout {
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.players-panel,
.lists-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.025), transparent 45%),
    #121816;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035);
}

.players-panel::before,
.lists-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgb(34 197 94 / 0.7), transparent 70%);
  opacity: 0.55;
}

.players-panel .panel-head,
.lists-panel .panel-head {
  position: relative;
  z-index: 1;
}

#playersVersion {
  display: none !important;
}

#adminRefresh {
  display: none !important;
}

.players li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid #23302b;
  border-radius: 7px;
  background:
    radial-gradient(circle at 0% 50%, rgb(34 197 94 / 0.1), transparent 80px),
    #0f1513;
  color: #e4f5ee;
  font-weight: 750;
}

.players li + li {
  margin-top: 8px;
}

.players li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 14px rgb(34 197 94 / 0.55);
}

.players-panel .empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 20px;
  border: 1px dashed #26352f;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgb(34 197 94 / 0.08), transparent 140px),
    #0e1412;
  text-align: center;
  line-height: 1.5;
}

.list-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #23302b;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.024), transparent 46%),
    #0f1513;
}

.list-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #dbece5;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.list-add-button {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #22c55e;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.list-add-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2.5px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgb(34 197 94 / 0.35);
}

.list-add-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.5px;
  height: 15px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgb(34 197 94 / 0.35);
}

.list-add-button:hover {
  transform: translateY(-1px);
  border-color: rgb(34 197 94 / 0.32);
  background:
    radial-gradient(circle at 50% 0%, rgb(134 239 172 / 0.18), transparent 72%),
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.02));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.11),
    0 10px 28px rgb(0 0 0 / 0.22),
    0 0 22px rgb(34 197 94 / 0.14);
}

.list-add-button:active {
  transform: translateY(0) scale(0.96);
  border-color: rgb(34 197 94 / 0.42);
  background:
    radial-gradient(circle at 50% 100%, rgb(34 197 94 / 0.22), transparent 70%),
    rgb(34 197 94 / 0.08);
}

.plain-list li {
  padding: 0;
}

.managed-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 7px 8px 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #101714;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.managed-name + .managed-name,
.plain-list .muted + .muted {
  margin-top: 7px;
}

.managed-name:hover {
  transform: translateY(-1px);
  border-color: #2b4037;
  background: #131d19;
}

.managed-player {
  min-width: 0;
  overflow: hidden;
  color: #e2f2eb;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-empty {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px dashed #26352f;
  border-radius: 7px;
  background: #0d1311;
  font-size: 13px;
}

.managed-name button,
.list-remove-button {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #ef4444;
  font-size: 0;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.list-remove-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background: currentColor;
  filter: drop-shadow(0 0 8px rgb(239 68 68 / 0.35));
  transform: translate(-50%, -50%);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M6 6l1 15h10l1-15'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M6 6l1 15h10l1-15'/%3E%3Cpath d='M10 11v6'/%3E%3Cpath d='M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.managed-name button:hover,
.list-remove-button:hover {
  transform: translateY(-1px);
  border-color: rgb(239 68 68 / 0.34);
  background:
    radial-gradient(circle at 50% 0%, rgb(248 113 113 / 0.17), transparent 72%),
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.02));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.1),
    0 10px 28px rgb(0 0 0 / 0.22),
    0 0 22px rgb(239 68 68 / 0.13);
}

.managed-name button:active,
.list-remove-button:active {
  transform: translateY(0) scale(0.96);
  border-color: rgb(239 68 68 / 0.44);
  background:
    radial-gradient(circle at 50% 100%, rgb(239 68 68 / 0.2), transparent 70%),
    rgb(239 68 68 / 0.08);
}

.list-add-button:focus-visible,
.managed-name button:focus-visible,
.list-remove-button:focus-visible {
  outline: none;
  border-color: currentColor;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.1),
    0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}

.list-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.list-manager {
  display: none;
  grid-template-columns: 0.8fr 1fr 1.2fr;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #23302b;
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 0%, rgb(34 197 94 / 0.08), transparent 150px),
    #0e1412;
}

.list-manager label,
.list-actions {
  display: grid;
  gap: 6px;
}

.list-manager span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.list-manager input,
.list-manager select {
  height: 36px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid #25332e;
  border-radius: 6px;
  background: #0b100f;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.025);
}

.list-manager input:focus,
.list-manager select:focus {
  border-color: #2f6b50;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.035),
    0 0 0 3px rgb(34 197 94 / 0.08);
}

.list-manager input:disabled {
  opacity: 0.45;
}

.list-actions {
  grid-column: 1 / -1;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  padding-top: 2px;
}

.list-actions .small-button {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 6px;
  font-weight: 850;
}

#listAdd {
  border-color: #14723a;
  background:
    linear-gradient(180deg, rgb(134 239 172 / 0.17), transparent),
    #123f26;
  color: #ecfdf5;
}

#listAdd:hover {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgb(34 197 94 / 0.16);
}

#listRemove {
  border-color: #642222;
  background:
    linear-gradient(180deg, rgb(248 113 113 / 0.14), transparent),
    #251111;
  color: #fecaca;
}

#listState {
  justify-self: start;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid #26352f;
  border-radius: 999px;
  background: #0b100e;
  color: #9fb0a9;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.confirm-dialog.list-add-dialog {
  width: min(456px, calc(100vw - 32px));
}

.list-add-dialog form {
  width: auto;
}

.list-dialog-fields {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.list-dialog-fields label {
  display: grid;
  gap: 7px;
}

.list-dialog-fields label[hidden],
.dialog-detail[hidden] {
  display: none;
}

.list-dialog-fields span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.list-dialog-fields input,
.list-dialog-fields select,
.list-dialog-fields textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #26352f;
  border-radius: 7px;
  background: #0b100f;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.025);
}

.list-dialog-fields input,
.list-dialog-fields select {
  height: 40px;
  padding: 0 12px;
}

.list-dialog-fields textarea {
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
}

.list-dialog-fields input:focus,
.list-dialog-fields select:focus,
.list-dialog-fields textarea:focus {
  border-color: #2f6b50;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.035),
    0 0 0 3px rgb(34 197 94 / 0.08);
}

.list-dialog-fields select:disabled {
  opacity: 0.55;
}

.list-dialog-fields small {
  font-size: 12px;
  line-height: 1.45;
}

#listDialogAdd {
  border-color: #14723a;
  background:
    linear-gradient(180deg, rgb(134 239 172 / 0.17), transparent),
    #123f26;
  color: #ecfdf5;
}

#listDialogAdd:hover:not(:disabled) {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgb(34 197 94 / 0.16);
}

#listDialogAdd:disabled {
  border-color: #202925;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.018), transparent),
    #0c1110;
  color: #586761;
  box-shadow: none;
  filter: saturate(0.65);
}

.refresh-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 32px;
  padding: 0;
  border-color: #24342f;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent),
    #0f1513;
  color: #cfe0d8;
  font-size: 0;
}

.refresh-button::before {
  content: "";
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.8-4.2L13 11h8V3l-3.3 3.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.8-4.2L13 11h8V3l-3.3 3.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.refresh-button:hover {
  border-color: #315347;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.06), transparent),
    #14201b;
  box-shadow: 0 0 20px rgb(34 197 94 / 0.12);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.property-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 12px;
}

.config-search {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #1f2d28;
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 0%, rgb(34 197 94 / 0.08), transparent 180px),
    linear-gradient(180deg, rgb(255 255 255 / 0.025), transparent),
    #0d1311;
}

.config-search .property-search-box {
  max-width: 620px;
}

.property-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.property-search-box input {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 38px;
  border: 1px solid #24342f;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent),
    #0d1311;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.property-search-box input::placeholder {
  color: #6f817a;
}

.property-search-box input::-webkit-search-cancel-button,
.property-search-box input::-webkit-search-decoration {
  display: none;
  appearance: none;
  -webkit-appearance: none;
}

.property-search-box input:focus {
  border-color: #2f6e51;
  background:
    radial-gradient(circle at 18% 0%, rgb(34 197 94 / 0.11), transparent 130px),
    linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent),
    #0e1612;
  box-shadow:
    0 0 0 3px rgb(34 197 94 / 0.08),
    0 12px 28px rgb(0 0 0 / 0.18);
}

.property-search-icon,
.property-search-clear::before {
  content: "";
  position: absolute;
  display: block;
  background: currentColor;
  pointer-events: none;
}

.property-search-icon {
  left: 14px;
  width: 15px;
  height: 15px;
  color: #7f918a;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.8 18a7.2 7.2 0 1 1 5.02-2.05l4.62 4.61-1.42 1.42-4.6-4.62A7.15 7.15 0 0 1 10.8 18Zm0-2a5.2 5.2 0 1 0 0-10.4 5.2 5.2 0 0 0 0 10.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.8 18a7.2 7.2 0 1 1 5.02-2.05l4.62 4.61-1.42 1.42-4.6-4.62A7.15 7.15 0 0 1 10.8 18Zm0-2a5.2 5.2 0 1 0 0-10.4 5.2 5.2 0 0 0 0 10.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.property-search-clear {
  position: absolute;
  right: 5px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8da099;
}

.property-search-clear::before {
  position: static;
  width: 14px;
  height: 14px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.property-search-clear:hover,
.property-search-clear:focus-visible {
  background: rgb(255 255 255 / 0.06);
  color: #d1fae5;
}

.property-search-count {
  flex: 0 0 auto;
  color: #8da099;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.config-mode-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 3px;
  margin: 2px 0 10px;
  padding: 4px;
  border: 1px solid #26342f;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent),
    #0b100e;
}

.config-mode-switch button {
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.config-mode-switch button.active {
  background:
    linear-gradient(180deg, rgb(34 197 94 / 0.22), rgb(34 197 94 / 0.08)),
    #14231b;
  color: #dcfce7;
  box-shadow: inset 0 0 0 1px rgb(134 239 172 / 0.18);
}

.config-mode-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.editor-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.editor-row.dangerous {
  border-color: #514126;
  background:
    linear-gradient(180deg, rgb(249 115 22 / 0.06), transparent),
    var(--panel-2);
}

.editor-row.locked {
  opacity: 0.72;
}

.editor-row strong,
.editor-row small {
  display: block;
}

.editor-row input,
.editor-row select {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1412;
  color: var(--text);
}

.editor-row input:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  -webkit-text-security: disc;
}

.toggle-control {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 4px 5px 4px 12px;
  border: 1px solid #26342f;
  border-radius: 999px;
  background: #0f1412;
}

.toggle-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  order: 2;
  flex: 0 0 52px;
  height: 28px;
  border: 1px solid #33413b;
  border-radius: 999px;
  background: #18201d;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.35);
  transition: transform 160ms ease, background 160ms ease;
}

.toggle-control input:checked + .toggle-track {
  border-color: #3f7b56;
  background:
    linear-gradient(180deg, rgb(34 197 94 / 0.45), rgb(34 197 94 / 0.2)),
    #102419;
  box-shadow: 0 0 18px rgb(34 197 94 / 0.12);
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(24px);
  background: #dcfce7;
}

.toggle-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.editor-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.server-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 5px 6px;
  border: 1px solid #2b3833;
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgb(34 197 94 / 0.12), transparent 125px),
    linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent 55%),
    #0d1311;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.045),
    0 14px 34px rgb(0 0 0 / 0.24);
}

.server-controls .control-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 6px 0 8px;
  color: #7f918a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.server-controls .small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #d8e8e1;
  font-size: 0;
  font-weight: 750;
  box-shadow: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.server-controls [data-server-action]::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 1;
  mask: var(--server-action-icon) center / contain no-repeat;
  -webkit-mask: var(--server-action-icon) center / contain no-repeat;
}

.server-controls [data-server-action="start"] {
  --server-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7L8 5Z'/%3E%3C/svg%3E");
}

.server-controls [data-server-action="stop"] {
  --server-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6h12v12H6V6Z'/%3E%3C/svg%3E");
}

.server-controls [data-server-action="restart"] {
  --server-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 4v5h-5l1.9-1.9A6 6 0 1 0 18 12h2a8 8 0 1 1-3.7-6.7L18 4Z'/%3E%3C/svg%3E");
}

.server-controls [data-server-action="kill"] {
  --server-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 2h8l6 6v8l-6 6H8l-6-6V8l6-6Zm3 5v7h2V7h-2Zm0 9v2h2v-2h-2Z'/%3E%3C/svg%3E");
}

.server-controls .small-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgb(255 255 255 / 0.1);
  background:
    radial-gradient(circle at 50% 0%, rgb(255 255 255 / 0.14), transparent 68%),
    rgb(255 255 255 / 0.055);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.08),
    0 8px 24px rgb(0 0 0 / 0.24);
}

.server-controls .small-button:active:not(:disabled) {
  transform: translateY(0) scale(0.95);
}

.server-controls [data-server-action="start"] {
  color: #22c55e;
}

.server-controls [data-server-action="start"]:hover:not(:disabled) {
  border-color: rgb(34 197 94 / 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgb(34 197 94 / 0.22), transparent 70%),
    rgb(34 197 94 / 0.08);
  box-shadow: 0 0 22px rgb(34 197 94 / 0.18);
}

.server-controls [data-server-action="stop"] {
  color: #d7e4de;
}

.server-controls [data-server-action="stop"]:hover:not(:disabled) {
  border-color: rgb(215 228 222 / 0.2);
  background:
    radial-gradient(circle at 50% 0%, rgb(215 228 222 / 0.15), transparent 70%),
    rgb(255 255 255 / 0.055);
}

.server-controls [data-server-action="restart"] {
  color: #7dd3fc;
}

.server-controls [data-server-action="restart"]:hover:not(:disabled) {
  border-color: rgb(56 189 248 / 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgb(56 189 248 / 0.2), transparent 70%),
    rgb(56 189 248 / 0.07);
  box-shadow: 0 0 22px rgb(56 189 248 / 0.16);
}

.server-controls .danger-button {
  color: #f87171;
}

.server-controls .danger-button:hover:not(:disabled) {
  border-color: rgb(248 113 113 / 0.26);
  background:
    radial-gradient(circle at 50% 0%, rgb(248 113 113 / 0.22), transparent 70%),
    rgb(239 68 68 / 0.08);
  box-shadow: 0 0 24px rgb(239 68 68 / 0.18);
}

.server-controls .small-button:disabled {
  border-color: transparent;
  background: transparent;
  color: #47544f;
  opacity: 0.7;
  box-shadow: none;
  filter: saturate(0.55);
}

.server-controls .control-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: min(240px, 34vw);
  padding: 0 12px 0 10px;
  border: 1px solid #244338;
  border-radius: 6px;
  background:
    radial-gradient(circle at 18% 50%, rgb(34 197 94 / 0.14), transparent 42px),
    #0a100d;
  color: #b7cac1;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  user-select: none;
}

.server-controls .control-state #serverActionState {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-controls .control-state.is-hidden {
  display: none;
}

.server-controls .control-state-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgb(34 197 94 / 0.55);
}

.danger-button {
  border-color: #7f1d1d;
  background: #3a1717;
}

.danger-button:disabled,
.small-button:disabled {
  cursor: not-allowed;
  opacity: 1;
  border-color: #202925;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.018), transparent),
    #0c1110;
  color: #586761;
  box-shadow: none;
  filter: saturate(0.65);
}

.confirm-dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #3b4742;
  border-radius: 8px;
  background: #121715;
  color: var(--text);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.55);
}

.confirm-dialog::backdrop {
  background: rgb(4 8 7 / 0.72);
  backdrop-filter: blur(3px);
}

.confirm-dialog form {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 18px;
}

.dialog-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.dialog-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  background: #2a1212;
  color: #fecaca;
  font-weight: 800;
}

.dialog-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.dialog-head p,
.dialog-detail {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dialog-detail {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f1412;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.config-plan {
  min-height: 120px;
  margin: 14px 0 0;
  padding: 12px;
  border-radius: 6px;
  background: #090d0b;
  color: #d1fae5;
  white-space: pre-wrap;
}

.config-restart-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgb(245 158 11 / 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 0%, rgb(245 158 11 / 0.14), transparent 240px),
    linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent 65%),
    #15130d;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.05),
    0 16px 34px rgb(0 0 0 / 0.2);
}

.config-restart-suggestion.is-hidden {
  display: none;
}

.config-restart-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.config-restart-copy strong {
  color: #fef3c7;
  font-size: 14px;
}

.config-restart-copy span {
  color: #c9bfa6;
  font-size: 13px;
  line-height: 1.45;
}

.config-restart-suggestion .small-button {
  flex: 0 0 auto;
  border-color: rgb(245 158 11 / 0.38);
  background:
    linear-gradient(180deg, rgb(251 191 36 / 0.16), transparent),
    #2a1e0a;
  color: #fff7ed;
}

.config-row {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  min-height: 56px;
  padding: 10px 11px;
  border: 1px solid #24312c;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.022), transparent 60%),
    #101613;
}

.config-row strong,
.config-row small {
  display: block;
}

.config-row strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.config-row small {
  margin-top: 3px;
  color: #8da099;
  line-height: 1.25;
}

.config-row code {
  justify-self: end;
  max-width: 100%;
  padding-top: 1px;
  text-align: right;
}

code {
  color: #bef264;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.command {
  max-width: 520px;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .hero,
  .grid,
  .split,
  .config-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

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

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

  .list-columns {
    grid-template-columns: 1fr;
  }

  .list-manager {
    grid-template-columns: 1fr;
  }

  .list-actions {
    grid-template-columns: 1fr;
  }

  .chart-head-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100vw - 20px, 1480px);
    padding-top: 10px;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  .mini-charts {
    grid-template-columns: 1fr;
  }

  .facts div,
  .config-row {
    grid-template-columns: 1fr;
  }

  .command-form {
    display: grid;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

  .range-switch {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .range-switch button {
    padding: 0 4px;
  }
}

.mods-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.mods-browse-panel .config-search,
.mods-installed-panel .config-search {
  margin-bottom: 12px;
}

.mod-results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 460px;
  overflow-y: auto;
}

.mod-result {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.mod-result:hover {
  border-color: #2f4a3e;
  background: #131a17;
}

.mod-result[aria-pressed="true"] {
  border-color: var(--mint);
  background: rgb(34 197 94 / 0.08);
}

.mod-result-title {
  font-weight: 600;
  font-size: 14px;
}

.mod-result-desc {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mod-result-meta {
  color: var(--muted);
  font-size: 11px;
}

.mod-detail-description {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.mod-install-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.mod-version-label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.mod-version-label select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #24342f;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
}

.mod-version-label select:disabled {
  opacity: 0.5;
}

.mod-sync-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.mod-sync-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--mint);
}

.mods-installed {
  display: grid;
  gap: 4px;
  max-height: 420px;
  overflow-y: auto;
}

.mod-installed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 12px;
}

.mod-installed-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mod-installed-meta {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mod-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mod-tag-sync {
  border: 1px solid rgb(56 189 248 / 0.4);
  background: rgb(56 189 248 / 0.12);
  color: var(--blue);
}

@media (max-width: 900px) {
  .mods-layout {
    grid-template-columns: 1fr;
  }
}

.mod-source-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 3px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
}

.mod-source-switch button {
  padding: 5px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.mod-source-switch button.active {
  background: rgb(34 197 94 / 0.16);
  color: var(--text);
}

.mod-source-hint {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgb(249 115 22 / 0.35);
  border-radius: 8px;
  background: rgb(249 115 22 / 0.08);
  color: var(--coral);
  font-size: 12px;
}

.mods-installed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.mod-tag-update {
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgb(249 115 22 / 0.4);
  background: rgb(249 115 22 / 0.12);
  color: var(--coral);
  font-size: 11px;
}

.mod-installed-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
}

.mod-row-button {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.mod-row-button:hover {
  border-color: #3a4b44;
  color: var(--text);
  background: rgb(255 255 255 / 0.03);
}

.mod-row-update {
  border-color: rgb(249 115 22 / 0.45);
  color: var(--coral);
}

.mod-row-remove:hover {
  border-color: rgb(239 68 68 / 0.5);
  color: var(--danger);
}

.mods-quarantine-panel {
  margin-top: 16px;
}

.mod-filter-toggle {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #24342f;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.mod-filter-toggle:hover {
  border-color: #3a4b44;
  color: var(--text);
}

.mod-filter-toggle.active {
  border-color: rgb(56 189 248 / 0.5);
  background: rgb(56 189 248 / 0.12);
  color: var(--blue);
}

.mod-filter-toggle[hidden] {
  display: none;
}

.mod-result {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.mod-result-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #0d1311;
  border: 1px solid var(--line);
}

.mod-result-icon-empty {
  display: block;
}

.mod-result-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mod-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mod-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #0d1311;
}

.mod-detail-icon[hidden] {
  display: none;
}

.mod-detail-headings {
  min-width: 0;
}

.mod-detail-headings h2 {
  margin: 0;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mod-detail-stats {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.mod-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.mod-detail-links:empty {
  display: none;
}

.mod-detail-links a {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.mod-detail-links a:hover {
  border-color: var(--mint);
  color: var(--text);
}

.mod-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mod-detail-tags:empty {
  display: none;
}

.mod-tag-category {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.mod-detail-body {
  max-height: 260px;
  overflow-y: auto;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mod-detail-body[hidden] {
  display: none;
}

.mod-detail-body h4 {
  margin: 12px 0 4px;
  color: var(--text);
  font-size: 13px;
}

.mod-detail-body h4:first-child {
  margin-top: 0;
}

.mod-detail-body p {
  margin: 0 0 8px;
}

.mod-detail-body ul {
  margin: 0 0 8px;
  padding-left: 18px;
}

.mod-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 6px 0;
}

.mod-detail-body a {
  color: var(--blue);
}

.mod-detail-body code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #0d1311;
  font-size: 11px;
}

.mod-detail-body {
  max-height: 320px;
}

.mod-detail-body iframe,
.mod-detail-body video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.mod-detail-body table {
  width: 100%;
  margin: 8px 0;
  border-collapse: collapse;
  font-size: 11px;
}

.mod-detail-body th,
.mod-detail-body td {
  padding: 5px 8px;
  border: 1px solid var(--line);
  text-align: left;
}

.mod-detail-body th {
  background: #0d1311;
  color: var(--text);
}

.mod-detail-body blockquote {
  margin: 8px 0;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.mod-detail-body pre {
  margin: 8px 0;
  padding: 10px;
  border-radius: 8px;
  background: #0d1311;
  overflow-x: auto;
}

.mod-detail-body pre code {
  padding: 0;
  background: none;
}

.mod-detail-body hr {
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.mod-detail-body h1,
.mod-detail-body h2,
.mod-detail-body h3,
.mod-detail-body h5,
.mod-detail-body h6 {
  margin: 12px 0 4px;
  color: var(--text);
  font-size: 13px;
}

.mod-detail-body center {
  display: block;
  text-align: center;
}

.mod-detail-body strong,
.mod-detail-body b {
  color: var(--text);
}

.mod-tag-custom {
  border: 1px solid rgb(34 197 94 / 0.4);
  background: rgb(34 197 94 / 0.12);
  color: var(--mint);
}

.mod-installed-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(4 8 7 / 0.85);
  backdrop-filter: blur(4px);
}

.login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(360px, 100%);
  padding: 28px 24px;
  border: 1px solid #3b4742;
  border-radius: 8px;
  background: #121715;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.55);
  text-align: center;
}

.login-card .server-icon {
  width: 38px;
}

.login-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-card input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
}

.login-card .small-button {
  width: 100%;
  min-height: 38px;
}

.login-error {
  margin: 0;
  min-height: 1em;
  color: var(--danger);
  font-size: 0.85rem;
}
