:root {
  --bg: #171313;
  --surface: #211c1b;
  --surface-soft: #2c2422;
  --ink: #f1e8dc;
  --muted: #b9ad9e;
  --line: #4c332c;
  --accent: #f8490a;
  --accent-dark: #ff7b45;
  --ok: #35b86b;
  --warn: #e0a331;
  --danger: #d84a43;
  --steel: #d7c8b8;
  --violet: #c7a8ff;
  --radius: 8px;
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body.light-mode {
  --bg: #f7f3ed;
  --surface: #ffffff;
  --surface-soft: #eee4da;
  --ink: #1f1714;
  --muted: #655851;
  --line: #d8c8b9;
  --accent: #f8490a;
  --accent-dark: #b43710;
  --steel: #3e3632;
  --violet: #6c49ad;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #171313;
  color: #f8fafc;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

body.light-mode .sidebar {
  background: #fff8ef;
  color: #1f1714;
  border-right: 1px solid var(--line);
}

body.light-mode .brand {
  border-bottom-color: var(--line);
}

body.light-mode .brand p,
body.light-mode .nav-group summary,
body.light-mode .nav-subheading,
body.light-mode .side-panel h2,
body.light-mode .side-panel li strong {
  color: var(--ink);
}

body.light-mode .tab,
body.light-mode .side-panel li,
body.light-mode .side-panel p {
  color: var(--muted);
}

body.light-mode .tab:hover,
body.light-mode .tab.active {
  background: rgba(248, 73, 10, 0.12);
  color: var(--ink);
}

body.light-mode .side-panel {
  border-color: var(--line);
  background: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:hover h1,
.brand-link:focus-visible h1 {
  color: var(--accent-dark);
}

.brand-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.auth-brand {
  margin: -4px 0 22px;
  padding: 0 0 18px;
  color: var(--ink);
  border-bottom-color: var(--line);
}

.auth-brand p,
.auth-panel p,
.empty-state p {
  color: var(--muted);
}

.auth-panel h2,
.tool-hub h1,
.empty-state h2 {
  margin: 0;
  letter-spacing: 0;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-link,
.secondary-link,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 800;
}

.primary-link {
  background: var(--accent);
  color: #171313;
  border: 0;
}

.secondary-link,
.text-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.text-button {
  cursor: pointer;
}

.tool-hub {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 32px 24px;
}

.hub-page {
  background: #171313;
  color: #b9ad9e;
}

.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.hub-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-request-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid #f8490a;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.admin-request-panel[hidden] {
  display: none;
}

.admin-request-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-request-panel code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #171313;
  color: var(--ink);
  padding: 10px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.tool-tile {
  min-height: 150px;
  border: 1px solid #f8490a;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  text-decoration: none;
  overflow: hidden;
}

.tool-tile[hidden] {
  display: none;
}

.tool-tile.image-tile {
  display: grid;
  grid-template-rows: 132px auto auto;
  gap: 12px;
  padding: 0 0 18px;
}

.tool-tile.image-tile img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  display: block;
}

.tool-tile span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-tile.image-tile span,
.tool-tile.image-tile strong {
  margin-left: 18px;
  margin-right: 18px;
}

.tool-tile strong {
  display: block;
  margin-top: 26px;
  max-width: 38ch;
  font-size: 22px;
  line-height: 1.2;
}

.tool-tile.disabled {
  color: var(--muted);
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
}

.empty-state.inline {
  border: 0;
  padding: 14px 0;
}

.invoice-page {
  width: min(1280px, 100%);
}

.invoice-checker-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.invoice-checker-controls {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 1.6fr) minmax(150px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
}

.invoice-checker-controls input,
.invoice-checker-controls select,
.invoice-advanced-grid input {
  width: 100%;
}

.invoice-advanced {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.invoice-advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
}

.invoice-advanced-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.invoice-status {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.invoice-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.invoice-summary-grid[hidden],
.invoice-downloads[hidden],
.invoice-results[hidden] {
  display: none;
}

.invoice-downloads {
  justify-content: flex-start;
  margin-top: 14px;
}

.invoice-table-wrap {
  max-height: calc(100vh - 350px);
  margin-top: 14px;
  background: var(--surface);
}

.invoice-table-wrap td {
  max-width: 340px;
  white-space: pre-wrap;
  vertical-align: top;
}

.invoice-table-wrap tr.positive .invoice-delta-cell {
  color: #57d77a;
  font-weight: 900;
}

.invoice-table-wrap tr.negative .invoice-delta-cell {
  color: #ff7b7b;
  font-weight: 900;
}

.diagnostics-page .summary-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.diagnostics-section {
  margin-top: 14px;
}

.diagnostics-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 16px;
}

.table-header.compact {
  padding: 0 0 10px;
}

.diagnostic-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.diagnostic-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-soft);
}

