[hidden] {
  display: none !important;
}

/* Serverkarten */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.server-card {
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.server-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.server-card-title h3 {
  font-size: 16px;
}

.server-card-status {
  margin-left: auto;
}

.server-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #1d2735;
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 20px;
  overflow: hidden;
  flex: none;
}

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

.server-card-facts,
.fact-list {
  display: grid;
  gap: 8px 18px;
  margin: 14px 0 0;
}

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

.fact-list {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.server-card-facts dt,
.fact-list dt {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.server-card-facts dd,
.fact-list dd {
  margin: 2px 0 0;
  word-break: break-word;
}

.server-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.server-card-actions .btn {
  padding: 7px 12px;
  font-size: 13px;
}

/* Live-Telemetrie */
.kvm-overview {
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 0%, rgba(124, 92, 252, 0.16), transparent 35%),
    var(--panel);
}

.section-head,
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.section-head h2 {
  margin-top: 4px;
  font-size: 20px;
}

.compact-field {
  display: grid;
  gap: 5px;
  width: min(280px, 100%);
  color: var(--muted);
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.metric-card,
.telemetry-panel {
  background: linear-gradient(145deg, rgba(27, 37, 51, 0.96), rgba(13, 19, 28, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.metric-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 11px;
  padding: 14px;
}

.metric-card div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-card strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
}

.metric-card small {
  grid-column: 1 / -1;
}

.metric-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(124, 92, 252, 0.16);
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 800;
}

.metric-icon.ram { color: #67e8f9; background: rgba(34, 211, 238, 0.12); }
.metric-icon.disk { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }
.metric-icon.net { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); }

.meter {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.12);
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #22d3ee);
  box-shadow: 0 0 10px rgba(124, 92, 252, 0.7);
  transition: width 0.45s ease;
}

.dashboard-chart-grid,
.stats-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.telemetry-panel {
  min-width: 0;
  padding: 14px;
}

.telemetry-panel canvas {
  display: block;
  width: 100%;
  height: 150px;
  margin-top: 10px;
}

.dashboard-chart-grid .telemetry-panel canvas { height: 130px; }

.core-panel {
  margin-top: 12px;
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.core-meter {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
}

.core-meter > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.core-meter small {
  color: var(--muted);
  font-size: 11px;
}

.core-meter-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.14);
}

.core-meter-track i {
  display: block;
  height: 100%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.65);
  transition: width 0.25s linear;
}

.core-meter.warning {
  border-color: rgba(251, 191, 36, 0.6);
}

.core-meter.warning .core-meter-track i {
  background: #fbbf24;
}

.core-meter.critical {
  border-color: rgba(248, 113, 113, 0.7);
}

.core-meter.critical .core-meter-track i {
  background: #ef4444;
}

.core-meter.unassigned,
.core-meter.unavailable {
  opacity: 0.5;
  border-color: var(--border);
}

.dashboard-section {
  margin-top: 18px;
}

.service-grid,
.connection-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.service-card,
.connection-card {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
  color: var(--text);
  padding: 15px;
  text-align: left;
  font: inherit;
}

.service-card {
  cursor: pointer;
}

.service-card:hover {
  border-color: var(--accent);
  background: var(--panel-hover);
}

.service-card > span:nth-child(2) {
  display: grid;
  flex: 1;
}

.service-card small {
  color: var(--muted);
  margin-top: 2px;
}

.service-symbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(124, 92, 252, 0.15);
  color: var(--accent-text);
  font-weight: 800;
}

.connection-card {
  justify-content: space-between;
}

.stats-hero {
  background:
    linear-gradient(120deg, rgba(124, 92, 252, 0.12), transparent 48%),
    var(--panel);
}

.stats-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.stats-detail {
  min-height: 95px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
}

.stats-detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stats-detail strong {
  display: block;
  margin-top: 7px;
  font-size: 21px;
}

.database-files {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 1.3fr);
  gap: 14px;
  margin-top: 14px;
}

.database-file-list,
.database-editor {
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input);
  overflow: auto;
}

.database-file-row {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(38, 50, 67, 0.7);
  text-align: left;
  cursor: default;
}

.database-file-row:hover {
  background: var(--panel-hover);
}

.database-file-row.selected {
  background: color-mix(in srgb, var(--accent) 18%, var(--panel-hover));
  box-shadow: inset 3px 0 var(--accent);
}

.database-file-row span:nth-child(2) {
  display: grid;
}

.database-file-row small {
  color: var(--muted);
}

