#respHdr td { vertical-align: top; }
#respHdr td:nth-child(2) {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

   .alert{
  display:none;
  position:relative;
  border:1px solid;
  border-radius:10px;
  padding:10px 12px;
  padding-right:32px;   /* room for × */
  margin:12px 0;
  width:100%;
  font-size:14px; line-height:1.4;

  /* wrap long messages, tokens, and URLs */
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;

  background:#fff1f1; border-color:#fecaca; color:#7f1d1d;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.02);

  /* 👇 optional: if messages are huge, keep box short & scroll it */
  max-height: 140px;
  overflow: auto;
}
.alert.show{display:block}
.alert .x{position:absolute;top:8px;right:10px;cursor:pointer;border:0;background:transparent;font-weight:800;line-height:1;color:#7f1d1d}






    /* =========================================
    GLOBAL / THEME
    ========================================= */
    :root{
    --bg:#fafbfe; --panel:#fff; --muted:#5b6b82; --text:#0f1a2b; --border:#e7edf5;
    --shadow:0 6px 24px rgba(16,24,40,.06);
    --primary:#2563eb; --success:#16a34a; --warn:#b45309;
    --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
    --radius:10px;
    --get:#16a34a; --post:#2563eb; --put:#eab308; --delete:#ef4444; --patch:#7c3aed;

    /* Left panel sizing */
    --leftW: 290px;
    --leftW-min: 220px;
    --leftW-max: 420px;

    /* Right panel sizing */
    --rightW: 420px;
    --rightW-min: 320px;
    --rightW-max: 800px;
    }

    *{box-sizing:border-box}
    html,body{height:100%}
    body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial}
    a{color:inherit;text-decoration:none}
    button{cursor:pointer;border:0;background:transparent;color:inherit;font:inherit}
    input,select,textarea{font:inherit}

    .hidden{display:none!important}
    .muted{color:#5b6b82;font-size:12px;margin-top:-6px}
    .invalid{border-color:#ef4444!important; box-shadow:0 0 0 1px #fecaca inset}
    .error-text{color:#b91c1c;font-size:12px;margin-top:6px}

    /* =========================================
    TOASTS / OVERLAY
    ========================================= */
    #toasts{position:fixed;top:12px;right:12px;display:grid;gap:10px;z-index:1000}
    .toast{min-width:260px;max-width:420px;padding:10px 12px;border-radius:10px;box-shadow:0 10px 30px rgba(16,24,40,.12);border:1px solid var(--border);
    background:#fff;color:var(--text);display:grid;gap:4px;animation:slideIn .18s ease-out}
    .toast .t-title{font-weight:800}
    .toast .t-sub{font-size:12px;color:var(--muted)}
    .toast.ok{border-color:#b9e8c9;background:#eefaf3}
    .toast.err{border-color:#fecaca;background:#fff1f1}
    .toast.info{border-color:#dbe7ff;background:#eef4ff}
    @keyframes slideIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}

    /* Page request loader */
    .reqloader{position:absolute; inset:8px; border-radius:10px; background:rgba(255,255,255,.75);
    display:none; align-items:center; justify-content:center; box-shadow:inset 0 0 0 1px var(--border); z-index:5}
    .reqloader.show{display:flex}
    .reqloader .wrap{display:grid;gap:10px;justify-items:center;padding:18px 20px;background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 10px 30px rgba(16,24,40,.12)}
    .reqloader .spinner{width:40px;height:40px;border-radius:50%;border:4px solid transparent;border-top-color:var(--primary);border-left-color:var(--primary);animation:spin .8s linear infinite}
    .reqloader .label{font-weight:700;color:var(--text)}
    .reqloader .sub{font-size:12px;color:var(--muted);margin-top:-6px}
    .reqloader .bar{width:220px;height:6px;border-radius:999px;background:#eef4ff;overflow:hidden}
    .reqloader .bar>i{display:block;height:100%;width:40%;background:var(--primary);opacity:.35;border-radius:999px;animation:barflow 1.4s ease-in-out infinite}
    @keyframes spin{to{transform:rotate(360deg)}}
    @keyframes barflow{0%{transform:translateX(-60%)}50%{transform:translateX(60%)}100%{transform:translateX(160%)}}

    /* =========================================
    TOPBAR
    ========================================= */
    .topbar{position:sticky;top:0;z-index:60;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:10px 16px;background:#fff;border-bottom:1px solid var(--border)}
    .brand{display:flex;gap:10px;align-items:center}
    .logo{width:34px;height:34px;border-radius:6px;background:#0b64f0;color:#fff;display:grid;place-items:center;font-weight:800}
    .brand h1{font-size:18px;margin:0}
    .brand p{margin:0;color:var(--muted);font-size:12px}
    .topbar .actions{display:flex;gap:8px;align-items:center}
    .search input{width:720px;max-width:70vw;border:1px solid var(--border);border-radius:999px;padding:10px 14px;background:#fff}

    /* Buttons & badges */
    .btn{border:1px solid var(--border);background:#fff;border-radius:8px;padding:8px 12px;font-weight:600}
    .btn[disabled]{opacity:.6;cursor:not-allowed}
    .btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}
    .badge{display:inline-block;border-radius:999px;padding:2px 10px;color:#fff;font-weight:800;font-size:12px}
    .badge.get{background:var(--get)} .badge.post{background:var(--post)} .badge.put{background:var(--put)}
    .badge.delete{background:var(--delete)} .badge.patch{background:var(--patch)}

    /* =========================================
    LAYOUT (3 columns)
    ========================================= */
    .layout{display:grid;grid-template-columns:var(--leftW) 1fr var(--rightW);gap:0;height:calc(100vh - 58px)}
    .sidebar{background:#fff;border-right:1px solid var(--border);padding:12px;overflow:auto;position:relative}
    .main{padding:18px 22px;overflow:auto}
    .right{border-left:1px solid var(--border);background:#fff;padding:14px;overflow:auto;position:relative}
    .right>.sticky{position:sticky;top:12px;display:grid;gap:12px}

    /* LEFT collapsed */
    .layout[data-left="collapsed"]{grid-template-columns:18px 1fr var(--rightW)}
    .layout[data-left="collapsed"] .sidebar{padding:0; overflow:visible}
    .layout[data-left="collapsed"] .sidebar > *:not(.left-expand-tab):not(.left-resizer){display:none}

    /* RIGHT collapsed */
    .layout[data-right="collapsed"]{grid-template-columns:var(--leftW) 1fr 18px}
    .layout[data-right="collapsed"] .right{padding:0; overflow:visible}
    .layout[data-right="collapsed"] .right .sticky,
    .layout[data-right="collapsed"] .right .panel-controls,
    .layout[data-right="collapsed"] .right .resizer{display:none}

    /* RIGHT maximized */
    .layout[data-right="max"]{grid-template-columns:0 0 1fr}
    .layout[data-right="max"] .sidebar, .layout[data-right="max"] .main{display:none}

    /* =========================================
    LEFT PANEL resizer + expand tab
    ========================================= */
    .left-resizer{
    position:absolute; right:-6px; top:0; bottom:0; width:12px;
    cursor:col-resize; z-index:6; background:transparent;
    }
    .left-resizer::after{
    content:""; position:absolute; right:5px; top:25%; bottom:25%; width:2px;
    background:var(--border); border-radius:2px;
    }
    .sidebar.resizing, .sidebar.resizing *{user-select:none}

    .left-expand-tab{
    position:absolute; right:-2px; top:50%; transform:translateY(-50%);
    width:18px; height:48px; border:1px solid var(--border);
    border-radius:10px; background:#fff; box-shadow:var(--shadow);
    display:grid; place-items:center; z-index:8;
    }
    .layout:not([data-left="collapsed"]) .left-expand-tab{display:none}
    .left-expand-tab svg{width:14px;height:14px;display:block}

    /* =========================================
    RIGHT PANEL controls + resizer
    ========================================= */
    .right .panel-controls{
    position:absolute; top:8px; right:10px; display:flex; gap:6px; z-index:7;
    }
    .icon-ghost{
    border:1px solid var(--border); background:#fff; border-radius:10px;
    width:36px; height:36px; display:grid; place-items:center; box-shadow:var(--shadow);
    }
    .icon-ghost:hover{background:#f5f7fc}
    .icon-ghost svg{width:18px;height:18px;display:block}

    /* Drag handle */
    .right .resizer{
    position:absolute; left:-6px; top:0; bottom:0; width:12px;
    cursor:col-resize; z-index:6; background:transparent;
    }
    .right .resizer::after{
    content:""; position:absolute; left:5px; top:25%; bottom:25%; width:2px;
    background:var(--border); border-radius:2px;
    }
    .right.resizing, .right.resizing *{user-select:none}
    body.resizing{cursor:col-resize}

    /* Expand tab (right) */
    .expand-tab{
    position:absolute; left:-2px; top:50%; transform:translateY(-50%);
    width:18px; height:48px; border:1px solid var(--border);
    border-radius:10px; background:#fff; box-shadow:var(--shadow);
    display:grid; place-items:center; z-index:8;
    }
    .layout:not([data-right="collapsed"]) .expand-tab{display:none}
    .expand-tab svg{width:14px;height:14px;display:block}

    /* =========================================
    SIDEBAR TREE
    ========================================= */
    .sidebar .search2 input{width:100%;border:1px solid var(--border);border-radius:999px;background:#fff;padding:10px 12px;margin-bottom:10px}
    .group{border:1px solid var(--border);border-radius:8px;margin-bottom:10px;overflow:hidden}
    .group-h{display:flex;align-items:center;justify-content:space-between;background:#f5f7fc;padding:10px 12px;cursor:pointer}
    .group-h .title{font-weight:800}
    .group[data-open="true"] .chev{transform:rotate(90deg)}
    .chev{transition:.2s}
    .group-b{padding:6px}
    .list{list-style:none;margin:0;padding:0}
    .item a{display:flex;gap:8px;align-items:center;padding:8px 10px;border-radius:8px}
    .item a:hover{background:#eef3ff}
    .item a.active{background:#e7efff;border-left:3px solid var(--primary);padding-left:7px}
    .item .path{font-family:var(--mono);font-size:13px;color:#0f1a2b}

    /* =========================================
    CENTER CONTENT
    ========================================= */
    .card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
    .hero{margin-bottom:16px}
    .pathbar{display:flex;gap:10px;align-items:center;background:#f5f7fc;border:1px solid var(--border);border-radius:8px;padding:10px 12px;margin-bottom:12px}
    .h1{margin:0 0 8px;font-size:26px;font-weight:800}
    .p-muted{color:var(--muted);margin:0}
    .kv{display:grid;grid-template-columns:160px 1fr;gap:8px;align-items:center;margin-top:8px}
    .kv .label{font-weight:700}
    .section-title{font-weight:800;margin:18px 0 8px}
    .table{width:100%;border:1px solid var(--border);border-radius:8px;border-collapse:collapse;overflow:hidden}
    .table th,.table td{padding:10px;border-bottom:1px solid var(--border)}
    .table th{background:#f5f7fc;text-align:left}

    /* Success / note */
    .resp-ok{display:flex;align-items:center;gap:8px;border:1px solid #b9e8c9;background:#eefaf3;color:#0b5d2c;border-radius:8px;padding:10px 12px}
    .note{border:1px solid #f6d3b0;background:#fff6e9;color:#8a4b0e;border-radius:8px;padding:10px 12px}

    /* Code & inputs */
    .code{background:#0b1220;color:#e2e8f0;border-radius:8px;padding:12px;font-family:var(--mono);font-size:13px;overflow:auto}
    .input,textarea,select{width:100%;border:1px solid var(--border);border-radius:8px;background:#fff;padding:10px;font-family:var(--mono)}

    /* Headers KV rows (right panel) */
    .hrow{display:grid;grid-template-columns:160px 1fr auto;gap:8px;align-items:center;margin-bottom:8px}
    .hrow input{width:100%}
    .icon-btn{border:1px solid var(--border);background:#fff;border-radius:8px;padding:8px;display:inline-grid;place-items:center}
    .icon-btn:hover{background:#f5f7fc}

    /* Inline loader (center card) */
    .loader{position:absolute;inset:0;background:rgba(255,255,255,.6);display:none;align-items:center;justify-content:center;border-radius:8px}
    .loader.show{display:flex}
    .spinner{width:42px;height:42px;border-radius:50%;border:4px solid transparent;border-top-color:var(--primary);border-left-color:var(--primary);animation:spin .8s linear infinite}

    /* Dialog */
    dialog{border:0;border-radius:12px;padding:0}
    /* Dialog container — keep size stable */
.modal{
  padding:18px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;

  /* 👇 force a fixed width that does NOT change with content */
  width: min(560px, 90vw);
  max-width: 90vw;
  box-sizing: border-box;

  /* 👇 optional: prevent tall growth and enable internal scrolling */
  max-height: 75vh;
  overflow: auto;
}

    .modal h3{margin:0 0 8px}
    .modal .row{display:flex;gap:8px;justify-content:flex-end}

    /* =========================================
    RESPONSIVE
    ========================================= */

    /* Hide the Menu button on large/desktop viewports */
    @media (min-width: 1200px) {
      #menuBtn { display: none; }
    }

    /* On mobile/tablet (where the Request panel is hidden), also hide the Token button */
    @media (max-width: 1200px) {
      #tokenBtn { display: none; }
    }
    /* Hide desktop-only login button on mobile */
    @media (max-width:960px){
      #loginBtn{ display:none; }
    }



    @media (max-width:1200px){
    .layout{grid-template-columns:var(--leftW) 1fr}
    .right{display:none}

    .layout[data-right="max"]{grid-template-columns:1fr}
    .layout[data-right="max"] .right{ display:block !important; }
    .layout[data-right="max"] .sidebar, .layout[data-right="max"] .main{display:none}

    .layout[data-right="collapsed"]{grid-template-columns:var(--leftW) 1fr 18px}
    .layout[data-right="collapsed"] .right{display:block}
    }

    @media (max-width:960px){
    .layout{grid-template-columns:1fr}
    .sidebar{
    position:fixed;top:58px;left:0;bottom:0;width:86%;max-width:320px;border-right:1px solid var(--border);
    transform:translateX(-100%);transition:.25s;z-index:55;background:#fff
    }
    .sidebar.open{transform:translateX(0)}
    .search{display:none}

    .layout[data-right="max"]{grid-template-columns:1fr}
    .layout[data-right="max"] .right{ display:block !important; }
    .layout[data-right="max"] .sidebar, .layout[data-right="max"] .main{display:none}

    .layout[data-right="collapsed"]{grid-template-columns:1fr 18px}
    .layout[data-right="collapsed"] .right{display:block}
    }

.warn-icon {
  font-size: 11px;
  color: #dc2626;   /* red */
    opacity: 0.8;

  margin-left: 2px;
    transition: transform 0.2s ease;
}

.item.deprecated .path {
  text-decoration: line-through;
  opacity: 0.6;
}
.item.deprecated:hover .path {
  opacity: 0.9;
}
.item.deprecated a.active {
  background: #fff1f1;
}

.item:hover .warn-icon {
  transform: scale(1.1);
}


.code-wrap {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #1f2937;
  color: white;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.8;
}

.copy-btn:hover {
  opacity: 1;
  background: #374151;
}

.copy-btn {
  opacity: 0;
}

.code-wrap:hover .copy-btn {
  opacity: 1;
}