/* erp-util.css — UX1. Utilidades u-* (sustituyen a los style="" en línea), tokens de respaldo, aviso/estado vacío,
   diálogo de confirmación y objetivos táctiles de tablet. Se carga desde partials/header.ejs y desde erp-ui.css.
   Solo usa tokens de la paleta azul de Nathalie (erp-ui.css). Las utilidades u-* se generan con scripts/ux1-codemod.js. */

/* ===== Tokens de respaldo (especificidad 0: header.ejs y erp-ui.css siempre mandan) ===== */
:where(:root){
  --white:#FFFFFF; --brand:#385D8D; --brand-hover:#2F4F78; --brand-light:#EEF5FB; --bg:#F5F8FC; --surface:#FFFFFF; --surface-hover:#F1F5F9; --border:#DDE5EF;
  --text:#0F172A; --text-primary:#0F172A; --text-secondary:#334155; --text-muted:#64748B; --radius-sm:8px; --radius-md:12px;
  --brand-50:#EEF5FB; --brand-100:#DDE7F3; --brand-200:#B8CEE4; --brand-300:#9DB8D4; --brand-400:#4D7FB1; --brand-500:#385D8D;
  --brand-600:#2F4F78; --brand-700:#263F61; --brand-800:#1F2F45; --brand-900:#182E57;
  --surface-2:#F8FAFC; --border-strong:#B9C6D6; --surface-subtle:#F1F5F9; --cx-bd:#DDE5EF;
  --action:#385D8D; --on-action:#FFFFFF; --err-solid:#B42318; --on-err:#FFFFFF;
  --ok:#047857; --ok-bg:#E7F6EF; --ok-bd:#A7DCC4;
  --warn:#9A5B00; --warn-bg:#FFF6E0; --warn-bd:#F1D08A;
  --err:#B42318; --err-bg:#FDECEA; --err-bd:#F2B8B2;
  --info:#285080; --info-bg:#E8F0F9; --info-bd:#B8CEE4;
  --r-sm:6px; --r-md:10px; --r-lg:14px; --r-pill:999px; --sh-3:0 12px 32px rgba(15,23,42,.16);
  --ring:0 0 0 3px rgba(56,93,141,.28); --touch:44px;
}
:where(:root[data-theme="dark"]){
  --surface-2:#16233A; --border-strong:#3A506F; --surface-subtle:#16233A; --cx-bd:#2C4A70;
  --action:#8CB4E8; --on-action:#0A1220; --err-solid:#FF8A80; --on-err:#2B0805;
  --ok:#5FD3A3; --ok-bg:#0E2A21; --ok-bd:#1E5C45; --warn:#F5C26B; --warn-bg:#2E2208; --warn-bd:#6B5217;
  --err:#FF9C92; --err-bg:#3A1512; --err-bd:#7A2D27; --info:#9DC3F0; --info-bg:#14243B; --info-bd:#2C4A70;
}

[hidden]{display:none!important}

/* ===== Avisos y estados vacíos (mismo componente en listas y formularios) ===== */
.erp-banner{display:flex;gap:12px;align-items:flex-start;padding:12px 16px;border-radius:14px;border:1px solid;font-size:13px;margin-bottom:16px}
.erp-banner .erp-btn{margin-left:auto;flex:0 0 auto}
.erp-banner i{font-size:18px;margin-top:1px}.erp-banner b{display:block}
.erp-banner.info{background:var(--info-bg);border-color:var(--info-bd);color:var(--info)}
.erp-banner.ok{background:var(--ok-bg);border-color:var(--ok-bd);color:var(--ok)}
.erp-banner.warn{background:var(--warn-bg);border-color:var(--warn-bd);color:var(--warn)}
.erp-banner.err{background:var(--err-bg);border-color:var(--err-bd);color:var(--err)}
.erp-banner p:last-child{margin-bottom:0}
.erp-banner:not(:has(>i:first-child)){display:block}
.erp-banner>i.bi{margin-right:2px}
.erp-empty{text-align:center;padding:48px 24px;color:var(--text-muted)}
.erp-empty i{font-size:42px;color:var(--brand-300);display:block;margin:0 0 8px;line-height:1}
.erp-empty h3{font-size:var(--fs-lg,16px);color:var(--text);margin:0 0 4px;font-weight:600}
.erp-empty p{margin:0 auto;max-width:46ch;font-size:13px}
.erp-empty .erp-btn{margin-top:12px}
td.erp-empty-cell{padding:0!important}
/* Mismo problema solo en tablas con scroll horizontal real (.ba-scroll, hoy solo el mayor de
   cuenta): el td.erp-empty-cell (colspan sobre columnas que exceden el viewport visible) hereda
   el ancho total de la tabla y centra el aviso respecto a ESE ancho, no respecto a lo visible sin
   hacer scroll — el texto queda cortado. Acotado a .ba-scroll (no a todo td.erp-empty-cell): en
   tablas sin overflow horizontal real, sticky+left:50% se resuelve contra el bloque de referencia
   de scroll (no contra el td) y descentra el aviso sin necesidad. */
.ba-scroll td.erp-empty-cell>.erp-empty{position:sticky;left:50%;transform:translateX(-50%);width:fit-content}
.erp-field-err{color:var(--err);font-size:12px;margin:4px 0 0;display:flex;gap:6px;align-items:flex-start}
[aria-invalid="true"],.is-invalid{border-color:var(--err)!important}