.database-editor {
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.database-editor textarea {
  flex: 1;
  min-height: 430px;
  margin-top: 10px;
  border: 0;
  resize: none;
}

@media (max-width: 1050px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .section-head,
  .connection-card {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .dashboard-chart-grid,
  .stats-chart-grid {
    grid-template-columns: 1fr;
  }

  .database-files {
    grid-template-columns: 1fr;
  }
}

.server-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-tiny {
  padding: 4px 9px;
  font-size: 12px;
}

/* Server hinzufügen */
.add-area {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.add-menu {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  max-width: 320px;
}

.add-menu p {
  font-size: 12px;
}

.type-choice {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.type-card {
  display: grid;
  gap: 4px;
  text-align: left;
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.type-card:hover {
  border-color: var(--accent);
  background: var(--panel-hover);
}

.type-name {
  font-weight: 600;
}

.hosting-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 16px;
  margin-top: 16px;
}

.hosting-form .field[data-field="env"],
.hosting-form .field[data-field="startParameters"],
.hosting-form .field[data-field="icon"] {
  grid-column: 1 / -1;
}

.settings-group {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 18px;
}

.settings-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.settings-group h3 {
  font-size: 15px;
  color: var(--accent-text);
}

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

.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  padding: 0;
  background: transparent;
  border: 0;
}

.range-row output {
  min-width: 66px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hosting-form small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

/* Dialoge */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 14, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 11000;
}

.modal {
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.modal-head {
  position: sticky;
  top: -22px;
  background: var(--panel);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  font-size: 19px;
}

.modal-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}

.icon-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.icon-preview {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #1d2735;
  color: var(--accent);
  display: grid;
  place-items: center;
  overflow: hidden;
}

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

/* Hinweise */
.toast {
  position: fixed;
  right: 20px;
  top: max(20px, env(safe-area-inset-top));
  max-width: min(380px, calc(100vw - 40px));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 12000;
}

@media (max-width: 600px) {
  .toast { left: 16px; right: 16px; max-width: none; }
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: #15803d;
  color: var(--success-soft);
}

.toast.error {
  border-color: var(--danger-border);
  color: var(--danger-text);
}

/* Werkzeugleisten */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.toolbar-group .btn {
  padding: 7px 11px;
  font-size: 13px;
}

.toolbar-group input[type="text"],
.toolbar-group input[type="number"],
.toolbar-group select {
  width: auto;
  min-width: 130px;
  padding: 7px 10px;
  font-size: 13px;
}

.path-input {
  min-width: 240px;
  font-family: "Consolas", monospace;
}

.recent-select {
  max-width: 180px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

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

/* Console */
.console-output {
  background: #080b0f;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  height: 460px;
  overflow: auto;
  margin: 0;
  font-family: "Consolas", "Cascadia Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-color: #334155 #080b0f;
}

.log-line {
  display: block;
  min-height: 1.45em;
  padding-inline: 6px;
  border-left: 2px solid transparent;
}

.log-line:hover {
  background: rgba(148, 163, 184, 0.06);
}

.log-warn {
  color: #fbbf24;
  border-left-color: #d97706;
}

.log-error {
  color: #f87171;
  border-left-color: #dc2626;
}

.log-panel {
  color: var(--accent-text);
}

.log-status-online {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border-left: 3px solid #22c55e;
  padding: 5px 8px;
  font-weight: 700;
}

.log-status-offline {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border-left: 3px solid #ef4444;
  padding: 5px 8px;
  font-weight: 700;
}

.log-status-starting {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  border-left: 3px solid #22d3ee;
  padding: 3px 8px;
}

.log-time {
  color: var(--muted);
}

.console-status {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.console-status[data-trimmed]::after {
  content: " · " attr(data-trimmed);
  color: var(--muted);
}

.console-status.ok {
  color: var(--success-soft);
}

.console-status.warn {
  color: #fbbf24;
}

.console-status.error {
  color: var(--danger-text);
}

.console-input {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}

.console-input input {
  font-family: "Consolas", monospace;
}

/* Explorer */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--muted);
}

.breadcrumb button {
  background: transparent;
  border: 0;
  color: var(--accent-text);
  font: inherit;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.breadcrumb button:hover {
  background: var(--panel-hover);
}

.explorer-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
}

.explorer-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid var(--border);
  padding-right: 10px;
  max-height: 520px;
  overflow: auto;
}

.tree-node {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  text-align: left;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.tree-node.child {
  padding-left: 20px;
}

.tree-node:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.tree-node.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.explorer-main {
  min-width: 0;
}

.explorer-drop {
  border: 1px dashed transparent;
  border-radius: var(--radius-sm);
  max-height: 520px;
  overflow: auto;
}

.explorer-drop.drag-active {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.08);
}

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

.file-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
}

.file-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #1b2532;
  white-space: nowrap;
}

