body {
  background: radial-gradient(circle at top, #fff6e6 0%, var(--bg) 45%, #e9e1d4 100%);
}

.top-link {
  font-size: 11px;
  padding: 4px 8px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.sidebar {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
  align-self: start;
  height: calc(100vh - 48px);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sidebar-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.sidebar-settings {
  border-top: 1px solid var(--panel-border);
  padding-top: 14px;
}

.sidebar .controls {
  grid-template-columns: 1fr;
}

.sidebar .button-row {
  flex-direction: column;
  align-items: stretch;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.nav-item {
  text-decoration: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-item:hover {
  background: rgba(29, 124, 111, 0.08);
}

.nav-item.active {
  background: rgba(29, 124, 111, 0.12);
  border-color: rgba(29, 124, 111, 0.35);
}

.nav-name {
  font-size: 14px;
  font-weight: 500;
}

.nav-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.pages {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeInUp 0.25s ease both;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.method {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  background: #e9f3f1;
  color: var(--accent-strong);
  border: 1px solid rgba(29, 124, 111, 0.25);
}

.method.get {
  background: #e7f2ff;
  color: #1d4b7c;
  border-color: rgba(29, 75, 124, 0.25);
}

.method.post {
  background: #ebf7ee;
  color: #1f7a40;
  border-color: rgba(31, 122, 64, 0.25);
}

.method.patch {
  background: #fff6dc;
  color: #8a5b00;
  border-color: rgba(138, 91, 0, 0.25);
}

.method.delete {
  background: #ffe9e9;
  color: #a23434;
  border-color: rgba(162, 52, 52, 0.25);
}

.method.put {
  background: #f3e9ff;
  color: #5b3275;
  border-color: rgba(91, 50, 117, 0.25);
}

.path {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

.summary {
  font-weight: 600;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.desc {
  color: var(--muted);
  font-size: 13px;
  white-space: pre-line;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.body-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.body-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.body-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

textarea.body-input {
  min-height: 140px;
  resize: vertical;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.field-group {
  border: 1px dashed var(--panel-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
}

.field-group legend {
  font-size: 12px;
  color: var(--muted);
  padding: 0 6px;
}

.body-preview {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  background: var(--bg-accent);
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.response {
  border-top: 1px dashed var(--panel-border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.response-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.response-toggle {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(29, 124, 111, 0.25);
  background: transparent;
  color: var(--accent-strong);
  cursor: pointer;
}

.response-toggle.active {
  background: rgba(29, 124, 111, 0.12);
  border-color: rgba(29, 124, 111, 0.45);
}

.response-status {
  font-size: 13px;
  color: var(--muted);
}

.response-status.ok {
  color: var(--ok);
}

.response-status.error {
  color: var(--danger);
}

.response-body {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  background: var(--bg-accent);
  border-radius: 12px;
  padding: 12px;
  white-space: normal;
}

.response-body.json {
  background: #f3f6f4;
  border: 1px solid rgba(29, 124, 111, 0.2);
}

.response-body.raw {
  white-space: pre-wrap;
}

.json-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 2px 0;
  padding-left: calc(var(--depth) * 16px);
}

.json-key {
  color: #1d4b7c;
  font-weight: 600;
}

.json-colon {
  color: #6a655f;
}

.json-value {
  word-break: break-word;
}

.json-bracket {
  color: #6a655f;
}

.json-string {
  color: #1f7a40;
}

.json-number {
  color: #8a5b00;
}

.json-boolean {
  color: #7a3b3b;
  font-weight: 600;
}

.json-null {
  color: #6b6b6b;
  font-style: italic;
}

.modal {
  width: min(840px, 100%);
}

.curl-block {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  background: #f3f6f4;
  border: 1px solid rgba(29, 124, 111, 0.2);
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding-bottom: 12px;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
