/* Omega Web — estilos base (Fase 0). Claro/oscuro simple. */
:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #eef2f9; --line: #dde5f0;
  --text: #142033; --muted: #6b7a90; --primary: #1e6bff; --primary-700: #1146ad;
  --danger: #e5484d; --ok: #2fa96b; --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg:#0e1420; --surface:#161d2b; --surface-2:#1e2838; --line:#2a3547; --text:#e7edf6; --muted:#93a1b5; }
}
* { box-sizing: border-box; }
/* Red de seguridad: la página nunca debe scrollear horizontalmente (tablas y
 * carruseles internos sí lo hacen, dentro de su propio .tablecard). */
html, body { overflow-x: hidden; max-width: 100%; }
body { margin: 0; font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }
button { font: inherit; cursor: pointer; }
input { font: inherit; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login__card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 26px; box-shadow: 0 12px 40px rgba(0,0,0,.08); }
.login__logo { text-align: center; font-size: 26px; font-weight: 800; color: var(--primary-700); margin-bottom: 4px; letter-spacing: .5px; }
.login__sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; background: var(--surface-2); color: var(--text); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; border-color: var(--line); }

/* Layout app */
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .brand { font-weight: 800; color: var(--primary-700); letter-spacing: .4px; }
.top .who { font-size: 13px; color: var(--muted); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 18px; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mod__h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--surface-2); font-weight: 800; }
.mod__h .count { font-size: 11px; color: var(--muted); font-weight: 700; background: var(--bg); border-radius: 20px; padding: 2px 9px; }
.mod__body { max-height: 320px; overflow: auto; }
.opt { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.opt:hover { background: var(--surface-2); }
.opt--link { cursor: pointer; }
.opt--link:hover { background: var(--primary); color: #fff; }
.opt--link:hover .lvl { color: var(--text); }
.opt .lvl { font-size: 10px; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 1px 6px; }
.opt .flags { margin-left: auto; font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }

/* Barra de vista (título + volver + acciones) */
.viewbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 16px; }
.viewbar h2 { margin: 0; font-size: 20px; }
.viewbar .spacer { flex: 1; }
.viewbar .count { font-size: 12px; color: var(--muted); font-weight: 700; }
.search { flex: 1; min-width: 200px; max-width: 420px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.search:focus { outline: none; border-color: var(--primary); }

/* Tabla de datos */
.tablecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data thead th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 10px 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data th.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
table.data th.th-sort:hover { color: var(--text); background: var(--bg); }
table.data th.th-sort--on { color: var(--primary); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; background: var(--surface-2); color: var(--muted); }
.badge--on { background: rgba(47,169,107,.15); color: var(--ok); }
.badge--off { background: rgba(229,72,77,.15); color: var(--danger); }
.badge--ice { background: rgba(30,107,255,.15); color: var(--primary); }
.badge--warn { background: rgba(214,158,20,.16); color: #a9761a; }
tr.row--link { cursor: pointer; }

/* Formularios */
.form { max-width: 980px; }
.fieldset { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.fieldset > h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; }
.grid--5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.f label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.f input, .f select, .f textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--primary); }
.f textarea { resize: vertical; min-height: 60px; }
.f--req label::after { content: ' *'; color: var(--danger); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding-top: 22px; }
.check input { width: 18px; height: 18px; }
.check--top { padding-top: 0; }
.ta { position: relative; }
.ta__list { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 30px rgba(0,0,0,.15); max-height: 240px; overflow: auto; }
.ta__item { padding: 9px 11px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ta__item:hover { background: var(--primary); color: #fff; }
.ta__item small { color: var(--muted); }
.ta__item:hover small { color: #dfe8ff; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.actions .spacer { flex: 1; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--ok { background: #128a3e; color: #fff; }

/* Paginador */
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 4px 2px; justify-content: flex-end; font-size: 13px; color: var(--muted); }
.pager button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.pager button:disabled { opacity: .45; cursor: default; }

/* Subir imagen */
.imgup { display: flex; align-items: center; gap: 12px; }
.imgup__prev { width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.imgup__ph { width: 84px; height: 84px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }
.thumbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.thumb { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 120px; object-fit: cover; display: block; }
.thumb__x { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: 14px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10,16,26,.55); display: grid; place-items: center; z-index: 40; padding: 16px; }
/* overflow visible (no hidden) para que un popover (MultiSelect) dentro del modal no se recorte;
 * las esquinas se redondean en header/footer para mantener el borde limpio. */
.modal { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: visible; }
.modal__h { padding: 14px 18px; font-weight: 800; border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: 14px 14px 0 0; }
.modal__b { padding: 16px 18px; display: grid; gap: 12px; }
.modal__f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; border-radius: 0 0 14px 14px; }
.modal__f .spacer { flex: 1; }
.modal--sm { max-width: 400px; }
/* Fichas con muchos campos (vendedor): ancha, para que la grilla reparta en varias
   columnas en vez de apilar todo y quedar altísima. */
.modal--lg { max-width: min(1060px, 94vw); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #142033; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 50; opacity: 0; transition: opacity .2s; }
.toast.show { opacity: 1; }
.toast--error { background: var(--danger); }
.toast--ok { background: var(--ok); }

/* ======================= SHELL (sidebar + topbar) ======================= */
.shell { display: flex; min-height: 100vh; }
.maincol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side { flex: 0 0 264px; width: 264px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-ov { display: none; }

.side-top { display: flex; align-items: center; gap: 8px; padding: 13px 12px; border-bottom: 1px solid var(--line); }
.side-brand { flex: 1; display: flex; align-items: center; gap: 10px; border: none; background: transparent; color: var(--primary-700); font-weight: 800; letter-spacing: .6px; font-size: 17px; padding: 2px; overflow: hidden; }
.side-brand__mk { display: inline-flex; color: var(--primary); flex: 0 0 auto; }
.side-rail { border: none; background: transparent; color: var(--muted); border-radius: 8px; padding: 6px; display: inline-flex; transition: transform .2s; }
.side-rail:hover { background: var(--surface-2); color: var(--text); }
.shell--rail .side-rail { transform: rotate(180deg); }

.nav { flex: 1; overflow: auto; padding: 8px 8px 16px; }
.nav-load { padding: 14px; color: var(--muted); font-size: 13px; }
.nav-block { margin-bottom: 2px; }
.nav-mod { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: none; background: transparent; color: var(--text); font-weight: 700; border-radius: 9px; text-align: left; }
.nav-mod:hover { background: var(--surface-2); }
.nav-mod.has-active { color: var(--primary); }
.nav-ico { width: 22px; height: 20px; display: inline-flex; align-items: center; color: var(--muted); flex: 0 0 auto; }
.nav-mod.has-active .nav-ico { color: var(--primary); }
.nav-mod__t { flex: 1; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 20px; padding: 1px 7px; }
.nav-soon { color: var(--muted); font-weight: 800; }
.nav-chev { display: inline-flex; color: var(--muted); transition: transform .18s; flex: 0 0 auto; }
.nav-mod.is-open .nav-chev { transform: rotate(90deg); }
.nav-sub { padding: 2px 0 8px 10px; margin: 2px 0 4px 20px; border-left: 1px solid var(--line); }
.nav-sa { width: 100%; display: flex; align-items: center; gap: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 6px 8px 4px; font-weight: 800; border: none; background: transparent; cursor: pointer; text-align: left; }
.nav-sa:hover { color: var(--text); }
.nav-sa__t { flex: 1; }
.nav-sa-count { font-size: 9.5px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 20px; padding: 0 6px; }
.nav-sa-chev { display: inline-flex; color: var(--muted); transition: transform .18s; }
.nav-sa-chev svg { width: 13px; height: 13px; }
.nav-sa.is-open .nav-sa-chev { transform: rotate(90deg); }
.nav-sa-body { padding-left: 2px; }
.nav-opt { width: 100%; display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: none; background: transparent; color: var(--text); font-size: 13px; border-radius: 8px; text-align: left; }
.nav-opt:hover { background: var(--surface-2); }
.nav-opt.is-active { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(30,107,255,.28); }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.nav-opt.is-active .nav-dot { background: #fff; }
.nav-opt.is-off { opacity: .42; cursor: default; }
.nav-opt.is-off:hover { background: transparent; }
.nav-empty { font-size: 12px; color: var(--muted); padding: 4px 10px 6px; }

.side-foot { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.side-user { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; }
.side-user__av { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.side-user__i { min-width: 0; }
.side-user__n { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user__r { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-out { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.side-out:hover { border-color: var(--danger); color: var(--danger); }

/* Riel (escritorio colapsado) */
.shell--rail .side { flex-basis: 66px; width: 66px; }
.shell--rail .side-brand__t, .shell--rail .nav-mod__t, .shell--rail .nav-count, .shell--rail .nav-soon,
.shell--rail .nav-chev, .shell--rail .nav-sub, .shell--rail .side-user__i, .shell--rail .side-out { display: none; }
.shell--rail .nav-mod, .shell--rail .side-brand { justify-content: center; }
.shell--rail .side-foot { justify-content: center; }

/* Topbar */
.topbar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.tb-burger { display: none; border: none; background: transparent; color: var(--text); padding: 6px; border-radius: 8px; }
.tb-burger:hover { background: var(--surface-2); }
.tb-ctx { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tb-emp { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-meta { font-size: 11.5px; color: var(--muted); }
.tb-spacer { flex: 1; }
.tb-home { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; }
.tb-home:hover { border-color: var(--primary); color: var(--primary); }

/* Home dashboard */
.hero { padding: 6px 2px 14px; }
.hero__t { margin: 0; font-size: 26px; font-weight: 800; }
.hero__s { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }
.sec-h { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin: 16px 2px 10px; }
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.qa { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.qa:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(30,107,255,.14); }
.qa__k { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 800; }
.qa__t { font-size: 15px; font-weight: 700; }
.qa__m { font-size: 12px; color: var(--muted); }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.ms { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 13px; }
.ms__t { font-weight: 700; font-size: 14px; }
.ms__b { font-size: 12px; color: var(--ok); margin-top: 2px; font-weight: 600; }
.ms--soon .ms__b { color: var(--muted); }

.wrap--tight { padding-top: 14px; padding-bottom: 0; }
.backlink { border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; padding: 2px 0; cursor: pointer; }
.backlink:hover { color: var(--primary); }

/* ---- Móvil / PWA: sidebar off-canvas ---- */
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; z-index: 40; height: 100vh; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
  .shell.is-mobopen .side { transform: none; }
  .shell--rail .side { flex-basis: 264px; width: 264px; }
  .shell--rail .side-brand__t, .shell--rail .nav-mod__t, .shell--rail .nav-count,
  .shell--rail .nav-chev, .shell--rail .nav-sub, .shell--rail .side-user__i, .shell--rail .side-out { display: revert; }
  .side-rail { display: none; }
  .side-ov { display: block; position: fixed; inset: 0; background: rgba(8,12,20,.5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 35; }
  .shell.is-mobopen .side-ov { opacity: 1; pointer-events: auto; }
  .tb-burger { display: inline-flex; }
  .wrap { padding: 14px; }
  .hero__t { font-size: 22px; }
}

/* ============================================================================
 * Pulido de interacción — filosofía de Emil Kowalski (animations.dev):
 * feedback al tacto, focos intencionales, entradas/salidas sin saltos.
 * Curvas fuertes, todo bajo 300ms. Se respeta prefers-reduced-motion.
 * ==========================================================================*/
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ring: 0 0 0 3px rgba(30, 107, 255, .18);
}

/* Botones: responden al toque (scale en :active da feedback instantáneo). */
.btn { transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease; }
.btn:active { transform: scale(0.97); }
.btn--ghost:hover { border-color: var(--muted); background: var(--surface-2); }
.btn--primary:hover { background: var(--primary-700); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:disabled:active { transform: none; }

/* Inputs: el foco se siente intencional (anillo suave + transición). */
.field input, .field select, .search, .f input, .f select, .f textarea {
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input:focus, .field select:focus, .search:focus,
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--primary); box-shadow: var(--ring); }

/* Filas de tabla: hover se ve seguido → transición breve, no instantánea. */
table.data tbody tr { transition: background-color 120ms ease; }
tr.row--link:active td { background: var(--surface-2); }
tr.row--link:focus-visible { outline: none; }
tr.row--link:focus-visible td { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--primary); }
tr.row--link:focus-visible td:first-child { box-shadow: inset 2px 0 0 0 var(--primary), inset 0 2px 0 0 var(--primary), inset 0 -2px 0 0 var(--primary); }

/* Estados de lista (error / vacío) centrados con acción. */
.estado { padding: 28px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; }

/* Acento de la marca en checks/radios (los catálogos usan varios). */
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

/* Modal: entra sin salto (origen centro; no es un popover anclado) y sale igual. */
.modal-bg { animation: bg-in 200ms var(--ease-out); }
.modal { transform-origin: center; animation: modal-in 220ms var(--ease-out); }
.modal-bg.is-closing { animation: bg-out 150ms var(--ease-out) forwards; }
.modal-bg.is-closing .modal { animation: modal-out 150ms var(--ease-out) forwards; }
@keyframes bg-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bg-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(6px) scale(0.98); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================================
 * MultiSelect (core/multiselect.js) — selección múltiple con buscador + chips.
 * El popover se abre desde su disparador (origen arriba, no centro) con ease-out.
 * ==========================================================================*/
.ms { position: relative; }
.ms__trigger { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-align: left; transition: border-color 150ms ease, box-shadow 150ms ease; }
.ms.is-open .ms__trigger, .ms__trigger:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.ms__chips { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.ms__ph { color: var(--muted); font-size: 13px; }
.ms__all { font-size: 12px; font-weight: 700; color: var(--primary); }
.ms__chip { display: inline-flex; align-items: center; gap: 3px; background: var(--surface-2); border-radius: 6px; padding: 2px 4px 2px 8px; font-size: 12px; max-width: 160px; }
.ms__chip > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms__x { cursor: pointer; color: var(--muted); font-weight: 800; padding: 0 3px; border-radius: 4px; line-height: 1; transition: color 120ms ease, background-color 120ms ease; }
.ms__x:hover { color: var(--danger); background: rgba(229,72,77,.12); }
.ms__more { font-size: 11px; font-weight: 700; color: var(--muted); padding: 0 2px; }
.ms__caret { color: var(--muted); flex: 0 0 auto; transition: transform 180ms var(--ease-out); }
.ms.is-open .ms__caret { transform: rotate(180deg); }
.ms__pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 44px rgba(0,0,0,.20); overflow: hidden; transform-origin: top center; display: none; }
.ms.is-open .ms__pop { display: block; animation: ms-in 170ms var(--ease-out); }
@keyframes ms-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.ms__bar { padding: 8px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.ms__search { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 13px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.ms__search:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.ms__acts { display: flex; gap: 4px; flex: 0 0 auto; }
.ms__act { font-size: 12px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); transition: transform 160ms var(--ease-out), color 150ms ease, border-color 150ms ease; }
.ms__act:hover { color: var(--primary); border-color: var(--primary); }
.ms__act:active { transform: scale(0.96); }
.ms__list { max-height: 244px; overflow: auto; padding: 4px; }
.ms__opt { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: background-color 120ms ease; }
.ms__opt:hover { background: var(--surface-2); }
.ms__opt.is-sel { background: rgba(30,107,255,.08); }
.ms__check { width: 17px; height: 17px; border: 1.5px solid var(--line); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; flex: 0 0 auto; transition: background-color 120ms ease, border-color 120ms ease; }
.ms__opt.is-sel .ms__check { background: var(--primary); border-color: var(--primary); }
.ms__code { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 22px; flex: 0 0 auto; }
.ms__desc { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms__empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }

/* ============================================================================
 * Productos · lista responsive. Desktop: tabla densa (10 col). Móvil (<700px):
 * tarjetas táctiles que lideran Descripción → PVP → Estado. Misma data, un solo
 * origen; CSS elige según ancho. Las tarjetas son <button> (teclado + táctil).
 * ==========================================================================*/
.prod-cards { display: none; }
@media (max-width: 700px) {
  .prod-desktop { display: none; }
  .prod-cards { display: flex; flex-direction: column; gap: 8px; }
}
.prodcard { width: 100%; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 60px; transition: transform 160ms var(--ease-out), border-color 150ms ease, box-shadow 150ms ease; }
.prodcard:active { transform: scale(0.99); }
.prodcard:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.prodcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.prodcard__name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.prodcard__meta { font-size: 12px; color: var(--muted); }
.prodcard__bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prodcard__pvp { font-weight: 800; font-variant-numeric: tabular-nums; }
.prodcard__tags { display: flex; gap: 5px; flex: 0 0 auto; }

/* Fila de filtros de Productos. Desktop: visible. Móvil: colapsa en botón "Filtros (N)". */
.filt { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 14px; }
.filt .f { margin: 0; flex: 1 1 200px; min-width: 170px; }
.filt-toggle { display: none; }
.filt-toggle__n { color: var(--primary); font-weight: 800; }
@media (max-width: 700px) {
  .filt-toggle { display: inline-flex; margin: 0 0 10px; }
  .filt { display: none; }
  .filt-wrap.is-open .filt { display: flex; }
}

/* ============================================================================
 * Documentos auxiliares de compras (Requisición de compras, Orden de compra,
 * Requisición de transferencia, Solicitud de pedidos a compras — ver
 * docAuxiliarCompras.js). En escritorio la barra de "agregar línea" es una fila
 * densa con varios campos chicos; en celular/tablet angosto eso queda apretado
 * e ilegible. Acá se apilan en columna a ancho completo — misma línea visual
 * (mismos colores, tipografía, radios), solo cambia el acomodo. La tabla de
 * líneas ya vive en un .tablecard (scroll horizontal propio) para que en
 * pantallas chicas no rompa el layout de la página.
 * ==========================================================================*/
@media (max-width: 700px) {
  .linea-bar, .cargar-bar { flex-direction: column; align-items: stretch; }
  /* !important justificado: algunos campos (Producto, Observación) traen
     min-width/flex fijos como estilo en línea (para su acomodo en escritorio),
     que por especificidad le gana a esta regla si no se marca así. */
  .linea-bar .f, .cargar-bar .f { width: 100% !important; flex: none !important; min-width: 0 !important; }
  .linea-bar > button, .cargar-bar > button { width: 100%; }
  table.data { font-size: 12px; }
  table.data thead th, table.data tbody td { padding: 7px 8px; }
}
/* Control segmentado (Estado): opción exclusiva. */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg__b { padding: 9px 13px; border: none; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; transition: background-color 120ms ease, color 120ms ease; }
.seg__b:last-child { border-right: none; }
.seg__b.is-on { background: var(--primary); color: #fff; }
.seg__b:not(.is-on):hover { background: var(--surface-2); color: var(--text); }
.seg__b:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }

/* ===== Punto de Venta (POS) ===== */
.pos-load { padding: 40px; text-align: center; color: var(--muted); }
.pos-gate { display: grid; place-items: center; min-height: 70vh; padding: 20px; }
.pos-gate__card { max-width: 460px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px; }
.pos-gate__card h2 { margin: 6px 0 8px; }
.pos-lock { font-size: 40px; margin-bottom: 6px; }

.pos2 { display: flex; flex-direction: column; gap: 12px; padding: 12px; height: calc(100vh - 96px); }
.pos-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pos-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pos-chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: all .12s; }
.pos-chip:hover { border-color: var(--primary); color: var(--text); }
.pos-chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pos-top__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text); }
.pill--mini { padding: 1px 7px; font-size: 10px; font-weight: 700; color: var(--primary-700); background: transparent; }
.pill--warn { padding: 1px 7px; font-size: 10px; font-weight: 700; color: #b42318; background: #fdecec; border-color: #f6c9c4; }

.pos-search { position: relative; }
.pos-search__ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; opacity: .6; pointer-events: none; }
.pos-search__inp { width: 100%; padding: 15px 16px 15px 46px; font-size: 17px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); }
.pos-search__inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(30,107,255,.12); }
.pos-results { position: absolute; z-index: 30; left: 0; right: 0; margin-top: 6px; max-height: 60vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.22); padding: 6px; }
.pos-res { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pos-res--empty { display: block; padding: 16px; text-align: center; cursor: default; }
.pos-res.is-sel { background: rgba(30,107,255,.10); outline: 1px solid rgba(30,107,255,.3); }
.pos-res__body { min-width: 0; }
.pos-res__d { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-res__m { display: flex; gap: 8px; font-size: 12px; margin-top: 2px; }
.pos-res__side { text-align: right; white-space: nowrap; }
.pos-res__p { font-weight: 800; font-size: 15px; }
.pos-res__e { font-size: 11px; color: var(--muted); }
.pos-res__e.is-zero { color: #b42318; }

.pos-thumb { position: relative; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.pos-thumb--lg { width: 56px; height: 56px; border-radius: 10px; }
.pos-thumb__ph { font-size: 18px; opacity: .5; }
.pos-thumb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.pos-thumb.is-ready .pos-thumb__img { opacity: 1; }
.pos-thumb.is-ready .pos-thumb__ph { display: none; }

.pos2__body { display: grid; grid-template-columns: 1fr 320px; gap: 12px; flex: 1; min-height: 0; }
.pos2__doc { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pos-grid { width: 100%; border-collapse: collapse; }
.pos-grid thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; }
.pos-grid th.n, .pos-grid td.n { text-align: right; } .pos-grid th.c, .pos-grid td.c { text-align: center; }
.pos-grid td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.pos-td-img { width: 48px; padding-right: 0 !important; }
.pos-pname { font-weight: 600; font-size: 14px; }
.pos-pmeta { display: flex; gap: 8px; font-size: 11px; margin-top: 2px; flex-wrap: wrap; }
.pos-linetot { font-weight: 800; font-variant-numeric: tabular-nums; }
.pos-qtybox { display: inline-flex; align-items: center; gap: 2px; }
.pos-step { width: 30px; height: 32px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 8px; font-size: 18px; cursor: pointer; line-height: 1; }
.pos-step:hover { border-color: var(--primary); color: var(--primary); }
.pos-qty { width: 62px; height: 32px; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-weight: 700; }
.pos-cell { width: 84px; height: 32px; text-align: right; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); padding: 0 8px; }
.pos-cell:disabled { opacity: .55; }
.btn--icon { padding: 4px 8px; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; border-radius: 6px; }
.btn--icon:hover { color: #b42318; background: #fdecec; }
.pos-empty { display: grid; place-items: center; gap: 8px; padding: 48px 20px; color: var(--muted); text-align: center; }
.pos-empty__ico { font-size: 44px; opacity: .5; }

.pos-sum { align-self: start; position: sticky; top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.pos-sum__row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--muted); }
.pos-sum__row b { color: var(--text); font-variant-numeric: tabular-nums; }
.pos-sum__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 800; }
.pos-sum__big { font-size: 28px; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.pos-sum__cobrar { margin-top: 14px; padding: 14px; font-size: 16px; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-700); }
.pos-sum__hint { margin-top: 10px; font-size: 11px; text-align: center; }
@media (max-width: 860px) { .pos2 { height: auto; } .pos2__body { grid-template-columns: 1fr; } .pos-sum { position: static; } }
/* POS · Cajas / Unidades / Cantidad calculada */
.pos-cell--c { width: 68px; text-align: center; }
.pos-cant { display: inline-block; min-width: 54px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2);
  border: 1px dashed var(--line); font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
/* POS · selector de lista de precio por línea */
.pos-lista { height: 32px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 12px; max-width: 130px; }
.pos-res__l { font-size: 10px; color: var(--muted); }
.pos-res.is-off { opacity: .55; }
/* POS · barra de cliente + condición */
.pos-cli { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pos-cli__box { flex: 1; min-width: 260px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .12s; }
.pos-cli__box:hover { border-color: var(--primary); }
.pos-cli__ico { font-size: 18px; }
.pos-cli__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pos-cli__n { font-weight: 700; font-size: 14px; }
.pos-cli__m { font-size: 12px; }
.pos-cli__f4 { font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.pos-cond__wrap { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pos-cond { padding: 10px 18px; border: 0; background: var(--surface); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; }
.pos-cond.is-on { background: var(--primary); color: #fff; }
.btn--sec { background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.btn--sec:hover { border-color: var(--primary); color: var(--primary); }
.pos-cli__search { position: absolute; z-index: 40; top: 100%; left: 0; right: 0; margin-top: 6px; }
.pos-cli__inp { width: 100%; padding: 12px 14px; font-size: 15px; border: 2px solid var(--primary); border-radius: 12px; background: var(--surface); color: var(--text); }
.pos-cli__inp:focus { outline: none; }
.pos-results--cli { position: static; margin-top: 6px; }
.pos-res--c { grid-template-columns: 1fr auto; }
.pos-aviso { background: #fdecec; color: #b42318; border: 1px solid #f6c9c4; border-radius: 10px; padding: 9px 11px; font-size: 12px; margin-bottom: 10px; line-height: 1.4; }
/* POS · cobro (modal) */
.ov { position: fixed; inset: 0; background: rgba(8,14,26,.55); display: grid; place-items: center; z-index: 100; padding: 20px; }
.cobro { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.cobro__h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cobro__h h3 { margin: 0; font-size: 15px; }
.cobro__tot { text-align: right; }
.cobro__tot span { display: block; font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.cobro__tot b { font-size: 22px; color: var(--primary-700); font-variant-numeric: tabular-nums; }
.cobro__b { padding: 16px 20px; }
.cobro__fila { display: grid; grid-template-columns: 1fr 110px 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
.cobro__f { height: 38px; }
.cobro__v { height: 38px; text-align: right; font-weight: 700; }
.cobro__acc { display: flex; gap: 8px; margin: 4px 0 14px; }
.cobro__l { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.cobro__l b { color: var(--text); font-variant-numeric: tabular-nums; font-size: 15px; }
.cobro__l.is-vuelto b { color: #157347; font-size: 18px; }
.cobro__f2 { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.cobro__f2 .btn--primary { padding: 10px 22px; }
.cobro__f2 .btn--primary[disabled] { opacity: .45; cursor: not-allowed; }
.pos-sum__pagos { margin-top: 8px; }
.pos-sum__pago { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; color: var(--muted); }
.pos-sum__pago b { color: var(--text); font-variant-numeric: tabular-nums; }
.pos-sum__pago.is-falta b { color: #b42318; }
.pos-sum__pago.is-vuelto b { color: #157347; }
/* POS · alta rápida de cliente */
.nc { max-width: 480px; }
.nc .campo { margin-bottom: 10px; }
.nc .campo span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.nc .inp { width: 100%; }
.nc__2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nc__id { font-size: 12px; margin: -4px 0 12px; min-height: 16px; }
.nc__id.is-ok { color: #157347; }
.nc__id.is-bad { color: #b42318; }
.nc__usar { border: 0; background: transparent; color: var(--primary); font-weight: 700; cursor: pointer; text-decoration: underline; font-size: 12px; padding: 0; }

/* POS · resultado de la venta (número, vuelto, clave de acceso) */
.cobro--ok .cobro__h { background: var(--ok-bg, #0d9488); color: #fff; }
.ok__num {
  font-size: 30px; font-weight: 700; letter-spacing: .5px; text-align: center;
  padding: 14px 0 10px; font-variant-numeric: tabular-nums;
}
.ok__clave { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ok__clave span { display: block; font-size: 11px; margin-bottom: 3px; }
.ok__clave code {
  display: block; font-size: 11px; line-height: 1.5; word-break: break-all;
  background: var(--bg-2); padding: 6px 8px; border-radius: 6px;
}

/* POS · estado de red (sin conexión / cola por subir) */
.pill--red { border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.pill--red.is-off { background: var(--warn-bg, #7c2d12); color: #fff; font-weight: 600; }
.pill--red.is-cola { background: var(--accent-soft, #1e3a5f); color: #fff; }

/* POS · nota de crédito: franja del documento devuelto + selección de ítems */
.pos-nc {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.pos-nc .nc__t { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.pos-nc .spacer { flex: 1; }
.nc__buscar, .nc__sel { max-width: 620px; width: 92vw; }
.nc__lista, .nc__items { max-height: 46vh; overflow-y: auto; margin-top: 8px; }
.nc__item {
  display: grid; grid-template-columns: auto 1fr auto 90px; gap: 10px;
  align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line);
}
.nc__chk { width: 16px; height: 16px; cursor: pointer; }
.nc__max { font-size: 11px; white-space: nowrap; }
.nc__c { text-align: right; }
.cobro--sm { max-width: 460px; width: 92vw; }

/* POS · cobro: casilleros del banco (cheque / depósito) */
.cobro__grupo { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.cobro__grupo:last-child { border-bottom: 0; }
/* Banco + N campos (cheque: 1 · tarjeta: voucher + últimos 4). Se acomodan solos. */
.cobro__banco {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px;
  margin: 6px 0 2px 0; padding-left: 4px;
}

/* Facturación · ficha del vendedor (secciones + listas de precio + metas) */
.vend__b {
  max-height: 78vh; overflow-y: auto;
  /* Nunca barra horizontal: lo que no cabe se reparte en menos columnas, no se corta. */
  overflow-x: hidden;
  gap: 0;                       /* el aire lo ponen las secciones, no el grid del modal */
  padding: 18px 22px;
}
/* Los hijos de un grid no encogen por debajo de su contenido si no se les dice:
   sin esto un input largo empuja la fila y aparece la barra horizontal. */
.vend__b .grid > * { min-width: 0; }
.vend__b .f input, .vend__b .f select { max-width: 100%; }
.vend__b .f small { display: block; margin-top: 4px; line-height: 1.35; }
.vend__h {
  margin: 22px 0 10px; padding-bottom: 5px; border-bottom: 1px solid var(--line);
  font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted);
}
.vend__h:first-of-type { margin-top: 4px; }
.vend__b .grid { gap: 14px 16px; }
.vend__b .check { padding-top: 0; align-items: flex-start; }
.vend__b .check span small { display: block; font-weight: 400; margin-top: 2px; }

.vend__listas { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 16px; margin-bottom: 12px; }
.vend__lista { display: grid; grid-template-columns: 78px 1fr 92px; gap: 8px; align-items: center; }
.vend__lista input[type=number] { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.vend__lista .check { padding-top: 0; }
.vend__lista .muted { font-size: 11px; text-align: right; }

.vend__presu__top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vend__presu__top select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.vend__presu__top .spacer { flex: 1; }
/* La grilla de 12 meses en 2 columnas: la mitad de alto y sin barra lateral propia. */
.vend__presu table.data { table-layout: fixed; }
.vend__presu table.data td { padding: 3px 6px; }
.vend__presu table.data input { width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); text-align: right; }
.vend__presu table.data tfoot td { font-weight: 800; border-top: 2px solid var(--line); }

/* Vendedor · cobertura (va con las listas de precio, no con la app de pedidos) */
.vend__cob { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 9px; margin-bottom: 4px; }

/* Campo con botón al lado (placa + consultar al SRI) */
.f__conbtn { display: flex; gap: 6px; align-items: stretch; }
.f__conbtn input { flex: 1; min-width: 0; }
.f__conbtn button { white-space: nowrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text); }
.f__conbtn button:disabled { opacity: .5; cursor: default; }
.f--placa small { display: block; margin-top: 5px; line-height: 1.35; }
