:root {
  --paper: #f5f4ef;
  --panel: #ffffff;
  --panel-2: #fbfaf7;
  --ink: #1b2233;
  --ink-2: #3b4356;
  --muted: #6c7283;
  --faint: #9aa0ad;
  --line: #e5e3dc;
  --line-2: #efede7;
  --accent: #1b2233;
  --accent-ink: #ffffff;
  --hl: #ffd84d;
  --hl-soft: rgba(255, 216, 77, .32);
  --hl-line: #e3b512;
  --blue: #2f5bea;
  --blue-soft: rgba(47, 91, 234, .12);
  --green: #18885c;
  --green-soft: #e3f4ec;
  --amber: #b86e00;
  --amber-soft: #fff1d6;
  --red: #c8372f;
  --red-soft: #fde6e4;
  --grey-soft: #eeede8;
  --shadow: 0 1px 2px rgba(27, 34, 51, .05), 0 4px 16px rgba(27, 34, 51, .05);
  --radius: 10px;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12151c; --panel: #1a1e27; --panel-2: #161a22; --ink: #eceef3; --ink-2: #c9cdd8;
    --muted: #9298a7; --faint: #6b7182; --line: #2a303c; --line-2: #222731; --accent: #ffd84d;
    --accent-ink: #1b2233; --hl-soft: rgba(255, 216, 77, .26); --blue: #7c9cff; --blue-soft: rgba(124, 156, 255, .16);
    --green: #4cc391; --green-soft: rgba(76, 195, 145, .14); --amber: #f0ad3d; --amber-soft: rgba(240, 173, 61, .15);
    --red: #ff7a70; --red-soft: rgba(255, 122, 112, .14); --grey-soft: #252a35;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 18px; height: 18px; flex: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: .92em; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line);
  background: var(--panel-2); display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 10px; }
.brand b { display: block; font-size: 15px; line-height: 1.1; }
.brand small { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: #1b2233; display: grid; align-content: center; gap: 3px; padding: 0 7px; }
.brand-mark i { display: block; height: 3px; border-radius: 2px; background: #fff; }
.brand-mark i:first-child { background: var(--hl); height: 5px; }
.brand-mark i:last-child { width: 65%; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--grey-soft); }
.nav a.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.nav a svg { color: var(--muted); }
.nav a.active svg { color: var(--ink); }
.new-batch-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.new-batch-btn:hover { filter: brightness(1.12); }
.engine-card { margin-top: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--panel); font-size: 12.5px; display: grid; gap: 8px; }
.engine-row { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.engine-row b { font-weight: 600; color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.dot.warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.main { min-width: 0; padding: 28px 36px 60px; }
.main.flush { padding: 0; height: 100vh; overflow: hidden; }

/* ---------- common ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 640px; }
.crumb { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 14px; height: 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--panel);
  padding: 7px 12px; border-radius: 8px; font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1.3; }
.btn:hover { border-color: var(--faint); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.good { background: var(--green); border-color: var(--green); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--grey-soft); }
.btn.sm { padding: 4px 8px; font-size: 12.5px; }
.btn.icon { padding: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, .select, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 10px; outline: none; }
.input:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
label.lbl { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: var(--ink-2); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--grey-soft); color: var(--ink-2); }
.chip svg { width: 12px; height: 12px; }
.chip.approved { background: var(--green-soft); color: var(--green); }
.chip.review { background: var(--amber-soft); color: var(--amber); }
.chip.failed { background: var(--red-soft); color: var(--red); }
.chip.processing, .chip.queued { background: var(--blue-soft); color: var(--blue); }
.chip.processing::before, .chip.queued::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tag { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--grey-soft); color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.skeleton { color: var(--muted); padding: 40px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { padding: 16px 18px; }
.kpi .k-label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .k-value { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { color: var(--muted); font-size: 12px; }
.two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; align-items: start; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--panel-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.cell-trunc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb { width: 38px; height: 48px; border-radius: 4px; border: 1px solid var(--line); object-fit: cover; object-position: top; background: var(--grey-soft); display: block; }
.conf { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.conf-bar { flex: 1; height: 6px; background: var(--grey-soft); border-radius: 9px; overflow: hidden; }
.conf-bar i { display: block; height: 100%; border-radius: 9px; }
.conf span { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--ink-2); width: 34px; text-align: right; }
.stackbar { display: flex; height: 8px; border-radius: 9px; overflow: hidden; background: var(--grey-soft); min-width: 120px; }
.stackbar i { display: block; height: 100%; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; font-weight: 500; }
.filter.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter b { font-variant-numeric: tabular-nums; margin-left: 3px; opacity: .7; }

/* ---------- new batch ---------- */
.form-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tpl-opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; background: var(--panel); display: grid; gap: 4px; text-align: left; }
.tpl-opt:hover { border-color: var(--faint); }
.tpl-opt.on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hl-soft); }
.tpl-opt .t-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tpl-opt .t-desc { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.tpl-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--grey-soft); display: grid; place-items: center; flex: none; }
.tpl-ico svg { width: 17px; height: 17px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--panel-2); gap: 3px; width: 100%; }
.seg button { flex: 1; border: 0; background: transparent; padding: 7px 10px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 34px 20px; text-align: center; background: var(--panel-2); cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--hl-soft); }
.drop svg { width: 30px; height: 30px; color: var(--muted); }
.drop b { display: block; margin-top: 8px; font-size: 15px; }
.file-list { display: grid; gap: 4px; margin-top: 10px; max-height: 220px; overflow: auto; }
.file-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 10px; background: var(--panel-2); border-radius: 7px; }
.file-item span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 6px; background: var(--grey-soft); border-radius: 9px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); transition: width .2s; }
.field-stack { display: grid; gap: 16px; }

