.api-shell { min-height:100vh; }
.api-header { height:auto; margin:0; padding:20px 30px; border-bottom:1px solid var(--line); background:#0d1117; }
.api-brand { display:flex; align-items:center; gap:13px; }
.api-brand h1 { margin:0 0 3px; font-size:20px; }
.api-brand p { margin:0; color:var(--muted); font-size:11px; }
.api-back { text-decoration:none; }
.api-main { width:min(1440px,100%); margin:0 auto; padding:26px 30px 60px; }
.api-config { margin-bottom:16px; }
.sample-capture { margin-bottom:16px; }
.sample-layout { display:grid; grid-template-columns:minmax(300px,.75fr) minmax(420px,1.25fr); gap:24px; }
.sample-user-form { padding-right:24px; border-right:1px solid var(--line); }
.sample-step { display:flex; align-items:center; gap:10px; margin-bottom:18px; }
.sample-step > span { width:30px; height:30px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; background:var(--blue-soft); color:#a8bfff; font-weight:700; }
.sample-step div { display:grid; gap:2px; }
.sample-step strong { font-size:13px; }
.sample-step small { color:var(--muted); font-size:11px; }
.sample-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.sample-session,.sample-result { margin-top:13px; padding:12px; border:1px solid rgba(67,211,154,.25); border-radius:9px; background:var(--green-soft); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.sample-session strong,.sample-result strong { color:var(--green); }
.sample-drop-zone { min-height:180px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:24px; border:2px dashed #3c4a5e; border-radius:13px; background:#0c121a; text-align:center; cursor:pointer; transition:.18s ease; }
.sample-drop-zone:hover,.sample-drop-zone.dragover { border-color:var(--blue); background:var(--blue-soft); transform:translateY(-1px); }
.sample-drop-zone.disabled { opacity:.45; cursor:not-allowed; transform:none; border-color:var(--line); background:#0c1118; }
.sample-drop-zone input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.sample-drop-zone .drop-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; background:var(--surface-2); color:#a8bfff; font-size:25px; }
.sample-drop-zone small { color:var(--muted); }
.sample-file-list { min-height:54px; display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:9px; margin-top:12px; }
.sample-file-list > .muted { grid-column:1/-1; margin:12px 0; text-align:center; }
.sample-file { min-width:0; display:grid; grid-template-columns:54px minmax(0,1fr) auto; align-items:center; gap:9px; padding:7px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.sample-file img { width:54px; height:54px; object-fit:cover; border-radius:6px; background:#090d12; }
.sample-file-info { min-width:0; display:grid; gap:4px; }
.sample-file-info strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.sample-file-info small { color:var(--muted); font-size:10px; }
.sample-file button { width:26px; height:26px; padding:0; border:0; background:transparent; color:var(--muted); font-size:17px; }
.sample-file button:hover { color:var(--red); }
.sample-actions { display:grid; grid-template-columns:1fr auto; gap:9px; margin-top:13px; }
.sample-result.error { border-color:rgba(242,109,125,.3); background:rgba(242,109,125,.08); color:var(--red); }
.sample-pipeline { display:grid; gap:9px; margin-top:13px; }
.pipeline-head { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:11px; }
.pipeline-live { display:inline-flex; align-items:center; gap:6px; color:#a8bfff; }
.pipeline-live::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--blue); box-shadow:0 0 0 4px var(--blue-soft); animation:pipeline-pulse 1.6s infinite; }
.pipeline-live.done::before { background:var(--green); box-shadow:0 0 0 4px var(--green-soft); animation:none; }
.pipeline-live.failed { color:var(--red); }
.pipeline-live.failed::before { background:var(--red); box-shadow:0 0 0 4px rgba(242,109,125,.12); animation:none; }
.pipeline-stage { display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.pipeline-stage-number { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:#172131; color:#9db3d7; font-weight:700; }
.pipeline-stage.complete .pipeline-stage-number { background:var(--green-soft); color:var(--green); }
.pipeline-stage.failed .pipeline-stage-number { background:rgba(242,109,125,.12); color:var(--red); }
.pipeline-stage-main { min-width:0; display:grid; gap:7px; }
.pipeline-stage-title { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.pipeline-stage-title strong { font-size:12px; }
.pipeline-stage-title small { color:var(--muted); }
.pipeline-progress { height:6px; overflow:hidden; border-radius:99px; background:#0b1017; }
.pipeline-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#5686f7,#7fa2ff); transition:width .35s ease; }
.pipeline-stage.complete .pipeline-progress span { background:var(--green); }
.pipeline-stage.failed .pipeline-progress span { background:var(--red); }
.pipeline-stage.running .pipeline-progress span { background:linear-gradient(90deg,#5686f7,#9ab5ff,#5686f7); background-size:200% 100%; animation:pipeline-run 1.2s linear infinite; }
.pipeline-stage-meta { max-width:180px; color:var(--muted); font-size:10px; text-align:right; overflow-wrap:anywhere; }
@keyframes pipeline-pulse { 50% { opacity:.45; transform:scale(.85); } }
@keyframes pipeline-run { to { background-position:-200% 0; } }
.api-fields { display:grid; gap:14px; }
.api-fields.four { grid-template-columns:repeat(4,minmax(180px,1fr)); }
.token-state { display:flex; flex-wrap:wrap; gap:8px; }
.api-workspace { display:grid; grid-template-columns:minmax(360px,.85fr) minmax(420px,1.15fr); gap:16px; margin-bottom:16px; }
.request-line { display:grid; grid-template-columns:72px 1fr; gap:8px; margin-bottom:16px; }
.method-badge { display:grid; place-items:center; border-radius:8px; background:var(--blue-soft); color:#a8bfff; font-weight:600; }
textarea { width:100%; resize:vertical; padding:12px; border:1px solid var(--line); border-radius:8px; background:#0c1118; color:#d9e3f3; font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; outline:none; }
textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px var(--blue-soft); }
.request-actions { display:grid; grid-template-columns:1fr auto; gap:9px; }
.request-actions .secondary { min-width:95px; }
.api-note { min-height:18px; margin-top:12px; color:var(--muted); font-size:11px; }
.response-summary { display:flex; align-items:center; gap:9px; }
.response-meta { padding:10px 12px; margin-bottom:10px; border-radius:8px; background:var(--surface-2); color:var(--muted); font:11px ui-monospace,SFMono-Regular,Consolas,monospace; overflow-wrap:anywhere; }
pre { min-height:390px; max-height:590px; margin:0; padding:15px; overflow:auto; border:1px solid var(--line); border-radius:9px; background:#090d12; color:#cbd8ee; font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
#binary-preview img { display:block; max-width:100%; max-height:300px; margin-top:12px; border-radius:9px; }
.status-success { color:var(--green); background:var(--green-soft); }
.status-error { color:var(--red); background:rgba(242,109,125,.12); }
@media (max-width:1050px) {
  .api-fields.four { grid-template-columns:repeat(2,1fr); }
  .api-workspace { grid-template-columns:1fr; }
  .sample-layout { grid-template-columns:1fr; }
  .sample-user-form { padding-right:0; padding-bottom:22px; border-right:0; border-bottom:1px solid var(--line); }
}
@media (max-width:620px) {
  .api-header,.api-main { padding-left:16px; padding-right:16px; }
  .api-fields.four { grid-template-columns:1fr; }
  .api-header { align-items:flex-start; }
  .sample-fields { grid-template-columns:1fr; }
  .sample-file-list { grid-template-columns:1fr; }
  .sample-actions { grid-template-columns:1fr; }
}