/* ===== Diálogo único de confirmación / aviso / dato (partials/modal-confirmar.ejs + js/modal-confirmar.js) ===== */
.cfm-dlg{border:1px solid var(--border);border-radius:var(--r-lg);padding:0;max-width:460px;width:calc(100% - 24px);background:var(--surface);color:var(--text);box-shadow:var(--sh-3)}
.cfm-dlg::backdrop{background:rgba(15,23,42,.5)}
.cfm-dlg form{display:flex;flex-direction:column;gap:12px;padding:20px;margin:0}
.cfm-dlg h2{font-size:18px;margin:0;color:var(--text)}
.cfm-dlg.cfm-danger h2{color:var(--err)}
.cfm-dlg .cfm-msg{margin:0;font-size:14px;color:var(--text-secondary);white-space:pre-line}
.cfm-dlg label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.cfm-dlg input[type=text],.cfm-dlg input[type=number]{font:inherit;padding:8px 10px;min-height:var(--touch);border:1px solid var(--border-strong);border-radius:var(--r-sm);background:var(--surface);color:inherit}
.cfm-dlg input:focus{outline:none;box-shadow:var(--ring)}
.cfm-dlg .cfm-err{color:var(--err);font-size:12px;min-height:16px;margin:0}
.cfm-dlg .cfm-btns{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.cfm-dlg .cfm-btns button{min-height:var(--touch);padding:0 18px;border-radius:var(--r-md);border:1px solid var(--border-strong);background:var(--surface);color:var(--text);font-weight:600;cursor:pointer}
.cfm-dlg .cfm-btns .cfm-ok{background:var(--action,var(--brand));border-color:var(--action,var(--brand));color:var(--on-action,#fff)}
.cfm-dlg.cfm-danger .cfm-btns .cfm-ok{background:var(--err-solid,var(--err));border-color:var(--err-solid,var(--err));color:var(--on-err,#fff)}
.cfm-dlg .cfm-btns button:focus-visible{outline:none;box-shadow:var(--ring)}

/* ===== Tablet (768-1199 px): objetivos táctiles >= 44 px en POS, Taller y Ventas ===== */
@media (min-width:768px) and (max-width:1199.98px){
  .app-content .erp-btn,.app-content .btn:not(.u-chip),.app-content a.erp-btn,.app-content .erp-btn-sm,.app-content .btn-sm,
  .app-content .erp-input,.app-content .erp-select,.app-content .form-control,.app-content .form-select,
  .app-content button:not(.btn-close):not(.erp-colbtn):not(.erp-chip):not(.u-chip):not(.erp-status),.app-content input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),.app-content select,
  .pos-tile,.pos-cat,.pos-keys button,.pos-method,.rt-btn,.pos-retail button,.pos-retail .btn,.cfm-dlg button{min-height:var(--touch)}
  .app-content .erp-table td,.app-content .erp-table th,.app-content table.table td,.app-content table.table th{padding-top:10px;padding-bottom:10px}
  .app-content .erp-table tbody tr,.app-content table.table tbody tr{height:var(--touch)}
  .app-content .c-act a,.app-content .c-act button{display:inline-flex;align-items:center;min-height:var(--touch);min-width:var(--touch);justify-content:center}
  .app-content input[type=checkbox],.app-content input[type=radio]{width:22px;height:22px}
  html body .sales-erp select,html body .sales-erp input:not([type=checkbox]):not([type=radio]):not([type=hidden]),html body .sales-erp button,html body .sales-erp textarea,html body .sales-erp .erp-btn{min-height:var(--touch)}
}

/* Pastillas (chips de filtro, estados) conservan su altura propia; la separación entre ellas ya es >= 8 px */
.app-content .erp-chip,.app-content .erp-status,.app-content .u-tag{min-height:0}
/* Indicio de scroll horizontal: sombra en el borde donde hay más contenido (tablas anchas en tablet y móvil) */
.table-responsive,.erp-sheet-wrap,.erp-table-wrap,.erp-tabs{
  background:linear-gradient(to right,var(--surface) 30%,transparent) 0 0/32px 100% no-repeat local,
             linear-gradient(to left,var(--surface) 30%,transparent) 100% 0/32px 100% no-repeat local,
             linear-gradient(to right,rgba(15,23,42,.18),transparent) 0 0/10px 100% no-repeat scroll,
             linear-gradient(to left,rgba(15,23,42,.18),transparent) 100% 0/10px 100% no-repeat scroll}
.erp-table-wrap,.erp-tabs{overflow-x:auto}
.erp-table-wrap:focus-visible{outline:none;box-shadow:var(--ring)}

.u-grid-2col{display:grid;grid-template-columns:1fr 1fr;gap:4px}

/* ===== Etiqueta de estado: .u-tag hereda de erp-status (UX-15). En vistas nuevas usar `erp-status` + statusClass(); .u-tag-* solo en partials/estado-badge.ejs ===== */
.u-tag,.erp-status{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:var(--r-pill);font-size:12px;font-weight:700;border:1px solid transparent;white-space:nowrap}
.u-tag::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.u-tag-ok{background:var(--ok-bg);color:var(--ok);border-color:var(--ok-bd)}
.u-tag-warn{background:var(--warn-bg);color:var(--warn);border-color:var(--warn-bd)}
.u-tag-err{background:var(--err-bg);color:var(--err);border-color:var(--err-bd)}
.u-tag-info{background:var(--info-bg);color:var(--info);border-color:var(--info-bd)}
.u-tag-brand{background:var(--brand-50);color:var(--brand-700);border-color:var(--brand-200)}
.u-tag-muted{background:var(--surface-hover);color:var(--text-secondary);border-color:var(--border-strong)}

/* ===== Utilidades generadas ===== */
/* ==== GENERADAS (scripts/ux1-codemod; no editar a mano) ==== */
.u-ai-center{align-items:center!important}
.u-ai-end{align-items:end!important}
.u-ai-flex-end{align-items:flex-end!important}
.u-ai-flex-start{align-items:flex-start!important}
.u-ai-start{align-items:start!important}
.u-as-center{align-self:center!important}
.u-aspect-ratio-1{aspect-ratio:1!important}
.u-bc-collapse{border-collapse:collapse!important}
.u-bd-0{border:0!important}
.u-bd-1-dashed-border{border:1px dashed var(--border)!important}
.u-bd-1-solid-border{border:1px solid var(--border)!important}
.u-bd-1-solid-rgba-239-68-68-p25{border:1px solid var(--err-bd)!important}
.u-bd-1-solid-transparent{border:1px solid transparent!important}
.u-bd-2-solid-brand{border:2px solid var(--brand)!important}
.u-bdb-1-solid-border{border-bottom:1px solid var(--border)!important}
.u-bdl-3-solid-brand-300{border-left:3px solid var(--brand-300)!important}
.u-bdt-0{border-top:0!important}
.u-bdt-1-solid-border{border-top:1px solid var(--border)!important}
.u-bdt-1-solid-cx-bd{border-top:1px solid var(--cx-bd)!important}
.u-bdt-2-solid-border{border-top:2px solid var(--border)!important}
.u-bdt-2-solid-brand{border-top:2px solid var(--brand)!important}
.u-bg-0{background:0!important}
.u-bg-bg{background:var(--bg)!important}
.u-bg-brand{background:var(--brand)!important}
.u-bg-brand-100{background:var(--brand-100)!important}
.u-bg-brand-light{background:var(--brand-light)!important}
.u-bg-err-bg{background:var(--err-bg)!important}
.u-bg-info-bg{background:var(--info-bg)!important}
.u-bg-ok-bg{background:var(--ok-bg)!important}
.u-bg-rgba-15-23-42-p55{background:rgba(15,23,42,.55)!important}
.u-bg-surface{background:var(--surface)!important}
.u-bg-surface-subtle{background:var(--surface-subtle)!important}
.u-bg-warn-bg{background:var(--warn-bg)!important}
.u-border-color-warn-bd{border-color:var(--warn-bd)!important}
.u-border-top-left-radius-0{border-top-left-radius:0!important}
.u-border-top-right-radius-0{border-top-right-radius:0!important}
.u-break-inside-avoid{break-inside:avoid!important}
.btn.u-chip{border-radius:var(--r-pill);font-size:12px;padding:4px 14px;font-weight:500;background:var(--brand-light);color:var(--brand)}
.btn.u-chip-on{background:var(--action,var(--brand));color:var(--on-action,#fff)}
.u-bubble{max-width:85%;padding:8px 12px;border-radius:12px;font-size:13px;line-height:1.45;word-break:break-word;background:var(--bg);color:inherit}
.u-bubble-shop{background:var(--action,var(--brand));color:var(--on-action,#fff)}
.u-c-brand{color:var(--brand)!important}
.u-c-brand-600{color:var(--brand-600)!important}
.u-c-brand-700{color:var(--brand-700)!important}
.u-c-err{color:var(--err)!important}
.u-c-info{color:var(--info)!important}
.u-c-inherit{color:inherit!important}
.u-c-ok{color:var(--ok)!important}
.u-c-text-muted{color:var(--text-muted)!important}
.u-c-text-placeholder{color:var(--text-placeholder)!important}
.u-c-text-primary{color:var(--text-primary)!important}
.u-c-text-secondary{color:var(--text-secondary)!important}
.u-c-warn{color:var(--warn)!important}
.u-c-white{color:var(--on-action,#fff)!important}
.u-caption-side-top{caption-side:top!important}
.u-column-gap-24{column-gap:24px!important}
.u-cur-crosshair{cursor:crosshair!important}
.u-cur-grab{cursor:grab!important}
.u-cur-pointer{cursor:pointer!important}
.u-cursor-pointer{cursor:pointer!important}
.u-d-block{display:block!important}
.u-d-flex{display:flex!important}
.u-d-grid{display:grid!important}
.u-d-inline{display:inline!important}
.u-d-inline-block{display:inline-block!important}
.u-d-inline-flex{display:inline-flex!important}
.u-fd-column{flex-direction:column!important}
.u-ff-monospace{font-family:monospace!important}
.u-ff-ui-monospace-sfmono-regular-men-552f98{font-family:ui-monospace,SFMono-Regular,Menlo,monospace!important}
.u-ff-var-font-mono-monospace{font-family:var(--font-mono, monospace)!important}
.u-flex-1{flex:1!important}
.u-flex-1-1-200{flex:1 1 200px!important}
.u-flex-shrink-0{flex-shrink:0!important}
.u-fs-10{font-size:10px!important}
.u-fs-11{font-size:11px!important}
.u-fs-12{font-size:12px!important}
.u-fs-12p5{font-size:12.5px!important}
.u-fs-13{font-size:13px!important}
.u-fs-14{font-size:14px!important}
.u-fs-15{font-size:15px!important}
.u-fs-16{font-size:16px!important}
.u-fs-18{font-size:18px!important}
.u-fs-19{font-size:19px!important}
.u-fs-1p25rem{font-size:1.25rem!important}
.u-fs-1p2rem{font-size:1.2rem!important}
.u-fs-1p5rem{font-size:1.5rem!important}
.u-fs-20{font-size:20px!important}
.u-fs-22{font-size:22px!important}
.u-fs-24{font-size:24px!important}
.u-fs-28{font-size:28px!important}
.u-fs-2rem{font-size:2rem!important}
.u-fs-p76rem{font-size:.76rem!important}
.u-fs-p78rem{font-size:.78rem!important}
.u-fs-p82rem{font-size:.82rem!important}
.u-fs-p85rem{font-size:.85rem!important}
.u-fs-p88rem{font-size:.88rem!important}
.u-fs-p8rem{font-size:.8rem!important}
.u-fs-p9rem{font-size:.9rem!important}
.u-fw-400{font-weight:400!important}
.u-fw-450{font-weight:450!important}
.u-fw-500{font-weight:500!important}
.u-fw-600{font-weight:600!important}
.u-fw-650{font-weight:650!important}
.u-fw-700{font-weight:700!important}
.u-fw-750{font-weight:750!important}
.u-fw-780{font-weight:780!important}
.u-fw-800{font-weight:800!important}
.u-fwrap-wrap{flex-wrap:wrap!important}
.u-gap-10{gap:10px!important}
.u-gap-12{gap:12px!important}
.u-gap-14{gap:14px!important}
.u-gap-16{gap:16px!important}
.u-gap-18{gap:18px!important}
.u-gap-20{gap:20px!important}
.u-gap-24{gap:24px!important}
.u-gap-4{gap:4px!important}
.u-gap-5{gap:5px!important}
.u-gap-6{gap:6px!important}
.u-gap-8{gap:8px!important}
.u-grid-auto-rows-auto{grid-auto-rows:auto!important}
.u-grid-column-1-1{grid-column:1/-1!important}
.u-grid-column-1-n1{grid-column:1 / -1!important}
.u-grid-template-areas-strip{grid-template-areas:'strip'!important}
.u-grid-template-areas-strip-party{grid-template-areas:'strip' 'party'!important}
.u-gtc-1fr{grid-template-columns:1fr!important}
.u-gtc-1fr-1fr{grid-template-columns:1fr 1fr!important}
.u-gtc-1fr-340{grid-template-columns:1fr 340px!important}
.u-gtc-1fr-auto{grid-template-columns:1fr auto!important}
.u-gtc-auto-auto{grid-template-columns:auto auto!important}
.u-gtc-minmax-0-1fr-320{grid-template-columns:minmax(0,1fr) 320px!important}
.u-gtc-minmax-0-1fr-minmax-340-p55fr{grid-template-columns:minmax(0,1fr) minmax(340px,.55fr)!important}
.u-gtc-minmax-160-1fr-auto{grid-template-columns:minmax(160px,1fr) auto!important}
.u-gtc-minmax-320-380-1fr{grid-template-columns:minmax(320px,380px) 1fr!important}
.u-gtc-repeat-3-1fr{grid-template-columns:repeat(3,1fr)!important}
.u-gtc-repeat-3-minmax-0-1fr{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.u-gtc-repeat-auto-fill-minmax-240-1fr{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))!important}
.u-gtc-repeat-auto-fit-minmax-190-1fr{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important}
.u-gtc-repeat-auto-fit-minmax-200-1fr{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))!important}
.u-gtc-repeat-auto-fit-minmax-210-1fr{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important}
.u-gtc-repeat-auto-fit-minmax-220-1fr{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important}
.u-gtc-repeat-auto-fit-minmax-240-1fr{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))!important}
.u-h-100pc{height:100%!important}
.u-h-125{height:125px!important}
.u-h-150{height:150px!important}
.u-h-24{height:24px!important}
.u-h-260{height:260px!important}
.u-h-28{height:28px!important}
.u-h-32{height:32px!important}
.u-h-38{height:38px!important}
.u-h-44{height:44px!important}
.u-h-48{height:48px!important}
.u-h-56{height:56px!important}
.u-h-96{height:96px!important}
.u-h-auto{height:auto!important}
.u-inset-0{inset:0!important}
.u-jc-center{justify-content:center!important}
.u-jc-flex-end{justify-content:flex-end!important}
.u-jc-flex-start{justify-content:flex-start!important}
.u-jc-space-between{justify-content:space-between!important}
.u-left-14{left:14px!important}
.u-left-n9999{left:-9999px!important}
.u-lh-1p5{line-height:1.5!important}
.u-lh-1p7{line-height:1.7!important}
.u-lh-1p8{line-height:1.8!important}
.u-lh-2{line-height:2!important}
.u-ls-2{letter-spacing:2px!important}
.u-ls-n0p02em{letter-spacing:-0.02em!important}
.u-ls-p04em{letter-spacing:.04em!important}
.u-ls-p05em{letter-spacing:.05em!important}
.u-ls-p06em{letter-spacing:.06em!important}
.u-m-0{margin:0!important}
.u-m-0-0-10{margin:0 0 10px!important}
.u-m-0-0-12{margin:0 0 12px!important}
.u-m-0-0-4{margin:0 0 4px!important}
.u-m-0-0-6{margin:0 0 6px!important}
.u-m-0-0-8{margin:0 0 8px!important}
.u-m-0-12{margin:0 12px!important}
.u-m-0-auto-12{margin:0 auto 12px!important}
.u-m-12{margin:12px!important}
.u-m-12-0{margin:12px 0!important}
.u-m-12-0-6{margin:12px 0 6px!important}
.u-m-14-12-6{margin:14px 12px 6px!important}
.u-m-16-0{margin:16px 0!important}
.u-m-2-0-0{margin:2px 0 0!important}
.u-m-4-0-0{margin:4px 0 0!important}
.u-m-4-0-8{margin:4px 0 8px!important}
.u-m-6-0{margin:6px 0!important}
.u-m-6-0-0{margin:6px 0 0!important}
.u-m-6-0-0-18{margin:6px 0 0 18px!important}
.u-m-8-0{margin:8px 0!important}
.u-m-8-0-0{margin:8px 0 0!important}
.u-m-8-0-10{margin:8px 0 10px!important}
.u-m-8-0-4{margin:8px 0 4px!important}
.u-maxh-100pc{max-height:100%!important}
.u-maxh-260{max-height:260px!important}
.u-maxh-340{max-height:340px!important}
.u-maxh-76{max-height:76px!important}
.u-maxw-100pc{max-width:100%!important}
.u-maxw-110{max-width:110px!important}
.u-maxw-150{max-width:150px!important}
.u-maxw-240{max-width:240px!important}
.u-maxw-260{max-width:260px!important}
.u-maxw-320{max-width:320px!important}
.u-maxw-360{max-width:360px!important}
.u-maxw-380{max-width:380px!important}
.u-maxw-420{max-width:420px!important}
.u-maxw-440{max-width:440px!important}
.u-maxw-460{max-width:460px!important}
.u-maxw-640{max-width:640px!important}
.u-maxw-700{max-width:700px!important}
.u-maxw-900{max-width:900px!important}
.u-mb-0{margin-bottom:0!important}
.u-mb-10{margin-bottom:10px!important}
.u-mb-12{margin-bottom:12px!important}
.u-mb-14{margin-bottom:14px!important}
.u-mb-16{margin-bottom:16px!important}
.u-mb-18{margin-bottom:18px!important}
.u-mb-2{margin-bottom:2px!important}
.u-mb-20{margin-bottom:20px!important}
.u-mb-22{margin-bottom:22px!important}
.u-mb-24{margin-bottom:24px!important}
.u-mb-3{margin-bottom:3px!important}
.u-mb-4{margin-bottom:4px!important}
.u-mb-6{margin-bottom:6px!important}
.u-mb-8{margin-bottom:8px!important}
.u-minh-18{min-height:18px!important}
.u-minh-48{min-height:48px!important}
.u-minh-56{min-height:56px!important}
.u-minw-0{min-width:0!important}
.u-minw-180{min-width:180px!important}
.u-minw-200{min-width:200px!important}
.u-minw-240{min-width:240px!important}
.u-minw-260{min-width:260px!important}
.u-minw-300{min-width:300px!important}
.u-minw-320{min-width:320px!important}
.u-ml-12{margin-left:12px!important}
.u-ml-4{margin-left:4px!important}
.u-ml-6{margin-left:6px!important}
.u-ml-8{margin-left:8px!important}
.u-ml-auto{margin-left:auto!important}
.u-mr-10{margin-right:10px!important}
.u-mr-1rem{margin-right:1rem!important}
.u-mr-6{margin-right:6px!important}
.u-mr-8{margin-right:8px!important}
.u-mr-auto{margin-right:auto!important}
.u-mt-0{margin-top:0!important}
.u-mt-10{margin-top:10px!important}
.u-mt-12{margin-top:12px!important}
.u-mt-14{margin-top:14px!important}
.u-mt-16{margin-top:16px!important}
.u-mt-2{margin-top:2px!important}
.u-mt-3{margin-top:3px!important}
.u-mt-4{margin-top:4px!important}
.u-mt-6{margin-top:6px!important}
.u-mt-8{margin-top:8px!important}
.u-object-fit-contain{object-fit:contain!important}
.u-object-fit-cover{object-fit:cover!important}
.u-op-0p5{opacity:.5!important}
.u-op-p7{opacity:.7!important}
.u-ov-auto{overflow:auto!important}
.u-ov-hidden{overflow:hidden!important}
.u-overflow-wrap-anywhere{overflow-wrap:anywhere!important}
.u-ovx-auto{overflow-x:auto!important}
.u-ovy-auto{overflow-y:auto!important}
.u-p-0{padding:0!important}
.u-p-0-12{padding:0 12px!important}
.u-p-0-12-8{padding:0 12px 8px!important}
.u-p-0-14-12{padding:0 14px 12px!important}
.u-p-0-16-14{padding:0 16px 14px!important}
.u-p-0-18-12{padding:0 18px 12px!important}
.u-p-0-18-16{padding:0 18px 16px!important}
.u-p-0-6{padding:0 6px!important}
.u-p-1-6{padding:1px 6px!important}
.u-p-10{padding:10px!important}
.u-p-10-12{padding:10px 12px!important}
.u-p-10-14{padding:10px 14px!important}
.u-p-10-16{padding:10px 16px!important}
.u-p-10-20{padding:10px 20px!important}
.u-p-10-24{padding:10px 24px!important}
.u-p-10-32{padding:10px 32px!important}
.u-p-12{padding:12px!important}
.u-p-12-0{padding:12px 0!important}
.u-p-12-14{padding:12px 14px!important}
.u-p-12-16{padding:12px 16px!important}
.u-p-12-20{padding:12px 20px!important}
.u-p-12-20-0{padding:12px 20px 0!important}
.u-p-14-16{padding:14px 16px!important}
.u-p-14-18{padding:14px 18px!important}
.u-p-14-20{padding:14px 20px!important}
.u-p-14-24{padding:14px 24px!important}
.u-p-16{padding:16px!important}
.u-p-16-18{padding:16px 18px!important}
.u-p-16-20{padding:16px 20px!important}
.u-p-16-22{padding:16px 22px!important}
.u-p-16-24{padding:16px 24px!important}
.u-p-2-7{padding:2px 7px!important}
.u-p-2-8{padding:2px 8px!important}
.u-p-20{padding:20px!important}
.u-p-20-0{padding:20px 0!important}
.u-p-20-24{padding:20px 24px!important}
.u-p-22{padding:22px!important}
.u-p-24{padding:24px!important}
.u-p-24-0{padding:24px 0!important}
.u-p-24-28{padding:24px 28px!important}
.u-p-3-10{padding:3px 10px!important}
.u-p-3-12{padding:3px 12px!important}
.u-p-3-8{padding:3px 8px!important}
.u-p-30{padding:30px!important}
.u-p-32{padding:32px!important}
.u-p-4-0{padding:4px 0!important}
.u-p-4-10{padding:4px 10px!important}
.u-p-4-12{padding:4px 12px!important}
.u-p-4-8{padding:4px 8px!important}
.u-p-40-20{padding:40px 20px!important}
.u-p-42{padding:42px!important}
.u-p-48{padding:48px!important}
.u-p-56-20{padding:56px 20px!important}
.u-p-6{padding:6px!important}
.u-p-6-0{padding:6px 0!important}
.u-p-6-12{padding:6px 12px!important}
.u-p-6-16{padding:6px 16px!important}
.u-p-6-8{padding:6px 8px!important}
.u-p-8{padding:8px!important}
.u-p-8-0{padding:8px 0!important}
.u-p-8-12{padding:8px 12px!important}
.u-p-8-16{padding:8px 16px!important}
.u-p-8-20{padding:8px 20px!important}
.u-p-8-8{padding:8px 8px!important}
.u-p-9-16{padding:9px 16px!important}
.u-p-9-8{padding:9px 8px!important}
.u-pb-12{padding-bottom:12px!important}
.u-pl-14{padding-left:14px!important}
.u-pl-16{padding-left:16px!important}
.u-pl-18{padding-left:18px!important}
.u-pl-24{padding-left:24px!important}
.u-pl-36{padding-left:36px!important}
.u-pl-40{padding-left:40px!important}
.u-place-items-center{place-items:center!important}
.u-pos-absolute{position:absolute!important}
.u-pos-fixed{position:fixed!important}
.u-pos-relative{position:relative!important}
.u-pt-12{padding-top:12px!important}
.u-pt-16{padding-top:16px!important}
.u-pt-4{padding-top:4px!important}
.u-pt-6{padding-top:6px!important}
.u-pt-8{padding-top:8px!important}
.u-rad-10{border-radius:10px!important}
.u-rad-12{border-radius:12px!important}
.u-rad-20{border-radius:20px!important}
.u-rad-4{border-radius:4px!important}
.u-rad-6{border-radius:6px!important}
.u-rad-8{border-radius:8px!important}
.u-rad-999{border-radius:999px!important}
.u-rad-radius-lg{border-radius:var(--radius-lg)!important}
.u-rad-radius-md{border-radius:var(--radius-md)!important}
.u-rad-radius-sm{border-radius:var(--radius-sm)!important}
.u-rs-vertical{resize:vertical!important}
.u-sh-0-10-40-rgba-0-0-0-p4{box-shadow:0 10px 40px rgba(0,0,0,.4)!important}
.u-sh-0-18-50-rgba-0-0-0-p35{box-shadow:0 18px 50px rgba(0,0,0,.35)!important}
.u-ta-center{text-align:center!important}
.u-ta-left{text-align:left!important}
.u-ta-right{text-align:right!important}
.u-td-none{text-decoration:none!important}
.u-to-ellipsis{text-overflow:ellipsis!important}
.u-top-50pc{top:50%!important}
.u-touch-action-none{touch-action:none!important}
.u-transform-translatey-n50pc{transform:translateY(-50%)!important}
.u-transition-background-p12s{transition:background .12s!important}
.u-tt-uppercase{text-transform:uppercase!important}
.u-w-100{width:100px!important}
.u-w-100pc{width:100%!important}
.u-w-105{width:105px!important}
.u-w-108{width:108px!important}
.u-w-10em{width:10em!important}
.u-w-110{width:110px!important}
.u-w-120{width:120px!important}
.u-w-130{width:130px!important}
.u-w-140{width:140px!important}
.u-w-150{width:150px!important}
.u-w-160{width:160px!important}
.u-w-170{width:170px!important}
.u-w-180{width:180px!important}
.u-w-200{width:200px!important}
.u-w-24{width:24px!important}
.u-w-240{width:240px!important}
.u-w-28{width:28px!important}
.u-w-280{width:280px!important}
.u-w-300{width:300px!important}
.u-w-32{width:32px!important}
.u-w-38{width:38px!important}
.u-w-38pc{width:38%!important}
.u-w-42{width:42px!important}
.u-w-44{width:44px!important}
.u-w-48{width:48px!important}
.u-w-52{width:52px!important}
.u-w-56{width:56px!important}
.u-w-58{width:58px!important}
.u-w-5em{width:5em!important}
.u-w-70{width:70px!important}
.u-w-80{width:80px!important}
.u-w-88{width:88px!important}
.u-w-8em{width:8em!important}
.u-w-90{width:90px!important}
.u-w-92pc{width:92%!important}
.u-w-95{width:95px!important}
.u-w-96{width:96px!important}
.u-w-auto{width:auto!important}
.u-w-min-480-100pc{width:min(480px,100%)!important}
.u-w-min-560-100pc{width:min(560px,100%)!important}
.u-w-min-720-100pc{width:min(720px,100%)!important}
.u-ws-nowrap{white-space:nowrap!important}
.u-ws-pre-line{white-space:pre-line!important}
.u-ws-pre-wrap{white-space:pre-wrap!important}
.u-z-2000{z-index:2000!important}
html body .us-ai-center{align-items:center}
html body .us-bg-bg{background:var(--bg)}
html body .us-bg-brand{background:var(--brand)}
html body .us-bg-brand-light{background:var(--brand-light)}
html body .us-bg-ok-bg{background:var(--ok-bg)}
html body .us-bg-rgba-15-23-42-p6{background:rgba(15,23,42,.6)}
html body .us-bg-surface{background:var(--surface)}
html body .us-bg-warn-bg{background:var(--warn-bg)}
html body .us-c-brand{color:var(--brand)}
html body .us-c-err{color:var(--err)}
html body .us-c-info{color:var(--info)}
html body .us-c-ok{color:var(--ok)}
html body .us-c-text-muted{color:var(--text-muted)}
html body .us-c-text-placeholder{color:var(--text-placeholder)}
html body .us-c-text-primary{color:var(--text-primary)}
html body .us-c-text-secondary{color:var(--text-secondary)}
html body .us-c-warn{color:var(--warn)}
html body .us-d-block{display:block}
html body .us-d-contents{display:contents}
html body .us-d-flex{display:flex}
html body .us-d-grid{display:grid}
html body .us-d-inline{display:inline}
html body .us-fd-column{flex-direction:column}
html body .us-flex-1{flex:1}
html body .us-flex-2{flex:2}
html body .us-fs-15{font-size:15px}
html body .us-fs-17{font-size:17px}
html body .us-fs-18{font-size:18px}
html body .us-fs-19{font-size:19px}
html body .us-fs-20{font-size:20px}
html body .us-fs-24{font-size:24px}
html body .us-fwrap-wrap{flex-wrap:wrap}
html body .us-gap-0{gap:0}
html body .us-gap-6{gap:6px}
html body .us-gap-8{gap:8px}
html body .us-grid-column-1-1{grid-column:1/-1}
html body .us-gtc-1fr-1fr-1fr{grid-template-columns:1fr 1fr 1fr}
html body .us-jc-center{justify-content:center}
html body .us-ls2-none{list-style:none}
html body .us-m-0{margin:0}
html body .us-maxh-140{max-height:140px}
html body .us-minh-64{min-height:64px}
html body .us-ml-auto{margin-left:auto}
html body .us-mt-auto{margin-top:auto}
html body .us-mt-n4{margin-top:-4px}
html body .us-ov-auto{overflow:auto}
html body .us-p-0{padding:0}
html body .us-pos-relative{position:relative}
html body .us-w-120{width:120px}
html body .us-w-130{width:130px}
html body .us-w-140{width:140px}
html body .us-w-30{width:30px}
html body .us-w-300{width:300px}
html body .us-w-36{width:36px}
html body .us-w-44{width:44px}
html body .us-w-56{width:56px}
html body .us-w-64{width:64px}
html body .us-w-70{width:70px}
html body .us-w-76{width:76px}
html body .us-w-80{width:80px}
html body .us-w-84{width:84px}
html body .us-w-88{width:88px}
html body .us-w-96{width:96px}
html body .us-w-min-720-94vw{width:min(720px,94vw)}

/* ===== UX3: listados (orders, sales-erp, purchases, banking). Patrón de docs/diseno/listado-ordenes-taller.html ===== */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;padding:0}
.erp-list-page{max-width:1420px}
.erp-toolbar .erp-search .erp-input{padding-left:36px;padding-right:12px}
.erp-toolbar .erp-search i{top:50%;transform:translateY(-50%)}
.erp-toolbar .erp-select,.erp-toolbar .erp-input.fit{width:auto}
.erp-toolbar label.lbl{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted)}
.erp-filters .sp{flex:1}
.erp-chip{text-decoration:none}
.erp-chip b{font-weight:700;min-width:20px;text-align:center}
.erp-chip.c-open b{background:var(--info);color:#fff}.erp-chip.c-warn b{background:var(--warn);color:#fff}.erp-chip.c-ok b{background:var(--ok);color:#fff}.erp-chip.c-err b{background:var(--err);color:#fff}.erp-chip.c-draft b{background:var(--text-muted);color:#fff}
.erp-table td .sub{display:block;color:var(--text-muted);font-size:12px}
.erp-table td.act,.erp-table th.act{width:96px;text-align:right;white-space:nowrap}
.erp-table td.imei,.erp-table .imei{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--text-muted)}
.erp-table tbody tr.ready td{background:var(--ok-bg)}
.erp-table td.muted{color:var(--text-muted)}
.erp-table td.over{color:var(--err);font-weight:700}
.erp-table a.doc:focus-visible,.erp-chip:focus-visible,.erp-tabs a:focus-visible,.erp-pager .pg a:focus-visible{outline:none;box-shadow:var(--ring);border-radius:var(--r-sm)}
.erp-tabs a{min-height:44px}
.erp-msg-n{display:inline-flex;align-items:center;gap:4px;margin-left:6px}
.erp-card.erp-list{overflow:hidden}
.erp-page-head .erp-actions{position:relative}
.erp-actions .erp-menu-wrap{position:relative}
.erp-menu[hidden]{display:none}
@media (max-width:767.98px){.erp-table .hide-md{display:none}}
.serial-link{color:var(--brand-700);text-decoration:none;font-weight:600}.serial-link:hover{text-decoration:underline}
.erp-menu button,.erp-menu a{width:100%;min-height:40px}
.erp-menu button{display:flex;gap:10px;align-items:center;padding:9px 10px;border:0;border-radius:var(--r-sm);background:transparent;color:var(--text);font:inherit;font-size:var(--fs-sm,13px);text-align:left;cursor:pointer}
.erp-menu button:hover,.erp-menu a:hover{background:var(--surface-hover)}
.erp-menu a:focus-visible,.erp-menu button:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--brand)}
.erp-menu .danger,.erp-menu .danger i{color:var(--err)}
.erp-menu hr{margin:6px 0;border:0;border-top:1px solid var(--border)}
.erp-menu form{margin:0}

/* ===== UX-28: asiento contable emergente (partials/modal-asiento.ejs) ===== */
.cfm-dlg.asi-dlg{max-width:min(880px,calc(100% - 24px));width:100%;max-height:calc(100dvh - 32px);overflow:hidden;flex-direction:column}
.cfm-dlg.asi-dlg[open]{display:flex}
.asi-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border)}
.asi-head h2{margin:0;font-size:18px}
.asi-x{width:var(--touch);height:var(--touch);border:0;border-radius:var(--r-md);background:transparent;color:var(--text-muted);font-size:20px;cursor:pointer;display:grid;place-items:center}
.asi-x:hover{background:var(--surface-hover);color:var(--text)}.asi-x:focus-visible{outline:none;box-shadow:var(--ring)}
.asi-body{padding:16px 20px;overflow:auto;flex:1}
.asi-foot{padding:12px 20px;border-top:1px solid var(--border);justify-content:space-between!important}
.cfm-dlg.asi-dlg .asi-foot .erp-btn{min-height:var(--touch);display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.asi-sk{height:18px;margin:10px 0}
.asi-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:12px}
.asi-meta small{display:block;color:var(--text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.asi-meta b{font-weight:600}
.asi-memo{margin:0 0 10px;color:var(--text-secondary);font-size:13px}
.asi-tbl .asi-grp th{background:var(--brand-50);color:var(--brand-700);text-align:left;font-size:12px;padding:6px 12px}
.asi-tbl tfoot .asi-tot th,.asi-tbl tfoot .asi-tot td{font-weight:700;border-top:2px solid var(--border-strong);background:var(--surface-2);padding:10px 12px}
.asi-tbl tfoot .asi-tot th{text-align:right}

/* Aviso de impresión directa (DMU Print, public/js/iot-print.js) */
.dm-iot-note{position:fixed;right:16px;bottom:16px;z-index:3000;max-width:min(420px,calc(100vw - 32px));padding:10px 14px;border-radius:8px;background:#16213A;color:#fff;font-size:.9rem;box-shadow:0 6px 24px rgba(0,0,0,.25)}
.dm-iot-note.bad{background:#9b1c1c}
.dm-iot-note[hidden]{display:none}

/* Página dentro de una ventana del ERP (public/js/doc-window.js): solo el contenido. */
html.is-embedded .sidebar,html.is-embedded .sidebar-overlay,html.is-embedded .topbar{display:none!important}
html.is-embedded .app-content{padding:16px 20px;max-width:none}
html.is-embedded body{background:var(--bg)}