.diagnostic-list span {
  color: var(--muted);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f8490a;
  color: #171313;
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.side-panel h2,
.side-panel p,
.insight h3,
.table-header h3,
.table-header p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  letter-spacing: 0;
}

.brand p {
  color: #afbac8;
  font-size: 13px;
}

.region-tabs {
  display: grid;
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 0 6px;
  color: #eef5fb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style-position: outside;
}

.nav-group summary strong {
  color: #ff9a6b;
  font-size: 12px;
}

.nav-group-items {
  display: grid;
  gap: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-subheading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 3px;
  color: #eef5fb;
  font-size: 12px;
  font-weight: 900;
}

.nav-subheading strong {
  color: #ff9a6b;
  font-size: 12px;
}

.tab {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  padding: 9px 10px;
  cursor: pointer;
}

.tab:hover,
.tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.tab strong {
  font-size: 12px;
  color: #ff9a6b;
}

.side-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.side-panel h2 {
  font-size: 13px;
  color: #dce6f2;
}

.side-panel ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.side-panel li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #b9c4d2;
  font-size: 13px;
}

.side-panel li strong {
  color: #ffffff;
}

.side-panel p {
  margin-top: 10px;
  color: #b9c4d2;
  font-size: 13px;
  line-height: 1.5;
}

.content {
  padding: 24px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar h2 {
  margin-top: 3px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.search,
.select {
  display: grid;
  gap: 6px;
}

.search {
  position: relative;
}

.search span,
.select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search input,
.select select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
}

.theme-toggle {
  align-self: end;
  min-height: 40px;
}

.icon-button.settings-button,
.icon-button.tools-button {
  align-self: end;
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.search input {
  width: min(320px, 34vw);
}

.search-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  width: min(420px, 82vw);
  max-height: min(460px, 70vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 6px;
}

.search-results.visible {
  display: grid;
  gap: 4px;
}

.search-results button {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 8px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.search-results button:hover {
  background: var(--surface-soft);
}

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

.search-results small {
  grid-column: 2;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-kind {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 2px 7px;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
}

.search-empty {
  display: grid;
  gap: 3px;
  padding: 10px;
}

.search-empty span {
  color: var(--muted);
  font-size: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric,
.insight,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric {
  padding: 14px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.metric small {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: var(--muted);
}

.insight-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  margin-bottom: 14px;
}

.insight-row[hidden],
.insight[hidden] {
  display: none;
}

.insight-row.overview-commercial-hidden {
  grid-template-columns: 1fr;
}

.insight {
  padding: 16px;
}

.insight h3,
.table-header h3 {
  font-size: 16px;
}

.rank-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.rank-item strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

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

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

.commercial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.commercial > div {
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.commercial span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.commercial strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.commercial small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.overview-region-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.overview-region-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 2px 8px;
}

.overview-region-list strong {
  color: var(--ink);
}

.pending {
  color: var(--violet);
}

.insight p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.table-wrap {
  overflow: hidden;
}

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

.table-header p {
  margin-top: 4px;
  color: var(--muted);
}

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

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-right: 5px;
}

.dot.ok {
  background: var(--ok);
}

.dot.warn {
  background: var(--warn);
}

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

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

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

th {
  position: sticky;
  top: 0;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  z-index: 1;
}

td {
  font-size: 13px;
}

th.col-node,
td.col-node {
  width: 18%;
  min-width: 180px;
}

th.col-games,
td.col-games {
  width: 150px;
  max-width: 150px;
}

th.col-metric,
td.col-metric {
  width: 92px;
  min-width: 82px;
}

th.col-money,
td.col-money {
  width: 92px;
  min-width: 84px;
}

th.col-vendor,
td.col-vendor {
  width: 120px;
  min-width: 105px;
}

th.col-revenue,
td.col-revenue {
  width: 118px;
  min-width: 105px;
}

td.col-games .stack {
  max-width: 150px;
}

.game-preview {
  display: block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-row td {
  background: var(--surface-soft);
  padding-block: 10px;
}

.group-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.group-summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.group-summary span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.group-node-details {
  margin-top: 9px;
}

.group-node-details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  list-style-position: inside;
  padding: 2px 8px;
}

.group-node-details summary strong {
  color: var(--ink);
}

.group-node-details summary small {
  color: var(--warn);
  font-weight: 900;
}

.group-node-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.group-node-chip {
  display: inline-grid;
  gap: 2px;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 6px 8px;
}

.group-node-chip.shared {
  border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
}

.group-node-chip strong,
.group-node-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-node-chip span {
  color: var(--muted);
  font-size: 12px;
}

.group-node-chip .node-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  white-space: normal;
}

.group-node-chip .node-tag-list em {
  display: inline-flex;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  padding: 1px 6px;
  white-space: nowrap;
}

.node {
  display: grid;
  gap: 4px;
}

.node strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.node span,
.subtext {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--surface-soft);
  color: var(--steel);
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ok);
}

.status.warn::before {
  background: var(--warn);
}

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

.stack {
  display: grid;
  gap: 4px;
}

.inline-toggle {
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-weight: 800;
  font: inherit;
}

.inline-toggle:hover {
  color: var(--accent);
}

.node-server-expanded-row td {
  padding: 0;
  background: color-mix(in srgb, var(--surface-soft) 74%, var(--surface));
}

tr.search-highlight td,
.server-detail.search-highlight {
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  box-shadow: inset 3px 0 0 var(--warn);
}

tr.muted-row td {
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
}

.metrics-node-server-row td {
  padding: 0 12px 12px;
  background: color-mix(in srgb, var(--surface-soft) 72%, var(--surface));
}

.metrics-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 6px;
}

