:root {
  --bg: #0f1714;
  --panel: #18241f;
  --line: #2c3f36;
  --text: #e8f0eb;
  --muted: #9bb0a5;
  --accent: #3d9b6e;
  --danger: #c45c4a;
  --warn: #c4a35a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, #1d3a2e 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #243248 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 1.75rem 0.5rem;
}
.brand {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}
h1 { margin: 0.2rem 0; font-size: 1.6rem; font-weight: 650; }
.sub, .muted, .hint { color: var(--muted); font-size: 0.9rem; }
.hint { margin-top: 0.75rem; }

.probe {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: rgba(24, 36, 31, 0.9);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  min-width: 240px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(196, 163, 90, 0.2);
}
.dot.ok { background: var(--accent); box-shadow: 0 0 0 4px rgba(61, 155, 110, 0.25); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 4px rgba(196, 92, 74, 0.25); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 1.75rem 2rem;
}
.panel {
  background: rgba(24, 36, 31, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.15rem;
}
.panel.metrics { grid-column: 1 / -1; }
h2 { margin: 0 0 0.85rem; font-size: 1rem; }

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
input {
  background: #101a16;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.95rem;
}

.row, .actions, .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.controls label { flex: 1 1 140px; margin-bottom: 0; }

button {
  border: 0;
  border-radius: 9px;
  padding: 0.65rem 0.9rem;
  background: var(--accent);
  color: #04140c;
  font-weight: 650;
  cursor: pointer;
}
button.secondary { background: #314a3e; color: var(--text); }
button.danger { background: var(--danger); color: #fff; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.stat {
  background: #101a16;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
}
.stat span { display: block; color: var(--muted); font-size: 0.72rem; }
.stat strong { font-size: 1.15rem; }

#chart {
  width: 100%;
  height: 220px;
  background: #101a16;
  border: 1px solid var(--line);
  border-radius: 10px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #101a16;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.85rem;
  min-height: 8rem;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .top { flex-direction: column; }
}
