:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #607086;
  --line: #d9e0e7;
  --panel: #ffffff;
  --panel-soft: #f6f8fb;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --blue: #1d4ed8;
  --amber: #b45309;
  --shadow: 0 16px 42px rgba(20, 35, 55, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #edf2f7;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 22px;
  background: #172033;
  color: #eef5ff;
}

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

.mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #34d399;
  color: #102233;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.2;
}

.brand p,
.connection small {
  color: #aebbd0;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.route-buttons button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.nav-item {
  padding: 0 14px;
  text-align: left;
  color: #dbe7f6;
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  background: #24314a;
  border-color: #3a4965;
}

.connection {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid #34435f;
  border-radius: 8px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(180, 83, 9, 0.18);
}

.status-dot.connected {
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.2);
}

.workspace {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar h2 {
  font-size: 32px;
}

.primary-button,
.secondary-button,
.route-buttons button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  min-height: 44px;
  padding: 0 18px;
  color: white;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button,
.route-buttons button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--blue);
  background: #eaf1ff;
}

.panel {
  display: none;
}

.panel.active {
  display: grid;
  gap: 18px;
}

.metric-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.work-card,
.tool-pane,
.response-pane {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.work-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
}

.work-card p {
  color: var(--muted);
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
}

.tool-pane {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcfe;
}

textarea {
  resize: vertical;
}

.response-pane {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 320px;
  padding: 20px;
}

.response-pane.wide {
  min-height: 280px;
}

pre {
  overflow: auto;
  margin: 14px 0 0;
  padding: 16px;
  border: 1px solid #dce7ef;
  border-radius: 8px;
  color: #0f172a;
  background: var(--panel-soft);
  white-space: pre-wrap;
}

.action-card {
  min-height: 150px;
}

.route-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 880px) {
  .app-shell,
  .split {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .metric-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