.file-table tr.selected td {
  background: var(--accent-soft);
}

.file-table tr:hover td {
  background: var(--panel-hover);
}

.checkbox-column {
  width: 34px;
}

.file-icon {
  margin-right: 8px;
}

.root-files-path,
.root-files-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.root-files-path .breadcrumb {
  flex: 1;
  min-width: 220px;
}

.root-files-path-input {
  flex: 1 1 260px;
  min-width: 180px;
}

.root-files-filters {
  display: flex;
  gap: 10px;
  margin: 14px 0 8px;
}

.root-files-filters input {
  flex: 1;
}

.root-files-drop-zone.drag-active {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.root-file-editor {
  min-height: 520px;
  resize: vertical;
  font-family: "Cascadia Code", Consolas, monospace;
  line-height: 1.5;
  tab-size: 2;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 6px;
}

.file-tile {
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  overflow: hidden;
}

.file-tile.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tile-icon {
  font-size: 26px;
}

.tile-name {
  margin-top: 6px;
  word-break: break-word;
}

.explorer-empty {
  padding: 24px;
  text-align: center;
}

.archive-list {
  max-height: 380px;
  overflow: auto;
  font-size: 13px;
}

.archive-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #1b2532;
}

.chmod-grid {
  display: grid;
  gap: 8px;
}