.metrics-history-chip {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 6px 8px;
  color: var(--muted);
  font-size: 11px;
}

.metrics-history-chip strong {
  color: var(--ink);
  font-size: 12px;
}

.metrics-history-chip span,
.metrics-history-chip small {
  overflow-wrap: anywhere;
}

.metrics-history-chip.muted {
  opacity: 0.65;
}

.metrics-server-list {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
}

.metrics-server-list.muted {
  color: var(--muted);
}

.metrics-server-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(80px, auto) minmax(180px, auto) minmax(80px, auto) minmax(70px, auto);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

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

.metrics-server-item.pressure {
  box-shadow: inset 3px 0 0 var(--danger);
  padding-left: 8px;
}

.metrics-server-item strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.metrics-server-item small {
  color: var(--muted);
}

.metrics-server-item .netdata-swap,
.metrics-server-item .netdata-pressure {
  color: var(--danger);
  font-weight: 900;
}

.server-detail.search-highlight {
  border-radius: 6px;
  padding-left: 8px;
}

.games-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.games-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
}

.games-panel-head strong {
  color: var(--ink);
  font-size: 14px;
}

.egg-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.egg-jump-nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  padding: 3px 9px;
  font: inherit;
  font-size: 12px;
}

.egg-jump-nav button:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

.egg-jump-nav span {
  color: var(--muted);
  font-weight: 800;
}

.netdata-node-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--steel);
  font-size: 12px;
}

.netdata-node-summary strong {
  color: var(--ink);
}

.netdata-node-summary small {
  color: var(--muted);
}

.netdata-node-summary.muted {
  color: var(--muted);
}

.netdata-node-chip {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.netdata-node-chip.ok {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
  color: var(--ok);
}

.netdata-node-chip.warn {
  border-color: color-mix(in srgb, var(--warn) 55%, var(--line));
  color: var(--warn);
}

.netdata-node-chip.muted {
  color: var(--muted);
}

.advanced-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid #20f070;
  border-radius: var(--radius);
  background: #132418;
  color: #d7ffe3;
  padding: 14px 16px;
}

