/* Estilo inspirado en la app de punto de venta que ya usan los vendedores. */
:root, [data-theme="dark"] {
  --bg: #121317;
  --surface: #1c1e24;
  --card: #23262e;
  --card-hover: #2b2f38;
  --line: #2f333c;
  --ink: #ffffff;
  --muted: #9a9fab;
  --faint: #6c717d;
  --blue: #1f5eff;
  --blue-ink: #ffffff;
  --link: #3d8bff;
  --green: #7fe089;
  --red: #ff5a4f;
  --yellow: #f6b73c;
  --pink: #ff2d78;
  --cart-bg: #f2f3f5;
  --cart-ink: #121317;
  --overlay: rgba(0, 0, 0, .6);
  --radius: 18px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --card: #ffffff;
  --card-hover: #eef0f3;
  --line: #e1e3e8;
  --ink: #121317;
  --muted: #5d6270;
  --faint: #8b909c;
  --link: #1f5eff;
  --green: #11893a;
  --red: #d42a20;
  --yellow: #a96b00;
  --cart-bg: #121317;
  --cart-ink: #ffffff;
  --overlay: rgba(0, 0, 0, .4);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.35;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
svg { width: 24px; height: 24px; flex: none; }
svg.chev { width: 26px; height: 26px; color: var(--ink); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.green { color: var(--green); } .red { color: var(--red); } .yellow { color: var(--yellow); }
.num { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .code { color: var(--faint); font-size: .88rem; margin-top: 2px; }

/* ---------- Logo ---------- */
/* logo.png es negro con fondo transparente; en modo oscuro se invierte a blanco. */
.logo { display: block; width: min(240px, 70vw); height: auto; }
.logo.small { width: 150px; }
[data-theme="dark"] .logo { filter: invert(1); }

/* ---------- Pantallas completas (PIN, sucursal, abrir caja) ---------- */
.fullscreen {
  min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 32px 16px; gap: 20px; background: #050506; color: #fff;
}
[data-theme="light"] .fullscreen { background: var(--bg); color: var(--ink); }
.fullscreen .logo { opacity: .95; }
.pin-location { font-size: 1.4rem; font-weight: 600; margin-top: 24px; }
.pin-prompt { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 28px; font-size: 1.25rem; }
.pin-dots { display: flex; gap: 14px; height: 16px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; opacity: .6; }
.pin-dots span.on { background: currentColor; opacity: 1; }
.pin-error { color: var(--red); min-height: 1.4em; font-size: .95rem; }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); gap: 20px; margin-top: 8px; }
.keypad button {
  width: 84px; height: 84px; border-radius: 50%; border: 0; background: #2c2d31; color: #fff;
  font-size: 2rem; font-weight: 600; display: grid; place-items: center;
}
[data-theme="light"] .keypad button { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.keypad button:active { background: #45474d; }
.keypad button.soft { color: #8d8f95; }
.keypad svg { width: 30px; height: 30px; }
.pin-foot { margin-top: 28px; opacity: .5; font-size: .85rem; }
.setup-list { width: min(420px, 100%); display: flex; flex-direction: column; gap: 10px; }
.setup-list button {
  text-align: left; padding: 16px 18px; border-radius: 14px; border: 0; background: var(--card); color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.open-register { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; }

/* ---------- Estructura principal ---------- */
.shell { display: flex; flex-direction: column; min-height: 100dvh; }
.home-layout > * { min-width: 0; }
.main { flex: 1; min-width: 0; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 980px; width: 100%; margin: 0 auto; }
.main.with-cart-btn { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabbar button {
  position: relative; background: none; border: 0; padding: 10px 0; display: grid; place-items: center;
  color: var(--muted);
}
.tabbar button.active { color: var(--ink); }
.tabbar button.active::before {
  content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 4px; border-radius: 0 0 4px 4px; background: var(--blue);
}
.tabbar svg { width: 30px; height: 30px; }
.badge {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 12px; background: #3a3d45; color: #fff; font-size: .8rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface);
}
[data-theme="light"] .badge { background: #5d6270; }

.cart-btn {
  position: fixed; left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 19;
  max-width: 948px; margin: 0 auto;
  background: var(--cart-bg); color: var(--cart-ink); border: 0; border-radius: 16px;
  padding: 20px; font-size: 1.3rem; font-weight: 500; display: flex; justify-content: center; gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.cart-btn .count { font-weight: 700; }

/* ---------- Encabezados y controles ---------- */
.page-title { font-size: 2.1rem; font-weight: 800; margin: 18px 0 18px; display: flex; align-items: center; gap: 12px; }
.title-menu {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  background: var(--card); border: 0; font-size: 1.05rem; font-weight: 600;
}
.title-menu svg { width: 18px; height: 18px; }
.topline { display: flex; align-items: center; gap: 12px; }
.back-btn, .icon-btn {
  background: none; border: 0; padding: 8px; margin-left: -8px; display: grid; place-items: center; color: var(--ink);
}
.back-btn svg, .icon-btn svg { width: 28px; height: 28px; }
.search {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 16px; min-height: 60px;
}
[data-theme="dark"] .search { background: #17181d; }
.search svg { width: 26px; height: 26px; flex: none; }
.search input { flex: 1; width: 100%; border: 0; background: none; outline: none; font-size: 1.2rem; min-width: 0; padding: 14px 0; }
.search input::placeholder { color: var(--ink); opacity: .85; }
.search .scan { background: none; border: 0; padding: 6px; color: var(--ink); display: grid; }
.search:focus-within { border-color: var(--blue); }
.search-row { display: flex; gap: 14px; align-items: stretch; }
.square-btn {
  width: 64px; flex: none; border-radius: 16px; border: 0; background: var(--card); display: grid; place-items: center; color: var(--green);
}
.square-btn svg { width: 30px; height: 30px; }
#connBtn { color: var(--green); }
.add-btn { background: none; border: 0; padding: 10px; color: var(--ink); display: grid; }
.add-btn svg { width: 34px; height: 34px; }

.chips { display: flex; gap: 12px; overflow-x: auto; margin: 16px -16px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; border-radius: 99px;
  background: var(--card); border: 0; font-size: 1.05rem;
}
.chip svg { width: 20px; height: 20px; }
.chip.on { background: var(--blue); color: var(--blue-ink); }

/* ---------- Cuadrícula de inicio ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.tile {
  position: relative; min-height: 140px; border-radius: var(--radius); background: var(--surface); border: 0;
  padding: 18px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  color: var(--ink); overflow: hidden;
}
[data-theme="dark"] .tile { background: #17181d; }
.tile:hover { background: var(--card); }
.tile .ico { width: 30px; height: 30px; }
.tile .label { font-size: 1.2rem; line-height: 1.25; font-weight: 500; }
.tile .sub { font-size: .9rem; color: var(--muted); margin-top: 2px; }
.tile.dim .label { color: var(--muted); }
.tile .count-pill {
  position: absolute; top: 14px; right: 14px; background: #101114; color: #fff; border-radius: 99px;
  padding: 4px 10px; font-weight: 600; font-size: .95rem; display: flex; gap: 6px; align-items: center;
}
.tile .count-pill svg { width: 18px; height: 18px; }
.tile .remove-x {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--red); color: #fff; display: grid; place-items: center; font-size: 1.1rem;
}
.tile.add { border: 2px dashed var(--line); background: transparent; align-items: center; justify-content: center; color: var(--muted); }
.tile.add svg { width: 34px; height: 34px; }
.edit-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.edit-row .chip { padding: 10px 16px; font-size: .98rem; }
.edit-banner {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border-radius: 16px; padding: 12px 14px;
}
.edit-banner > span { font-weight: 600; }
.edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-actions .chip:not(.on) { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.grid.editing .tile { outline: 2px dashed var(--line); outline-offset: -2px; animation: wiggle .35s ease-in-out infinite alternate; }
.grid.editing .tile:hover { outline-color: var(--red); }
@keyframes wiggle { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
@media (prefers-reduced-motion: reduce) { .grid.editing .tile { animation: none; } }
.tile { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.text-btn { background: none; border: 0; color: var(--link); font-weight: 600; padding: 6px 0; }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 16px; padding: 16px 0; border: 0; background: none; text-align: left; width: 100%;
  color: var(--ink);
}
.row + .row { border-top: 1px solid transparent; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-size: 1.2rem; font-weight: 600; }
.row .meta { color: var(--muted); font-size: 1.05rem; margin-top: 2px; }
.row .right { text-align: right; font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.row .chev { width: 26px; height: 26px; flex: none; }
.row .ico { width: 30px; height: 30px; flex: none; }
.thumb {
  width: 72px; height: 72px; flex: none; border-radius: 14px; background: #fff; overflow: hidden; display: grid; place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.empty { background: var(--card); color: var(--muted); }
.thumb.empty svg { width: 32px; height: 32px; }
.avatar {
  width: 72px; height: 72px; flex: none; border-radius: 14px; background: var(--card); display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 600;
}
.tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tag { padding: 6px 14px; border-radius: 99px; background: var(--card); font-size: .98rem; color: var(--muted); }
.tag.example { background: transparent; border: 1px dashed var(--line); }
.updated { color: var(--muted); margin: 6px 0 4px; }
.empty-state { color: var(--muted); text-align: center; padding: 48px 16px; }
.banner {
  border: 1px dashed var(--line); color: var(--muted); border-radius: 12px; padding: 10px 14px; font-size: .92rem; margin: 8px 0 4px;
}

/* Menú desplegable del título */
.menu-pop {
  position: fixed; left: 16px; right: 16px; top: 16px; z-index: 40; max-width: 520px;
  background: var(--card); border-radius: 18px; padding: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.menu-pop button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border: 0;
  background: none; font-size: 1.25rem; color: var(--muted); border-radius: 14px;
}
.menu-pop button.on { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.menu-pop .n { background: var(--surface); color: var(--ink); border-radius: 99px; min-width: 34px; height: 34px; display: grid; place-items: center; font-size: 1rem; }
.scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 39; }

/* ---------- Ajustes ---------- */
.section-label { color: var(--muted); font-size: 1.05rem; margin: 26px 0 6px; }
.setting { display: flex; align-items: center; gap: 12px; padding: 14px 0; width: 100%; background: none; border: 0; text-align: left; color: var(--ink); }
.setting .grow { flex: 1; min-width: 0; }
.setting .name { font-size: 1.25rem; font-weight: 600; }
.setting .value { color: var(--muted); font-size: 1.05rem; margin-top: 2px; }
.switch { position: relative; width: 62px; height: 36px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #4a4d55; transition: .15s; pointer-events: none; }
.switch span::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: .15s;
}
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { left: 30px; }
.switch input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.big-btn {
  width: 100%; padding: 22px; border-radius: 16px; border: 0; background: var(--card); font-size: 1.3rem; font-weight: 600;
  color: var(--ink); margin-top: 18px;
}
.big-btn.danger { color: var(--red); text-align: left; }
.big-btn.primary { background: var(--blue); color: var(--blue-ink); text-align: center; }
.big-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Tarjetas de conectividad e informes */
.card { background: var(--card); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 14px; }
.card .name { font-size: 1.25rem; font-weight: 600; }
.card .value { color: var(--muted); margin-top: 4px; font-size: 1.05rem; }
.card.outline { background: transparent; border: 1px solid var(--line); }
.card.row-card { display: flex; align-items: center; gap: 22px; }
.card.row-card svg { width: 34px; height: 34px; flex: none; }
.kpi .label { color: var(--muted); font-size: 1.1rem; }
.kpi .big { font-size: 1.6rem; margin: 18px 0 6px; font-variant-numeric: tabular-nums; }
.delta { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.delta svg { width: 20px; height: 20px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 1.15rem; }
.kv .v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); margin: 18px 0 6px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- Hoja inferior (diálogos) ---------- */
dialog.sheet {
  width: 100%; max-width: 640px; max-height: 92dvh; margin: auto auto 0; border: 0; padding: 0;
  border-radius: 22px 22px 0 0; background: var(--bg); color: var(--ink); overflow: hidden;
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: up .18s ease-out; }
dialog.sheet::backdrop { background: var(--overlay); }
@keyframes up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 6px; }
.sheet-head h2 { margin: 0; font-size: 1.45rem; font-weight: 600; flex: 1; }
.sheet-head.big h2 { font-size: 2rem; font-weight: 800; }
.sheet-body { padding: 8px 20px 24px; overflow-y: auto; }
.sheet-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; color: var(--muted); font-size: .98rem; }
.field input, .field select, .field textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 1.15rem; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 12px 0; }
.seg label span {
  display: block; text-align: center; padding: 14px 6px; border-radius: 12px; background: var(--card); font-weight: 600;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { background: var(--blue); color: var(--blue-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--link); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button { border: 0; background: var(--card); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.error { color: var(--red); min-height: 1.3em; margin: 8px 0 0; }

/* Carrito */
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line .t { font-weight: 600; }
.cart-line .s { color: var(--muted); font-size: .92rem; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--card); font-size: 1.2rem; }
.qty input { width: 54px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 4px; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: .92rem; padding: 4px 0; }
.cart-extras { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.cart-extras .pill { display: inline-flex; gap: 6px; align-items: center; background: var(--card); padding: 8px 12px; border-radius: 99px; font-size: .95rem; border: 0; }
.cart-extras .pill svg { width: 18px; height: 18px; }
.totals .kv { font-size: 1.05rem; padding: 4px 0; }
.totals .kv.total { font-size: 1.6rem; font-weight: 800; padding-top: 10px; }

/* Sugerencias de "Agregar recuadro" */
.suggest { background: #000; border-radius: 22px; padding: 26px 0 18px; margin: 10px 0 18px; overflow: hidden; }
[data-theme="light"] .suggest { background: var(--card); }
.suggest-track { display: flex; gap: 22px; overflow-x: auto; padding: 8px 22px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.suggest-track::-webkit-scrollbar { display: none; }
.suggest-card {
  position: relative; flex: none; width: 230px; min-height: 140px; border-radius: 18px; background: #5f6066; color: #fff;
  padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; scroll-snap-align: center; border: 0; text-align: left;
}
.suggest-card .t { font-size: 1.2rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.suggest-card .p { font-weight: 700; margin-top: 4px; font-size: 1.15rem; }
.suggest-card .plus {
  position: absolute; top: -10px; right: -10px; width: 42px; height: 42px; border-radius: 50%; background: var(--blue);
  display: grid; place-items: center; color: #fff;
}
.suggest-card .plus svg { width: 26px; height: 26px; }
.suggest-note { text-align: center; color: var(--muted); margin-top: 14px; }
.sugg-label { color: #8b6dff; font-weight: 600; display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.sugg-label svg { width: 24px; height: 24px; }

/* Ticket */
/* Ticket: papel blanco y letra negra, como el de Shopify POS. */
.receipt { background: #fff; color: #000; font: 500 13.5px/1.35 -apple-system, "Helvetica Neue", Arial, system-ui, sans-serif; max-width: 340px; margin: 0 auto; padding: 22px 18px; border-radius: 6px; }
.receipt p { margin: 6px 0; }
.receipt .r-c { text-align: center; }
.receipt .r-logo { text-align: center; margin: 8px 0 18px; }
.receipt .r-logo img { max-width: 72%; max-height: 90px; filter: brightness(0); }
.receipt .r-branch { margin: 10px 0; }
.receipt .r-branch strong { display: block; font-size: 14.5px; margin-bottom: 6px; }
.receipt .r-barcode { width: 160px; height: 48px; margin: 8px auto 4px; display: block; }
.receipt .r-head { font-weight: 800; border-bottom: 2px solid #000; margin: 14px 0 6px; padding-bottom: 2px; }
.receipt .r-item { display: flex; gap: 10px; margin: 10px 0; }
.receipt .r-item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.receipt .r-amt { white-space: nowrap; text-align: right; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 10px; margin: 8px 0; }
.receipt .r-row > :last-child { white-space: nowrap; }
.receipt .r-rule { border-top: 2px solid #000; margin: 12px 0; }
.receipt .r-total { border: 2px solid #000; border-radius: 6px; text-align: center; padding: 12px 8px; margin: 16px 0; }
.receipt .r-total div { font-weight: 800; font-size: 12.5px; }
.receipt .r-total strong { font-size: 27px; font-weight: 800; }
.receipt .r-qr { display: flex; justify-content: center; margin: 14px 0 4px; }
.receipt .r-qr svg { width: 130px; height: 130px; }
.receipt .r-small { font-size: 11.5px; }
.receipt .r-sign { border-bottom: 1.5px dotted #000; height: 46px; margin: 18px 12px 0; }
/* Editor del ticket */
.re-page { max-width: 1100px !important; }
.re-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.re-preview { position: sticky; top: 12px; background: var(--surface); border-radius: var(--radius); padding: 16px; max-height: calc(100vh - 40px); overflow: auto; }
.re-logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.re-logo-row img { height: 34px; max-width: 150px; object-fit: contain; background: #fff; padding: 6px; border-radius: 8px; filter: none; }
@media (max-width: 820px) { .re-grid { grid-template-columns: 1fr; } .re-preview { position: static; max-height: none; } }

/* Menú "Más" */
.more-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 6px; }
.more-head .who { font-size: 1.7rem; font-weight: 600; }
.more-head .where { color: var(--muted); font-size: 1.15rem; margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.pro { background: #1a3a8c; color: #8fb3ff; border-radius: 99px; padding: 2px 10px; font-size: .95rem; font-weight: 600; }
.lock-btn { width: 64px; height: 64px; border-radius: 16px; border: 0; background: #0b0c0f; color: #fff; display: grid; place-items: center; }
.lock-btn svg { width: 30px; height: 30px; }
.more-list .row { padding: 18px 22px; gap: 18px; }
.more-list .row .title { font-weight: 500; font-size: 1.35rem; }
.more-list .row svg { width: 28px; height: 28px; }

/* Avisos */
.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -20px); z-index: 100;
  background: #2c2f37; color: #fff; padding: 12px 18px; border-radius: 99px; opacity: 0; transition: .2s; pointer-events: none;
  max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); }

/* ---------- Computadora: barra lateral y carrito fijo ---------- */
@media (min-width: 1024px) {
  .shell { flex-direction: row; }
  .tabbar {
    position: sticky; top: 0; height: 100dvh; width: 96px; flex: none; grid-template-columns: 1fr; grid-auto-rows: 84px;
    align-content: start; border-top: 0; border-right: 1px solid var(--line); padding: 24px 0;
  }
  .tabbar button.active::before { top: 20%; bottom: 20%; left: -1px; right: auto; width: 4px; height: auto; border-radius: 0 4px 4px 0; }
  .main { padding: 24px 32px 40px; max-width: none; }
  .main.with-cart-btn { padding-bottom: 40px; }
  .cart-btn { display: none; }
  .home-layout { display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cart-panel {
    position: sticky; top: 24px; background: var(--surface); border-radius: var(--radius); padding: 20px;
    max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  }
  .cart-panel .cart-scroll { overflow-y: auto; flex: 1; }
  dialog.sheet { margin: auto; border-radius: 22px; max-height: 88dvh; }
  .page { max-width: 860px; }
}
@media (max-width: 1023px) { .cart-panel { display: none; } }
@media (max-width: 380px) {
  .keypad { grid-template-columns: repeat(3, 72px); gap: 16px; }
  .keypad button { width: 72px; height: 72px; }
  .tile { min-height: 124px; padding: 14px; }
  .tile .label { font-size: 1.05rem; }
  .page-title { font-size: 1.8rem; }
}

/* Cotización con el formato de Nosa: hoja carta fija de 816 × 1056 px (8.5 × 11 in) con las medidas del diseño
   original. En pantalla se escala completa (quoteLayout); al guardar PDF se imprime a tamaño real. */
.qd-frame { width: 100%; overflow: hidden; border-radius: 6px; }
.qd-pages { width: 816px; display: flex; flex-direction: column; gap: 24px; transform-origin: 0 0; }
#printRoot { display: none; }
.quote-doc { position: relative; width: 816px; min-height: 1056px; padding: 0 96px 88px; box-sizing: border-box; background: #fff; color: #1b1c1f;
  font: 400 14px/21px "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .045em; }
.quote-doc strong { font-weight: 700; }
.qd-band { position: absolute; left: 0; right: 0; bottom: 0; top: 725px; background: #0d33ff; }
.qd-card { position: relative; background: #fff; border-radius: 0 0 46px 46px; padding-bottom: 24px; }
.qd-head { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 55px; }
.qd-logo { width: 165px; margin-top: 9px; filter: brightness(0); }
.qd-code { width: 182px; text-align: right; }
.qd-code .r-barcode { width: 182px; height: 46px; display: block; }
.qd-code strong { display: block; font-size: 13.5px; line-height: 18px; margin-top: 4px; letter-spacing: .08em; }
.qd-seller { text-align: right; margin-top: 21px; font-size: 14.5px; }
.qd-rule { border-top: 1.4px solid #1b1c1f; margin-top: 22px; }
.qd-parties { display: flex; justify-content: space-between; gap: 24px; height: 111px; padding-top: 22px; box-sizing: border-box; }
.qd-client { font-size: 15px; line-height: 22px; }
.qd-client strong { margin-right: 14px; }
.qd-small { font-size: 11.5px; line-height: 17px; }
.qd-parties .qd-small { margin-top: 4px; }
.qd-right { text-align: right; max-width: 300px; line-height: 20px; }
.qd-right strong { font-size: 15px; line-height: 22px; }
.qd-table { width: 548px; margin: 0 auto; border-collapse: collapse; table-layout: fixed; }
.qd-col-desc { width: 330px; } .qd-col-qty { width: 120px; } .qd-col-price { width: 98px; }
.qd-table th { height: 62px; padding: 0; font-weight: 800; font-size: 14px; text-align: center; vertical-align: middle; border-bottom: 1.4px solid #1b1c1f; }
.qd-table td { padding: 0 6px; vertical-align: middle; border-bottom: 1.4px solid #1b1c1f; font-variant-numeric: tabular-nums; }
.qd-table td:last-child { padding: 0; white-space: nowrap; }
.qd-item td { height: 88px; padding-top: 10px; padding-bottom: 10px; box-sizing: border-box; }
.qd-sum td { height: 63px; }
.qd-total td { border-bottom: 0; font-size: 14.5px; }
.qd-c { text-align: center; }
.qd-nw { white-space: nowrap; }
/* Última hoja (medidas del diseño de Nosa): sin tarjeta; datos bancarios en negritas, condiciones justificadas
   y la forma azul redondeada al pie. */
.qd-last { height: 1056px; padding: 0 96px; overflow: hidden; }
.qd-last .qd-head { padding-top: 49px; }
.qd-last .qd-logo { margin-top: 9px; }
.qd-last .qd-rule { margin-top: 20px; }
.ql-bank { margin-top: 125px; font-weight: 700; font-size: 15px; line-height: 20px; letter-spacing: .03em; }
.ql-terms { margin-top: 44px; font-size: 13px; line-height: 18px; text-align: justify; letter-spacing: .03em; }
.ql-terms p { margin: 0; }
.ql-foot { position: absolute; left: 0; right: 0; bottom: -40px; height: 131px; background: #1530f5; border-radius: 136px 136px 0 0; }
.ql-foot span { position: absolute; left: 93px; top: 34px; color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .06em; }
.qd-note { width: 548px; margin: 10px auto 0; font-size: 11.5px; line-height: 17px; }
.qd-site { position: absolute; left: 96px; bottom: 47px; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .08em; }
.big-btn.wa { background: #25d366; color: #06301a; }

@media print {
  body * { visibility: hidden; }
  body:not(.print-quote) .receipt, body:not(.print-quote) .receipt * { visibility: visible; }
  body:not(.print-quote) .receipt { position: absolute; left: 0; top: 0; width: 72mm; max-width: none; padding: 0; color: #000; page: ticket; }
  .re-preview { position: static; max-height: none; overflow: visible; background: none; padding: 0; }
  body.print-quote > :not(#printRoot) { display: none !important; }
  body.print-quote #printRoot, body.print-quote #printRoot * { visibility: visible; }
  body.print-quote #printRoot { display: block; }
  body.print-quote #printRoot .qd-pages { display: block; transform: none !important; }
  body.print-quote #printRoot .quote-doc { page: quote; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.print-quote #printRoot .quote-doc:last-child { break-after: auto; }
  dialog.sheet { position: static; max-height: none; overflow: visible; }
  dialog.sheet .sheet-body { overflow: visible; }
  @page { margin: 14mm; }
  @page ticket { size: 80mm auto; margin: 4mm; }
  @page quote { size: letter; margin: 0; }
}

/* ---------- Vendedor en pantalla ---------- */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.userbar { padding: 12px 16px 0; max-width: 980px; width: 100%; margin: 0 auto; }
.userbar-btn {
  display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 4px 8px 4px 0;
  color: var(--ink); text-align: left; max-width: 100%;
}
.ub-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ub-text strong { font-size: 1.1rem; }
.ub-text span { color: var(--muted); font-size: .92rem; }
.avatar-c {
  border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center;
  background: var(--card); color: var(--ink); font-weight: 700; border: 2px solid var(--line);
}
.main { padding-top: 8px; }
@media (min-width: 1024px) {
  .userbar { padding: 20px 32px 0; max-width: none; }
}

/* ---------- Ficha de producto y existencias ---------- */
.pd-head { display: flex; gap: 16px; align-items: center; }
.pd-price { font-size: 1.5rem; font-weight: 800; }
.levels { display: flex; flex-direction: column; gap: 8px; }
.level {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--card);
  border: 0; color: var(--ink); text-align: left; width: 100%;
}
.level.here { box-shadow: inset 0 0 0 2px var(--blue); }
.level .name { font-weight: 600; font-size: 1.08rem; }
.level .meta { color: var(--muted); font-size: .9rem; }
.level.as-btn:hover { background: var(--card-hover); }
.qty-big { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.foot-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.foot-grid .big-btn { margin: 0; padding: 18px 10px; font-size: 1.05rem; text-align: center; }
.level .grow { flex: 1; min-width: 0; }
@media (max-width: 480px) {
  .foot-grid { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .foot-grid .big-btn { padding: 15px 8px; }
  .foot-grid .big-btn.primary, .foot-grid .big-btn:only-child { grid-column: 1 / -1; }
}

/* Etiquetas de estado */
.tag.st-requested { background: rgba(246, 183, 60, .18); color: var(--yellow); }
.tag.st-sent { background: rgba(31, 94, 255, .2); color: var(--link); }
.tag.st-received { background: rgba(127, 224, 137, .16); color: var(--green); }
.tag.st-canceled { background: rgba(255, 90, 79, .16); color: var(--red); }
.count-dot {
  background: var(--blue); color: var(--blue-ink); border-radius: 99px; min-width: 28px; height: 28px; padding: 0 8px;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}

/* Foto en el menú Más y en Empleados */
.more-head { align-items: center; }
.more-head .grow { flex: 1; min-width: 0; }
.photo-edit { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 8px; }

/* Barra con 6 secciones: en celular solo íconos; en computadora, ícono con su nombre. */
.tab-label { display: none; }
@media (max-width: 400px) { .tabbar svg { width: 26px; height: 26px; } .badge { left: calc(50% + 2px); } }
@media (min-width: 1024px) {
  .tabbar { grid-auto-flow: row; grid-auto-rows: 84px; }
  .tabbar button { gap: 4px; align-content: center; }
  .tab-label { display: block; font-size: .72rem; font-weight: 600; }
}

/* Comisiones: selector de periodo */
.period-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.period-bar .square-btn { width: 52px; height: 52px; color: var(--ink); }
.period-bar .square-btn:disabled { opacity: .35; }
.period-label { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }

/* Cobro: formas de pago en cuadrícula */
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 4px 0 14px; }
.pay-methods label span {
  display: flex; align-items: center; min-height: 54px; padding: 10px 12px; border-radius: 12px; background: var(--card);
  font-weight: 600; font-size: .98rem; line-height: 1.2; cursor: pointer;
}
.pay-methods input { position: absolute; opacity: 0; pointer-events: none; }
.pay-methods input:checked + span { background: var(--blue); color: var(--blue-ink); }
.pay-methods input:focus-visible + span { outline: 2px solid var(--link); }
@media (min-width: 700px) { .pay-methods { grid-template-columns: repeat(3, 1fr); } }

/* Entregas */
.evidence img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 14px; background: #000; margin: 8px 0; }
.photo-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.photo-pick .big-btn { padding: 16px 8px; font-size: 1rem; }
.quick-link { display: inline-block; background: var(--card); color: var(--link); border-radius: 10px; padding: 10px 14px; font-weight: 600; text-decoration: none; }
.quick-link { border: 0; cursor: pointer; font-size: .98rem; }
.quick-link.wa-link { background: #25d366; color: #06301a; }

/* ---------- Kiosko de autoservicio (pantalla del cliente, tablet) ---------- */
body.kiosk-mode { --k-blue: #0d33ff; --k-ink: #15171c; --k-soft: #f2f4f8; background: #fff; color: var(--k-ink); }
body.kiosk-mode .cart-btn, body.kiosk-mode .toast { display: none; }
.k-screen { min-height: 100vh; min-height: 100dvh; box-sizing: border-box; padding: 18px clamp(16px, 4vw, 40px) 40px; display: flex; flex-direction: column; font: 500 18px/1.4 -apple-system, "Helvetica Neue", Arial, sans-serif; -webkit-user-select: none; user-select: none; }
.k-screen h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; margin: 10px 0 18px; }
.k-welcome { align-items: center; justify-content: center; text-align: center; gap: 10px; background: linear-gradient(180deg, #fff 0%, #fff 62%, var(--k-soft) 100%); }
.k-welcome p { font-size: 1.3rem; color: #4a4f5c; margin: 0 0 26px; }
.k-logo-big { width: min(420px, 70vw); filter: brightness(0); margin-bottom: 20px; }
.k-top { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; }
.k-logo { height: 34px; filter: brightness(0); }
.k-hello { flex: 1; text-align: right; font-weight: 700; font-size: 1.1rem; }
.k-btn { border: 2px solid var(--k-ink); background: #fff; color: var(--k-ink); border-radius: 18px; padding: 16px 26px; font: 800 1.15rem/1.2 inherit; font-family: inherit; min-height: 64px; cursor: pointer; }
.k-btn:disabled { opacity: .4; }
.k-primary { background: var(--k-blue); border-color: var(--k-blue); color: #fff; }
.k-huge { font-size: 1.6rem; padding: 24px 70px; border-radius: 26px; min-width: min(420px, 80vw); }
.k-narrow { width: 100%; max-width: 620px; margin: 0 auto; }
.k-wide { max-width: 860px; }
.k-field { display: block; font-weight: 700; margin-bottom: 18px; }
.k-field input { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; font: 500 1.35rem inherit; font-family: inherit; padding: 18px 20px; border: 2px solid #c9ccd4; border-radius: 16px; background: #fff; color: var(--k-ink); -webkit-user-select: text; user-select: text; }
.k-field input:focus { outline: none; border-color: var(--k-blue); box-shadow: 0 0 0 4px rgba(13, 51, 255, .15); }
.k-row { display: flex; gap: 14px; margin-top: 10px; }
.k-row .k-btn { flex: 1; }
.k-err { color: #d22; font-weight: 700; min-height: 1.4em; margin: 6px 0; }
.k-hint { color: #5d6270; text-align: center; font-size: 1.05rem; margin: 24px auto; max-width: 560px; }
.k-search { display: flex; align-items: center; gap: 12px; border: 2px solid var(--k-ink); border-radius: 22px; padding: 6px 20px; background: #fff; }
.k-search svg { width: 30px; height: 30px; flex: none; }
.k-search input { flex: 1; min-width: 0; border: 0; outline: none; font: 600 1.4rem inherit; font-family: inherit; padding: 16px 0; background: none; color: var(--k-ink); -webkit-user-select: text; user-select: text; }
.k-cart { display: flex; align-items: center; gap: 10px; background: var(--k-ink); color: #fff; border: 0; border-radius: 18px; padding: 12px 18px; font: 700 1.05rem inherit; font-family: inherit; min-height: 56px; }
.k-cart svg { width: 26px; height: 26px; }
.k-cart strong { background: var(--k-blue); border-radius: 12px; padding: 6px 12px; }
.k-cart:disabled { opacity: .35; }
.k-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 18px; }
.k-results .k-hint { grid-column: 1 / -1; }
.k-card { border: 1.5px solid #e2e5eb; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.k-img { aspect-ratio: 1; border-radius: 14px; background: var(--k-soft); display: grid; place-items: center; overflow: hidden; }
.k-img img { width: 100%; height: 100%; object-fit: contain; }
.k-img svg { width: 40%; height: 40%; color: #a4a9b5; }
.k-img.small { width: 64px; height: 64px; flex: none; }
.k-name { font-weight: 700; font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.k-sku { color: #6c717d; font-size: .9rem; }
.k-price { font-size: 1.5rem; font-weight: 800; margin-top: auto; }
.k-stock { color: #13843a; font-weight: 700; font-size: .95rem; }
.k-card .k-btn { padding: 12px; min-height: 54px; font-size: 1.05rem; }
.k-lines { border-top: 1.5px solid #e2e5eb; }
.k-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1.5px solid #e2e5eb; }
.k-grow { flex: 1; min-width: 0; }
.k-qty { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.3rem; }
.k-qty button { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--k-ink); background: #fff; font: 800 1.5rem inherit; font-family: inherit; color: var(--k-ink); }
.k-qty button:disabled { opacity: .3; }
.k-amt { width: 120px; text-align: right; font-weight: 800; font-size: 1.15rem; }
.k-del { border: 0; background: none; color: #d22; padding: 10px; }
.k-del svg { width: 26px; height: 26px; }
.k-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.3rem; margin: 22px 0 8px; }
.k-total strong { font-size: 2.2rem; font-weight: 800; }
.k-done .k-check { width: 110px; height: 110px; border-radius: 50%; background: #13a24a; color: #fff; font-size: 4rem; display: grid; place-items: center; }
.k-ticket { border: 2px solid var(--k-ink); border-radius: 22px; padding: 22px 34px; margin: 0 0 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; }
.k-ticket strong { font-size: 2.6rem; letter-spacing: .08em; }
.k-ticket span { font-size: 1.3rem; font-weight: 700; }
.k-barcode { width: 300px; height: 70px; }
.k-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 12, 20, .55); display: grid; place-items: center; padding: 16px; }
.k-modal-card { background: #fff; color: var(--k-ink); border-radius: 26px; padding: 28px; width: min(420px, 100%); text-align: center; }
.k-modal-card h2 { margin: 0 0 6px; font-size: 1.7rem; }
.k-modal-card .k-btn { width: 100%; margin-top: 14px; }
.k-dots { display: flex; justify-content: center; gap: 12px; margin: 16px 0 4px; }
.k-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--k-ink); }
.k-dots span.on { background: var(--k-ink); }
.k-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.k-pad button { height: 64px; border-radius: 16px; border: 0; background: var(--k-soft); font: 800 1.4rem inherit; font-family: inherit; color: var(--k-ink); }
.k-pad [data-p="ok"] { background: var(--k-blue); color: #fff; font-size: 1.1rem; }
.k-pad [data-p="x"] { font-size: 1rem; }
@media (max-width: 640px) {
  .k-line { flex-wrap: wrap; } .k-amt { width: auto; } .k-hello { display: none; }
  .k-results { grid-template-columns: repeat(2, 1fr); gap: 10px; } .k-row { flex-direction: column-reverse; }
}
.k-sub { color: #4a4f5c; font-size: 1.15rem; margin: -6px 0 22px; }
.k-center { text-align: center; }
.k-center .k-row { margin-top: 26px; }
.k-link { display: block; margin: 22px auto 0; border: 0; background: none; color: var(--k-blue); font: 700 1.1rem inherit; font-family: inherit; text-decoration: underline; padding: 10px; }
.k-invoice { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--k-soft); border-radius: 18px; padding: 14px 18px; font-weight: 800; font-size: 1.2rem; }
.k-seg { display: flex; background: #fff; border: 2px solid var(--k-ink); border-radius: 14px; overflow: hidden; }
.k-seg button { border: 0; background: #fff; padding: 12px 26px; font: 800 1.1rem inherit; font-family: inherit; color: var(--k-ink); }
.k-seg button.on { background: var(--k-ink); color: #fff; }
.k-pay { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 18px; }
.k-paybtn { display: flex; align-items: center; gap: 14px; text-align: left; border: 2px solid #d6d9e0; background: #fff; border-radius: 18px; padding: 16px; min-height: 84px; color: var(--k-ink); font-family: inherit; }
.k-paybtn svg { width: 34px; height: 34px; flex: none; color: var(--k-blue); }
.k-paybtn strong { display: block; font-size: 1.1rem; }
.k-paybtn small { display: block; color: #5d6270; font-size: .92rem; margin-top: 2px; }
.k-paybtn:active, .k-paybtn:focus-visible { border-color: var(--k-blue); }
.k-paybtn:disabled { opacity: .5; }
.k-terminal { width: 120px; height: 120px; border-radius: 30px; background: var(--k-blue); color: #fff; display: grid; place-items: center; animation: k-pulse 1.6s ease-in-out infinite; }
.k-terminal svg { width: 64px; height: 64px; }
@keyframes k-pulse { 50% { transform: scale(1.06); } }
.k-bank { align-items: stretch; gap: 10px; min-width: min(460px, 90vw); }
.k-bank div { display: flex; justify-content: space-between; gap: 16px; }
.k-bank span { font-size: 1.05rem; color: #5d6270; font-weight: 600; }
.k-bank strong { font-size: 1.25rem; letter-spacing: .02em; }
.pin-paste { display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 0; font-size: 1.05rem; }
.pin-paste svg { width: 20px; height: 20px; }
.pair-code { font-size: 3rem; font-weight: 800; letter-spacing: .25em; text-align: center; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.promo-list { display: flex; gap: 10px; flex-wrap: wrap; }
.promo-thumb { width: 150px; }
.promo-thumb img { width: 150px; height: 66px; object-fit: cover; border-radius: 10px; display: block; }

/* Cotización con el formato que ya usa Nosa (P61403): blanca, letra ligera, medidas del PDF. Hoja 816 × 1056 px. */
.qn-doc { padding: 40px 83px 48px; font: 300 14px/18px "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .01em; color: #1b1c1f; }
.qn-doc strong { font-weight: 700; }
.qn-head { display: flex; justify-content: space-between; align-items: flex-start; }
.qn-logo { width: 193px; margin-top: 70px; filter: brightness(0); }
.qn-who { text-align: right; font-size: 14.5px; line-height: 18px; }
.qn-who .r-barcode { width: 128px; height: 32px; display: block; margin: 0 0 6px auto; }
.qn-parties { display: flex; justify-content: space-between; gap: 30px; margin-top: 92px; }
.qn-parties strong { display: block; margin-bottom: 6px; font-size: 14px; }
.qn-right { text-align: right; }
.qn-small { font-size: 12px; line-height: 16px; margin-top: 4px; max-width: 360px; }
.qn-table { width: 100%; border-collapse: collapse; margin-top: 26px; border-top: 2px solid #1b1c1f; border-bottom: 2px solid #1b1c1f; table-layout: fixed; }
.qn-table th { font-weight: 700; font-size: 14px; text-align: left; padding: 22px 0 12px; }
.qn-table td { padding: 8px 0; vertical-align: middle; font-variant-numeric: tabular-nums; }
.qn-table tr { break-inside: avoid; }
.qn-table tbody tr:last-child td { padding-bottom: 20px; }
.qn-r { text-align: right !important; }
.qn-c { text-align: center !important; }
.qn-img { width: 57px; height: 57px; border: 1px solid #e6e8ee; display: grid; place-items: center; overflow: hidden; background: #fff; }
.qn-img img { width: 100%; height: 100%; object-fit: contain; }
.qn-desc { padding-left: 16px !important; padding-right: 12px !important; text-transform: uppercase; overflow-wrap: anywhere; }
.qn-totals { margin: 56px 0 0 auto; width: 300px; }
.qn-totals div { display: flex; justify-content: space-between; padding: 3px 0; font-weight: 700; }
.qn-grand span:first-child { padding-left: 18px; }
.qn-note { margin: 18px 0 0; font-size: 13px; }
.qn-fiscal { text-align: center; margin-top: 60px; font-size: 14.5px; line-height: 18px; }
.qn-gap { height: 18px; }
.qn-terms { margin-top: 14px; font-size: 12.5px; line-height: 15.5px; }
.qn-terms p { margin: 0 0 5px; }
.qn-last { height: 1056px; }
.qn-last { min-height: 1056px; height: auto; }
.qn-rule { border-top: 2px solid #1b1c1f; margin-top: 40px; }
.qn-bank { margin-top: 60px; font-size: 15px; line-height: 22px; }
.qn-bank > strong:first-child { display: block; margin-bottom: 8px; }
.qn-banktable { margin-top: 64px; }
.qn-banktable td { padding: 7px 0; font-size: 14.5px; }
.qn-banktable tbody tr:last-child td { padding-bottom: 20px; }
.qn-last .qn-totals { margin-top: 34px; }
.qn-last .qn-terms { margin-top: 40px; font-size: 14.5px; line-height: 18px; }
.qn-last .qn-terms p { margin: 0 0 7px; }
