:root {
  --bg: #101318;
  --panel: #11131a;
  --panel2: #0f1117;
  --text: #e7e7ea;
  --muted: #a8acb8;
  --border: rgba(255, 255, 255, 0.08);
  --good: #2ee59d;
  --bad: #ff5c7a;
  --warn: #ffcc66;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";

  --editor-line-height: 20px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 260px;
}

.dot {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--good), rgba(46, 229, 157, 0.2));
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(46, 229, 157, 0.35);
}

.title { font-weight: 700; letter-spacing: 0.2px; }
.subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }

.controls {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 999px;
  user-select: none;
}

.toggle input { transform: translateY(1px); }

.btnrow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease;
}

.btn:hover { background: rgba(255, 255, 255, 0.09); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  padding: 10px 18px 18px;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--panel2);
}

.panel-head h2 { margin: 0; font-size: 14px; letter-spacing: 0.25px; }
.hint { font-size: 12px; color: var(--muted); }

.editor {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  height: 100%;
  min-height: 0;
}

.lines {
  padding: 14px 0 14px;
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: rgba(231,231,234,0.45);
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: var(--editor-line-height);
  text-align: right;
  user-select: none;
  overflow: hidden;
}

.lines .ln {
  padding-right: 10px;
  height: var(--editor-line-height);
  white-space: nowrap;
}

textarea {
  width: 100%;
  height: 100%;
  resize: none;
  border: 0;
  outline: none;
  padding: 14px;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.8px;
  line-height: var(--editor-line-height);
  tab-size: 2;
  overflow: auto;
}

textarea.errorFlash {
  box-shadow: inset 0 0 0 2px rgba(255, 92, 122, 0.35);
}

.statusRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.badge.good { border-color: rgba(46, 229, 157, 0.35); box-shadow: 0 0 18px rgba(46, 229, 157, 0.10); }
.badge.bad { border-color: rgba(255, 92, 122, 0.35); box-shadow: 0 0 18px rgba(255, 92, 122, 0.10); }
.badge.warn { border-color: rgba(255, 204, 102, 0.35); box-shadow: 0 0 18px rgba(255, 204, 102, 0.10); }

.results {
  padding: 14px;
  overflow: auto;
}

.summary {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.table thead th {
  text-align: left;
  font-size: 12px;
  color: rgba(231,231,234,0.85);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  padding: 10px 10px;
  position: sticky;
  top: 0;
}

.table tbody td {
  font-family: var(--mono);
  font-size: 12.4px;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
  white-space: pre-wrap;
  word-break: break-word;
}

.table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

.pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  background: rgba(255,255,255,0.04);
}

.pill.bad { border-color: rgba(255, 92, 122, 0.35); }
.pill.warn { border-color: rgba(255, 204, 102, 0.35); }
.pill.good { border-color: rgba(46, 229, 157, 0.35); }

.emptyState {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  display: none;
}

.footer_disc {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 14px;
}

.footer {
  padding: 0 18px 18px;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr; }
  .panel { min-height: 45vh; }
}