/* SOLVEN — Documentación de la API (integracion-erp.html, /desarrolladores).
   Estilo de documentación clásica de lenguaje (Sphinx «classic»/docs.python.org): barra de migas, índice lateral,
   encabezados con banda gris, código verde claro, firmas tipo función, admoniciones. Prefijo d- y elementos semánticos. */

:root {
  --d-text: #222;
  --d-muted: #555;
  --d-link: #0b5394;
  --d-link-visited: #30306f;
  --d-head: #20435c;
  --d-band: #f2f2f2;
  --d-rule: #ccc;
  --d-side: #f8f8f8;
  --d-code-bg: #eeffcc;
  --d-code-rule: #ac9;
  --d-inline: #ecf0f3;
  --d-sig: #f0f4f8;
  --d-sig-rule: #c9d5e1;
  --d-hl: #fbe54e;
}

body.d-doc { margin: 0; background: #fff; color: var(--d-text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; }
.d-doc * { box-sizing: border-box; }
.d-doc a { color: var(--d-link); text-decoration: none; }
.d-doc a:hover { text-decoration: underline; }

/* ── barra de migas (relbar) ─────────────────────────────────────────────── */
.d-rel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 16px; background: #fff; border-bottom: 1px solid var(--d-rule); font-size: 14px; }
.d-rel .d-logo { display: inline-flex; align-items: center; gap: 6px; color: var(--d-text); font-weight: 600; }
.d-rel .d-logo img { width: 18px; height: 18px; }
.d-rel .d-sep { color: #888; }
.d-rel .d-ver { font: inherit; font-size: 13px; padding: 1px 4px; border: 1px solid #bbb; background: #fff; }
.d-rel .d-right { margin-left: auto; display: flex; gap: 10px; align-items: center; color: #888; }
.d-rel .d-right a { color: var(--d-link); }

/* ── estructura ──────────────────────────────────────────────────────────── */
.d-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 36px); }
.d-side { background: var(--d-side); border-right: 1px solid #e3e3e3; padding: 14px 14px 40px; font-size: 13.5px; }
.d-side-in { position: sticky; top: 10px; max-height: calc(100vh - 20px); overflow: auto; padding-right: 4px; }
.d-side h3 { font-size: 15px; font-weight: normal; color: var(--d-text); margin: 14px 0 6px; font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; }
.d-side h3:first-child { margin-top: 0; }
.d-side ul { list-style: none; margin: 0; padding: 0; }
.d-side ul ul { padding-left: 14px; margin: 2px 0 4px; }
.d-side li { margin: 2px 0; line-height: 1.35; }
.d-side ul ul ul a { color: #444; font-family: Menlo, Consolas, 'DejaVu Sans Mono', monospace; font-size: 12px; }
.d-side ul ul ul a em { font-style: normal; color: #888; }
.d-side a.d-actual { font-weight: 700; }
.d-search { display: flex; gap: 4px; }
.d-search input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 2px 4px; border: 1px solid #bbb; }
.d-search button { font: inherit; font-size: 13px; padding: 1px 8px; border: 1px solid #bbb; background: #eee; cursor: pointer; }
.d-search-msg { color: var(--d-muted); font-size: 12px; margin-top: 4px; min-height: 1em; }

.d-body { padding: 10px 30px 60px; max-width: 980px; min-width: 0; }

/* ── encabezados (banda gris clásica) ────────────────────────────────────── */
.d-body h1, .d-body h2, .d-body h3 { font-family: 'Trebuchet MS', 'Segoe UI', sans-serif; font-weight: normal; color: var(--d-head); }
.d-body h1 { font-size: 200%; margin: 18px -30px 12px; padding: 4px 30px 6px; background: var(--d-band); border-bottom: 1px solid var(--d-rule); }
.d-body h2 { font-size: 160%; margin: 34px -30px 10px; padding: 3px 30px; background: var(--d-band); border-bottom: 1px solid var(--d-rule); }
.d-body h3 { font-size: 125%; margin: 24px 0 8px; padding-bottom: 2px; border-bottom: 1px solid #e5e5e5; }
.d-body h4 { font-size: 105%; margin: 16px 0 6px; color: var(--d-text); }
.d-body p, .d-body li { margin: 8px 0; }
.d-body ul, .d-body ol { padding-left: 26px; }
.d-sec-n { color: var(--d-head); }

/* enlace ¶ que aparece al pasar el mouse */
a.d-pl { visibility: hidden; color: #c60f0f; font-size: 0.8em; padding: 0 4px; text-decoration: none; }
h1:hover a.d-pl, h2:hover a.d-pl, h3:hover a.d-pl, dt:hover a.d-pl { visibility: visible; }
a.d-pl:hover { background: #c60f0f; color: #fff; text-decoration: none; }

/* ── código ──────────────────────────────────────────────────────────────── */
.d-body code, .d-body pre, .d-body kbd { font-family: Menlo, Monaco, Consolas, 'DejaVu Sans Mono', monospace; font-size: 13px; }
.d-body :not(pre) > code { background: var(--d-inline); padding: 0 3px; border-radius: 0; color: #222; }
.d-pre-wrap { position: relative; margin: 10px 0; }
.d-body pre { margin: 0; padding: 6px 10px; background: var(--d-code-bg); color: #333; border-top: 1px solid var(--d-code-rule); border-bottom: 1px solid var(--d-code-rule); line-height: 1.35; overflow: auto; white-space: pre; }
.d-copy { position: absolute; top: 4px; right: 4px; font: 11px/1 -apple-system, Segoe UI, sans-serif; padding: 3px 6px; background: #fff; color: #555; border: 1px solid #bbb; cursor: pointer; opacity: 0; transition: opacity .15s; }
.d-pre-wrap:hover .d-copy, .d-copy:focus { opacity: 1; }
/* colores tipo Pygments «default» */
.tk-k { color: #007020; font-weight: bold; }
.tk-s { color: #4070a0; }
.tk-c { color: #408090; font-style: italic; }
.tk-n { color: #208050; }
.tk-o { color: #666; }
.tk-p { color: #0e84b5; font-weight: bold; }
.tk-f { color: #06287e; }
.tk-v { color: #bb60d5; }

/* pestañas de lenguaje (curl · Python · Node.js) */
.d-tabs { margin: 10px 0; }
.d-tabs .d-tabbar { display: flex; gap: 0; border-bottom: 1px solid var(--d-code-rule); }
.d-tabs .d-tabbar button { font: 13px -apple-system, Segoe UI, sans-serif; padding: 3px 12px; margin-bottom: -1px; background: #f4f4f4; color: #444; border: 1px solid #ccc; border-bottom-color: var(--d-code-rule); cursor: pointer; }
.d-tabs .d-tabbar button + button { border-left: 0; }
.d-tabs .d-tabbar button[aria-selected="true"] { background: var(--d-code-bg); color: #000; border-color: var(--d-code-rule); border-bottom-color: var(--d-code-bg); font-weight: 600; }
.d-tabs .d-pre-wrap { margin: 0; }
.d-tabs pre { border-top: 0; }

/* ── tablas ──────────────────────────────────────────────────────────────── */
.d-body table { border-collapse: collapse; margin: 10px 0; font-size: 14px; width: 100%; }
.d-body th, .d-body td { border: 1px solid #c9c9c9; padding: 4px 8px; text-align: left; vertical-align: top; }
.d-body th { background: #ededed; font-weight: 600; }
.d-body tr:nth-child(even) td { background: #fafafa; }
.d-scroll { overflow-x: auto; }

/* ── admoniciones ────────────────────────────────────────────────────────── */
.d-adm { margin: 12px 0; padding: 8px 12px; border: 1px solid #ccc; background: #eee; }
.d-adm > .d-adm-t { margin: 0 0 4px; font-weight: bold; }
.d-adm > p:last-child { margin-bottom: 0; }
.d-adm.d-warn { background: #ffe4e4; border-color: #f66; }
.d-adm.d-tip { background: #e8f4e8; border-color: #8c8; }
.d-adm.d-seealso { background: #ffc; border-color: #ff6; }

/* ── referencia: firmas tipo función ─────────────────────────────────────── */
dl.d-ep { margin: 0 0 26px; }
dl.d-ep > dt { font-family: Menlo, Monaco, Consolas, monospace; font-size: 14px; padding: 4px 8px; background: var(--d-sig); border-left: 3px solid var(--d-sig-rule); scroll-margin-top: 10px; }
dl.d-ep > dt:target, dl.d-ep > dt.d-hl, .d-body h2.d-hl, .d-body h3.d-hl { background: var(--d-hl); }
dl.d-ep > dt .d-meth { font-style: italic; color: #555; margin-right: 6px; }
dl.d-ep > dt .d-name { font-weight: bold; color: #000; }
dl.d-ep > dt .d-arg { color: #555; }
dl.d-ep > dd { margin: 6px 0 0 30px; }
.d-vm { font-style: italic; color: var(--d-muted); margin: 6px 0; }
.d-vm b { font-style: normal; font-weight: 600; color: #333; }

/* lista de campos (Parámetros / Cuerpo / Devuelve) */
table.d-fields { width: auto; border: 0; margin: 8px 0; }
table.d-fields th, table.d-fields td { border: 0; background: none !important; padding: 2px 10px 2px 0; }
table.d-fields th { font-weight: bold; white-space: nowrap; font-size: 14px; }
table.d-fields ul { margin: 0; padding-left: 18px; }
table.d-fields li { margin: 2px 0; }
table.d-fields code { font-weight: bold; background: none !important; padding: 0 !important; }

/* ── probador ────────────────────────────────────────────────────────────── */
.d-try { border: 1px solid #ccc; background: #fafafa; padding: 12px 14px; margin: 10px 0; }
.d-try .row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; margin-bottom: 8px; align-items: start; }
.d-try label { font-size: 14px; padding-top: 3px; }
.d-try input, .d-try select, .d-try textarea { width: 100%; font: inherit; font-size: 14px; padding: 3px 5px; border: 1px solid #aaa; background: #fff; border-radius: 0; }
.d-try textarea { font-family: Menlo, Consolas, monospace; font-size: 13px; min-height: 120px; }
.d-try button { font: inherit; font-size: 14px; padding: 3px 14px; border: 1px solid #888; background: linear-gradient(#fdfdfd, #e6e6e6); cursor: pointer; }
.d-try button:disabled { opacity: .6; cursor: default; }
.d-res-meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 14px; }
.d-res-meta b.ok { color: #1a7f37; } .d-res-meta b.bad { color: #b00; }

/* ── pie ─────────────────────────────────────────────────────────────────── */
.d-foot { margin: 50px -30px 0; padding: 10px 30px; border-top: 1px solid var(--d-rule); background: var(--d-band); color: var(--d-muted); font-size: 12.5px; }

/* ── móvil ───────────────────────────────────────────────────────────────── */
.d-menu-btn { display: none; font: inherit; font-size: 13px; padding: 1px 8px; border: 1px solid #bbb; background: #eee; }
@media (max-width: 860px) {
  .d-layout { grid-template-columns: 1fr; }
  .d-side { display: none; border-right: 0; border-bottom: 1px solid #e3e3e3; }
  .d-side.abierto { display: block; }
  .d-side-in { position: static; max-height: none; }
  .d-menu-btn { display: inline-block; }
  .d-body { padding: 8px 16px 50px; }
  .d-body h1, .d-body h2 { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .d-foot { margin-left: -16px; margin-right: -16px; padding-left: 16px; }
  dl.d-ep > dd { margin-left: 12px; }
  table.d-fields, table.d-fields tbody, table.d-fields tr, table.d-fields th, table.d-fields td { display: block; }
  table.d-fields th { padding-top: 6px; }
  .d-try .row { grid-template-columns: 1fr; }
  .d-rel .d-right .d-hide-m { display: none; }
}
@media print { .d-side, .d-rel, #probar, #probar ~ * { display: none !important; } .d-layout { display: block; } }
