
  :root {
    color-scheme: dark;
    --bg: #0b1220;
    --panel: #141f32;
    --border: #2a3952;
    --text: #e6edf8;
    --muted: #a5b5cd;
    --green: #32d49a;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px system-ui, sans-serif;
  }

  main {
    max-width: 1120px;
    margin: 40px auto;
    padding: 24px;
  }

  h1 { margin: 0 0 8px; }
  h2 { margin: 0; }
  h3 { margin: 24px 0 12px; font-size: 16px; }

  p {
    color: var(--muted);
    line-height: 1.6;
  }

  .settings, article {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
  }

  .settings { margin: 24px 0; }

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

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

  .region {
    margin: 6px 0 20px;
    font-size: 13px;
  }

  label {
    display: block;
    margin: 16px 0 8px;
    color: var(--muted);
  }

  input, select, button {
    font: inherit;
    border-radius: 9px;
    padding: 11px 12px;
  }

  input, select {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid #42516b;
  }

  button {
    border: 1px solid transparent;
    cursor: pointer;
    background: #334560;
    color: white;
  }

  button:hover:not(:disabled) { filter: brightness(1.15); }

  button:disabled {
    opacity: .4;
    cursor: not-allowed;
  }

  button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid #80b7ff;
    outline-offset: 3px;
  }

  .start { background: #21825d; }
  .stop { background: #a63d51; }

  .buttons {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 18px;
  }

  .badge {
    display: inline-block;
    background: #28374e;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
  }

  .badge.running {
    background: #153e34;
    color: #8bf1c4;
  }

  .details {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    font-size: 14px;
  }

  .detail {
    display: flex;
    justify-content: space-between;
    gap: 14px;
  }

  .detail span:first-child { color: var(--muted); }
  .detail span:last-child { text-align: right; overflow-wrap: anywhere; }

  .clients {
    display: grid;
    gap: 10px;
  }

  .client {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
  }

  .client-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }

  .client-name { font-weight: 650; }

  .client-status {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
  }

  .client-status.active { color: var(--green); }

  .client-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }

  .empty, .hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
  }

  .empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 16px;
  }

  #message {
    min-height: 26px;
    white-space: pre-wrap;
    color: #f3ce82;
  }

  details { margin-top: 18px; }
  summary { cursor: pointer; color: var(--muted); }

  code {
    background: var(--bg);
    padding: 2px 5px;
    border-radius: 4px;
  }

  @media (max-width: 420px) {
    main { padding: 14px; margin: 20px auto; }
    .grid { grid-template-columns: 1fr; }
    .settings, article { padding: 18px; }
  }