.advanced-banner strong {
  display: block;
}

.advanced-banner span {
  color: #98dcae;
  font-size: 13px;
}

body.advanced-mode .advanced-banner {
  display: flex;
}

.stargazer-stage-page {
  background: #171313;
  color: #b9ad9e;
  overflow-x: hidden;
}

.stargazer-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #171313;
}

.choice-stage {
  align-content: center;
  gap: 18px;
}

.choice-stage h1 {
  margin: 0;
  color: #b9ad9e;
  font-size: clamp(28px, 5vw, 54px);
  letter-spacing: 0;
}

.stargazer-image-wrap {
  position: relative;
  max-width: 100%;
}

.stargazer-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stargazer-wrap {
  width: min(94vw, 1672px);
  aspect-ratio: 1672 / 941;
}

.choice-wrap {
  width: min(90vw, 594px);
  aspect-ratio: 594 / 514;
}

.image-hotspot {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.image-hotspot:focus-visible {
  outline: 2px solid #f8490a;
  outline-offset: 3px;
}

.rabbit-hotspot {
  left: 69%;
  top: 84%;
  width: 8%;
  height: 12%;
  border-radius: 999px;
}

.pill-hotspot {
  top: 58%;
  width: 20%;
  height: 18%;
  border-radius: 999px;
}

.red-pill-hotspot {
  left: 19%;
}

.blue-pill-hotspot {
  left: 61%;
}

.rabbit-dialog {
  width: min(360px, calc(100vw - 32px));
  border: 1px solid #f8490a;
  border-radius: var(--radius);
  background: #211c1b;
  color: #b9ad9e;
  padding: 20px;
}

.rabbit-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.rabbit-dialog p {
  margin: 0 0 18px;
  color: #f1e8dc;
  font-size: 20px;
  font-weight: 800;
}

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

.settings-dialog,
.tools-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.settings-dialog::backdrop,
.tools-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.tools-dialog.starburst-open,
.tools-dialog.singularity-open {
  width: min(920px, calc(100vw - 32px));
}

.tools-dialog.kehrwoche-open {
  width: min(1240px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  overflow-x: hidden;
}

.settings-panel,
.tools-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.settings-header h2,
.settings-section h3 {
  margin: 0;
  letter-spacing: 0;
}

.settings-header h2 {
  font-size: 22px;
}

.settings-section {
  display: grid;
  gap: 10px;
}

.settings-section h3 {
  font-size: 14px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 4px;
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.segmented-control button.active {
  background: var(--accent);
  color: #171313;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 0 12px;
  color: var(--ink);
  font-weight: 800;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.checkbox-row.compact {
  min-height: 40px;
  align-self: end;
}

.tool-action-list {
  display: grid;
  gap: 10px;
}

.tool-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 14px;
}

.tool-action span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-action strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.tool-action p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.tool-action button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.tools-dialog.starburst-open .tool-action,
.tools-dialog.singularity-open .tool-action,
.tools-dialog.kehrwoche-open .tool-action {
  display: none;
}

.starburst-panel,
.singularity-panel,
.kehrwoche-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 14px;
}

.starburst-panel[hidden],
.singularity-panel[hidden],
.kehrwoche-panel[hidden] {
  display: none;
}

.starburst-tool-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.starburst-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px;
}

.language-toggle button {
  min-width: 42px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.language-toggle button.active {
  background: var(--accent);
  color: #171313;
}

.starburst-tool-header span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.starburst-tool-header strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.starburst-controls {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(160px, 1.2fr) minmax(96px, 0.7fr) minmax(140px, 1fr);
  gap: 10px;
  align-items: end;
}

.starburst-controls .checkbox-row {
  min-width: 118px;
}

.starburst-controls .split-nonmonthly {
  grid-column: span 3;
}

.starburst-controls .search input,
.starburst-controls .select select {
  width: 100%;
}

.starburst-summary {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.starburst-table-wrap {
  max-height: min(56vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.starburst-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.starburst-table-wrap th,
.starburst-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.starburst-table-wrap th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.starburst-panel .dialog-actions {
  justify-content: flex-start;
}

.singularity-note {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

.singularity-package-list {
  display: grid;
  gap: 8px;
}

.singularity-package-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.3fr) minmax(88px, 0.7fr) minmax(108px, 0.8fr) minmax(108px, 0.8fr) minmax(82px, 0.6fr) 40px;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
}

.singularity-package-row input {
  width: 100%;
}

.singularity-remove-package {
  align-self: end;
}

.singularity-remove-package:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.singularity-actions {
  justify-content: flex-start;
}

.primary-action {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #171313;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 900;
}

.singularity-summary {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
}

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

.singularity-metrics .metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
}

.singularity-metrics .metric-card span,
.singularity-metrics .metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.singularity-metrics .metric-card strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
  letter-spacing: 0;
}

.singularity-table-wrap {
  max-height: min(42vh, 420px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.singularity-table-wrap[hidden] {
  display: none;
}

.singularity-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.singularity-table-wrap th,
.singularity-table-wrap td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.singularity-table-wrap th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.singularity-region-row {
  background: var(--surface);
}

.singularity-region-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.singularity-region-toggle span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 12px;
}

.singularity-node-row td:first-child {
  padding-left: 42px;
  color: var(--muted);
  font-weight: 800;
}

.kehrwoche-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.kehrwoche-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.kehrwoche-grid section,
.kehrwoche-panel > section {
  display: grid;
  gap: 8px;
}

.kehrwoche-grid h3,
.kehrwoche-panel > section h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.kehrwoche-panel .singularity-table-wrap {
  max-height: none;
  overflow: visible;
}

.kehrwoche-panel .singularity-table-wrap table {
  table-layout: fixed;
}

.kehrwoche-panel .singularity-table-wrap th,
.kehrwoche-panel .singularity-table-wrap td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.kehrwoche-panel .singularity-table-wrap th {
  position: static;
}

.kehrwoche-suggestion-list {
  display: grid;
  gap: 10px;
}

.kehrwoche-suggestion {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.kehrwoche-node-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.kehrwoche-node-card.source {
  border-color: rgba(248, 73, 10, 0.72);
  background: rgba(248, 73, 10, 0.12);
}

.kehrwoche-node-card.target {
  border-color: rgba(119, 180, 130, 0.52);
  background: rgba(119, 180, 130, 0.09);
}

.kehrwoche-node-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.kehrwoche-node-card header span,
.kehrwoche-save span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kehrwoche-node-card.source header span {
  color: #ff9a6d;
}

.kehrwoche-node-card.source header strong {
  color: #ffd0bd;
}

.kehrwoche-node-card header strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.kehrwoche-save {
  text-align: right;
  display: grid;
  justify-items: end;
  gap: 4px;
}

.kehrwoche-copy-transfer {
  font-size: 12px;
  line-height: 1.2;
}

.kehrwoche-source-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kehrwoche-source-stats span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.kehrwoche-target-stack {
  display: grid;
  gap: 10px;
}

.kehrwoche-target-block {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.kehrwoche-details {
  color: var(--muted);
  font-weight: 800;
}

.kehrwoche-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.kehrwoche-server-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.kehrwoche-server-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(220px, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 8px;
}

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

.kehrwoche-server-row small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.kehrwoche-server-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.kehrwoche-server-limits span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 4px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.kehrwoche-empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
  color: var(--muted);
  font-weight: 800;
}

.kehrwoche-empty-state.compact {
  padding: 8px;
}

.secondary-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.58;
}

.matrix-transition-page {
  margin: 0;
  background: #000000;
  overflow: hidden;
}

.matrix-transition {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000000;
  isolation: isolate;
}

.matrix-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  background: #000000;
}

.matrix-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 255, 120, 0.08), transparent 36%),
    radial-gradient(circle at 50% 100%, rgba(0, 120, 80, 0.12), transparent 48%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.55), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.55)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 28%, transparent 68%, rgba(0, 0, 0, 0.76));
  mix-blend-mode: screen;
  z-index: 1;
}

