:root {
  --bg0: #0f1412;
  --line: #2a3a33;
  --text: #e7efe9;
  --muted: #8aa196;
  --accent: #3dcf8e;
  --panel: rgba(23, 32, 28, 0.92);
  --font: "Outfit", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg0);
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(61, 207, 142, 0.18), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(40, 90, 70, 0.35), transparent 55%),
    linear-gradient(160deg, #0f1412 0%, #121a16 45%, #0d1210 100%);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; gap: 0.9rem; align-items: center; }

.mark {
  width: 14px;
  height: 42px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), #1f7a52);
  box-shadow: 0 0 24px rgba(61, 207, 142, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.brand p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #666;
}

.dot.live {
  background: var(--accent);
  animation: pulse 2s infinite;
}

.dot.down { background: #e05757; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 207, 142, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(61, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 207, 142, 0); }
}

main {
  padding: 1.25rem 2rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.check-all {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  user-select: none;
}

.actions { display: flex; gap: 0.55rem; flex-wrap: wrap; }

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.warn {
  background: rgba(224, 162, 74, 0.15);
  border-color: rgba(224, 162, 74, 0.45);
  color: #f0c27a;
}

.btn.danger {
  background: rgba(224, 87, 87, 0.18);
  border-color: rgba(224, 87, 87, 0.5);
  color: #ff9b9b;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td {
  font-family: var(--mono);
  font-size: 0.86rem;
}

td.host {
  font-family: var(--font);
  font-weight: 600;
}

tr:last-child td { border-bottom: none; }

tr.empty td {
  text-align: center;
  color: var(--muted);
  font-family: var(--font);
  padding: 2.5rem 1rem;
}

.hint {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--mono);
}

.toast {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(61, 207, 142, 0.1);
  color: var(--text);
}

.toast.error {
  background: rgba(224, 87, 87, 0.12);
  border-color: rgba(224, 87, 87, 0.4);
}

.diag-link {
  color: var(--accent);
  text-decoration: none;
  margin-right: 0.75rem;
  font-family: var(--font);
  font-size: 0.9rem;
}

.diag-link:hover { text-decoration: underline; }

.user-on { color: var(--accent); }
.user-off { color: var(--muted); }

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.diag-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}

.diag-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.diag-card p {
  margin: 0.35rem 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.diag-card b, .diag-card code { color: var(--text); }

.pill {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--line);
}

.pill.ok {
  color: #8dffc0;
  border-color: rgba(61, 207, 142, 0.45);
  background: rgba(61, 207, 142, 0.12);
}

.pill.bad {
  color: #ff9b9b;
  border-color: rgba(224, 87, 87, 0.45);
  background: rgba(224, 87, 87, 0.12);
}

.host-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.host-link:hover { color: var(--accent); }

.fs-toolbar { flex-direction: column; align-items: stretch; gap: 0.75rem; }

.fs-path-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.fs-path {
  flex: 1;
  min-width: 180px;
  background: #0d1210;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.file-btn { display: inline-flex; align-items: center; }

.btn.mini {
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
}

.linkish {
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.fs-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.console-out {
  margin: 0;
  padding: 1rem;
  min-height: 420px;
  max-height: 70vh;
  overflow: auto;
  background: #0a0f0d;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #b7f5d0;
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.hotkeys {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.hotkeys h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.hotkeys ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.hotkeys kbd {
  font-family: var(--mono);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 0.3rem;
}

@media (max-width: 700px) {
  .top, main { padding-left: 1rem; padding-right: 1rem; }
  .brand h1 { font-size: 1.25rem; }
}