/* Übertragungen */
.transfers {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.transfer-list {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.transfer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
}

.transfer-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.progress {
  height: 7px;
  background: #1b2532;
  border-radius: 99px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.install-progress {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.install-bar {
  height: 10px;
}

.install-bar span {
  transition: width 0.35s ease;
}

.install-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
  margin: 14px 0;
}

.install-steps span {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.install-steps span.active {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--accent-soft);
}

.install-steps span.done {
  border-color: #15803d;
  color: var(--success-soft);
  background: #10241c;
}

.install-log {
  min-height: 150px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #070b11;
  color: #cbd5e1;
  white-space: pre-wrap;
  font: 12px/1.5 "Consolas", monospace;
}

.install-verification {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 12px 14px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid #22c55e;
  border-radius: var(--radius-sm);
}

.project-detection {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.integration-grid {
  margin-top: 0;
}

.integration-grid h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.github-account {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.github-account img,
.github-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
}

.github-account img {
  object-fit: cover;
}

.github-mark {
  display: grid;
  place-items: center;
  background: #f2f5fa;
  color: #11151d;
  font-weight: 800;
}

.github-account div:last-child {
  display: grid;
  gap: 3px;
}

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

.integration-changes,
.proposal-list {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
  margin: 10px 0 14px;
}

.integration-changes div,
.proposal-operation {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel-item);
  font-size: 13px;
}

.proposal-operation {
  display: grid;
  gap: 6px;
}

.proposal-operation pre {
  max-height: 170px;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  color: var(--muted);
}

/* Domains */
.domain-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.domain-row {
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

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

.domain-row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.domain-row .btn {
  padding: 7px 11px;
  font-size: 13px;
}

/* Editor */
.editor-overlay {
  padding: 12px;
}

.editor {
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

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

.editor-head h2 {
  font-size: 17px;
}

.editor-body {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  flex: 1;
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #070b11;
}

.editor-gutter {
  padding: 12px 8px;
  text-align: right;
  color: #4b5b70;
  font-family: "Consolas", monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.editor-input {
  position: relative;
  overflow: hidden;
}

.editor-highlight,
.editor-input textarea {
  margin: 0;
  padding: 12px;
  font-family: "Consolas", "Cascadia Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
  overflow: auto;
  border: 0;
  width: 100%;
  height: 100%;
}

.editor-highlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--text);
}

.editor-input textarea {
  position: relative;
  background: transparent;
  color: transparent;
  caret-color: var(--text);
  resize: none;
  outline: none;
  scrollbar-gutter: stable;
}

.editor-highlight {
  scrollbar-gutter: stable;
}

.file-context-menu {
  position: fixed;
  z-index: 10020;
  min-width: 220px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 96%, black);
  box-shadow: 0 16px 50px rgb(0 0 0 / 55%);
}

.file-context-menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.file-context-menu button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.file-context-menu button.danger { color: #ff7b82; }
.file-context-menu button:disabled { opacity: .42; cursor: not-allowed; }
.file-context-menu hr { border: 0; border-top: 1px solid var(--border); margin: 5px; }

.editor-status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.tok-key {
  color: #93c5fd;
}

.tok-string {
  color: #86efac;
}

.tok-number {
  color: #fbbf24;
}

.tok-boolean {
  color: #c4b5fd;
}

.tok-comment {
  color: #64748b;
  font-style: italic;
}

.tok-error {
  color: #f87171;
}

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

  .explorer-tree {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 0 8px;
  }

  .server-card-facts {
    grid-template-columns: 1fr;
  }

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

/* Panel-Bereiche */
.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.health-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.health-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
}

.health-item.health-error { border-left-color: #ef4444; }
.health-item.health-warn { border-left-color: #fbbf24; }
.health-item.health-info { border-left-color: var(--accent); }

.health-icon {
  font-weight: 700;
}

.activity-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  max-height: 380px;
  overflow: auto;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #1b2532;
  font-size: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.project-card {
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.project-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #1d2735;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}

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

.project-summary {
  font-size: 13px;
  max-height: 60px;
  overflow: hidden;
}

.project-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 12px 0;
}

.project-gallery img {
  height: 120px;
  border-radius: 8px;
}

.project-description {
  white-space: pre-wrap;
  font-size: 13px;
  max-height: 260px;
  overflow: auto;
  color: var(--muted);
}

.version-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.version-row,
.installed-row,
.backup-row,
.world-row,
.player-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
}

.installed-list,
.backup-list,
.world-list,
.template-list,
.player-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.installed-row .actions,
.backup-row .actions,
.world-row .actions,
.player-row .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.installed-row .btn,
.backup-row .btn,
.world-row .btn,
.player-row .btn,
.version-row .btn {
  padding: 6px 10px;
  font-size: 13px;
}

.update-box {
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.command-box {
  background: #070b11;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: "Consolas", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0 0 12px;
}

#propertiesEditor {
  margin-top: 14px;
  min-height: 320px;
}

.log-trace {
  color: #94a3b8;
}

/* Helles Design */
:root[data-theme="light"] {
  --window: #f4f6fb;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-hover: #eef1f8;
  --panel-item: #f7f9fd;
  --border: #d7dde9;
  --text: #131a24;
  --muted: #5a6779;
  --input: #ffffff;
  --success-soft: #15803d;
  --danger: #fee2e2;
  --danger-border: #ef4444;
  --danger-text: #991b1b;
}

:root[data-theme="light"] .console-output,
:root[data-theme="light"] .editor-body,
:root[data-theme="light"] .command-box {
  background: #0f1622;
  color: #f2f5f9;
}

:root[data-theme="light"] .brand-mark,
:root[data-theme="light"] .btn-primary {
  color: #fff;
}

:root[data-theme="light"] .modal-overlay {
  background: rgba(24, 32, 45, 0.45);
}

/* Kompakte Ansicht */
:root[data-density="compact"] {
  --radius: 8px;
  --radius-sm: 6px;
  font-size: 14px;
}

:root[data-density="compact"] .card,
:root[data-density="compact"] .server-card {
  padding: 12px;
}

:root[data-density="compact"] .content {
  padding: 18px 20px 20px;
}

:root[data-density="compact"] .stats,
:root[data-density="compact"] .server-grid {
  gap: 10px;
}

:root[data-density="compact"] .btn {
  padding: 7px 12px;
}

:root[data-density="compact"] .console-output {
  height: 360px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Einstellungen */
.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.settings-nav {
  display: grid;
  gap: 4px;
  align-content: start;
}

.settings-nav button {
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.settings-nav button:hover {
  background: var(--panel-hover);
  color: var(--text);
}

.settings-nav button.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.theme-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-card {
  flex: 1 1 140px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
  padding: 12px;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  text-align: left;
}

.theme-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

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

.color-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.color-dot.active {
  border-color: var(--text);
}

/* Wolf Nitro */
.nitro-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(236, 72, 153, 0.55);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 50%, rgba(124, 92, 252, 0.34), transparent 30%),
    linear-gradient(125deg, #171027, #28102d 55%, #391332);
  box-shadow: 0 18px 50px rgba(236, 72, 153, 0.16);
}

.nitro-hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(4px);
}

.nitro-hero.unlocked {
  border-color: rgba(52, 211, 153, 0.65);
  background:
    radial-gradient(circle at 8% 50%, rgba(52, 211, 153, 0.24), transparent 30%),
    linear-gradient(125deg, #0d2020, #151b32 58%, #241330);
}

.nitro-orb,
.nitro-checkout-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #8b5cf6, #ec4899);
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(236, 72, 153, 0.45);
}

.nitro-hero h2 {
  margin: 3px 0;
  color: #fff;
  font-size: 22px;
}

.nitro-hero p,
.nitro-hero .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.nitro-price {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: right;
  color: #fff;
}

.nitro-price strong {
  font-size: 24px;
}

.nitro-price span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
}

.premium-shell {
  position: relative;
  margin-top: 18px;
}

.premium-content {
  display: grid;
  gap: 18px;
}

.premium-shell.locked {
  min-height: 720px;
  overflow: hidden;
  border-radius: var(--radius);
}

.premium-shell.locked .premium-content {
  filter: blur(9px);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.nitro-lock {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  background: linear-gradient(rgba(7, 10, 17, 0.12), rgba(7, 10, 17, 0.72));
}

.nitro-lock-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(13, 18, 28, 0.82);
  font-size: 28px;
  box-shadow: 0 0 34px rgba(236, 72, 153, 0.35);
}

.nitro-lock strong {
  font-size: 22px;
  letter-spacing: 0.08em;
}

.nitro-buy {
  margin-top: 8px;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  box-shadow: 0 12px 30px rgba(219, 39, 119, 0.3);
}

.nitro-checkout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.nitro-checkout > div:nth-child(2) {
  display: grid;
}

.nitro-checkout > div:nth-child(2) strong {
  font-size: 30px;
}

.nitro-checkout ul,
.nitro-checkout p {
  grid-column: 1 / -1;
}

.nitro-success {
  display: grid;
  gap: 10px;
  text-align: center;
}

.nitro-success > div {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  font-size: 34px;
}

.nitro-success strong {
  font-size: 24px;
}

.premium-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 0%, rgba(124, 92, 252, 0.1), transparent 28%),
    var(--panel);
}

