:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  /* Gris: relleno de botones y pestañas activas (texto blanco encima) */
  --primary: #52525b;
  --primary-dark: #3f3f46;
  --on-primary: #ffffff;
  /* Gris oscuro para textos, links y bordes sobre fondo blanco */
  --acento: #3f3f46;
  --tinte: #f4f4f5;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
  --side: #111827;
  --marca: #a2ff9b; /* verde de Panter: solo el logo del menú */
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0 0 12px; }
h2 { font-size: 20px; }
a { color: var(--acento); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #111827, #3f3f46); }
.login-card { background: var(--panel); padding: 32px; border-radius: 12px; width: min(360px, 92vw); display: grid; gap: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.login-card h1 { font-size: 24px; }
.login-card h1 span { color: var(--acento); font-weight: 500; }

.demo-card { width: min(420px, 92vw); }
.demo-aviso { margin: 0; color: var(--muted); }
.demo-usuarios { display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.demo-usuario { font: inherit; text-align: left; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.demo-usuario span { color: var(--muted); font-size: 13px; }
.demo-usuario:hover, .demo-usuario:focus { border-color: var(--acento); background: var(--tinte); outline: none; }

/* Layout */
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: #d1d5db; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { font-size: 22px; font-weight: 700; color: #fff; padding: 18px 20px 18px 62px; }
/* Logo PANTER (el mismo de las facturas), pintado con el verde de la marca */
.brand-logo { display: block; width: 136px; height: 22px; margin-top: 7px; background: var(--marca);
  -webkit-mask: url(img/logo-panter-menu.png) left center / contain no-repeat; mask: url(img/logo-panter-menu.png) left center / contain no-repeat; }
/* Menú plegable: el botón queda siempre arriba a la izquierda; plegado, el contenido ocupa todo el ancho */
.menu-btn { position: fixed; top: 14px; left: 14px; z-index: 60; width: 36px; height: 36px; border-radius: 8px; border: 1px solid #374151;
  background: var(--side); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.menu-btn:hover { background: #1f2937; }
.layout.plegado { grid-template-columns: minmax(0, 1fr); }
.layout.plegado .sidebar { display: none; }
.layout.plegado > main { padding-left: 66px; }
#nav { flex: 1; overflow: auto; }
#nav a { display: block; padding: 10px 20px; color: #d1d5db; text-decoration: none; border-left: 3px solid transparent; }
#nav a:hover { background: #1f2937; color: #fff; }
#nav a.active { background: #1f2937; color: #fff; border-left-color: #a1a1aa; }
#nav .sep { padding: 14px 20px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6b7280; }
/* Secciones desplegables del menú */
#nav .nav-grupo { border-top: 1px solid #1f2937; }
#nav .nav-sec { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 20px; background: none; border: 0;
  color: #9ca3af; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-align: left; }
#nav .nav-sec:hover { background: #1f2937; color: #fff; }
#nav .nav-sec:focus-visible { outline: 2px solid var(--acento); outline-offset: -2px; }
#nav .con-activo > .nav-sec { color: #fff; }
#nav .nav-sec .chev { transition: transform .15s; flex: none; }
#nav .abierto > .nav-sec .chev { transform: rotate(90deg); }
#nav .nav-items { display: none; padding-bottom: 6px; }
#nav .abierto > .nav-items { display: block; }
#nav .nav-items a { padding: 8px 20px 8px 30px; font-size: 14px; }
.ctx { padding: 0 14px 12px; display: grid; gap: 8px; border-bottom: 1px solid #1f2937; }
.ctx label { color: #9ca3af; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.ctx select { background: #1f2937; color: #fff; border-color: #374151; padding: 6px 8px; font-size: 13px; text-transform: none; letter-spacing: 0; }
.ctx select:disabled { opacity: 1; }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
.tab { font: inherit; border: 0; background: none; padding: 8px 16px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--acento); border-bottom-color: var(--acento); font-weight: 600; }
.perm-arbol { border: 1px solid var(--line); border-radius: 8px; height: 340px; overflow: auto; padding: 6px; }
.perm-mod { background: #3f3f46; color: #fff; font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 4px; margin: 4px 0; }
/* Árbol de permisos por módulo: interruptor del módulo, pantallas y "qué puede hacer" un nivel adentro */
.perm-mod.perm-padre { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.perm-sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px 2px 18px; }
.perm-row.perm-hijo { padding-left: 26px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-bottom: 1px dotted var(--line); }
.perm-lbl { flex: 1; }
.perm-lim { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.perm-lim input { width: 80px; padding: 3px 6px; }
.sw { display: inline-block; position: relative; width: 58px; height: 26px; flex: none; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw-txt { position: absolute; inset: 0; border-radius: 13px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: flex-end; padding: 0 9px; transition: background .15s; pointer-events: none; }
.sw-txt::before { content: 'NO'; }
.sw-txt::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw input:checked + .sw-txt { background: #16a34a; justify-content: flex-start; }
.sw input:checked + .sw-txt::before { content: 'SÍ'; }
.sw input:checked + .sw-txt::after { left: 35px; }
.sw input:focus-visible + .sw-txt { outline: 2px solid var(--acento); outline-offset: 2px; }
.sw input:disabled + .sw-txt { opacity: .55; }
.perm-buscar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.arbol-tit { font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 6px; }
.arbol { border: 1px solid var(--line); border-radius: 8px; max-height: 280px; overflow: auto; padding: 6px 10px; display: grid; gap: 2px; }
.arbol label { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; padding: 3px 0; }
.arbol input { width: auto; }
.arbol-caja { padding-left: 8px !important; }
.arbol-caja input:disabled + * { opacity: .5; }
.user { padding: 14px 20px; border-top: 1px solid #1f2937; font-size: 13px; }
.user .btn.link { color: #93c5fd; padding: 0; }
main { padding: 24px; min-width: 0; }

/* Componentes */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h2 { margin: 0 auto 0 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.grid { display: grid; gap: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.card .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.card .val { font-size: 24px; font-weight: 700; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; width: 100%; }
input:focus, select:focus { outline: 2px solid var(--primary); border-color: var(--acento); }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.btn { font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid #d1d5db; background: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f3f4f6; }
.btn.primary { background: var(--primary); border-color: var(--primary-dark); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.small { padding: 4px 8px; font-size: 12px; }
.btn.link { border: 0; background: none; color: var(--acento); }
.sidebar .btn.link { color: #d4d4d8; }
.btn.big { padding: 14px 20px; font-size: 16px; font-weight: 600; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f9fafb; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:hover td { background: #fafafa; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e5e7eb; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.yellow { background: #fef3c7; color: #92400e; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.blue { background: #dbeafe; color: #1e40af; }
.error { color: var(--danger); min-height: 1em; margin: 0; }
.muted { color: var(--muted); }
.right { text-align: right; }

/* POS */
.pos { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.search-box { position: relative; }
.search-box input { font-size: 16px; padding: 12px; }
.results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,.1); max-height: 320px; overflow: auto; }
.results div { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.results div:hover, .results div.sel { background: var(--tinte); }
.cart input { width: 90px; padding: 4px 6px; text-align: right; }
.total-box { font-size: 30px; font-weight: 800; text-align: right; margin: 8px 0 12px; }
.tipo-letra { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--text); font-weight: 800; font-size: 20px; border-radius: 4px; }
.side-form { display: grid; gap: 12px; }

/* Chart */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars .bar span { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 12px; padding: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.modal .fields .full { grid-column: 1 / -1; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Ficha de cliente (grilla de 12 columnas) */
.modal.wide { width: min(980px, 100%); }
.modal.small { width: min(400px, 100%); }
.modal.medium { width: min(560px, 100%); }
.tipo-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.tipo-card { font: inherit; text-align: left; display: grid; gap: 6px; padding: 16px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.tipo-card b { font-size: 17px; }
.tipo-card span { color: var(--muted); font-size: 13px; }
.tipo-card:hover, .tipo-card:focus { border-color: var(--acento); background: var(--tinte); outline: none; }
.form-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.form-head h3 { margin: 0; }
.tipo-sel { width: 220px; }
.entrega { display: grid; gap: 8px; background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 8px; padding: 10px 12px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; cursor: pointer; }
.check input { width: auto; }
.g12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px 12px; margin-bottom: 8px; }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; }
.c6 { grid-column: span 6; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.g12 > * { min-width: 0; }
.cli-form input, .cli-form select, .cli-form textarea { padding: 6px 8px; }
.cli-form textarea { resize: vertical; }
.cli-form input:disabled { background: #f3f4f6; color: #9ca3af; }
.req { color: var(--danger); }
.c9 { grid-column: span 9; }
.c1 { grid-column: span 1; } .c5 { grid-column: span 5; } .c7 { grid-column: span 7; }
.c10 { grid-column: span 10; } .c11 { grid-column: span 11; }
.sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--acento); border-bottom: 1px solid var(--line); padding: 6px 0 4px; margin-top: 4px; }
.hint { font-size: 12px; align-self: end; padding-bottom: 6px; }
.with-btn { display: flex; gap: 4px; }
.with-btn .btn { padding: 4px 9px; }
.radio-field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.radios { display: flex; gap: 14px; align-items: center; border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 10px; background: #fff; }
.radios label { display: flex; gap: 4px; align-items: center; color: var(--text); }
.radios input { width: auto; }
.obs-venta { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; }

/* Alta de pedido */
.modal.ped-modal { padding: 0; width: min(1000px, 100%); }
.ped > .g12, .ped > .ped-tabla, .ped > .ped-pie, .ped > .error, .ped > .actions { margin-left: 16px; margin-right: 16px; }
.ped > .actions { padding: 12px 0 16px; }
.ped-head { background: #38b6e6; color: #fff; font-size: 22px; padding: 10px 16px; margin-bottom: 12px; border-radius: 12px 12px 0 0; }
.ped-head span { font-size: 13px; opacity: .85; margin-left: 8px; }
.ped .search-box { position: relative; }
.ped-tabla { border: 1px solid var(--line); border-radius: 6px 6px 0 0; height: 260px; overflow: auto; margin-top: 12px; }
.ped-tabla th { background: #2d2d2d; color: #fff; position: sticky; top: 0; }
.ped-tabla td input { padding: 3px 6px; text-align: right; }
/* Pedido interno: como un remito (stock del origen en vez de precios) */
/* Posventa: constancia de recepción */
.pv-const { font-size: 12px; line-height: 1.5; }
.pv-const-cab { display: flex; justify-content: space-between; border-bottom: 1px solid #000; padding-bottom: 4px; }
.pv-firmas { display: flex; gap: 20px; margin-top: 28px; }
.pv-firmas > div { flex: 1; border-top: 1px solid #000; text-align: center; padding-top: 4px; font-size: 11px; }
/* Tablero de posventa / servicio técnico */
.pv-tablero { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; align-items: start; }
.pv-col { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-height: 120px; }
.pv-col-tit { font-weight: 700; font-size: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.pv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-bottom: 8px; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.pv-card:hover { border-color: var(--acento); }
.pv-card-top { display: flex; align-items: center; gap: 6px; }
.pv-card-top .muted { margin-left: auto; }
.pv-card-serv { color: var(--acento); }
/* Stock RMA por unidad: contadores por estado, historial y etiquetas (8 por A4) */
.rma-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.rma-chip { border: 1px solid var(--line); background: var(--panel); color: inherit; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 12px; text-align: left; }
.rma-chip b { display: block; font-size: 20px; line-height: 1.1; }
.rma-chip.act { border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); }
.rma-hist { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; }
.rma-ev { border-left: 3px solid var(--acento); padding: 2px 0 2px 10px; font-size: 13px; }
.pg-rma { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 66mm); gap: 4mm; padding: 4mm; color: #000; background: #fff; }
.rma-etq { border: 1px dashed #777; padding: 4mm 5mm; display: flex; flex-direction: column; gap: 1.5mm; font-size: 10pt; overflow: hidden; }
.rma-etq-cod { font-size: 22pt; font-weight: 800; letter-spacing: .02em; border-bottom: 2px solid #000; padding-bottom: 1mm; }
.rma-etq-prod { font-size: 12pt; font-weight: 700; }
.rma-etq-prob { font-size: 9pt; }
.rma-etq-pie { margin-top: auto; font-size: 8pt; border-top: 1px solid #000; padding-top: 1mm; }
tr.clic { cursor: pointer; } tr.clic:hover td { background: #f9fafb; }
/* Logística → Envíos a entregar */
.sem { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.sem-verde { background: #16a34a; } .sem-amarillo { background: #eab308; } .sem-rojo { background: #dc2626; }
.fe-dia { margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 2px solid #e5e7eb; }
.fe-dia.fe-atrasado { color: #b91c1c; border-color: #fecaca; }
.fe-zona { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.fe-zona .btn { margin-left: auto; }
.fe-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; position: sticky; top: 0; background: var(--bg, #fff); z-index: 2; padding: 6px 0; }
.fe-tabla td { vertical-align: top; }
.fe-tabla tr.sel td { background: var(--tinte); }
.badge.log-pendiente { background: #f3f4f6; color: #374151; } .badge.log-preparado { background: #dbeafe; color: #1e40af; }
.badge.log-en_camino { background: #fef3c7; color: #92400e; } .badge.log-entregado { background: #dcfce7; color: #166534; } .badge.log-no_entregado { background: #fee2e2; color: #991b1b; }
.pg-ruta { padding: 10mm; font-size: 11px; }
.pg-ruta table.ruta { width: 100%; border-collapse: collapse; margin-top: 8px; }
.pg-ruta table.ruta th, .pg-ruta table.ruta td { border: 1px solid #000; padding: 4px; vertical-align: top; text-align: left; }
.pref-envio { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.pref-envio > span { color: var(--muted, #6b7280); }
.pref-envio .btn { align-self: flex-start; }
.pref-envio #pPrefTxt { font-size: 12px; }
.ped .col-int { display: none; }
.ped.ped-interno .col-int { display: table-cell; }
.ped.ped-interno .col-cli { display: none; }
.ped-pie { background: #e5e7eb; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 0 0 6px 6px; }
.ped input[readonly] { background: #f9fafb; }
.total-input { font-weight: 800; }
.fp-box { margin: 14px 16px 0; border: 2px solid #8cc63f; border-radius: 6px; }
.fp-head { background: #8cc63f; color: #fff; font-weight: 700; padding: 6px 10px; }
.fp-body { padding: 10px 12px; display: grid; gap: 10px; }
.fp-tabla th { background: #2d2d2d; color: #fff; }
.fp-tabla td { padding: 5px 6px; }
.fp-tabla select, .fp-tabla input { padding: 5px 6px; }
.fp-det { font-size: 12px; color: #444; }
.fp-det select { width: auto; margin-right: 8px; }
.fp-acciones { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-add { color: #3d6b10; border-color: #8cc63f; font-weight: 700; }
.fp-ok, .fp-falta, .fp-mas { padding: 6px 10px; font-weight: 700; border-radius: 4px; }
.fp-ok { color: #2d4f0c; background: #f1f9e6; }
.fp-falta { color: #8a4b00; background: #fff4e0; }
.fp-mas { color: #9b1c1c; background: #fde8e8; }
.fp-cond { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.fp-cond > span { font-weight: 700; }
.fp-cond label { display: inline-flex; align-items: center; gap: 6px; flex-direction: row; margin: 0; }
.fp-cond input[type=radio] { width: auto; }
.fp-cond .fp-plazo select { width: auto; }
.fp-vence { font-size: 13px; color: #2d4f0c; background: #f1f9e6; padding: 6px 10px; border-radius: 4px; }
.fp-det input { width: auto; margin-right: 6px; }
.plan-tarjetas { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 12px; }
.plan-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 6px 0; }
.plan-grilla label { font-size: 12px; }
.fp-det .fp-fecha { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; margin: 0 6px 0 0; font-size: 12px; }
.iibb-jur { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; padding: 6px 0; border-bottom: 1px dashed #ddd; }
@media (max-width: 700px) { .iibb-jur { grid-template-columns: minmax(0, 1fr); } }
.msel { position: relative; }
.msel-caja { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: text; min-height: 40px; }
.msel-chips { display: contents; }
.msel-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--tinte); color: var(--on-primary); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.msel-chip button { border: 0; background: transparent; cursor: pointer; color: inherit; font-size: 12px; padding: 0 4px; border-radius: 999px; }
.msel-chip button:hover { background: rgba(0,0,0,.1); }
.msel-vacio { font-size: 13px; }
.msel-input { flex: 1; min-width: 160px; border: 0 !important; outline: none; padding: 4px !important; box-shadow: none !important; }
.retira { display: block; margin: 12px 0; padding: 10px 12px; background: #fff8e6; border: 1px solid #f3d38b; border-radius: 8px; }
.retira select { margin-top: 6px; }
.arca-pie { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.arca-qr svg { width: 110px; height: 110px; display: block; }
.arca-logo { font-weight: 800; letter-spacing: .08em; font-size: 15px; }
.arca-homo { color: #b91c1c; font-weight: 700; margin-top: 4px; }
.arca-amb { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; display: grid; gap: 4px; }
.fp-promo { font-size: 12px; color: #8a4b00; background: #fff4e0; padding: 4px 8px; border-radius: 4px; margin: 4px 0; }
.fp-monto { white-space: nowrap; }
.fp-monto select { width: auto; padding: 5px 4px; margin-right: 4px; }
.fp-monto input { width: 120px; display: inline-block; }
.fp-mon { display: inline-block; min-width: 30px; text-align: center; color: #555; }
.fp-equiv { font-size: 11px; margin-top: 2px; white-space: normal; }
tr.vencida td { background: #fff4f4; }
tr.anulado td { color: #999; text-decoration: line-through; }
tr.anulado td .badge, tr.anulado td a { text-decoration: none; }
tr.fp-rec td { background: #f1f9e6; }
.radios.facturar { transition: background .15s; }
.radios.facturar.no { background: #ef4444; border-color: #dc2626; }
.radios.facturar.no label { color: #fff; }
.radios.facturar.si { background: #22c55e; border-color: #16a34a; }
.radios.facturar.si label { color: #fff; }

/* Feed de pedidos */
.feed { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.feed.sin-filtros { grid-template-columns: minmax(0, 1fr); }
.feed.sin-filtros .feed-filtros { display: none; }
.feed-toggle { position: relative; padding: 8px 10px; line-height: 0; }
.feed-toggle.activo { background: var(--primary); border-color: var(--primary-dark); color: var(--on-primary); }
.feed-n { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.feed-filtros { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 12px; }
.feed-filtro h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--acento); border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.feed-lista { max-height: 132px; overflow: auto; display: grid; gap: 3px; }
.feed-lista label { display: flex; gap: 6px; align-items: center; color: var(--text); font-size: 13px; }
.feed-lista input { width: auto; }
.feed-btns { display: flex; gap: 4px; margin-top: 5px; }
.feed-fechas { display: grid; gap: 6px; }
.feed-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
/* Informe por forma de pago: un recuadro por tipo de medio con su desglose */
.inf-resumen { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.inf-medio { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.inf-medio-tit { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.inf-medio-tit b { white-space: nowrap; }
.inf-medio table { width: 100%; margin-top: 6px; font-size: 12px; background: none; }
.inf-medio td { padding: 2px 0; border: 0; }
.inf-medio td.num { padding-left: 8px; white-space: nowrap; }
.feed-tab { font: inherit; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.feed-tab.active { background: var(--primary); border-color: var(--primary-dark); color: var(--on-primary); font-weight: 600; }
.feed-tab b { font-weight: 700; margin-left: 4px; }
/* Pestañas de canal con el mismo color que la columna Canal */
.feed-tab.ft-meli { background: #fde047; border-color: #eab308; color: #1f2937; }
.feed-tab.ft-web { background: #7c3f8f; border-color: #7c3f8f; color: #fff; }
.feed-tab.ft-meli.active, .feed-tab.ft-web.active { font-weight: 600; box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--text); }
.feed-tabla tr.feed-sec td { background: #3f3f46; color: #fff; text-align: center; letter-spacing: .05em; font-size: 13px; font-weight: 600; }
.feed-tabla tr.feed-fila { cursor: pointer; }
.feed-tabla td { font-size: 13px; }
.feed-tabla td.c-canal { color: #fff; font-weight: 700; font-size: 12px; white-space: nowrap; }
.canal-directa { background: #0b7fab; } .canal-web { background: #7c3f8f; } .canal-meli { background: #fde047; color: #1f2937 !important; } .canal-interno { background: #475569; }
.feed-tabla tr:hover td.canal-directa { background: #0b7fab; } .feed-tabla tr:hover td.canal-web { background: #7c3f8f; }
.feed-tabla tr:hover td.canal-meli { background: #fde047; } .feed-tabla tr:hover td.canal-interno { background: #475569; }
.est { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.est-PENDIENTE { background: #fde68a; color: #78350f; } .est-INGRESADO { background: #f59e0b; color: #1f2937; } .est-FACTURADO { background: #bfdbfe; color: #1e3a8a; }
.est-REMITIDO, .est-TRANSFERIDO { background: #bbf7d0; color: #14532d; } .est-CANCELADO { background: #fecaca; color: #7f1d1d; }
.col-lista { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-bottom: 14px; }
.col-lista label { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
.col-lista input { width: auto; }

.toast { position: fixed; right: 20px; bottom: 20px; padding: 12px 18px; border-radius: 8px; color: #fff; background: var(--ok); opacity: 0; transform: translateY(10px); transition: .2s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: var(--danger); }

/* Comprobante impreso */
.factura { background: #fff; max-width: 820px; margin: 0 auto; border: 1px solid #000; color: #000; font-size: 13px; }
.factura .head { display: grid; grid-template-columns: 1fr 80px 1fr; border-bottom: 1px solid #000; }
.factura .head > div { padding: 14px; }
.factura .letra { border-left: 1px solid #000; border-right: 1px solid #000; text-align: center; }
.factura .letra b { display: block; font-size: 40px; line-height: 1; }
.factura .letra small { font-size: 10px; }
.factura .cli { padding: 10px 14px; border-bottom: 1px solid #000; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.factura table th { background: #f0f0f0; color: #000; }
.factura table td, .factura table th { border-bottom: 1px solid #ddd; }
.factura .cli .full-row { grid-column: 1 / -1; }
.factura .tot { padding: 14px; display: flex; justify-content: flex-end; border-top: 1px solid #000; }
.factura .tot table { width: 320px; }
.factura .tot td { border: 0; padding: 3px 6px; }
.factura .tot tr.grand td { font-size: 18px; font-weight: 800; border-top: 1px solid #000; }
.factura .pie { border-top: 1px solid #000; padding: 10px 14px; font-size: 11px; }

/* Comprobante no fiscal (modelo Panter) */
.nf { background: #fff; color: #000; max-width: 794px; min-height: 1060px; margin: 0 auto; padding: 28px 0 20px; display: flex; flex-direction: column; font-size: 13px; }
.nf-top { display: grid; grid-template-columns: 1fr 44px 1fr; border-bottom: 1px solid #000; }
.nf-emp { padding: 0 16px 14px 28px; font-size: 11px; line-height: 1.25; }
.nf-emp img { display: block; width: 280px; max-width: 100%; margin-bottom: 8px; }
.nf-gap { margin-top: 4px; }
.nf-centro { display: flex; flex-direction: column; align-items: center; }
.nf-centro::after { content: ''; flex: 1; border-left: 1px solid #000; }
.nf-letra { width: 44px; height: 44px; border: 1px solid #000; display: grid; place-items: center; font-size: 30px; font-weight: 500; }
.nf-doc { text-align: center; padding: 0 16px 14px; }
.nf-doc small { font-size: 8px; display: block; }
.nf-nro { width: 180px; margin: 3px auto 24px; padding: 8px; border: 1px solid #000; border-radius: 6px; font-size: 15px; font-weight: 600; }
.nf-tit { font-size: 17px; }
.nf-mid { display: grid; grid-template-columns: 1fr 1fr; min-height: 150px; border-bottom: 1px solid #000; }
.nf-mid > div { padding: 12px 28px; line-height: 1.6; }
.nf-mid > div + div { border-left: 1px solid #000; }
.nf-sec { font-size: 11px; font-weight: 700; letter-spacing: .05em; border-bottom: 1px solid #000; margin-bottom: 4px; }
.nf-sec2 { margin-top: 10px; }
.nf-mid > div { font-size: 12px; line-height: 1.45; }
.nf-body { flex: 1; padding: 10px 20px; }
.nf table { background: none; }
.nf th { background: none; color: #000; border-bottom: 1px solid #000; }
.nf td { border-bottom: 1px solid #ddd; }
.nf tr:hover td { background: none; }
.nf-aviso { text-align: center; font-size: 28px; line-height: 1; padding-bottom: 8px; border-bottom: 1px solid #000; }
.nf-aviso span { display: block; font-size: 17px; margin-top: 4px; }
.nf-aviso .nf-escalera { font-size: 12px; line-height: 1.3; margin-top: 6px; padding: 4px 8px; border: 1px solid #000; }
.nf-pie { display: grid; grid-template-columns: 75% 25%; min-height: 170px; }
.nf-pie > div { padding: 12px 28px; }
.nf-total { border-left: 1px solid #000; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; padding: 12px 16px !important; }
.nf-total b { font-size: 18px; white-space: nowrap; }
/* Comprobantes fiscales (mismo modelo que el X): código, datos del emisor, IVA discriminado, leyenda B y pie de ARCA */
.nf-cod { font-size: 8px; white-space: nowrap; margin-top: 2px; }
.nf-fiscal { font-size: 11px; line-height: 1.4; text-align: left; display: inline-block; margin-top: 8px; }
.nf-det { display: flex; justify-content: space-between; gap: 8px; width: 100%; font-size: 11px; }
.nf-ley { font-size: 9px; color: #444; text-align: right; margin-top: 4px; }
.nf-pie .arca-pie { margin-bottom: 10px; }

@page { size: A4; margin: 8mm; }
@media print {
  .nf { max-width: none; min-height: calc(297mm - 16mm - 2px); padding-top: 0; padding-bottom: 0; }
  body { background: #fff; }
  .sidebar, .toolbar, .no-print, .toast, .menu-btn { display: none !important; }
  .layout.plegado > main { padding-left: 0; }
  .layout { display: block; }
  main { padding: 0; }
  .factura { border: 1px solid #000; max-width: none; }
}

/* ----- Impresión de factura + remito en talonario + etiquetas ----- */
#impresion { display: none; }
@page preimpreso { size: A4; margin: 0; }
@media print {
  body.imprimiendo > *:not(#impresion) { display: none !important; }
  body.imprimiendo #impresion { display: block; }
  body.imprimiendo { background: #fff; }
}
#impresion .pg { break-after: page; }
#impresion .pg:last-child { break-after: auto; }
.pg-pre, .pg-etq { page: preimpreso; position: relative; width: 210mm; height: 297mm; overflow: hidden; background: transparent; color: #000;
  font-family: Arial, Helvetica, sans-serif; }
.pre-campo { position: absolute; font-size: 10pt; line-height: 1.2; white-space: normal; }
.pre-bultos { font-size: 14pt; font-weight: 700; margin-top: 4mm; }
.pre-valor { font-size: 12pt; font-weight: 700; }
.pre-obs { margin-top: 2mm; }
.pre-firma { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr; gap: 6mm; font-size: 9pt; }
.pre-firma span { border-top: 1px solid #000; padding-top: 1mm; }
/* Hoja de prueba: reglas cada 10 mm en los bordes para medir cuánto hay que correr los datos a contraluz */
.pre-muestra { position: absolute; inset: 0; background:
  repeating-linear-gradient(90deg, #999 0 0.3mm, transparent 0.3mm 10mm) 0 0 / 100% 3mm no-repeat,
  repeating-linear-gradient(#999 0 0.3mm, transparent 0.3mm 10mm) 0 0 / 3mm 100% no-repeat; }
.pg-etq { display: grid; grid-template-rows: 1fr 1fr; }
.etq { box-sizing: border-box; height: 148.5mm; padding: 12mm 14mm; border-bottom: 1px dashed #999; display: flex; flex-direction: column; gap: 2mm; font-size: 11pt; }
.etq:last-child { border-bottom: 0; }
.etq-top { display: flex; justify-content: space-between; gap: 8mm; padding-bottom: 4mm; border-bottom: 2px solid #000; margin-bottom: 3mm; }
.etq-sec { font-size: 8pt; font-weight: 700; letter-spacing: .1em; color: #444; }
.etq-bulto { border: 2px solid #000; padding: 2mm 5mm; text-align: center; font-size: 9pt; font-weight: 700; white-space: nowrap; }
.etq-bulto b { display: block; font-size: 26pt; line-height: 1.1; }
.etq-nombre { font-size: 20pt; font-weight: 700; line-height: 1.15; }
.etq-dir { font-size: 16pt; }
.etq-loc { font-size: 24pt; font-weight: 800; text-transform: uppercase; }
.etq-datos { font-size: 12pt; }
.etq-pie { margin-top: auto; font-size: 10pt; border-top: 1px solid #000; padding-top: 2mm; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  #nav { display: flex; flex-wrap: wrap; }
  #nav .sep { display: none; }
  #nav .nav-grupo { flex: 0 0 100%; }
  #nav .abierto > .nav-items { display: flex; flex-wrap: wrap; }
  #nav .nav-items a { padding: 8px 14px; }
  .pos, .two { grid-template-columns: 1fr; }
  main { padding: 16px; }
  .modal .fields { grid-template-columns: 1fr; }
  .feed { grid-template-columns: minmax(0, 1fr); }
  .g12 { grid-template-columns: 1fr 1fr; }
  .g12 > div.solo-interno:empty, .g12 > div.solo-cliente:empty { display: none; }
  .tipo-cards { grid-template-columns: 1fr; }
  .form-head { flex-direction: column; }
  .g12 > * { grid-column: span 1; }
  .g12 > .c4, .g12 > .c5, .g12 > .c6, .g12 > .c7, .g12 > .c8, .g12 > .c9, .g12 > .c10, .g12 > .c11, .g12 > .c12 { grid-column: span 2; }
}

/* Mostrador: sugerencia de mover el compromiso de otro pedido (va dentro del mensaje de error) */
.error .prestamo { color: #333; background: #fff8e1; border: 1px solid #f0d77a; border-radius: 6px; padding: 8px 10px; margin-top: 6px; font-weight: 400; }
.error .prestamo > div { margin: 4px 0; }

/* Saldo a cobrar al recibir (seña / paga al recibir) */
.fp-pend.fp-saldo, .venta-vuelto .fp-saldo { color: #8a5a00; font-weight: 700; }
.factura .pend-pago td { font-size: 12px; }
.factura .pend-fuerte td { font-weight: 800; font-size: 14px; border-top: 2px solid #000; }
.nf-pendiente { grid-column: 1 / -1; justify-self: end; text-align: right; font-size: 16px; margin-top: 6px; padding: 4px 10px; border: 2px solid #000; }
.pre-cobrar { font-size: 15pt; font-weight: 800; border: 2px solid #000; padding: 1mm 3mm; display: inline-block; margin-top: 1mm; }
.etq-cobrar { font-size: 20pt; font-weight: 800; border: 3px solid #000; padding: 2mm 4mm; margin: 3mm 0; text-align: center; }
/* Recursos humanos: calendario de vacaciones y licencias */
table.cal { border-collapse: collapse; font-size: 12px; }
table.cal th.cal-h { min-width: 20px; padding: 2px; text-align: center; font-weight: 600; }
td.cal-d, span.cal-d { width: 20px; height: 20px; border: 1px solid var(--line); padding: 0; }
span.cal-d { display: inline-block; vertical-align: middle; margin: 0 4px 0 12px; }
.cal-dom { background: var(--bg); }
.cal-vac.cal-aprobada { background: var(--ok); }
.cal-vac.cal-solicitada { background: repeating-linear-gradient(45deg, var(--ok), var(--ok) 3px, transparent 3px, transparent 6px); }
.cal-lic.cal-aprobada { background: var(--warn); }
.cal-lic.cal-solicitada { background: repeating-linear-gradient(45deg, var(--warn), var(--warn) 3px, transparent 3px, transparent 6px); }
td.cal-grupo { background: var(--bg); font-weight: 700; padding: 4px 6px; }
.cal-ref { font-size: 12px; margin: 6px 0 10px; }
/* Sueldos: novedades del mes */
td.nov-d { cursor: pointer; font-size: 10px; font-weight: 700; text-align: center; min-width: 22px; }
td.nov-d:hover { outline: 2px solid var(--acento); }
.nov-fer { box-shadow: inset 0 0 0 2px var(--warn); }
.su-tabla td { vertical-align: top; }
/* Cotizador */
.cot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .cot-grid { grid-template-columns: 1fr; } }
.cot-pago { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 4px 0; border-top: 1px solid var(--line); }
.cot-pago b { font-size: 16px; }
.cot-plan { margin: 8px 0; }
/* Comercial: cotizador de envíos (como el plugin panter-envios) */
.pntr-app { max-width: 760px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin: 6px auto; }
.pntr-kicker { font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.pntr-app h2 { margin: 4px 0 2px; }
.pntr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.pntr-wide { grid-column: 1 / -1; }
.pntr-matches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pntr-selected { font-weight: 600; margin: 6px 0 0; }
.pntr-note { font-size: 12px; color: var(--muted); margin: 6px 0; }
.pntr-result { background: var(--bg); border-radius: 12px; padding: 14px 16px; margin: 10px 0; }
.pntr-total { font-size: 30px; font-weight: 800; margin: 4px 0; }
@media (max-width: 700px) { .pntr-grid { grid-template-columns: 1fr; } }
/* Comercial: cotizador de cuotas (como el plugin panter-cotizador) */
.pnt-cot { box-sizing: border-box; max-width: 624px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 21px; margin: 6px auto; font-size: 17px; background: var(--panel); }
.pnt-cot [hidden] { display: none !important; }
.pnt-cot__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.pnt-cot__title { font-weight: 700; font-size: 20px; }
.pnt-cot__cards { display: flex; flex-wrap: wrap; gap: 5px; }
.pnt-cot__card { font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.pnt-cot__search { position: relative; margin-bottom: 16px; }
.pnt-cot__q { width: 100%; border-radius: 999px !important; padding: 10px 18px !important; font-size: 16px !important; }
.pnt-cot__prod { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pnt-cot__pname { font-weight: 600; font-size: 18px; }
.pnt-cot__psku { font-size: 14px; color: var(--muted); margin: 3px 0 8px; }
.pnt-cot__pcat { display: inline-block; font-size: 13px; background: var(--bg); border-radius: 999px; padding: 3px 10px; margin-right: 8px; }
.pnt-cot__sel { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin: 0 0 10px; font-size: 16px; color: var(--muted); }
.pnt-cot__sel select { border-radius: 999px; width: 320px; max-width: 100%; }
.pnt-cot__input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; width: 234px; color: var(--text); }
.pnt-cot__input input { flex: 1; border: 0 !important; outline: 0; box-shadow: none !important; background: transparent !important; padding: 8px 0 !important; font-size: 16px; }
.pnt-cot__row { padding: 10px 0; border-top: 1px solid var(--line); }
.pnt-cot__r1 { display: flex; justify-content: space-between; align-items: baseline; gap: 13px; flex-wrap: wrap; }
.pnt-cot__main b { font-size: 20px; }
.pnt-cot__total { font-size: 15px; color: var(--muted); white-space: nowrap; }
.pnt-cot__tag { display: inline-block; font-size: 12px; font-weight: 600; background: var(--text); color: var(--panel); border-radius: 999px; padding: 1px 10px; margin-left: 8px; }
.pnt-cot__mx { margin-top: 8px; background: var(--bg); border-radius: 10px; padding: 8px 13px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pnt-cot__err { font-size: 15px; color: var(--danger); margin: 0 0 8px; }
.pnt-cot__note { font-size: 15px; color: var(--muted); font-style: italic; margin-top: 8px; }

/* ---- Comercial → Precios y publicaciones ---- */
.linklike { background: none; border: 0; padding: 0; color: var(--acento); cursor: pointer; font: inherit; text-align: left; }
.linklike:hover { text-decoration: underline; }
.pp-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.pp-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-info { display: flex; gap: 8px 22px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13px; margin-bottom: 10px; }
.pp-filtros { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.pp-filtros label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.pp-filtros label.check { flex-direction: row; align-items: center; padding-bottom: 8px; }
.pp-grupo { margin-bottom: 18px; }
.pp-ruta { font-weight: 700; font-size: 14px; padding: 6px 10px; background: var(--tinte); color: var(--on-primary); border-radius: 8px; margin-bottom: 8px; }
.pp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.pp-card-pierde { border-left: 4px solid var(--danger); }
.pp-top { display: grid; grid-template-columns: minmax(260px, 1fr) 170px 200px auto; gap: 12px; align-items: start; }
.pp-cod { font-family: ui-monospace, monospace; font-size: 12px; background: #f3f4f6; border-radius: 4px; padding: 1px 5px; }
.pp-ficha { font-weight: 600; }
.pp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--muted); }
.pp-tags span { background: #f3f4f6; border-radius: 999px; padding: 1px 8px; }
.pp-tags .pp-nota { background: #fef3c7; color: #92400e; }
.pp-dest { font-size: 12px; background: #ffedd5; color: #9a3412; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.pp-base label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.pp-base input { width: 140px; font-weight: 700; }
.pp-web .lbl { font-size: 12px; color: var(--muted); }
.pp-web > div { margin-top: 2px; }
.pp-pubs { margin-top: 8px; font-size: 13px; }
.pp-pubs th, .pp-pubs td { padding: 4px 6px; }
.pp-pubs .pp-desc { width: 58px; text-align: right; padding: 2px 4px; }
.pp-pubs .pp-est { padding: 2px 4px; font-size: 12px; }
.pp-pierde td { background: #fef2f2; }
.pp-rojo { color: var(--danger); font-weight: 600; }
.pp-ok { color: var(--ok); }
.pp-env { font-size: 11px; background: #dbeafe; color: #1e40af; border-radius: 999px; padding: 0 6px; }
.pp-pend { display: inline-block; font-size: 11px; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 0 6px; margin: 1px 2px 1px 0; }
.pp-mla { font-family: ui-monospace, monospace; font-size: 12px; }
.pp-mas { font-size: 13px; margin-top: 4px; }
.pp-checks { display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.pp-checks label.check { font-size: 12px; }
.pp-edit td { vertical-align: top; padding: 4px; }
.pp-edit input, .pp-edit select { padding: 3px 5px; }
.pp-res { display: inline-block; background: var(--tinte); border-radius: 8px; padding: 6px 10px; }
.pp-ul { margin: 4px 0 8px; padding-left: 20px; font-size: 13px; max-height: 220px; overflow: auto; }
@media (max-width: 900px) { .pp-top { grid-template-columns: 1fr 1fr; } }
.modal.pp-modal { max-width: min(1180px, 96vw); width: 96vw; }
.pp-edit select { min-width: 96px; }
.pp-edit .pp-checks { display: grid; grid-template-columns: auto auto; gap: 0 8px; margin-top: 3px; }
.pp-filtros .pp-tog { white-space: nowrap; }
.pp-filtros .pp-tog.pp-on { background: var(--primary); color: var(--on-primary); border-color: var(--primary-dark); }
#ppPierde.pp-on { background: var(--danger); border-color: var(--danger); }
.pp-aviso { font-size: 12px; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 1px 6px; display: inline-block; }
.pp-base input.pp-estimada { border-style: dashed; color: var(--muted); }
.pp-filtros select { max-width: 320px; }
.pp-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
.pp-tab { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.pp-tab:hover { color: var(--text); }
.pp-tab.on { color: var(--acento); border-bottom-color: var(--acento); }
.pp-dest small { font-size: 9px; opacity: .7; text-transform: uppercase; }
.pp-tag-baja_rent { background: #fee2e2; color: #991b1b; }
.pp-tag-discontinuar { background: #e5e7eb; color: #374151; }
.pp-tag-mas_vendido { background: #fef9c3; color: #854d0e; }
.pp-dest { white-space: nowrap; display: inline-block; margin-top: 2px; }
.prod-tabla td.prod-desc { min-width: 280px; }
.prod-tabla tr.prod-fila { cursor: pointer; }
.prod-tabla tr.prod-fila:hover td { background: #f8fafc; }
.prod-stk { font-size: 11px; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.prod-stk .comp-link { font-size: 11px; color: var(--warn); font-weight: 600; }
.ped-aviso { align-self: end; font-size: 13px; color: #92400e; line-height: 1.35; max-height: 140px; overflow: auto; }
.ped-aviso:not(:empty) { background: #fef3c7; border: 1px solid #fcd34d; border-radius: 8px; padding: 6px 10px; }
.ped-aviso .prestamo { margin-top: 4px; }
.ped-aviso .btn.small { margin: 2px 4px 2px 0; }
.nf-body .nf-cod { white-space: nowrap; font-size: 12px; }
.nf-body .nf-marca { font-size: 11px; color: #555; }
.ped-sku { font-size: 11px; color: var(--muted); }
/* Venta de Mercado Libre cancelada o con reclamo/devolución abierta (pedido y Envíos a entregar) */
.ml-alerta { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.ml-alerta-txt { color: #b91c1c; font-size: 11px; font-weight: 600; margin-top: 2px; }
/* Publicaciones ML: valor de Panter distinto del de Mercado Libre */
.pm-dif { color: #b91c1c; font-weight: 700; }

/* Auditoría: filtros en una fila */
.au-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.au-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 160px; flex: 1 1 160px; max-width: 220px; }

/* Etiqueta de bulto para la Zebra (11 × 21 cm, una por hoja, con QR como las de Mercado Libre) */
.pg-zebra { page: zebra; position: relative; overflow: hidden; background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; box-sizing: border-box; }
.etz { box-sizing: border-box; height: 100%; padding: 5mm 5mm; display: flex; flex-direction: column; gap: 1.6mm; font-size: 10pt; }
.etz-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 3mm; padding-bottom: 2.5mm; border-bottom: 2px solid #000; }
.etz-rem { font-size: 9pt; line-height: 1.25; }
.etz-sec { font-size: 7.5pt; font-weight: 700; letter-spacing: .1em; color: #333; }
.etz-bulto { border: 2px solid #000; padding: 1.5mm 3mm; text-align: center; font-size: 8pt; font-weight: 700; white-space: nowrap; }
.etz-bulto b { display: block; font-size: 28pt; line-height: 1.1; }
.etz-qr { display: flex; align-items: center; gap: 4mm; padding: 3mm 0; border-bottom: 2px solid #000; }
.etz-qr-img { width: 58mm; height: 58mm; flex: none; }
.etz-qr-img svg { width: 100%; height: 100%; display: block; }
.etz-qr-txt { font-size: 12pt; line-height: 1.4; }
.etz-transp { margin-top: 1.5mm; font-size: 13pt; font-weight: 800; text-transform: uppercase; }
.etz-nombre { margin-top: 2mm; font-size: 24pt; font-weight: 700; line-height: 1.15; }
.etz-dir { font-size: 18pt; line-height: 1.2; }
.etz-loc { font-size: 30pt; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.etz-datos { font-size: 12pt; }
.etz-cobrar { font-size: 18pt; font-weight: 800; border: 3px solid #000; padding: 1.5mm 3mm; text-align: center; }
