:root {
    --primary: #49b749;
    --primary-dark: #3d9c3d;
    --primary-light: rgba(73, 183, 73, 0.12);
    --bg: #ffffff;
    --bg-subtle: #f8faf9;
    --bg-muted: #f1f5f3;
    --border: #e2e8e4;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 10px;
    --radius-lg: 14px;
    --sidebar-width: 280px;
    --header-height: 60px;
    --credentials-height: 53px;
    --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
    --get: #059669;
    --get-bg: rgba(5, 150, 105, 0.1);
    --post: #2563eb;
    --post-bg: rgba(37, 99, 235, 0.1);
    --patch: #d97706;
    --patch-bg: rgba(217, 119, 6, 0.1);
    --delete: #dc2626;
    --delete-bg: rgba(220, 38, 38, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--credentials-height) + 1.5rem);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-subtle);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
    font-family: var(--mono);
    font-size: 0.8125rem;
}

code {
    background: var(--bg-muted);
    padding: 0.15em 0.45em;
    border-radius: 5px;
    border: 1px solid var(--border);
}

pre {
    margin: 0;
    padding: 1rem 1.125rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--radius);
    overflow-x: auto;
    line-height: 1.55;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* Header */
.docs-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.docs-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    text-decoration: none;
}

.docs-brand:hover { text-decoration: none; }

.docs-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.docs-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.docs-search-wrap {
    position: relative;
}

.docs-search {
    width: 220px;
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-subtle);
    font: inherit;
    font-size: 0.875rem;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s, width 0.2s;
}

.docs-search:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    width: 280px;
    background: var(--bg);
}

.docs-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft);
    pointer-events: none;
    font-size: 0.875rem;
}

.docs-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    transition: all 0.15s;
    white-space: nowrap;
}

.docs-btn:hover {
    text-decoration: none;
    border-color: #cbd5e1;
    background: var(--bg-muted);
}

.docs-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.docs-btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.docs-menu-toggle {
    display: none;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    cursor: pointer;
    font-size: 1rem;
}

/* Layout */
.docs-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    width: 100%;
    min-height: calc(100vh - var(--header-height) - var(--credentials-height));
}

.docs-sidebar {
    position: sticky;
    top: calc(var(--header-height) + var(--credentials-height));
    height: calc(100vh - var(--header-height) - var(--credentials-height));
    overflow-y: auto;
    padding: 1.25rem 0 2rem;
    border-right: 1px solid var(--border);
    background: var(--bg);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.25s ease;
}

.docs-sidebar:hover {
    scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
}

.docs-sidebar::-webkit-scrollbar {
    width: 5px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 999px;
    transition: background-color 0.25s ease;
}

.docs-sidebar:hover::-webkit-scrollbar-thumb {
    background-color: rgba(15, 23, 42, 0.28);
}

.docs-nav-group {
    margin-bottom: 0.25rem;
}

.docs-nav-label {
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.docs-nav-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 0.35rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color 0.12s;
}

.docs-nav-section-count {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-soft);
    background: var(--bg-subtle);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.docs-nav-section-title:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.docs-nav-section-title.active {
    color: var(--primary-dark);
    background: var(--primary-light);
    border-left: 2px solid var(--primary);
    padding-left: calc(1.25rem - 2px);
}

.docs-nav-link {
    display: block;
    padding: 0.4rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.12s;
}

.docs-nav-link:hover {
    color: var(--text);
    background: var(--bg-subtle);
    text-decoration: none;
}

.docs-nav-link.active {
    color: var(--primary-dark);
    background: var(--primary-light);
    border-left-color: var(--primary);
    font-weight: 600;
}

.docs-nav-link.is-hidden { display: none; }

.docs-nav-endpoint {
    padding-left: 1.75rem;
    font-size: 0.8125rem;
}

.docs-main {
    padding: 2rem 2.5rem 4rem;
    width: 100%;
    min-width: 0;
}

/* Hero */
.docs-hero {
    margin-bottom: 2.5rem;
}

.docs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.875rem;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
}

.docs-hero h1 {
    margin: 0 0 0.75rem;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.docs-hero-lead {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 42rem;
}

.docs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* Sections */
.docs-section {
    margin-bottom: 3rem;
    scroll-margin-top: calc(var(--header-height) + var(--credentials-height) + 1rem);
}

.docs-section.is-hidden { display: none; }

.docs-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--border);
}

.docs-section-intro {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 52rem;
}

.docs-section-endpoints {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}

.docs-section-endpoint-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: all 0.12s;
}

.docs-section-endpoint-chip:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    text-decoration: none;
}

.docs-section-endpoint-chip .docs-chip-method {
    font-size: 0.6875rem;
}

.docs-chip-path {
    font-family: var(--font-mono);
    color: var(--text);
    font-size: 0.8125rem;
}