.background-studio {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.8fr);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.background-preview {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--input);
  background-size: cover;
  background-position: center;
  color: var(--muted);
}

.music-library {
  display: grid;
  gap: 8px;
  margin: 15px 0;
}

.music-track {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
}

.music-track.active {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(124, 92, 252, 0.14);
}

.track-art {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #ec4899);
  color: #fff;
}

.track-copy {
  display: grid;
  min-width: 0;
}

.track-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-copy small {
  color: var(--muted);
}

.empty-music {
  min-height: 110px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.empty-music span {
  font-size: 28px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.preset-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.preset-card.active {
  border-color: var(--accent);
}

.preset-card > span {
  height: 50px;
  border-radius: 6px;
  background:
    linear-gradient(120deg, transparent 55%, var(--preset-accent) 56%),
    var(--preset-bg);
}

.color-studio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin: 16px 0;
}

.color-studio label {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
  font-size: 12px;
}

.color-studio input {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
}

.color-studio button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.color-studio label.uses-default {
  opacity: 0.58;
}

.effect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px;
}

/* Globaler Hintergrund */
.wolf-custom-background {
  position: fixed;
  inset: -45px;
  z-index: 0;
  background-repeat: no-repeat;
  pointer-events: none;
}

.wolf-background-active body {
  background: #070a11;
}

.wolf-background-active .app,
.wolf-background-active .auth-page {
  position: relative;
  z-index: 1;
  background: rgba(7, 10, 17, var(--background-dim));
}

.wolf-background-motion .wolf-custom-background {
  animation: wolf-background-drift 18s ease-in-out infinite alternate;
}

@keyframes wolf-background-drift {
  from { transform: scale(1.04) translate3d(-0.8%, -0.5%, 0); }
  to { transform: scale(1.09) translate3d(0.8%, 0.5%, 0); }
}

.wolf-scanlines body::after,
.wolf-vignette body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 42;
  pointer-events: none;
}

.wolf-scanlines body::after {
  opacity: 0.14;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.13) 4px
  );
  mix-blend-mode: overlay;
}

.wolf-vignette body::before {
  box-shadow: inset 0 0 150px 45px rgba(0, 0, 0, 0.68);
}

/* Globaler Musikplayer */
.wolf-music-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 44;
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) auto auto auto auto 90px;
  align-items: center;
  gap: 7px;
  max-width: min(620px, calc(100vw - 36px));
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(11, 16, 24, 0.9);
  color: #fff;
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
}

.wolf-music-dock button {
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  cursor: pointer;
}

.wolf-music-dock .music-play {
  background: var(--accent);
}

.wolf-music-dock.has-error .music-play {
  background: #b45309;
}

.wolf-music-dock .music-mode {
  width: auto;
  padding: 0 9px;
  font-size: 10px;
}

.music-copy {
  display: grid;
  min-width: 0;
}

.music-copy span {
  color: #a78bfa;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.music-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-pulse {
  height: 28px;
  display: flex;
  align-items: end;
  gap: 2px;
}

.music-pulse i {
  width: 3px;
  height: 30%;
  border-radius: 2px;
  background: #ec4899;
}

.wolf-music-dock.playing .music-pulse i {
  animation: music-pulse 0.65s ease-in-out infinite alternate;
}

