:root {
  --bg: #080d16;
  --panel: #101827;
  --panel-2: #0c1422;
  --line: #233149;
  --text: #e8eef8;
  --muted: #91a0b7;
  --accent: #43d7b8;
  --accent-2: #74a9ff;
  --warning: #f2b95d;
  --danger: #ff7488;
  --shadow: 0 20px 70px rgba(0,0,0,.25);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: radial-gradient(circle at 20% 0%, #142237 0%, var(--bg) 38%); color: var(--text); }
body { font-size: 14px; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
code, pre, textarea { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; }
code { color: #b6ddff; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text, .hint { font-size: 12px; }
.success-text { color: var(--accent); }
.topbar { min-height: 76px; padding: 15px clamp(18px, 4vw, 54px); display: flex; justify-content: space-between; align-items: center; gap: 18px; border-bottom: 1px solid rgba(88,118,158,.25); background: rgba(8,13,22,.74); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; }
.brand, .top-actions, .button-group, .title-actions, .section-heading, .config-foot, .endpoint-title-row, .response-heading, .response-meta, .route-line, .title-meta { display: flex; align-items: center; }
.brand { gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #06111a; background: linear-gradient(135deg, var(--accent), #64b8ff); font-weight: 900; letter-spacing: -1px; box-shadow: 0 7px 30px rgba(67,215,184,.25); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 17px; letter-spacing: -.3px; }
.brand p { color: var(--muted); margin-top: 3px; font-size: 12px; }
.top-actions { gap: 8px; }
.button { border: 1px solid transparent; border-radius: 9px; padding: 10px 14px; cursor: pointer; color: var(--text); transition: transform .15s ease, background .15s ease, border .15s ease; text-decoration: none; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { background: linear-gradient(135deg, #26bda4, #3a9edb); color: #051118; font-weight: 800; box-shadow: 0 7px 24px rgba(45,195,178,.22); }
.button.ghost { background: rgba(255,255,255,.035); border-color: var(--line); }
.button.small { padding: 6px 9px; font-size: 12px; }
.button.link { padding: 4px 0; background: none; border: 0; color: var(--accent-2); }
.button.link:hover { color: var(--accent); }
.shell { max-width: 1800px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 48px) 60px; }
.panel { border: 1px solid rgba(81,111,150,.34); background: linear-gradient(145deg, rgba(16,24,39,.96), rgba(11,19,31,.96)); border-radius: 16px; box-shadow: var(--shadow); }
.hero { padding: 25px 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: 1.6px; font-weight: 800; text-transform: uppercase; }
.hero h2 { max-width: 680px; font-size: clamp(23px, 3vw, 37px); letter-spacing: -1.3px; margin: 7px 0 9px; }
.hero p { max-width: 760px; line-height: 1.65; }
.hero-note { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 15px var(--accent); }
.config-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 15px; margin-top: 15px; }
.config-card { padding: 17px 19px; }
.section-heading { justify-content: space-between; gap: 10px; }
.section-heading h3 { font-size: 14px; margin-top: 3px; }
.target-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 13px; }
label { color: var(--muted); font-size: 11px; display: grid; gap: 5px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #0a1220; color: var(--text); outline: none; }
input, select { height: 36px; padding: 0 10px; }
input:focus, textarea:focus, select:focus { border-color: rgba(67,215,184,.8); box-shadow: 0 0 0 3px rgba(67,215,184,.08); }
.config-foot { justify-content: space-between; margin-top: 11px; min-height: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; }
.stat-card { padding: 17px; display: flex; flex-direction: column; gap: 7px; justify-content: center; }
.stat-label { font-size: 10px; color: var(--muted); letter-spacing: 1px; font-weight: 800; }
.stat-card strong { font-size: 28px; letter-spacing: -1px; }
.workbench { display: grid; grid-template-columns: 350px minmax(0,1fr); gap: 15px; margin-top: 15px; align-items: start; }
.sidebar { overflow: hidden; min-height: 750px; }
.sidebar-head { padding: 18px 17px 13px; display: flex; justify-content: space-between; align-items: flex-end; }
.sidebar-head h3 { font-size: 17px; margin-top: 4px; }
.count-pill, .badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 800; letter-spacing: .35px; }
.count-pill { background: rgba(116,169,255,.12); color: var(--accent-2); }
.search-wrap { margin: 0 13px 10px; position: relative; }
.search-wrap span { position: absolute; left: 10px; top: 8px; color: var(--muted); font-size: 18px; }
.search-wrap input { padding-left: 31px; }
.filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 0 13px 10px; }
.filter-row select { font-size: 11px; }
.group-filters { padding: 0 13px 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.group-chip { cursor: pointer; padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-size: 10px; }
.group-chip.active { color: var(--accent); border-color: rgba(67,215,184,.55); background: rgba(67,215,184,.08); }
.endpoint-list { border-top: 1px solid rgba(81,111,150,.25); max-height: 650px; overflow: auto; }
.endpoint-item { display: grid; grid-template-columns: 45px minmax(0,1fr); gap: 9px; padding: 12px 13px; cursor: pointer; border-bottom: 1px solid rgba(81,111,150,.17); transition: background .15s ease; }
.endpoint-item:hover, .endpoint-item.active { background: rgba(116,169,255,.08); }
.endpoint-item.active { box-shadow: inset 3px 0 0 var(--accent); }
.endpoint-item .method { align-self: start; justify-content: center; }
.endpoint-name { font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.endpoint-path { color: var(--muted); font-size: 10px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.endpoint-sub { display: flex; gap: 5px; align-items: center; margin-top: 6px; }
.endpoint-sub .badge { padding: 2px 5px; font-size: 9px; }
.empty-state { padding: 35px 17px; color: var(--muted); text-align: center; }
.editor { min-width: 0; padding: 25px; min-height: 750px; }
.empty-editor { min-height: 690px; display: grid; place-content: center; text-align: center; gap: 9px; }
.empty-icon { width: 56px; height: 56px; border-radius: 17px; margin: 0 auto 5px; display: grid; place-items: center; font-size: 30px; color: var(--accent); background: rgba(67,215,184,.08); border: 1px solid rgba(67,215,184,.25); }
.empty-editor h3 { font-size: 18px; }
.endpoint-title-row { justify-content: space-between; align-items: flex-start; gap: 15px; }
.title-meta { gap: 6px; margin-bottom: 8px; }
.badge { background: rgba(67,215,184,.12); color: var(--accent); text-transform: uppercase; }
.badge.availability-active_route { background: rgba(67,215,184,.12); color: var(--accent); }
.badge.availability-conditional_auth { background: rgba(242,185,93,.13); color: var(--warning); }
.badge.availability-client_defined_not_routed { background: rgba(255,116,136,.12); color: var(--danger); }
.badge.availability-internal_route { background: rgba(116,169,255,.13); color: var(--accent-2); }
.availability-badge { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.badge.target-bcas { background: rgba(244,185,93,.13); color: var(--warning); }
.badge.target-soluix { background: rgba(181,130,255,.13); color: #c9a5ff; }
.badge.target-be { background: rgba(116,169,255,.13); color: var(--accent-2); }
.muted-badge { color: var(--muted); background: rgba(145,160,183,.1); }
.endpoint-title-row h2 { font-size: 24px; letter-spacing: -.6px; }
.endpoint-title-row p { margin-top: 7px; max-width: 730px; line-height: 1.5; font-size: 12px; }
.title-actions { gap: 8px; align-items: flex-start; }
.route-line { margin: 19px 0 12px; padding: 11px 12px; gap: 10px; background: #09111d; border: 1px solid var(--line); border-radius: 9px; overflow: auto; }
.route-line code { font-size: 12px; white-space: nowrap; }
.method { min-width: 43px; display: inline-flex; padding: 4px 6px; border-radius: 5px; font-size: 10px; font-weight: 900; letter-spacing: .5px; }
.method.GET { background: rgba(67,215,184,.14); color: var(--accent); }
.method.POST { background: rgba(116,169,255,.14); color: var(--accent-2); }
.method.PUT { background: rgba(244,185,93,.14); color: var(--warning); }
.method.DELETE { background: rgba(255,116,136,.14); color: var(--danger); }
.mapping-box { padding: 10px 12px; border: 1px solid rgba(116,169,255,.25); background: rgba(116,169,255,.05); border-radius: 9px; margin-bottom: 14px; }
#upstreamLinks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.upstream-link { border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; color: var(--accent-2); background: transparent; cursor: pointer; font-size: 11px; }
.upstream-sample { width: 100%; max-height: 160px; overflow: auto; margin: 7px 0 0; padding: 8px; border-radius: 7px; background: #09111d; color: var(--muted); font-size: 10px; white-space: pre-wrap; }
.editor-grid { display: grid; grid-template-columns: minmax(300px, 1.03fr) minmax(300px, .97fr); gap: 17px; }
.input-column, .output-column { min-width: 0; }
.input-section { border-top: 1px solid rgba(81,111,150,.28); padding: 15px 0 0; margin-top: 15px; }
.input-section:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.compact { align-items: center; }
.compact h3 { margin: 0; font-size: 13px; }
.optional { color: var(--muted); font-size: 10px; font-weight: 400; }
.code-editor { min-height: 85px; resize: vertical; margin-top: 9px; padding: 11px; line-height: 1.5; font-size: 12px; tab-size: 2; }
.code-editor.short { min-height: 64px; }
.code-editor.body-editor { min-height: 200px; }
.hint { line-height: 1.5; color: var(--muted); margin-top: 6px; }
.parameter-row { display: grid; grid-template-columns: minmax(100px,.7fr) minmax(100px,1fr); gap: 8px; align-items: end; margin-top: 9px; }
.parameter-row .param-name { color: var(--muted); font-size: 11px; padding: 9px 0; font-family: monospace; }
.parameter-row input { height: 34px; }
.danger-section { border: 1px solid rgba(242,185,93,.22); padding: 11px; border-radius: 8px; margin-top: 17px; background: rgba(242,185,93,.035); }
.checkbox-label { display: flex; grid-template-columns: none; align-items: center; gap: 8px; color: var(--text); font-size: 12px; margin-top: 9px; }
.checkbox-label input { width: auto; height: auto; accent-color: var(--accent); }
.response-heading { justify-content: space-between; gap: 10px; }
.response-heading h3 { margin-top: 3px; font-size: 15px; }
.response-status { border-radius: 7px; padding: 5px 8px; font-size: 10px; font-weight: 900; letter-spacing: .5px; }
.response-status.neutral { color: var(--muted); background: rgba(145,160,183,.1); }
.response-status.ok { color: var(--accent); background: rgba(67,215,184,.13); }
.response-status.error { color: var(--danger); background: rgba(255,116,136,.13); }
.response-status.warn { color: var(--warning); background: rgba(242,185,93,.13); }
.response-meta { justify-content: space-between; color: var(--muted); font-size: 11px; margin: 10px 0 8px; }
.response-viewer { min-height: 425px; max-height: 650px; overflow: auto; margin: 0; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #080f1a; color: #cfe4ff; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-summary { margin-top: 15px; padding-top: 14px; border-top: 1px solid rgba(81,111,150,.28); }
.request-summary pre { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.5; margin: 8px 0 0; }
.toast { position: fixed; right: 20px; bottom: 20px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: #18253a; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: all .2s ease; color: var(--text); font-size: 12px; z-index: 20; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1100px) { .workbench { grid-template-columns: 300px minmax(0,1fr); } .editor-grid { grid-template-columns: 1fr; } .response-viewer { min-height: 300px; } }
@media (max-width: 780px) { .topbar, .hero, .endpoint-title-row { align-items: flex-start; flex-direction: column; } .top-actions, .title-actions { width: 100%; } .top-actions .button, .title-actions .button { flex: 1; text-align: center; } .config-grid, .workbench { grid-template-columns: 1fr; } .sidebar { min-height: 0; } .endpoint-list { max-height: 390px; } .editor { padding: 18px; } .target-grid { grid-template-columns: 1fr; } .stats-grid { margin-top: 0; } .hero-note { align-self: stretch; } }
@media (max-width: 430px) { .stats-grid { grid-template-columns: 1fr; } .filter-row { grid-template-columns: 1fr; } }

#pathParams { margin-top: 2px; }

/* ===== Landing Page ===== */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.tool-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: start; padding: 20px; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .1s ease; position: relative; }
.tool-card:hover:not(.disabled) { border-color: rgba(67,215,184,.5); background: rgba(67,215,184,.03); transform: translateY(-2px); }
.tool-card.disabled { opacity: .55; cursor: not-allowed; }
.tool-icon { width: 48px; height: 48px; display: grid; place-items: center; font-size: 24px; border-radius: 12px; background: rgba(67,215,184,.08); border: 1px solid rgba(67,215,184,.2); color: var(--accent); flex-shrink: 0; }
.tool-content { min-width: 0; }
.tool-content h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.3px; }
.tool-content p { margin: 0 0 10px; line-height: 1.55; font-size: 13px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tool-tags li { font-size: 10px; padding: 3px 7px; border-radius: 999px; background: rgba(116,169,255,.12); color: var(--accent-2); font-weight: 700; letter-spacing: .3px; }
.tool-arrow { align-self: center; font-size: 20px; color: var(--muted); transition: transform .15s ease, color .15s ease; }
.tool-card:hover:not(.disabled) .tool-arrow { color: var(--accent); transform: translateX(4px); }
.tool-badge { align-self: flex-start; margin-top: 4px; font-size: 9px; padding: 3px 7px; border-radius: 999px; background: rgba(242,185,93,.13); color: var(--warning); font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }

.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 12px; }
.status-item { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8,13,22,.6); text-align: center; }
.status-item .label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .5px; }
.status-item .value { font-size: 13px; font-weight: 800; }
.status-item .value.ready { color: var(--accent); }
.status-item .value.planned { color: var(--warning); }

.env-hint { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(81,111,150,.25); }
.env-hint .target-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; font-size: 12px; }
.env-hint .target-list div { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(8,13,22,.6); border: 1px solid var(--line); border-radius: 8px; font-family: monospace; }
.env-hint .target-list code { color: var(--accent); }
.env-hint .target-list .muted { color: var(--muted); }