.docs-section h3 {
    margin: 1.5rem 0 0.625rem;
    font-size: 1rem;
    font-weight: 650;
}

.docs-section p,
.docs-section li {
    color: var(--text-muted);
}

.docs-section ul {
    margin: 0.5rem 0 1rem;
    padding-left: 1.25rem;
}

.docs-section li { margin-bottom: 0.35rem; }

/* Feature cards */
.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.875rem;
    margin: 1.25rem 0;
}

.docs-card {
    padding: 1rem 1.125rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.docs-card-icon {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.docs-card h4 {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    font-weight: 650;
    color: var(--text);
}

.docs-card p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* Callout */
.docs-callout {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    margin: 1rem 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
}

.docs-callout-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
    margin-top: 0.1rem;
}

.docs-callout-body p {
    margin: 0;
    font-size: 0.875rem;
}

.docs-callout-body strong { color: var(--text); }

/* Code block wrapper */
.docs-code-block {
    margin: 1rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #1e293b;
    box-shadow: var(--shadow-sm);
}

.docs-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.875rem;
    background: #1e293b;
}

.docs-code-label {
    color: #94a3b8;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.docs-copy-btn {
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.docs-copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.docs-copy-btn.copied {
    color: #86efac;
    border-color: rgba(134, 239, 172, 0.35);
}

.docs-endpoint-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.docs-test-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.15s;
}

.docs-test-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Endpoint cards */
.docs-endpoint {
    margin-bottom: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    scroll-margin-top: calc(var(--header-height) + var(--credentials-height) + 1rem);
}

.docs-endpoint:not(.open) {
    overflow: hidden;
}

.docs-endpoint.is-hidden { display: none; }

.docs-endpoint-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
}