.wolf-music-dock.playing .music-pulse i:nth-child(2) { animation-delay: -0.3s; }
.wolf-music-dock.playing .music-pulse i:nth-child(3) { animation-delay: -0.5s; }

@keyframes music-pulse {
  to { height: 100%; }
}

/* Benutzerdefinierte Komponenten */
:root[data-card-style="glass"] .card,
:root[data-card-style="glass"] .server-card,
:root[data-card-style="glass"] .metric-card {
  background: color-mix(in srgb, var(--panel) 65%, transparent);
  backdrop-filter: blur(max(14px, var(--panel-blur)));
}

:root[data-card-style="outline"] .card,
:root[data-card-style="outline"] .server-card,
:root[data-card-style="outline"] .metric-card {
  background: transparent;
  box-shadow: none;
}

:root[data-card-style="neon"] .card,
:root[data-card-style="neon"] .server-card,
:root[data-card-style="neon"] .metric-card {
  border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
  box-shadow:
    0 0 calc(26px * var(--accent-glow)) rgba(124, 92, 252, 0.45),
    inset 0 0 calc(18px * var(--accent-glow)) rgba(124, 92, 252, 0.08);
}

:root[data-button-style="pill"] .btn {
  border-radius: 999px;
}

:root[data-button-style="sharp"] .btn {
  border-radius: 2px;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

:root .btn,
:root .card,
:root .server-card,
:root .metric-card {
  transition-duration: calc(0.15s * var(--motion-speed));
}

@media (max-width: 760px) {
  .nitro-hero,
  .background-studio {
    grid-template-columns: 1fr;
  }

  .nitro-price {
    text-align: left;
  }

  .music-track {
    grid-template-columns: auto 1fr auto;
  }

  .music-track .btn-danger {
    grid-column: 2 / -1;
  }

  .wolf-music-dock {
    grid-template-columns: auto 1fr auto auto auto;
  }

  .wolf-music-dock .music-mode,
  .wolf-music-dock input {
    display: none;
  }
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

.matrix-table th,
.matrix-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.matrix-table td:not(:first-child),
.matrix-table th:not(:first-child) {
  text-align: center;
}

.member-row,
.role-row,
.session-row,
.token-row,
.key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 14px;
}

.role-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.permission-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.permission-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.permission-group label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
  color: var(--muted);
}

.strength-bar {
  height: 6px;
  background: var(--panel-hover);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.strength-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
  font-family: "Consolas", monospace;
}

.code-grid span {
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  text-align: center;
}

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

  .settings-nav {
    grid-auto-flow: column;
    overflow-x: auto;
  }
}

/* Notepad-Editor */
.notepad .menu-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.notepad .menu {
  position: relative;
}

.notepad .menu-title {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
}

.notepad .menu:hover .menu-title {
  background: var(--panel-hover);
}

.notepad .menu-items {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0 6px 6px 6px;
  padding: 4px;
  display: none;
  z-index: 5;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.notepad .menu:hover .menu-items {
  display: block;
}

.notepad .menu-items button {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.notepad .menu-items button:hover {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.editor-find {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  background: var(--panel-item);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  margin-bottom: 10px;
}

.editor-find input[type="text"] {
  width: auto;
  min-width: 160px;
  padding: 7px 10px;
}

.editor-find .btn {
  padding: 6px 10px;
  font-size: 13px;
}

.notepad .editor-status {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* File studio */
.editor-overlay {
  backdrop-filter: blur(8px);
}

.editor-overlay .editor {
  max-width: 1280px;
  height: min(92vh, 900px);
  padding: 0;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 45px var(--accent-soft);
}

.editor-overlay.is-fullscreen {
  padding: 0;
}

.editor-overlay.is-fullscreen .editor {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
}

.editor-overlay .editor-head {
  margin: 0;
  padding: 14px 18px;
  background:
    linear-gradient(90deg, var(--accent-soft), transparent 42%),
    var(--panel);
  border-bottom: 1px solid var(--border);
}

.editor-head-actions,
.editor-commandbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-tabs {
  display: flex;
  min-height: 38px;
  overflow-x: auto;
  background: color-mix(in srgb, var(--panel) 88%, #000);
  border-bottom: 1px solid var(--border);
}

.editor-tab {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 150px;
  max-width: 260px;
  padding: 9px 10px 9px 14px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.editor-tab > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.editor-tab-close {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
}

.editor-tab-close:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.7);
}

.editor-commandbar {
  justify-content: space-between;
  min-height: 42px;
  padding-right: 12px;
  border-bottom: 1px solid var(--border);
}

.editor-commandbar .menu-bar {
  margin: 0;
  border: 0;
  padding-left: 8px;
}

.editor-encoding {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.editor-encoding select {
  width: 132px;
  padding: 6px 28px 6px 9px;
  font-size: 12px;
}

.editor-overlay .editor-find {
  margin: 8px 10px;
}

.editor-overlay .editor-body {
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.editor-body.without-gutter {
  grid-template-columns: minmax(0, 1fr);
}

.editor-overlay .editor-status {
  margin: 0;
  padding: 8px 14px;
  background: var(--panel);
}

.print-frame {
  position: fixed;
  right: 100%;
}

/* Server access */
.access-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 85% 20%, var(--accent-soft), transparent 28%),
    var(--panel);
}

.access-hero h2 {
  margin: 5px 0;
  font-size: 22px;
}

.owner-lock {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 270px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--border));
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.owner-lock div {
  display: grid;
  gap: 2px;
}

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

.owner-shield,
.access-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  box-shadow: 0 0 24px var(--accent-soft);
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.access-permissions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.access-permission-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
}

.access-permission-group legend {
  padding: 0 6px;
  color: var(--accent-text);
  font-weight: 650;
  font-size: 13px;
}

.access-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 7px;
  border-radius: 7px;
  cursor: pointer;
}

.access-check:hover {
  background: var(--panel-hover);
}

.access-check input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.access-check span {
  display: grid;
  gap: 2px;
}

.access-check strong {
  font-size: 12px;
}

.access-check small {
  color: var(--muted);
  font: 10px "Consolas", monospace;
}

.access-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.access-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
}