.matrix-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(190, 255, 205, 0.055) 0,
    rgba(190, 255, 205, 0.055) 1px,
    transparent 1px,
    transparent 5px
  );
  opacity: 0.42;
}

.matrix-signal {
  position: fixed;
  left: 50%;
  top: 50%;
  min-width: min(520px, calc(100vw - 40px));
  transform: translate(-50%, -50%);
  color: #d8ffe0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-align: center;
  text-shadow:
    0 0 12px rgba(120, 255, 160, 0.9),
    0 0 34px rgba(0, 255, 100, 0.65);
  opacity: 0;
  pointer-events: none;
  animation: matrix-signal-pulse 1.7s ease-in forwards;
  z-index: 2;
}

.matrix-signal span {
  font-size: clamp(34px, 8vw, 88px);
  font-weight: 900;
  line-height: 1;
}

@keyframes matrix-signal-pulse {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translate(-50%, -50%) scale(0.94);
  }
  22%,
  68% {
    opacity: 0.96;
    filter: blur(0);
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(12px);
    transform: translate(-50%, -50%) scale(1.16);
  }
}

.flashbang-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: #ffffff;
  opacity: 0;
}

body.flashbang-active .flashbang-overlay {
  animation: flashbang-fade var(--flashbang-duration, 1800ms) ease-out forwards;
}

