:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #111822;
  --panel-2: #162130;
  --text: #f5f7fb;
  --muted: #9ca9ba;
  --line: #273447;
  --blue: #2da8ff;
  --red: #ff3b4e;
  --green: #34d399;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(45, 168, 255, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 59, 78, 0.18), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #02111f;
  padding: 11px 15px;
  font-weight: 700;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button.danger {
  background: #3a1720;
  color: #ffb2bc;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c121b;
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}

input:focus {
  border-color: var(--blue);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  color: var(--blue);
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

h2 {
  margin-bottom: 8px;
}

h3 {
  margin: 24px 0 12px;
}

p {
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.metrics article,
.panel,
.card-form,
.api-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 34, 0.88);
}

.metrics article {
  padding: 18px;
}

.metrics span {
  display: block;
  font-size: 32px;
  font-weight: 800;
}

.metrics p {
  margin-bottom: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.tab {
  background: #101722;
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.tab.active {
  color: var(--text);
  border-color: var(--blue);
}

.panel {
  display: none;
  padding: 18px;
}

.panel.active {
  display: block;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, 160px) auto;
  gap: 10px;
  min-width: min(620px, 100%);
}

.grid {
  display: grid;
  gap: 16px;
}

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

.card-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.card-form.wide {
  max-width: 760px;
}

.card-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px;
}

.row p {
  margin: 5px 0 0;
}

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

.compact .row {
  align-items: flex-start;
}

.api-box {
  padding: 18px;
}

code {
  display: block;
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090e15;
  padding: 12px;
  color: #c5f2ff;
}

@media (max-width: 760px) {
  .topbar,
  .section-head,
  .row {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics,
  .grid.two,
  .inline-form {
    grid-template-columns: 1fr;
  }
}