.access-entry.owner {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.access-entry.expired {
  opacity: 0.62;
}

.access-entry-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.access-entry-main span {
  color: var(--muted);
  font-size: 12px;
}

.access-entry-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

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

  .access-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .owner-lock {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .access-permissions {
    grid-template-columns: 1fr;
  }

  .editor-commandbar {
    align-items: stretch;
    flex-direction: column;
    padding: 0 8px 8px;
  }

  .access-entry {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .access-entry-actions {
    width: 100%;
    margin-left: 49px;
  }
}

.root-console-card {
  display: grid;
  gap: 12px;
  min-height: calc(100vh - 150px);
}

.root-console-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.root-console-toolbar .toolbar-group {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.root-console-toolbar .btn {
  padding: 5px 11px;
  font-size: 12px;
}

.terminal-search {
  width: 190px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #05080d;
  color: inherit;
  font: inherit;
}

.root-terminal {
  min-height: 460px;
  height: calc(100vh - 330px);
  padding: 10px 6px 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #0b0f0c;
  overflow: hidden;
}

.root-console-card.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 60;
  margin: 0;
  border-radius: 0;
  min-height: 100vh;
  overflow: auto;
}

.root-console-card.fullscreen .root-terminal {
  height: calc(100vh - 170px);
}

.root-terminal .xterm-viewport::-webkit-scrollbar { width: 10px; }
.root-terminal .xterm-viewport::-webkit-scrollbar-thumb {
  background: #2a3a2f;
  border-radius: 6px;
}

.root-console-warning {
  margin: 0;
}

@media (max-width: 700px) {
  .root-console-toolbar,
  .root-command-form {
    align-items: stretch;
    flex-direction: column;
  }

  .root-prompt {
    padding: 0;
  }
}

/* Operations UI */
:root[data-theme="light"] {
  --window: #f1f3ef;
  --sidebar: #f8faf6;
  --panel: #ffffff;
  --panel-hover: #e9eee8;
  --panel-item: #f3f6f1;
  --border: #ccd3cc;
  --border-strong: #aeb9b0;
  --text: #151a16;
  --muted: #606a62;
  --input: #ffffff;
  --success-soft: #19764a;
  --danger: #ffe8e8;
  --danger-border: #d96268;
  --danger-text: #9d282f;
}

::selection {
  background: var(--accent);
  color: #10150d;
}

* {
  scrollbar-color: var(--border-strong) var(--panel-item);
  scrollbar-width: thin;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--accent);
}

.dashboard-section,
.tab-panel > .card + .card {
  margin-top: 16px;
}

.section-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  font-size: 19px;
  line-height: 1.25;
}

.kvm-overview,
.stats-hero,
.access-hero,
.premium-card,
.editor-overlay .editor-head {
  background: var(--panel);
}

.metric-card,
.telemetry-panel {
  background: var(--panel-item);
  border-radius: var(--radius-sm);
}

.metric-card {
  position: relative;
  overflow: hidden;
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 15px;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--accent);
}

.metric-card div > span,
.stats-detail span,
.server-card-facts dt,
.fact-list dt {
  font-family: "Cascadia Mono", "Consolas", monospace;
  letter-spacing: 0.08em;
}

