@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600&family=Source+Sans+3:wght@400;600&display=swap');

:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --line: #e3e7ef;
  --text: #1f2330;
  --muted: #6c7284;
  --accent: #2b6df6;
  --accent-soft: #e8f0ff;
  --good: #1f9d55;
  --warn: #d97a00;
  --bad: #d64545;
  --shadow: 0 12px 30px rgba(21, 26, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 40px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: conic-gradient(from 160deg, #2b6df6, #90b3ff, #2b6df6);
  box-shadow: var(--shadow);
}

.brand h1 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  margin: 0;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
}

.stats {
  display: flex;
  gap: 12px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 12px;
  text-align: center;
  min-width: 90px;
}

.stat span {
  display: block;
  font-weight: 600;
  font-size: 18px;
}

.stat label {
  font-size: 12px;
  color: var(--muted);
}

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  padding: 24px 40px 40px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.list-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filters {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.filters input,
.filters select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  max-height: calc(100vh - 260px);
}

.request-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.2s ease;
}

.request-item:hover,
.request-item.active {
  background: var(--accent-soft);
}

.request-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.request-path {
  font-weight: 600;
  margin: 6px 0;
}

.badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.good { background: rgba(31, 157, 85, 0.15); color: var(--good); }
.badge.warn { background: rgba(217, 122, 0, 0.15); color: var(--warn); }
.badge.bad { background: rgba(214, 69, 69, 0.15); color: var(--bad); }

.detail-panel {
  padding: 20px 24px 24px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.detail-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.detail-header p {
  margin: 0;
  color: var(--muted);
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--line);
  font-weight: 600;
}

.tabs {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}

.tab {
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.tab-content {
  margin-top: 20px;
}

.hidden {
  display: none;
}

.kv-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 12px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  margin-top: 8px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