.docs-endpoint.open .docs-endpoint-header {
    position: sticky;
    top: calc(var(--header-height) + var(--credentials-height));
    z-index: 25;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.docs-endpoint:not(.open) .docs-endpoint-header:hover {
    background: var(--bg-subtle);
}

.docs-endpoint.open .docs-endpoint-header:hover {
    background: rgba(248, 250, 249, 0.98);
}

.docs-method {
    flex-shrink: 0;
    min-width: 4.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.docs-method-get { background: var(--get-bg); color: var(--get); }
.docs-method-post { background: var(--post-bg); color: var(--post); }
.docs-method-patch { background: var(--patch-bg); color: var(--patch); }
.docs-method-delete { background: var(--delete-bg); color: var(--delete); }
.docs-method-put { background: var(--post-bg); color: var(--post); }

.docs-endpoint-path {
    font-family: var(--mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.docs-endpoint-summary {
    margin: 0.15rem 0 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.docs-endpoint-chevron {
    color: var(--text-soft);
    transition: transform 0.2s;
    font-size: 0.75rem;
    padding-top: 0.25rem;
}

.docs-endpoint.open .docs-endpoint-chevron {
    transform: rotate(180deg);
}

.docs-endpoint-body {
    display: none;
    padding: 1rem 1.125rem 1.125rem;
    border-top: 1px solid var(--border);
}

.docs-endpoint.open .docs-endpoint-body {
    display: block;
}

.docs-endpoint-desc {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: pre-wrap;
}

.docs-endpoint-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding-top: 0.125rem;
}

.docs-tag {
    display: inline-flex;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.docs-tag-auth {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
    color: #2563eb;
}

.docs-tag-public {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.2);
    color: #059669;
}

.docs-subheading {
    margin: 1rem 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.docs-param-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
}

.docs-param-table th,
.docs-param-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.docs-param-table th {
    background: var(--bg-muted);
    font-weight: 600;
    color: var(--text);
}

.docs-param-name {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--text);
}

.docs-param-type {
    color: var(--text-soft);
    font-size: 0.75rem;
}

.docs-response-list {
    display: grid;
    gap: 0.5rem;
}

.docs-response-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
}

.docs-status {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 2.5rem;
}

.docs-status-2xx { color: var(--get); }
.docs-status-4xx { color: var(--patch); }
.docs-status-5xx { color: var(--delete); }

/* Credentials bar */
.docs-credentials-bar {
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.docs-credentials-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.625rem 1.5rem;
    min-height: var(--credentials-height);
}

.docs-credentials-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.docs-cred-field {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.docs-cred-field span {
    white-space: nowrap;
    font-weight: 500;
}

.docs-cred-field input {
    width: 11rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 0.8125rem;
    background: var(--bg-subtle);
    color: var(--text);
}

.docs-cred-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
    background: var(--bg);
}

.docs-cred-field input.wide {
    width: 14rem;
}

.docs-cred-field-token input {
    width: 14rem;
}

.docs-cred-apply {
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
}

.docs-credentials-status {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    color: var(--text-soft);
    text-align: right;
}

.docs-credentials-end {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.docs-cred-toggle {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
}

.docs-credentials-status.is-applied {
    color: var(--primary-dark);
    font-weight: 600;
}

.docs-credentials-status.is-error {
    color: var(--delete);
    font-weight: 500;
}

.docs-credentials-hint {
    display: none;
}

/* Try it panel */
.docs-try-panel {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.docs-try-panel.is-disabled {
    opacity: 0.85;
}

.docs-try-fields {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.docs-try-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.docs-try-field input,
.docs-try-field textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 0.8125rem;
    background: var(--bg);
    color: var(--text);
}

.docs-try-field textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--mono);
    line-height: 1.5;
}

.docs-try-body-generated {
    background: var(--bg-muted);
    color: var(--text);
}

.docs-try-body-section {
    margin-top: 0.25rem;
}

.docs-body-input-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    margin-bottom: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.docs-body-input-table th,
.docs-body-input-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.docs-body-input-table th {
    background: var(--bg-muted);
    font-weight: 600;
    color: var(--text);
    font-size: 0.75rem;
}

.docs-body-input-table tr:last-child td {
    border-bottom: none;
}

.docs-body-field-name {
    width: 38%;
}

.docs-body-field-desc {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--text-soft);
    line-height: 1.45;
}

.docs-body-field-label-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.docs-body-badge {
    display: inline-flex;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.docs-body-badge.required {
    background: rgba(220, 38, 38, 0.1);
    color: var(--delete);
}

.docs-body-badge.optional {
    background: var(--bg-muted);
    color: var(--text-soft);
}

.docs-body-badge.one-of {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.docs-body-oneof-hint {
    margin: 0 0 0.75rem;
    padding: 0.625rem 0.875rem;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.docs-field-value-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-field-value-wrap .docs-body-input {
    flex: 1;
    min-width: 0;
}

.docs-saved-select {
    flex-shrink: 0;
    max-width: 9rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 0.6875rem;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
}

.docs-saved-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.docs-body-required {
    display: none;
}

.docs-body-input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 0.8125rem;
    background: var(--bg-subtle);
    color: var(--text);
}

.docs-body-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
    background: var(--bg);
}

.docs-body-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.docs-try-body-preview {
    margin-top: 0.25rem;
}

.docs-try-body-preview .docs-try-note {
    margin-top: 0.35rem;
}

.docs-try-field input:focus,
.docs-try-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.docs-try-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.docs-try-note {
    font-size: 0.75rem;
    color: var(--text-soft);
}

.docs-try-result {
    margin-top: 0.875rem;
    padding: 0.875rem;
    border-radius: 8px;
    font-family: var(--mono);
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--border);
    background: #0f172a;
    color: #e2e8f0;
    display: none;
}

.docs-try-result.visible {
    display: block;
}

.docs-try-result.success {
    border-color: rgba(5, 150, 105, 0.35);
}

.docs-try-result.error {
    border-color: rgba(220, 38, 38, 0.35);
}

.docs-try-result.info {
    border-color: rgba(37, 99, 235, 0.35);
}

/* Webhook events */
.docs-event-grid {
    display: grid;
    gap: 0.75rem;
}

.docs-event {
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.docs-event code {
    font-weight: 600;
    color: var(--primary-dark);
}

.docs-event p {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
}

/* Resources row */
.docs-resources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.docs-resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}

.docs-resource-link:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--primary-dark);
}

/* Loading / error */
.docs-loading,
.docs-error {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.docs-error {
    color: var(--delete);
}

.docs-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 1rem;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.docs-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-soft);
}

/* Mobile */
@media (max-width: 960px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: fixed;
        left: 0;
        top: calc(var(--header-height) + var(--credentials-height));
        width: min(var(--sidebar-width), 88vw);
        z-index: 90;
        transform: translateX(-100%);
        transition: transform 0.2s;
        box-shadow: var(--shadow-md);
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .docs-menu-toggle { display: inline-flex; }

    .docs-search { width: 160px; }
    .docs-search:focus { width: 180px; }

    .docs-main {
        padding: 1.5rem 1.25rem 3rem;
    }

    .docs-hero h1 { font-size: 1.75rem; }

    .docs-header-actions .docs-btn:not(.docs-btn-primary) {
        display: none;
    }

    .docs-credentials-status {
        flex: 1 1 100%;
        text-align: left;
    }

    .docs-credentials-end {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }

    .docs-cred-field input { width: 9rem; }
}

@media (max-width: 640px) {
    .docs-field-value-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .docs-saved-select {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .docs-search-wrap { display: none; }

    .docs-credentials-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .docs-cred-field {
        flex-direction: column;
        align-items: stretch;
    }

    .docs-cred-field input,
    .docs-cred-field input.wide {
        width: 100%;
    }
}
