: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: #a2ff9b;        /* verde de Panter (el del logo): todo lo verde */
  --on-ok: #0f2e14;      /* texto sobre el verde (el verde claro no se lee con letra blanca) */
  --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 { display: block; font-size: 22px; font-weight: 700; color: #fff; padding: 18px 20px 18px 62px; text-decoration: none; }
.brand:hover .brand-logo { opacity: .85; }
.leyenda-ped { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
/* 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; }
/* Buscador del menú */
.nav-buscar { padding: 8px 14px 10px; }
.nav-buscar input { width: 100%; box-sizing: border-box; background: #1f2937; color: #fff; border: 1px solid #374151; border-radius: 6px; padding: 7px 10px; font: inherit; font-size: 13px; }
.nav-buscar input::placeholder { color: #9ca3af; }
.nav-buscar input:focus { outline: 2px solid var(--acento); outline-offset: -1px; border-color: transparent; }
#nav.buscando .con-resultado > .nav-items { display: block; }
#nav.buscando .con-resultado > .nav-sec .chev { transform: rotate(90deg); }
#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; }
.fe-tabs { flex-wrap: wrap; } .fe-tabs-sep { width: 1px; background: var(--line); margin: 6px 10px; }
.perm-arbol { border: 1px solid var(--line); border-radius: 8px; height: min(58vh, 560px); 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; }
/* Árbol de permisos como el menú: cada rama se pliega */
.perm-nodo { margin: 4px 0; }
.perm-nodo .perm-mod.perm-padre { margin: 0; }
.perm-tog { flex: 1; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; padding: 2px 0; }
.perm-flecha { display: inline-block; width: 12px; transition: transform .15s; }
.perm-nodo.abierto .perm-flecha { transform: rotate(90deg); }
.perm-cuenta { font-weight: 400; font-size: 12px; opacity: .8; }
.perm-cuerpo { display: none; padding: 2px 0 6px; }
.perm-nodo.abierto .perm-cuerpo, .perm-buscando .perm-cuerpo { display: block; }
.perm-row.perm-pant .perm-lbl { font-weight: 600; }
.perm-row.perm-accion { padding-left: 50px; font-size: 13px; }
/* Pantallas plegables dentro del módulo: sus acciones se ven al abrirlas (o buscando) */
.perm-pnodo > .perm-accion { display: none; }
.perm-pnodo.abierto > .perm-accion, .perm-buscando .perm-pnodo > .perm-accion:not(.hidden) { display: flex; }
.perm-togp { background: none; border: 0; padding: 0 2px; cursor: pointer; color: var(--muted); font: inherit; line-height: 1; }
.perm-togp-vacio { display: inline-block; width: 16px; }
.perm-pnodo.abierto > .perm-row .perm-flecha { transform: rotate(90deg); }
.perm-cuenta-p { font-weight: 400; font-size: 12px; color: var(--muted); }
.perm-row.perm-pant { padding-left: 14px; }
.perm-row.perm-accion .perm-lbl::before { content: "↳ "; color: var(--muted); }
.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: var(--ok); color: var(--on-ok); 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: var(--ok); color: var(--on-ok); }
.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-bg.minimizada { display: none; }
.modal-min { float: right; position: sticky; top: -8px; z-index: 3; margin: -10px -10px 0 8px; width: 32px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; line-height: 1; }
.modal-min:hover { background: #f4f4f5; color: var(--acento); }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--acento); box-shadow: 0 -2px 8px rgba(0,0,0,.15); }
.dock-chip { display: flex; background: #fff; border-radius: 8px; overflow: hidden; max-width: 340px; }
.dock-chip button { font: inherit; border: 0; background: none; cursor: pointer; padding: 6px 10px; }
.dock-abrir { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-abrir::before { content: "▲ "; color: var(--muted); font-size: 11px; }
.dock-abrir:hover { background: #f4f4f5; }
.dock-x { color: var(--muted); border-left: 1px solid var(--line) !important; }
.dock-x:hover { color: #dc2626; }
body.con-dock { padding-bottom: 52px; }
.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-modal > .modal-min { margin: 10px 12px 0 0; top: 10px; background: rgba(255,255,255,.9); }
.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: var(--ok); box-shadow: inset 0 0 0 1px #4d9b47; } .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: var(--ok); color: var(--on-ok); } .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: var(--ok); border-color: #4d9b47; }
.radios.facturar.si label { color: var(--on-ok); }

/* 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-buscar { width: 100%; margin-bottom: 6px; padding: 5px 8px; font-size: 13px; }
.feed-cnt { font-size: 12px; }
.feed-btns { display: flex; gap: 4px; margin-top: 5px; }
.feed-limpiar { display: flex; justify-content: flex-end; margin: -4px 0 -4px; }
.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: var(--ok); color: var(--on-ok); } .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 .rc-logo { height: 34px; display: block; margin-bottom: 6px; }
.emp-contacto { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; }
.emp-contacto span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.emp-contacto svg { width: 13px; height: 13px; flex: none; }
/* Filtros: los casilleros con título arriba y los sin título (buscador, botones) quedan alineados abajo */
.toolbar:has(> label) { align-items: flex-end; }
.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: 14px; font-weight: 700; line-height: 1.1; padding: 6px 0; border-bottom: 1px solid #000; }
.nf-aviso span { display: block; font-size: 10px; font-weight: 400; margin-top: 2px; }
/* Leyendas por producto / categoría / forma de entrega (Configuración → Leyendas de comprobantes) */
.nf-leyendas { font-size: 10px; line-height: 1.35; padding: 6px 28px 7px; border-bottom: 1px solid #000; }   /* mismo margen que los datos del cliente */
.nf-leyendas > b { display: block; font-size: 10px; margin-bottom: 2px; }
.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; }
/* ----- Carteles de precios (A4, blanco y negro). Margen de 6 mm: la láser no imprime hasta el borde ----- */
@page cartel { size: A4; margin: 6mm; }
.ct-hojas { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.ct-hoja { width: 198mm; height: 284mm; display: grid; background: #fff; color: #000; box-shadow: 0 1px 6px rgba(0,0,0,.18); flex: none; }
#impresion .ct-hoja { page: cartel; box-shadow: none; }
.ct-hoja-chico { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(7, 1fr); }
.ct-hoja-mediano { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.ct-hoja-grande { grid-template-columns: 1fr; grid-template-rows: repeat(2, 1fr); }
.ct-celda { position: relative; border: 0.3mm dashed #999; overflow: hidden; min-width: 0; min-height: 0; }
.ct-vacia { display: grid; place-items: center; cursor: pointer; color: #888; }
.ct-vacia:hover { background: #f4f4f5; }
.ct-celda:not(.ct-vacia) { cursor: pointer; }
.ct-quitar { position: absolute; top: 2mm; right: 2mm; border: 1px solid #ccc; background: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; line-height: 1; }
.ct { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; font-family: Arial, Helvetica, sans-serif; color: #000; }
.ct-top { display: flex; align-items: center; justify-content: space-between; gap: 2mm; }
.ct-logo { filter: grayscale(1) contrast(1.4); }
.ct-marca { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ct-tit { font-weight: 700; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
.ct-precios { margin-top: auto; }
.ct-oferta { display: inline-block; background: #000; color: #fff; font-weight: 800; letter-spacing: .08em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ct-antes { text-decoration: line-through; color: #000; }
.ct-precio { font-weight: 800; line-height: 1; white-space: nowrap; }
.ct-sinp { font-size: 10pt; font-weight: 400; }
/* Precio sin impuestos (Régimen de Transparencia Fiscal al Consumidor, Ley 27.743): chico y gris claro debajo del precio */
.ct-siniva { color: #8c8c8c; font-weight: 400; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ct-chico .ct-siniva { font-size: 6pt; width: 100%; }
.ct-mediano .ct-siniva { font-size: 9pt; margin: -2mm 0 2mm; }
.ct-grande .ct-siniva { font-size: 12pt; width: 100%; margin: -2mm 0 2mm; }
.ct-bandas .ct-siniva { margin: .5mm 0 0 !important; }
.ct-si { font-weight: 700; text-transform: uppercase; }
.ct-pie { display: flex; justify-content: space-between; gap: 2mm; }
.ct-fecha { color: #444; }
.ct:not(.ct-bandas) .ct-cab, .ct:not(.ct-bandas) .ct-base { display: contents; }
/* Diseño "Bandas grises": cabecera negra con logo y letra blanca, precio sobre blanco, cuotas sobre gris claro y base casi negra (todo en grises, para láser) */
.ct-bandas { padding: 0 !important; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ct-bandas .ct-cab { background: #000; color: #fff; }
.ct-bandas .ct-top { justify-content: center; gap: 3mm; }
.ct-bandas .ct-logo { filter: grayscale(1) invert(1) brightness(2); }
.ct-bandas .ct-marca { color: #e5e5e5; }
.ct-bandas .ct-tit { margin-top: 0 !important; }
.ct-bandas .ct-precios { flex: 1; display: flex !important; flex-direction: column; align-items: center; justify-content: center; margin: 0; }
.ct-bandas .ct-precio { width: auto !important; margin: 0 !important; }
.ct-bandas .ct-cuotas { background: #d4d4d4; margin: 0 !important; }
.ct-bandas .ct-base { background: #262626; color: #fff; }
.ct-bandas .ct-pie { justify-content: center; gap: 4mm; }
.ct-bandas .ct-fecha { color: #bdbdbd; margin-top: 0 !important; }
.ct-bandas .ct-oferta { background: #000; }
.ct-chico.ct-bandas .ct-cab { padding: 1.2mm 3mm 1.3mm; } .ct-chico.ct-bandas .ct-top { display: none; }
.ct-chico.ct-bandas .ct-tit { font-size: 8pt; -webkit-line-clamp: 2; }
.ct-chico.ct-bandas .ct-precios { flex-direction: row; align-items: center; align-content: center; gap: 2mm; flex-wrap: wrap; justify-content: center; }
.ct-chico.ct-bandas .ct-precio { font-size: 20pt; }
.ct-chico.ct-bandas .ct-cuotas { padding: .8mm 2mm; font-size: 8.5pt; }
.ct-chico.ct-bandas .ct-base { padding: .7mm 2mm .8mm; }
.ct-mediano.ct-bandas .ct-cab { padding: 5mm 6mm; } .ct-mediano.ct-bandas .ct-tit { margin-top: 4mm !important; }
.ct-mediano.ct-bandas .ct-cuotas { padding: 3mm 4mm; font-size: 14pt; }
.ct-mediano.ct-bandas .ct-base { padding: 2.5mm 4mm; }
.ct-grande.ct-bandas .ct-cab { padding: 6mm 10mm; } .ct-grande.ct-bandas .ct-tit { margin-top: 4mm !important; }
.ct-grande.ct-bandas .ct-precios { flex-direction: row; align-items: center; align-content: center; gap: 2mm 6mm; flex-wrap: wrap; }
.ct-grande.ct-bandas .ct-precio { width: 100% !important; }
.ct-grande.ct-bandas .ct-cuotas { padding: 4mm 6mm; font-size: 22pt; }
.ct-grande.ct-bandas .ct-base { padding: 3mm 6mm; }
/* Chico: 99 × 40,7 mm */
.ct-chico { padding: 2mm 3mm; }
.ct-chico .ct-logo { height: 3.5mm; } .ct-chico .ct-marca { font-size: 6.5pt; }
.ct-chico .ct-tit { font-size: 8.5pt; -webkit-line-clamp: 2; margin-top: 1mm; }
.ct-chico .ct-precios { display: flex; align-items: baseline; gap: 2mm; flex-wrap: wrap; }
.ct-chico .ct-oferta { font-size: 6.5pt; padding: .3mm 1.2mm; } .ct-chico .ct-antes { font-size: 8pt; }
.ct-chico .ct-precio { font-size: 19pt; }
.ct-chico .ct-cuotas { font-size: 7.5pt; } .ct-chico .ct-pie { font-size: 6pt; } .ct-chico .ct-fecha { font-size: 5pt; }
/* Mediano: 99 × 142,5 mm */
.ct-mediano { padding: 6mm 6mm 4mm; }
.ct-mediano .ct-logo { height: 7mm; } .ct-mediano .ct-marca { font-size: 11pt; }
.ct-mediano .ct-tit { font-size: 18pt; -webkit-line-clamp: 5; margin-top: 6mm; }
.ct-mediano .ct-oferta { font-size: 13pt; padding: 1mm 3mm; margin-bottom: 2mm; } .ct-mediano .ct-antes { font-size: 15pt; }
.ct-mediano .ct-precio { font-size: 36pt; margin: 1mm 0 3mm; }
.ct-mediano .ct-cuotas { font-size: 13pt; margin-bottom: 4mm; } .ct-mediano .ct-pie { font-size: 9pt; } .ct-mediano .ct-fecha { font-size: 6.5pt; margin-top: 1.5mm; }
/* Grande: 198 × 142,5 mm */
.ct-grande { padding: 7mm 10mm 5mm; }
.ct-grande .ct-logo { height: 10mm; } .ct-grande .ct-marca { font-size: 16pt; }
.ct-grande .ct-tit { font-size: 24pt; -webkit-line-clamp: 3; margin-top: 5mm; }
.ct-grande .ct-precios { display: flex; align-items: flex-end; gap: 6mm; flex-wrap: wrap; }
.ct-grande .ct-oferta { font-size: 18pt; padding: 1.5mm 4mm; } .ct-grande .ct-antes { font-size: 22pt; }
.ct-grande .ct-precio { font-size: 64pt; width: 100%; margin: 1mm 0 3mm; }
.ct-grande .ct-cuotas { font-size: 20pt; margin-bottom: 4mm; } .ct-grande .ct-pie { font-size: 12pt; } .ct-grande .ct-fecha { font-size: 8pt; margin-top: 2mm; }
#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; }
.dolar-dia { font-size: 13px; white-space: nowrap; } .dolar-dia .btn { margin-left: 6px; }
.dolar-dia-linea { display: flex; justify-content: flex-end; padding: 4px 12px 0; }
.oc-peso { margin-top: 10px; }
.oc-peso-txt { font-size: 14px; }
.oc-peso-barra { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 4px; max-width: 520px; }
.oc-peso-barra > div { height: 100%; }
.oc-peso-verde { background: var(--ok); box-shadow: inset 0 0 0 1px #4d9b47; } .oc-peso-amarillo { background: #eab308; } .oc-peso-rojo { background: #dc2626; }
.oc-peso-sin { color: #dc2626; font-size: 13px; margin-top: 4px; }
.pp-ruta { font-weight: 700; font-size: 14px; padding: 6px 10px; background: var(--primary); color: #fff; border-radius: 8px; margin-bottom: 8px; }
.pp-ruta .muted { color: rgba(255,255,255,.75); }
.pp-ruta[data-ruta] { cursor: pointer; user-select: none; }
.pp-ruta[data-ruta]:hover { filter: brightness(1.15); }
.pp-flecha { display: inline-block; width: 14px; }
.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(--on-ok); background: var(--ok); padding: 0 4px; border-radius: 4px; }
.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); }
/* Ordenar solapas arrastrándolas (mantener apretada) */
.pp-tabs.ordenable .pp-tab { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.pp-tabs.ordenando .pp-tab { cursor: grabbing; }
.pp-tab.arrastrando { opacity: .7; outline: 2px dashed var(--acento); outline-offset: -2px; border-radius: 6px; background: var(--bg-soft, rgba(0,0,0,.04)); }
.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; }

/* Lo que hay que pasar por el posnet (monto + recargo de la tarjeta), bien visible */
.fp-cobrar-tarj { margin-top: 4px; font-size: 14px; color: var(--text); }
.fp-cobrar-tarj b { font-size: 15px; }
.fp-cobrar-tarj span { color: var(--muted); font-size: 12px; }

/* Configuración: sucursales de cada canal online */
.canal-sucs .center { text-align: center; }
.canal-sucs { max-width: 520px; }

/* Campanita de notificaciones (arriba a la derecha) */
.notif { position: fixed; top: 14px; right: 18px; z-index: 70; }
.notif-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--acento);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.notif-btn:hover, .notif-btn[aria-expanded="true"] { background: var(--tinte); }
.notif-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.notif-panel { position: absolute; top: 46px; right: 0; width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 640px); overflow: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.notif-cab { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.notif-cab b { margin-right: auto; font-size: 15px; }
.notif-it { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.notif-it.nueva { background: #fefce8; }
.notif-it .ico { font-size: 18px; line-height: 1.2; }
.notif-it .cuerpo { min-width: 0; flex: 1; }
.notif-it .tit { overflow-wrap: anywhere; }
.notif-it .tit.ir, .notif-det .ir { cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); }
.notif-it .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.notif-det { margin: 4px 0 0; padding-left: 16px; font-size: 13px; color: var(--text); }
.notif-det li { overflow-wrap: anywhere; }
.notif-vacia { padding: 24px 14px; color: var(--muted); text-align: center; }
/* Que la campanita no tape los botones de la derecha del encabezado de cada pantalla */
#main > .toolbar:first-child { padding-right: 52px; }
/* Avisos urgentes (cartel con precio viejo): en rojo y arriba hasta que se resuelvan */
.notif-btn.urgente { border-color: var(--danger); color: var(--danger); }
.notif-it.urgente { background: #fef2f2; border-left: 4px solid var(--danger); }
.notif-it.urgente .tit { color: #991b1b; font-weight: 600; }
.notif-acc { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
/* Pedido de nota de crédito total (comprobante) */
.aviso-nc { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); }
.aviso-nc.pend { background: #fffbeb; border-color: #fcd34d; }
.aviso-nc.ok { background: #effff0; border-color: var(--ok); }
.aviso-nc.no { background: #fef2f2; border-color: #fca5a5; }
/* Perfiles: avisos de la campanita */
.avisos-perfil { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.avisos-perfil legend { font-weight: 600; padding: 0 4px; }
.avisos-perfil p { grid-column: 1 / -1; }

/* Verde de Panter en textos: el #a2ff9b sobre blanco no se lee, así que lo que antes era texto verde va resaltado en verde con letra oscura */
[style*="color:var(--ok)"], [style*="color: var(--ok)"] { color: var(--on-ok) !important; background: var(--ok); border-radius: 4px; padding: 0 4px; }
div[style*="color:var(--ok)"], div[style*="color: var(--ok)"] { display: inline-block; }
.toast { color: var(--on-ok); }
.toast.err { color: #fff; }
/* Atributos para la web (plantilla por categoría y ficha del producto) */
.atr-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.atr-mover { display: inline-flex; gap: 4px; }
.atr-mover .btn:disabled { opacity: .35; cursor: default; }
.atr-fila label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.atr-op textarea { min-width: 240px; font-size: 13px; }
.atr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 12px; }
.atr-grid label { display: flex; flex-direction: column; gap: 2px; }
.atr-auto { padding: 6px 8px; background: var(--tinte); border-radius: 6px; min-height: 30px; }

/* Descripción para la web (ficha → Integraciones) */
.desc-web-vista { border: 1px solid var(--border, #ddd); border-radius: 8px; padding: 10px 14px; max-height: 420px; overflow: auto; font-size: 13px; line-height: 1.45; }
.desc-web-vista h2 { font-size: 15px; margin: 12px 0 6px; }
.desc-web-vista h3 { font-size: 14px; margin: 10px 0 4px; }
.desc-web-vista p { margin: 0 0 8px; }
.desc-web-vista ul { margin: 0 0 8px 18px; padding: 0; }
.aviso-ia { border-left: 3px solid #e0a800; background: rgba(224, 168, 0, .08); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.aviso-ia ul { margin: 4px 0 6px 18px; padding: 0; }

/* Ficha de producto (como en Cianbox): la ventana tiene siempre el mismo alto; el título con las solapas queda fijo arriba,
   los botones fijos abajo y solo el contenido de la solapa se desplaza */
.modal.ficha-modal { height: min(90vh, 900px); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.modal.ficha-modal > form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.modal .ficha-cab { flex: none; padding: 20px 20px 0; border-bottom: 1px solid var(--line); background: #fff; }
.modal .ficha-cab h3 { margin-top: 0; }
.modal .ficha-cab .tabs { margin-bottom: 0; }
.modal .ficha-cuerpo { flex: 1; min-height: 0; overflow: auto; padding: 14px 20px; }
.modal .ficha-error { flex: none; margin: 0; padding: 0 20px; }
.modal .ficha-error:empty { display: none; }
.modal .ficha-pie { flex: none; margin: 0; padding: 12px 20px; border-top: 1px solid var(--line); background: #fff; }

/* Categorías: el botón de atributos o etiquetas web en verde cuando la categoría ya tiene los suyos */
.btn.btn-cargado { background: var(--ok); color: var(--on-ok); border-color: var(--ok); }
.btn.btn-cargado:hover { filter: brightness(.95); }
/* Publicidad de ML en Precios y publicaciones: verde / naranja / rojo pastel */
.pp-ads { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: help;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; border: 1px solid transparent; }
.pp-ads-bien { background: #d9f7d6; color: #1f5a1b; border-color: #b8ebb2; }
.pp-ads-regular { background: #ffe6cc; color: #7a4100; border-color: #ffd2a6; }
.pp-ads-mal { background: #ffd9d9; color: #8a1414; border-color: #ffbdbd; }
.pp-ads-sin_datos { background: #f0f0f0; color: #666; border-color: #e2e2e2; }
/* Descuento de ML que corre en la publicación: azul tenue; naranja si vence en 3 días o menos */
.pp-promo { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: help;
  background: #e3efff; color: #1d4a85; border: 1px solid #c9defb; vertical-align: middle; }
.pp-promo-vence { background: #ffe6cc; color: #7a4100; border-color: #ffc99a; }
/* Comercial → Publicidad ML */
.ads-per { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin: 6px 0; }
.ads-per label { font-size: 12px; display: flex; flex-direction: column; }
.ads-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ads-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: help; }
.ads-kpi .lbl { font-size: 12px; color: var(--muted); }
.ads-kpi .val { font-size: 22px; font-weight: 700; margin: 2px 0; }
.ads-delta { font-size: 12px; font-weight: 600; }
.ads-delta.ads-bien { color: #1f7a1a; }
.ads-delta.ads-mal { color: #b42318; }
.ads-grafs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ads-graf { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ads-graf-ancho { grid-column: 1 / -1; }
.ads-graf-tit { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.ads-svg { width: 100%; height: auto; display: block; }
.ads-eje { stroke: #c9c9c9; stroke-width: 1; }
.ads-grilla { stroke: #eee; stroke-width: 1; }
.ads-obj { stroke: #6b7280; stroke-width: 1.5; stroke-dasharray: 5 4; }
.ads-txt { font-size: 11px; fill: var(--muted); }
.ads-hit:hover rect[fill]:not([fill="transparent"]) { opacity: .8; }
.ads-tip { position: fixed; z-index: 3000; background: #111827; color: #fff; padding: 5px 9px; border-radius: 6px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.ads-ley { font-weight: 400; font-size: 12px; color: var(--muted); }
.ads-ley i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.ads-hbar { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid #f2f2f2; }
.ads-hbar-nom { font-size: 13px; font-weight: 600; }
.ads-hbar-barras > div { display: flex; align-items: center; gap: 8px; margin: 2px 0; font-size: 12px; }
.ads-hbar-barras span { display: inline-block; height: 12px; border-radius: 0 4px 4px 0; min-width: 2px; }
.ads-hbar-barras b { font-weight: 600; white-space: nowrap; }
.ads-ins ul { margin: 0; padding-left: 18px; }
.ads-ins li { margin: 4px 0; font-size: 13px; }
.ads-camps-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 16px 0 8px; }
.ads-filtros { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ads-camp { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.ads-camp-top { display: flex; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; flex-wrap: wrap; }
.ads-camp-nom { flex: 1; min-width: 240px; }
.ads-camp-num { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.ads-tabla { font-size: 13px; }
/* CRM Mercado Libre */
.crm-res { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: -4px 0 10px; font-size: 13px; }
.crm-alerta b { color: var(--danger); }
.crm-filtros { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.crm-filtros input { max-width: 320px; }
.crm-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.crm-card.crm-pend { border-left: 4px solid #eb6834; }
.crm-pub { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.crm-pub a { font-weight: 600; }
.crm-prod { margin-left: auto; font-size: 12px; }
.crm-preg { margin: 6px 0; font-size: 15px; }
.crm-respuesta { background: #f4f6f9; border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.crm-resp textarea { width: 100%; font-size: 14px; }
.crm-resp-pie { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.crm-aviso { margin-right: auto; font-size: 12px; }
.crm-rapida { max-width: 200px; font-size: 13px; }
.crm-conv { cursor: pointer; }
.crm-conv:hover { background: #f7f7f7; }
.crm-noleido td { font-weight: 600; }
.crm-hilo { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 6px; background: #f4f6f9; border-radius: 8px; margin-bottom: 8px; }
.crm-msj { max-width: 80%; padding: 6px 10px; border-radius: 10px; font-size: 14px; white-space: pre-wrap; }
.crm-comprador { background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.crm-vendedor { background: #dceeff; align-self: flex-end; }
.crm-msj-pie { font-size: 11px; margin-top: 2px; }
.crm-ia { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; margin: 4px 0 6px; padding: 6px 10px; border-radius: 8px; background: #f4f6f9; }
.crm-ia-ok { background: #d9f7d6; color: #1f5a1b; }
.crm-ia-rev { background: #ffe6cc; color: #7a4100; }
.crm-ia-err { background: #ffd9d9; color: #8a1414; }
.crm-ia-datos { width: 100%; font-size: 12px; }
.crm-ia .btn { margin-left: auto; }
/* Avisos (popups) */
.aviso-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 16px; }
.aviso-bg.aviso-firme { background: rgba(0,0,0,.6); }
.aviso-pop { position: relative; background: var(--panel, #fff); color: var(--text, #222); border-radius: 12px; max-width: 520px; width: 100%; padding: 22px 24px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3); max-height: 85vh; overflow: auto; }
.aviso-firme .aviso-pop { border-top: 5px solid var(--danger, #c0392b); }
.aviso-pop h3 { margin: 0 28px 10px 0; font-size: 20px; }
.aviso-texto { font-size: 15px; line-height: 1.5; }
.aviso-acciones { display: flex; justify-content: flex-end; margin-top: 16px; }
.aviso-x { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.aviso-x:hover { opacity: 1; }
.aviso-cumple .aviso-pop, .aviso-pop.aviso-cumple { border-top: 5px solid #f0a500; }
.aviso-pop.aviso-cumple-propio { text-align: center; border-top: 5px solid #f0a500; }
.aviso-pop.aviso-cumple-propio h3 { margin-right: 0; font-size: 24px; }
.aviso-emoji { font-size: 40px; margin-bottom: 6px; }
/* Categorías desplegables */
.cat-pleg { border: 1px solid var(--line, #ccc); background: transparent; color: inherit; border-radius: 4px; width: 22px; height: 22px; padding: 0; cursor: pointer; font-size: 12px; line-height: 1; }
.cat-pleg:hover { background: rgba(0,0,0,.06); }
.cat-pleg-vacio { display: inline-block; width: 22px; text-align: center; color: var(--muted, #888); }

/* Precios y publicaciones: competencia en catálogo de Mercado Libre */
.pp-comp { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; cursor: help; background: #eee; color: #333; vertical-align: middle; }
.pp-comp-gana { background: var(--ok); color: var(--on-ok); }
.pp-comp-comparte { background: #fff3c4; color: #6b5200; }
.pp-comp-propia { background: #e3f4e1; color: #24582a; }   /* la que gana es otra publicación tuya: no es un problema */
.pp-comp-pierde { background: #ffe0c2; color: #7a3a00; }
.pp-comp-no { background: #ffd4d4; color: #8a0f0f; }
.au-filtros .barra-limpiar { align-self: end; }
/* Publicidad Meta: recomendaciones y productos de cada anuncio */
.meta-recs { margin-bottom: 14px; }
.meta-rec { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.meta-rec:first-of-type { border-top: 0; }
.meta-rec-ico { font-size: 20px; line-height: 1.2; }
.meta-rec-txt { flex: 1; min-width: 0; }
.meta-rec-txt .muted { font-size: 13px; }
.meta-rec-btns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.meta-prods { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.meta-prod { font-size: 11px; padding: 1px 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.meta-prod.sin { background: #ffd4d4; color: #8a0f0f; border-color: #f3b0b0; }
.meta-prod-res { max-height: 260px; overflow: auto; margin-top: 6px; display: grid; gap: 2px; }
.meta-prod-op { text-align: left; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; cursor: pointer; color: inherit; }
.meta-prod-op:hover { background: var(--panel); }
@media (max-width: 700px) { .meta-rec { flex-wrap: wrap; } .meta-rec-btns { width: 100%; justify-content: flex-start; } }
.btn-x { background: none; border: 0; cursor: pointer; color: inherit; padding: 0 2px; font-size: 13px; line-height: 1; }