@keyframes flashbang-fade {
  0% {
    opacity: 1;
  }
  28% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.fake-ads,
.premium-banner,
.toast {
  position: fixed;
  z-index: 30;
  display: none;
}

.fake-ads {
  inset: 0;
  pointer-events: none;
}

.fake-ad-image-wrap.fake-ad-primary,
.fake-ad-image-wrap.fake-ad-secondary {
  position: fixed;
  animation: fake-ad-bother 5s ease-in-out infinite;
  pointer-events: auto;
}

.fake-ad-image-wrap.fake-ad-primary {
  right: 18px;
  bottom: 76px;
  width: min(720px, calc(100vw - 28px));
}

.fake-ad-image-wrap.fake-ad-secondary {
  left: 18px;
  top: 18px;
  width: min(612px, calc(100vw - 36px));
  aspect-ratio: 672 / 320;
  animation-delay: -1.8s;
}

.fake-ad-image-wrap {
  position: relative;
  aspect-ratio: 1448 / 1086;
  border: 3px solid #f8490a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(31, 23, 20, 0.3);
}

.fake-ad-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fake-ad-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.fake-ad-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -6px;
}

.fake-ad-hotspot {
  position: absolute;
  left: 20%;
  top: 78%;
  width: 64%;
  height: 18%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.fake-ad-hotspot:focus-visible {
  outline: 3px solid #2b9fef;
  outline-offset: -3px;
}

@keyframes fake-ad-bother {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  35% {
    transform: translate(-8px, -5px) rotate(-0.3deg);
  }
  70% {
    transform: translate(5px, 3px) rotate(0.25deg);
  }
}

.premium-banner {
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  align-items: center;
  gap: 12px;
  width: min(560px, calc(100vw - 32px));
  border: 1px solid #f8490a;
  border-radius: var(--radius);
  background: #fffdf7;
  color: #1f1714;
  padding: 10px 12px;
  box-shadow: 0 14px 36px rgba(31, 23, 20, 0.18);
}

.premium-banner span {
  flex: 1;
  font-weight: 800;
}

.premium-button {
  cursor: pointer;
}

.toast {
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%);
  border: 1px solid #f8490a;
  border-radius: var(--radius);
  background: #211c1b;
  color: #f1e8dc;
  padding: 12px 14px;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26);
}

body.light-mode .fake-ads {
  display: block;
}

body.light-mode .premium-banner {
  display: flex;
}

body.ads-dismissed .fake-ads,
body.ads-dismissed .premium-banner {
  display: none;
}

.toast.visible {
  display: block;
}

.cleanup-alert {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 28;
  display: none;
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.cleanup-alert.visible {
  display: grid;
  gap: 14px;
}

.cleanup-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schwaben-alarm-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.schwaben-alarm-title img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex: 0 0 auto;
}

.schwaben-alarm-title strong {
  color: var(--danger);
  font-size: 24px;
  line-height: 1;
}

.cleanup-alert h3 {
  margin: 0;
  color: var(--warn);
  font-size: 20px;
}

.cleanup-alert p,
.cleanup-alert ul,
.cleanup-alert small {
  margin: 0;
}