/* ---------- review ---------- */
.review-page { display: grid; grid-template-rows: auto 1fr; height: 100vh; }
.review-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.review-top .title { min-width: 0; }
.review-top .title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.review-top .title small { color: var(--muted); }
.review-body { display: grid; grid-template-columns: minmax(0, 1fr) 430px; min-height: 0; }
.viewer { display: grid; grid-template-rows: auto 1fr; min-height: 0; background: var(--grey-soft); }
.viewer-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 12.5px; flex-wrap: wrap; }
.viewer-scroll { overflow: auto; padding: 22px; min-height: 0; }
.pages { margin: 0 auto; display: grid; gap: 18px; }
.page { position: relative; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .12); border-radius: 2px; }
.page img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; border-radius: 2px; }
.page-label { position: absolute; top: -18px; left: 0; font-size: 11px; color: var(--muted); }
.box { position: absolute; border-radius: 2px; cursor: pointer; transition: background .1s, box-shadow .1s; }
.show-all .box { background: rgba(47, 91, 234, .07); box-shadow: inset 0 0 0 1px rgba(47, 91, 234, .35); }
.box:hover { background: rgba(47, 91, 234, .16); box-shadow: inset 0 0 0 1px rgba(47, 91, 234, .7); }
.box.lowconf { box-shadow: inset 0 -2px 0 rgba(200, 55, 47, .7); }
.box.src { background: var(--hl-soft) !important; box-shadow: inset 0 0 0 1.5px var(--hl-line) !important; }
.box.src.active { background: rgba(255, 216, 77, .45) !important; box-shadow: 0 0 0 3px rgba(255, 216, 77, .5), inset 0 0 0 2px var(--hl-line) !important; }
.picking .box { cursor: crosshair; }
.box-tip { position: fixed; z-index: 30; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 12px; padding: 4px 8px; border-radius: 6px; max-width: 360px; }
.panel { border-left: 1px solid var(--line); background: var(--panel); display: grid; grid-template-rows: auto auto 1fr auto; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; padding: 8px 10px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab b { font-weight: 600; font-size: 11px; background: var(--grey-soft); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.panel-summary { padding: 12px 16px; display: grid; gap: 8px; border-bottom: 1px solid var(--line-2); }
.panel-scroll { overflow: auto; min-height: 0; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; background: var(--panel-2); }
.notes { background: var(--amber-soft); color: var(--ink); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.notes ul { margin: 4px 0 0; padding-left: 18px; }
.pick-banner { margin: 10px 16px 0; padding: 8px 10px; border-radius: 8px; background: var(--hl-soft); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.fields { display: grid; }
.field { padding: 10px 16px; border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent; cursor: default; }
.field:hover { background: var(--panel-2); }
.field.active { background: var(--hl-soft); border-left-color: var(--hl-line); }
.field-top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.field-top .f-label { font-weight: 600; font-size: 12.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req { color: var(--red); }
.f-conf { font-size: 11.5px; font-weight: 600; padding: 1px 6px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.f-conf.hi { background: var(--green-soft); color: var(--green); }
.f-conf.mid { background: var(--amber-soft); color: var(--amber); }
.f-conf.lo { background: var(--red-soft); color: var(--red); }
.f-conf.ed { background: var(--blue-soft); color: var(--blue); }
.field .input { padding: 6px 9px; font-size: 13.5px; }
.field.has-error .input { border-color: var(--red); }
.f-meta { display: flex; gap: 6px; align-items: center; margin-top: 5px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.src-chip { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--hl-soft); color: var(--ink-2); cursor: pointer; border: 0; }
.issue { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; margin-top: 5px; }
.issue svg { width: 14px; height: 14px; margin-top: 2px; }
.issue.error { color: var(--red); }
.issue.warning { color: var(--amber); }
.norm { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.check-ok { color: var(--green); font-size: 12px; display: flex; gap: 5px; align-items: center; margin-top: 5px; }
.check-ok svg { width: 14px; height: 14px; }
.grid-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.grid-table th { position: sticky; top: 0; background: var(--panel-2); text-align: left; padding: 6px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.grid-table td { padding: 2px; border-bottom: 1px solid var(--line-2); }
.grid-table input { width: 100%; border: 1px solid transparent; background: transparent; padding: 5px; border-radius: 5px; min-width: 60px; }
.grid-table input:focus { border-color: var(--blue); background: var(--panel); outline: none; }
.grid-table tr:hover td { background: var(--panel-2); }
.grid-table tr.active td { background: var(--hl-soft); }
.table-block { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.textview { padding: 14px 16px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; line-height: 1.6; }
.timeline { padding: 12px 16px; display: grid; gap: 10px; }
.tl { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 12.5px; }
.tl i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-top: 6px; }
.tl small { color: var(--muted); display: block; }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--muted); }

/* ---------- menus, modals, toasts ---------- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: 6px; display: none; }
.menu.open { display: block; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 9px; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--grey-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 0; }
.menu .m-sub { display: block; color: var(--muted); font-size: 12px; }
.menu label { display: flex; gap: 8px; align-items: center; padding: 6px 10px; font-size: 12.5px; color: var(--muted); }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 18, 25, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(520px, 100%); background: var(--panel); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 18px 20px; display: grid; gap: 14px; max-height: 70vh; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
.toast-wrap { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 9px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 380px; font-size: 13.5px; animation: up .2s ease-out; }
.toast.err { background: var(--red); color: #fff; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }

/* ---------- templates ---------- */
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tpl-card { padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.tpl-card .t-head { display: flex; gap: 10px; align-items: center; }
.tpl-card .t-head b { display: block; }
.tpl-card p { margin: 0; color: var(--muted); font-size: 13px; min-height: 38px; }
.tpl-card .t-stats { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); }
.tpl-card .t-stats b { color: var(--ink); }
.editor-section { margin-bottom: 18px; }
.ed-table { width: 100%; border-collapse: collapse; }
.ed-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.ed-table td { padding: 5px 4px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.ed-table .input, .ed-table .select { padding: 6px 8px; }
.ed-table input[type=checkbox] { width: 16px; height: 16px; }
.subtable { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: var(--panel-2); }
pre.code { background: #141824; color: #e6e9f2; padding: 14px 16px; border-radius: 10px; overflow: auto; font-size: 12.5px; line-height: 1.55; margin: 8px 0 0; }
.endpoint { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.endpoint:last-child { border-bottom: 0; }
.verb { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; text-align: center; height: fit-content; }
.verb.GET { background: var(--green-soft); color: var(--green); }
.verb.POST { background: var(--blue-soft); color: var(--blue); }
.verb.PUT { background: var(--amber-soft); color: var(--amber); }
.verb.DELETE { background: var(--red-soft); color: var(--red); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how div { padding: 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); }
.how b { display: block; margin-bottom: 4px; }
.how span { color: var(--muted); font-size: 12.5px; }
.how em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); }

@media (max-width: 1100px) {
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .review-body { grid-template-columns: 1fr; grid-template-rows: 55vh auto; }
  .review-page { height: auto; }
  .main.flush { height: auto; overflow: visible; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  .how { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi .k-value { font-size: 22px; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; gap: 10px; }
  .nav { display: flex; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .nav a { padding: 6px 10px; }
  .engine-card { display: none; }
  .new-batch-btn { margin-left: auto; padding: 8px 12px; }
  .main { padding: 18px 16px 40px; }
}
.grid-table td:nth-child(2) input { min-width: 150px; }
