:root {
  color-scheme: dark;
  --bg: #08111f;
  --card: rgba(16, 27, 48, 0.82);
  --card-strong: rgba(25, 39, 67, 0.95);
  --line: rgba(148, 163, 184, 0.2);
  --text: #e5eefb;
  --muted: #93a4ba;
  --accent: #60a5fa;
  --accent-2: #34d399;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(96, 165, 250, 0.2), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(52, 211, 153, 0.14), transparent 28rem),
    var(--bg);
}

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0; }
.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 24px;
}
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 20px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1, h2 { margin: 0; }
h1 { font-size: clamp(30px, 5vw, 56px); letter-spacing: -0.05em; }
h2 { font-size: 20px; }
.muted, .hint { color: var(--muted); }
.hint { margin: 0; font-size: 13px; }
.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(15, 23, 42, .65); }
.status.ok { color: #bbf7d0; border-color: rgba(52, 211, 153, .45); }
.status.bad { color: #fecdd3; border-color: rgba(251, 113, 133, .55); }

label { display: flex; flex-direction: column; gap: 8px; color: #cbd5e1; font-size: 14px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  background: rgba(2, 6, 23, 0.5); color: var(--text); outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(96, 165, 250, .8); box-shadow: 0 0 0 4px rgba(96, 165, 250, .12); }
button {
  border: 0; border-radius: 14px; padding: 11px 16px; color: #04111f; font-weight: 800;
  cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .65; }
button.ghost { background: rgba(148, 163, 184, .14); color: var(--text); }
button.danger { background: linear-gradient(135deg, #fb7185, #f97316); color: #fff; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metrics div { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(2, 6, 23, .35); }
.metrics strong { display: block; font-size: 34px; }
.metrics span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
tr:hover td { background: rgba(148, 163, 184, .05); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; }
.badge.on { color: #bbf7d0; background: rgba(34, 197, 94, .16); }
.badge.off { color: #fecdd3; background: rgba(244, 63, 94, .16); }
.inline-fields { display: grid; grid-template-columns: 1fr 150px; gap: 12px; }
.result-list { display: grid; gap: 10px; max-height: 420px; overflow: auto; }
.result-item { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(2, 6, 23, .32); }
.result-item .top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.result-item small { color: var(--muted); word-break: break-word; }
.checkline { flex-direction: row; align-items: center; }
.checkline input { width: auto; }
dialog { border: 0; border-radius: 24px; background: transparent; padding: 0; width: min(720px, calc(100% - 24px)); }
dialog::backdrop { background: rgba(2, 6, 23, .76); backdrop-filter: blur(8px); }
.modal { background: var(--card-strong); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.actions { display: flex; justify-content: space-between; gap: 12px; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; padding: 14px 16px; border-radius: 16px; background: #0f172a; border: 1px solid var(--line); box-shadow: var(--shadow); }
code { color: #bae6fd; }

@media (max-width: 820px) {
  .hero, .section-title { align-items: flex-start; flex-direction: column; }
  .two, .inline-fields { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
}