.metric-card strong,
.stat-value,
.stats-detail strong {
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-variant-numeric: tabular-nums;
}

.metric-card strong {
  font-size: 15px;
  white-space: nowrap;
}

.metric-icon,
.metric-icon.ram,
.metric-icon.disk,
.metric-icon.net {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--accent);
}

.meter,
.core-meter-track,
.progress,
.install-bar,
.strength-bar {
  border-radius: 1px;
  background: color-mix(in srgb, var(--border) 58%, transparent);
}

.meter i,
.core-meter-track i,
.progress span,
.install-bar span,
.strength-bar span {
  border-radius: inherit;
  background: var(--accent);
  box-shadow: none;
}

.core-meter {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-item);
}

.core-meter.warning {
  border-color: color-mix(in srgb, var(--warning) 60%, var(--border));
}

.core-meter.critical {
  border-color: var(--danger-border);
}

.server-card,
.service-card,
.connection-card,
.stats-detail,
.health-item,
.activity-item,
.project-card,
.version-row,
.installed-row,
.backup-row,
.world-row,
.player-row,
.member-row,
.role-row,
.session-row,
.token-row,
.key-row,
.access-entry,
.access-permission-group,
.music-track,
.preset-card {
  border-radius: var(--radius-sm);
  background: var(--panel-item);
}

.server-card {
  position: relative;
  padding-top: 19px;
  transition: border-color 150ms ease, transform 150ms ease;
}

.server-card::before {
  content: "";
  position: absolute;
  inset: -1px 18px auto;
  height: 2px;
  background: var(--accent);
}

.server-card:hover,
.service-card:hover,
.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.server-icon,
.service-symbol,
.project-icon,
.owner-shield,
.access-avatar,
.empty-icon,
.track-art {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--panel-hover);
  color: var(--accent);
  box-shadow: none;
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge.ok {
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
}

.badge.warn {
  border-color: var(--danger-border);
}

.notice,
.demo-banner,
.update-box,
.command-box,
.owner-lock {
  border-radius: var(--radius-sm);
  border-left-width: 3px;
}

.modal-overlay,
.editor-overlay {
  background: rgba(4, 6, 5, 0.78);
}

.modal {
  border-radius: var(--radius);
  border-top: 2px solid var(--accent);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
}

.modal-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  border-radius: 3px;
}

.toolbar {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.file-table,
.matrix-table {
  border-collapse: collapse;
}

.file-table th,
.matrix-table th {
  color: var(--muted);
  font: 700 10px/1.2 "Cascadia Mono", "Consolas", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.file-table tr:hover td,
.database-file-row:hover {
  background: var(--panel-hover);
}

.file-table tr.selected td,
.database-file-row.selected,
.tree-node.active,
.ide-tree-entry.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.settings-nav {
  gap: 2px;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}

.settings-nav button {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}

.settings-nav button.active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-text);
}

.console-output,
.root-terminal,
.terminal-search {
  border-color: #29332c;
  background: #070a08;
}

.wolf-music-dock {
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
}

.wolf-music-dock button {
  border-radius: 3px;
}

.music-copy span {
  color: var(--accent);
}

.music-pulse i {
  background: var(--accent);
}

:root[data-card-style="neon"] .card,
:root[data-card-style="neon"] .server-card,
:root[data-card-style="neon"] .metric-card {
  box-shadow:
    0 0 calc(22px * var(--accent-glow)) color-mix(in srgb, var(--accent) 36%, transparent),
    inset 0 0 calc(14px * var(--accent-glow)) color-mix(in srgb, var(--accent) 8%, transparent);
}

@media (max-width: 900px) {
  .settings-nav {
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 560px) {
  .metric-grid,
  .dashboard-chart-grid,
  .stats-chart-grid,
  .server-card-facts {
    grid-template-columns: 1fr;
  }

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

  .server-card-actions .btn,
  .toolbar-group .btn {
    flex: 0 1 auto;
  }
}
/* Datei-Explorer Status */
.explorer-loading {
  pointer-events: none;
  opacity: 0.72;
  transition: opacity 160ms ease;
}

.file-skeleton td {
  padding: 18px;
}

.file-skeleton span {
  display: block;
  width: min(100%, 560px);
  height: 12px;
  margin: 8px 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--panel-item), var(--panel-hover), var(--panel-item));
  background-size: 220% 100%;
  animation: explorer-skeleton 1.2s ease-in-out infinite;
}

.file-skeleton span:nth-child(2) { width: min(72%, 400px); }
.file-skeleton span:nth-child(3) { width: min(44%, 260px); }

@keyframes explorer-skeleton {
  to { background-position: -220% 0; }
}