.cleanup-alert p,
.cleanup-alert small,
.cleanup-alert li span {
  color: var(--muted);
}

.cleanup-alert ul {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.cleanup-alert li {
  display: grid;
  gap: 8px;
}

.cleanup-alert-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cleanup-alert-title > span:first-child {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.cleanup-alert dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.cleanup-alert dl div {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.cleanup-alert dt,
.cleanup-alert dd {
  margin: 0;
}

.cleanup-alert dt {
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.cleanup-alert dd {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.cleanup-alert a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.cleanup-alert a:hover {
  text-decoration: underline;
}

.cleanup-kind {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  color: #171313;
  background: var(--muted);
}

.cleanup-kind.danger {
  background: var(--danger);
}

.cleanup-kind.warn {
  background: var(--warn);
  color: #171313;
}

.cleanup-kind.trace {
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.game-group {
  display: grid;
  gap: 10px;
  scroll-margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--surface);
}

.game-group:last-child {
  border-bottom: 1px solid var(--line);
}

.game-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.game-title div {
  display: grid;
  gap: 2px;
}

.game-title strong {
  color: var(--ink);
  font-size: 14px;
}

.game-title span {
  color: var(--muted);
  white-space: nowrap;
}

.game-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.game-group li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
  color: var(--steel);
}

.game-group li span {
  overflow-wrap: anywhere;
}

.server-detail {
  width: 100%;
  display: grid;
  gap: 5px;
}

.server-detail-main,
.server-detail-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.server-tenant {
  color: var(--accent-dark);
  font-weight: 800;
}

.server-id-link {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.server-id-link:hover {
  color: var(--accent-dark);
}

.server-detail-meta {
  color: var(--muted);
  font-size: 12px;
}

.server-netdata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 11px;
}

.server-netdata.pressure {
  border-left: 3px solid var(--danger);
  padding-left: 7px;
}

.server-netdata span,
.server-netdata small {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 7px;
  background: var(--surface-soft);
}

.server-netdata.muted span {
  color: var(--muted);
}

.netdata-state {
  font-weight: 800;
  color: var(--ink);
}

.netdata-state.ok {
  border-color: color-mix(in srgb, var(--ok) 42%, var(--line));
  color: var(--ok);
}

.netdata-state.warn {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
  color: var(--warn);
}

.netdata-state.missing {
  color: var(--muted);
}

.server-netdata .netdata-swap {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
  color: var(--danger);
  font-weight: 900;
}

.server-netdata .netdata-pressure,
.server-netdata .netdata-pressure-chip {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
  color: var(--danger);
  font-weight: 900;
}

.subscription-lines {
  display: grid;
  gap: 4px;
  margin: 2px 0 0 !important;
  padding-left: 12px !important;
  border-left: 1px solid var(--line);
  list-style: none;
}

.subscription-lines li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
  font-size: 12px;
  color: var(--muted);
}

.subscription-lines li span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subscription-lines b {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 6px;
  color: var(--accent-dark);
  font-size: 10px;
  text-transform: uppercase;
}

.subscription-lines strong {
  color: var(--steel);
  white-space: nowrap;
}

.revenue-with-discount {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  border-radius: 4px;
  padding: 1px 5px;
  background: var(--danger);
  color: #fff7ed;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.revenue-split {
  overflow-wrap: anywhere;
}

.game-group small {
  color: var(--muted);
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

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

  .sidebar {
    min-height: auto;
  }

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

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

  .insight-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .content,
  .sidebar {
    padding: 16px;
  }

  .topbar,
  .toolbar,
  .table-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search input {
    width: 100%;
  }

  .region-tabs,
  .summary-grid,
  .commercial,
  .starburst-controls,
  .invoice-checker-controls,
  .invoice-advanced-grid,
  .invoice-summary-grid,
  .singularity-metrics,
  .kehrwoche-grid,
  .kehrwoche-server-row {
    grid-template-columns: 1fr;
  }

  .metrics-history-grid,
  .metrics-server-item {
    grid-template-columns: 1fr;
  }

  .singularity-package-row {
    grid-template-columns: 1fr;
  }

  .singularity-remove-package {
    width: 40px;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .games-panel-head {
    display: grid;
  }
}
