.catalog-compact .catalog-table{font-size:12px}.catalog-compact .catalog-table td{padding:7px}.catalog-compact input{font-size:12px!important;padding:4px!important;min-height:26px!important}.catalog-compact .product-photo{width:36px;height:42px}.catalog-flags{display:flex;flex-wrap:wrap;gap:4px 9px;margin-top:5px}.catalog-flags label,.option-check{display:flex;align-items:center;gap:4px;font-size:11px;font-weight:400}.catalog-flags input,.option-check input{width:auto!important;min-height:0!important;margin:0}.compact-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:7px;padding:5px}.company-group{min-width:0}.company-group h4{font-size:11px;margin:2px 0 5px}.company-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,100px),1fr));gap:4px}.company-tiles .profit-tile{padding:5px;font-size:10px}.company-tiles .profit-title{gap:3px;margin-bottom:3px}.company-tiles .profit-title strong{font-size:10px}.company-tiles .profit-light{width:15px;height:15px;flex-basis:15px;box-shadow:inset 0 0 0 3px white;padding:2px}.company-tiles .profit-edit-line{gap:3px}.company-tiles .profit-result-line{display:block}.company-tiles .profit-result-line span{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px}.company-tiles .profit-result-line b{font-size:11px}.company-tiles .channel-save-state,.company-tiles .comparison-caption{font-size:9px}.channel-open{padding:0 4px!important;border:0;font-size:15px!important}.profit-title strong a{text-decoration:underline}.incidence-panel{border:1px solid var(--line);border-radius:9px;background:white;padding:12px;margin-bottom:15px}.incidence-panel summary{cursor:pointer;font-weight:700}.incidence-panel h4{margin:12px 0 6px}.incidence-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:6px}.incidence-grid button{display:flex;justify-content:space-between;gap:10px;font-size:12px;padding:7px}.incidence-grid b{border-radius:12px;background:var(--paper);padding:0 6px}.catalog-wide{width:calc(100vw - 32px);max-width:1800px;max-height:calc(100dvh - 24px)}.catalog-wide #dialog-body{padding:16px;overflow-x:hidden}.catalog-wide input,.catalog-wide select{max-width:100%;min-width:0}.bulk-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:8px;margin-bottom:15px}.bulk-field{border:1px solid var(--line);border-radius:7px;padding:9px;min-width:0}.bulk-field>label{display:flex;align-items:center;gap:6px;font-size:12px}.bulk-field input[data-apply]{width:auto;margin:0}.bulk-field select,.bulk-field input:not([data-apply]){font-size:13px;padding:5px}.bulk-filters,.incident-edit-grid,.options-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,105px),1fr));gap:8px}.bulk-filters{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));margin-bottom:15px}.incident-edit-grid label,.options-grid label{font-size:11px}.incident-edit-grid input,.options-grid input{font-size:12px;padding:5px}.incident-product,.channel-product{border:1px solid var(--line);padding:10px;border-radius:8px;margin-bottom:10px}.incident-product .section-head{margin:0 0 8px}.incident-product .section-head label{font-size:12px;display:flex;align-items:center;gap:5px}.incident-product .section-head input{width:auto}.incident-channel .profit-tile{margin-top:7px}.incident-channel .profit-title{display:none}.incident-channel .profit-edit-line,.incident-channel .profit-result-line{display:flex;flex-wrap:wrap;gap:12px}.incident-channel .profit-edit-line label{max-width:150px}.incident-channel .profit-result-line span{display:flex;gap:8px}.incident-channel .profit-breakdown{display:none}.modal-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}.modal-tools label{font-size:12px}.modal-tools input[type=checkbox]{width:auto}.channel-product-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.1fr);gap:15px}.catalog-compact .toolbar{gap:8px}.catalog-compact .catalog-help{font-size:11px;margin-bottom:0}.catalog-compact .profitability-row td{padding:0 6px 12px}.catalog-compact .catalog-table small{font-size:10px;white-space:normal}.catalog-wide .save-error{color:#a7352a}
@media(max-width:900px){.channel-product-grid{grid-template-columns:1fr}.catalog-wide{width:calc(100vw - 12px)}.company-tiles{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))}.incident-product .section-head{flex-wrap:wrap;gap:8px}}
main:has(.catalog-compact) .intro-strip{display:none}main:has(.catalog-compact) .metrics{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}main:has(.catalog-compact) .metric{padding:6px 12px;flex:1}main:has(.catalog-compact) .metric strong{font-size:19px;display:inline;margin-left:8px}main:has(.catalog-compact) .metric small{display:none}main:has(.catalog-compact) .metric label{display:inline;font-size:11px}main:has(.catalog-compact) .page-heading{margin-bottom:12px}main:has(.catalog-compact) .page-heading h1{font-size:27px}main:has(.catalog-compact) .page-heading p{margin-bottom:4px}
.company-tiles .profit-result-line span{flex-direction:row;align-items:baseline;margin:2px 0}.company-tiles .profit-breakdown,.company-tiles .comparison-caption{display:none}.company-tiles .profit-result-line{margin-top:4px}.company-tiles .profit-title{min-height:28px}.company-tiles .channel-save-state{margin-top:3px}.catalog-compact .panel-head{padding:12px 18px}.catalog-compact .catalog-filters{gap:6px}

/* Actualizacion 22: controles del catalogo en una sola banda legible. */
.catalog-controls-row>td{padding:0 8px 8px!important;border-bottom:0!important}
.catalog-controls-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0;padding:2px 0 4px}
.catalog-controls-bar .catalog-minimums{display:flex;align-items:center;gap:12px;flex-wrap:nowrap;margin:0}
.catalog-controls-bar .catalog-minimums label{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:10px;color:var(--muted)}
.catalog-controls-bar .catalog-minimums input{width:54px!important;min-width:54px!important;min-height:24px!important;padding:3px 5px!important;margin:0!important;font-size:11px!important;border-color:var(--line)!important}
.catalog-controls-bar .catalog-flags{display:flex;align-items:center;justify-content:flex-end;flex:1;flex-wrap:nowrap;gap:4px 12px;margin:0;white-space:nowrap}
.catalog-controls-bar .catalog-flags label{display:flex;align-items:center;gap:3px;font-size:10px;font-weight:400;white-space:nowrap}
.catalog-controls-bar .catalog-flags input{width:auto!important;min-height:0!important;margin:0!important}
@media(max-width:1100px){.catalog-controls-row{display:block!important;padding:0!important}.catalog-controls-row>td{display:block!important;grid-column:1/-1!important}.catalog-controls-bar{align-items:flex-start;flex-direction:column;gap:7px}.catalog-controls-bar .catalog-flags{justify-content:flex-start;flex-wrap:wrap}.catalog-controls-bar .catalog-minimums{flex-wrap:wrap}}
@media(max-width:600px){.catalog-controls-bar .catalog-minimums{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.catalog-controls-bar .catalog-minimums label{display:block}.catalog-controls-bar .catalog-minimums input{width:100%!important;min-width:0!important}.catalog-controls-bar .catalog-flags{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}}
/* U25: rentabilidad editable por listing, sin scroll horizontal */
.listing-profit-form{min-width:0}.listing-profit-form .profit-tile{padding:10px}.listing-profit-form .profit-head{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap}.profit-edit-grid,.profit-min-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:8px}.profit-edit-grid label,.profit-min-grid label{font-size:11px}.profit-edit-grid input,.profit-min-grid input{font-size:12px;padding:5px;min-width:0}.profit-readonly-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 9px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:7px 0;margin:7px 0;font-size:11px}.profit-readonly-grid b{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.listing-profit-form .save-state{display:block;margin-top:6px}.channel-product-grid>section{min-width:0}
@media(max-width:1200px){.profit-edit-grid,.profit-min-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.profit-edit-grid,.profit-min-grid{grid-template-columns:1fr}}

/* U28: etiquetas visibles por producto y tres vistas de plataformas. */
.catalog-table .cell-caption{display:block;margin-bottom:3px;font-size:9px;line-height:1;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700;white-space:nowrap}
.catalog-table td[data-label="Stock total"] .cell-caption{margin-bottom:6px}
.catalog-view-switch{display:flex;align-items:center;gap:4px;margin-left:auto}
.catalog-view-switch button{padding:6px 9px;font-size:11px;line-height:1.1;border-radius:7px}
.catalog-view-switch button.active{background:#17324d;color:#fff;border-color:#17324d}

/* Vista Excel: todas las plataformas en una matriz muy baja, sin scroll horizontal. */
.profit-excel{display:grid;gap:2px;padding:5px 2px;min-width:0}
.profit-excel-row{display:grid;grid-template-columns:58px repeat(var(--profit-cols,12),minmax(0,1fr));gap:2px;align-items:center;min-width:0}
.profit-excel-row.head{margin-bottom:2px}
.profit-excel-row>strong,.profit-excel-row>span,.profit-excel-row>b{min-width:0;padding:3px 4px;border:1px solid var(--line);border-radius:4px;font-size:9px;line-height:1.15;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.profit-excel-row>strong{text-align:center;font-size:8px;background:var(--paper);white-space:normal;line-height:1.05}
.profit-excel-row>b{text-align:left;border-color:transparent;background:transparent;padding-left:0;color:var(--muted)}
.profit-excel-row .neg{color:#a7352a;font-weight:700}

/* Vista compacta propuesta: una banda por empresa y chips de 3 lineas. */
.compact-groups:has(.compact-line){display:grid;grid-template-columns:1fr;gap:4px;padding:4px}
.company-group.compact-line{display:grid;grid-template-columns:135px minmax(0,1fr);align-items:center;gap:5px;padding:3px 5px;border:1px solid var(--line);border-radius:7px}
.company-group.compact-line h4{margin:0;font-size:9px;line-height:1.15}
.company-line{display:grid;grid-template-columns:repeat(auto-fit,minmax(108px,1fr));gap:3px;min-width:0}
.profit-chip{display:grid;gap:2px;min-width:0;padding:4px 5px!important;text-align:left;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:8.5px;line-height:1.15;font-variant-numeric:tabular-nums}
.profit-chip .chip-head{display:flex;align-items:center;gap:4px;min-width:0}.profit-chip .chip-head i{width:7px;height:7px;border-radius:50%;background:#b45b50;flex:0 0 7px}.profit-chip.on .chip-head i{background:#2f8a62}.profit-chip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8.5px}.profit-chip>span:not(.chip-head){white-space:nowrap}.profit-chip .neg{color:#a7352a;font-weight:700}

@media(max-width:1200px){.catalog-view-switch{order:3;margin-left:0}.company-group.compact-line{grid-template-columns:105px minmax(0,1fr)}.company-line{grid-template-columns:repeat(auto-fit,minmax(98px,1fr))}.profit-excel-row>strong,.profit-excel-row>span{font-size:8px;padding:3px 2px}.profit-excel-row{grid-template-columns:50px repeat(var(--profit-cols,12),minmax(0,1fr))}}
@media(max-width:800px){.catalog-view-switch{width:100%;display:grid;grid-template-columns:repeat(3,1fr)}.company-group.compact-line{grid-template-columns:1fr}.company-line{grid-template-columns:repeat(2,minmax(0,1fr))}.profit-excel{display:none}html[data-catalog-profit-view="excel"] .compact-groups:after{content:'La vista Excel se sustituye por Compacta en pantallas estrechas para evitar scroll horizontal.';display:block;font-size:10px;color:var(--muted);padding:5px}}

/* Conserva U27: cabecera general visible al desplazarse. */
.catalog-compact .catalog-wrap{overflow:visible}
.catalog-compact .catalog-table thead th{position:sticky;top:0;z-index:12;background:var(--paper,#f8faf7);box-shadow:0 1px 0 var(--line,#d9e2db);white-space:nowrap}
.catalog-compact .catalog-table thead th:first-child{padding-left:8px}
@media(max-width:900px){.catalog-compact .catalog-table thead th{position:static}}

/* U32: Fila Excel legible, editable y compacta. */
html[data-catalog-profit-view="excel"] .profitability-row>td{padding:6px 8px}
html[data-catalog-profit-view="excel"] .profit-excel{gap:3px;padding:7px 2px 8px}
html[data-catalog-profit-view="excel"] .profit-excel-row{grid-template-columns:92px repeat(var(--profit-cols,12),minmax(82px,1fr));gap:3px}
html[data-catalog-profit-view="excel"] .profit-excel-row>b{font-size:10px;line-height:1.15;padding:6px 4px;color:var(--ink);font-weight:700}
html[data-catalog-profit-view="excel"] .profit-excel-row>.excel-value,
html[data-catalog-profit-view="excel"] .excel-edit-cell,
html[data-catalog-profit-view="excel"] .excel-channel-head{min-width:0;border:1px solid var(--line);border-radius:6px;box-sizing:border-box}
html[data-catalog-profit-view="excel"] .excel-value{display:flex;align-items:center;justify-content:flex-end;min-height:31px;padding:5px 7px;font-size:11px;line-height:1.1;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-catalog-profit-view="excel"] .excel-edit-cell{display:block;position:relative;min-height:31px;padding:2px}
html[data-catalog-profit-view="excel"] .excel-edit-cell input{width:100%;min-width:0;height:25px;padding:3px 20px 3px 6px;border:0;background:transparent;box-shadow:none;font-size:11px;font-weight:700;text-align:right;font-variant-numeric:tabular-nums}
html[data-catalog-profit-view="excel"] .excel-edit-cell input:focus{outline:2px solid rgba(23,50,77,.28);outline-offset:-2px;border-radius:4px}
html[data-catalog-profit-view="excel"] .excel-sync-state{position:absolute;right:4px;top:50%;transform:translateY(-50%);font-size:9px;color:var(--muted);pointer-events:none}
html[data-catalog-profit-view="excel"] .excel-edit-cell.saving .excel-sync-state:after{content:'…'}
html[data-catalog-profit-view="excel"] .excel-edit-cell.saved .excel-sync-state:after{content:'✓'}
html[data-catalog-profit-view="excel"] .excel-edit-cell.error .excel-sync-state:after{content:'!';color:#a7352a;font-weight:800}
html[data-catalog-profit-view="excel"] .profit-excel-row .neg,
html[data-catalog-profit-view="excel"] .profit-excel-row .neg input{color:#b3261e;font-weight:800}
html[data-catalog-profit-view="excel"] .excel-channel-head{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:40px;padding:4px 5px}
html[data-catalog-profit-view="excel"] .excel-head-main{display:flex;align-items:center;min-width:0;gap:5px}
html[data-catalog-profit-view="excel"] .excel-channel-head strong{min-width:0;font-size:10px;line-height:1.05;white-space:normal;text-align:left;overflow:hidden;text-overflow:ellipsis}
html[data-catalog-profit-view="excel"] .excel-light{flex:0 0 auto;width:10px;height:10px;padding:0;border:1px solid rgba(0,0,0,.25);border-radius:50%;background:#c9ced3;box-shadow:none}
html[data-catalog-profit-view="excel"] .excel-light.on{background:#2e9b57;border-color:#237a45;box-shadow:0 0 0 2px rgba(46,155,87,.13)}
html[data-catalog-profit-view="excel"] .excel-head-actions{display:flex;align-items:center;gap:2px;flex:0 0 auto}
html[data-catalog-profit-view="excel"] .excel-head-actions button,
html[data-catalog-profit-view="excel"] .excel-head-actions a,
html[data-catalog-profit-view="excel"] .excel-link-off{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:5px;background:rgba(255,255,255,.72);font-size:11px;line-height:1;text-decoration:none;color:inherit;box-sizing:border-box}
html[data-catalog-profit-view="excel"] .excel-link-off{opacity:.35}
html[data-catalog-profit-view="excel"] [data-company="ibadanica"]{background:#eef4ff;border-color:#b8cff3}
html[data-catalog-profit-view="excel"] [data-company="farela"]{background:#eef9f0;border-color:#b9ddc0}
html[data-catalog-profit-view="excel"] [data-company="bokosia"]{background:#fff4e8;border-color:#edcfaa}
html[data-catalog-profit-view="excel"] .excel-edit-cell[data-company="ibadanica"] input,
html[data-catalog-profit-view="excel"] .excel-edit-cell[data-company="farela"] input,
html[data-catalog-profit-view="excel"] .excel-edit-cell[data-company="bokosia"] input{background:transparent}
@media(max-width:1400px){
 html[data-catalog-profit-view="excel"] .profit-excel-row{grid-template-columns:82px repeat(var(--profit-cols,12),minmax(74px,1fr))}
 html[data-catalog-profit-view="excel"] .excel-channel-head strong,
 html[data-catalog-profit-view="excel"] .excel-value,
 html[data-catalog-profit-view="excel"] .excel-edit-cell input{font-size:10px}
 html[data-catalog-profit-view="excel"] .excel-head-actions a,
 html[data-catalog-profit-view="excel"] .excel-head-actions button,
 html[data-catalog-profit-view="excel"] .excel-link-off{width:19px;height:19px}
}

html[data-catalog-profit-view="excel"] .profit-excel-row.head [data-company="ibadanica"]{box-shadow:inset 0 3px 0 #4e78b8}
html[data-catalog-profit-view="excel"] .profit-excel-row.head [data-company="farela"]{box-shadow:inset 0 3px 0 #4d9b62}
html[data-catalog-profit-view="excel"] .profit-excel-row.head [data-company="bokosia"]{box-shadow:inset 0 3px 0 #c48135}
html[data-catalog-profit-view="excel"] .excel-channel-label{display:flex;min-width:0;flex-direction:column;gap:1px}
html[data-catalog-profit-view="excel"] .excel-channel-label small{font-size:8px;line-height:1;color:var(--muted);font-weight:600}

/* U33: el catalogo usa exclusivamente la vista Excel. */
.catalog-view-switch{display:none!important}
.catalog-view-fixed{margin-left:auto;padding:6px 10px;border:1px solid var(--line);border-radius:7px;background:var(--paper);font-size:11px;font-weight:800;color:var(--ink)}
html[data-catalog-profit-view="excel"] .profit-excel{display:grid!important}
@media(max-width:800px){
 html[data-catalog-profit-view="excel"] .profit-excel{display:grid!important;overflow-x:auto;padding-bottom:10px}
 html[data-catalog-profit-view="excel"] .profit-excel-row{min-width:max-content;grid-template-columns:82px repeat(var(--profit-cols,12),82px)}
 html[data-catalog-profit-view="excel"] .compact-groups:after{content:none!important}
}


/* U34: la vista del catalogo es una hoja Excel real, ancha y legible. */
html[data-catalog-profit-view="excel"] .profitability-row>td{
  padding:6px 8px 10px;
}
html[data-catalog-profit-view="excel"] .profit-strip{
  display:block;
  min-width:0;
}
html[data-catalog-profit-view="excel"] .profit-excel{
  display:block!important;
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  padding:0 0 8px;
  border:1px solid var(--line);
  border-radius:7px;
  background:white;
  scrollbar-gutter:stable;
}
html[data-catalog-profit-view="excel"] .profit-excel-row{
  display:grid;
  grid-template-columns:118px repeat(var(--profit-cols,12),170px)!important;
  gap:0!important;
  width:max-content;
  min-width:100%;
  align-items:stretch;
}
html[data-catalog-profit-view="excel"] .profit-excel-row.head{
  position:sticky;
  top:0;
  z-index:3;
  margin:0!important;
}
html[data-catalog-profit-view="excel"] .profit-excel-row>b{
  display:flex;
  align-items:center;
  min-height:36px;
  margin:0;
  padding:7px 9px!important;
  border:0!important;
  border-right:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  background:#f5f7f4!important;
  color:var(--ink)!important;
  font-size:11px!important;
  font-weight:800!important;
  white-space:nowrap;
}
html[data-catalog-profit-view="excel"] .profit-excel-row.head>b{
  min-height:58px;
}
html[data-catalog-profit-view="excel"] .excel-channel-head,
html[data-catalog-profit-view="excel"] .excel-value,
html[data-catalog-profit-view="excel"] .excel-edit-cell{
  min-width:170px!important;
  margin:0!important;
  border:0!important;
  border-right:1px solid var(--line)!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  box-sizing:border-box;
}
html[data-catalog-profit-view="excel"] .excel-channel-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  min-height:58px!important;
  padding:7px 7px 6px!important;
}
html[data-catalog-profit-view="excel"] .excel-head-main{
  align-items:flex-start!important;
  gap:6px!important;
}
html[data-catalog-profit-view="excel"] .excel-channel-label{
  gap:3px!important;
  overflow:visible!important;
}
html[data-catalog-profit-view="excel"] .excel-channel-head strong{
  display:block;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:normal!important;
  font-size:11.5px!important;
  line-height:1.18!important;
  font-weight:800!important;
  text-align:left!important;
}
html[data-catalog-profit-view="excel"] .excel-channel-label small{
  display:block;
  font-size:9px!important;
  line-height:1.1!important;
  white-space:normal;
}
html[data-catalog-profit-view="excel"] .excel-light{
  width:11px!important;
  height:11px!important;
  margin-top:2px;
}
html[data-catalog-profit-view="excel"] .excel-head-actions{
  align-self:start;
  gap:3px!important;
}
html[data-catalog-profit-view="excel"] .excel-head-actions button,
html[data-catalog-profit-view="excel"] .excel-head-actions a,
html[data-catalog-profit-view="excel"] .excel-link-off{
  width:24px!important;
  height:24px!important;
  border-radius:3px!important;
  font-size:12px!important;
}
html[data-catalog-profit-view="excel"] .excel-value{
  min-height:36px!important;
  padding:7px 9px!important;
  border-radius:0!important;
  font-size:12px!important;
}
html[data-catalog-profit-view="excel"] .excel-edit-cell{
  min-height:36px!important;
  padding:2px 3px!important;
}
html[data-catalog-profit-view="excel"] .excel-edit-cell input{
  height:31px!important;
  padding:4px 22px 4px 7px!important;
  font-size:12px!important;
}
html[data-catalog-profit-view="excel"] .profit-excel-row:last-child>b,
html[data-catalog-profit-view="excel"] .profit-excel-row:last-child .excel-value,
html[data-catalog-profit-view="excel"] .profit-excel-row:last-child .excel-edit-cell{
  border-bottom:0!important;
}
html[data-catalog-profit-view="excel"] [data-company="ibadanica"]{background:#eef4ff!important}
html[data-catalog-profit-view="excel"] [data-company="farela"]{background:#eef9f0!important}
html[data-catalog-profit-view="excel"] [data-company="bokosia"]{background:#fff4e8!important}
html[data-catalog-profit-view="excel"] .profit-excel-row.head [data-company="ibadanica"]{box-shadow:inset 0 4px 0 #4e78b8!important}
html[data-catalog-profit-view="excel"] .profit-excel-row.head [data-company="farela"]{box-shadow:inset 0 4px 0 #4d9b62!important}
html[data-catalog-profit-view="excel"] .profit-excel-row.head [data-company="bokosia"]{box-shadow:inset 0 4px 0 #c48135!important}
@media(max-width:900px){
  html[data-catalog-profit-view="excel"] .profit-excel-row{
    grid-template-columns:105px repeat(var(--profit-cols,12),155px)!important;
  }
  html[data-catalog-profit-view="excel"] .excel-channel-head,
  html[data-catalog-profit-view="excel"] .excel-value,
  html[data-catalog-profit-view="excel"] .excel-edit-cell{min-width:155px!important}
}

/* U35: Excel ajustado al ancho disponible, sin scroll horizontal y semaforos rojo/verde. */
html[data-catalog-profit-view="excel"] .profit-excel{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  overflow-y:visible!important;
  scrollbar-gutter:auto!important;
}
html[data-catalog-profit-view="excel"] .profit-excel-row{
  display:grid!important;
  grid-template-columns:86px repeat(var(--profit-cols,12),minmax(0,1fr))!important;
  gap:0!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
html[data-catalog-profit-view="excel"] .excel-channel-head,
html[data-catalog-profit-view="excel"] .excel-value,
html[data-catalog-profit-view="excel"] .excel-edit-cell{
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
}
html[data-catalog-profit-view="excel"] .excel-channel-head{
  position:relative;
  display:flex!important;
  flex-direction:column;
  align-items:stretch!important;
  justify-content:space-between;
  gap:4px!important;
  min-height:72px!important;
  padding:5px 4px 4px!important;
  overflow:hidden;
}
html[data-catalog-profit-view="excel"] .profit-excel-row.head>b{min-height:72px!important}
html[data-catalog-profit-view="excel"] .excel-head-main{
  display:flex!important;
  align-items:flex-start!important;
  gap:4px!important;
  width:100%;
  min-width:0;
}
html[data-catalog-profit-view="excel"] .excel-channel-label{
  display:block!important;
  min-width:0!important;
  width:100%;
  overflow:visible!important;
}
html[data-catalog-profit-view="excel"] .excel-channel-head strong{
  display:block!important;
  width:100%;
  min-width:0!important;
  font-size:9.5px!important;
  line-height:1.08!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
  word-break:normal;
}
html[data-catalog-profit-view="excel"] .excel-channel-label small{
  display:block!important;
  margin-top:2px;
  font-size:7.5px!important;
  line-height:1.05!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
html[data-catalog-profit-view="excel"] .excel-head-actions{
  display:flex!important;
  justify-content:flex-end;
  align-items:center;
  gap:2px!important;
  width:100%;
}
html[data-catalog-profit-view="excel"] .excel-head-actions button,
html[data-catalog-profit-view="excel"] .excel-head-actions a,
html[data-catalog-profit-view="excel"] .excel-link-off{
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  font-size:10px!important;
}
html[data-catalog-profit-view="excel"] .excel-light{
  flex:0 0 13px!important;
  width:13px!important;
  height:13px!important;
  min-width:13px!important;
  margin-top:0!important;
  border:2px solid #fff!important;
  border-radius:50%!important;
  background:#c9433a!important;
  box-shadow:0 0 0 1px #9f2f28!important;
}
html[data-catalog-profit-view="excel"] .excel-light.on{
  background:#23945a!important;
  box-shadow:0 0 0 1px #17683e!important;
}
html[data-catalog-profit-view="excel"] .excel-light.off{
  background:#c9433a!important;
  box-shadow:0 0 0 1px #9f2f28!important;
}
html[data-catalog-profit-view="excel"] .excel-value{
  padding:5px 4px!important;
  min-height:32px!important;
  font-size:10px!important;
}
html[data-catalog-profit-view="excel"] .excel-edit-cell{
  min-height:32px!important;
  padding:1px 2px!important;
}
html[data-catalog-profit-view="excel"] .excel-edit-cell input{
  height:29px!important;
  padding:3px 15px 3px 3px!important;
  font-size:10px!important;
}
html[data-catalog-profit-view="excel"] .profit-excel-row>b{
  min-width:0!important;
  padding:5px 5px!important;
  font-size:9px!important;
  white-space:normal!important;
}
@media(max-width:1200px){
  html[data-catalog-profit-view="excel"] .profit-excel-row{
    grid-template-columns:74px repeat(var(--profit-cols,12),minmax(0,1fr))!important;
    width:100%!important;
    min-width:0!important;
  }
  html[data-catalog-profit-view="excel"] .excel-channel-head,
  html[data-catalog-profit-view="excel"] .excel-value,
  html[data-catalog-profit-view="excel"] .excel-edit-cell{min-width:0!important}
  html[data-catalog-profit-view="excel"] .excel-channel-head strong{font-size:8.5px!important}
  html[data-catalog-profit-view="excel"] .excel-channel-label small{font-size:7px!important}
}
@media(max-width:900px){
  html[data-catalog-profit-view="excel"] .profit-excel-row{
    grid-template-columns:64px repeat(var(--profit-cols,12),minmax(0,1fr))!important;
    width:100%!important;
    min-width:0!important;
  }
  html[data-catalog-profit-view="excel"] .excel-channel-head,
  html[data-catalog-profit-view="excel"] .excel-value,
  html[data-catalog-profit-view="excel"] .excel-edit-cell{min-width:0!important}
}

/* U36: semaforo independiente del color de empresa/celda. */
html[data-catalog-profit-view="excel"] .excel-light{
  position:relative!important;
  flex:0 0 18px!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  padding:0!important;
  border:2px solid #ffffff!important;
  border-radius:50%!important;
  background:#263238!important;
  box-shadow:0 0 0 1px #263238,0 1px 2px rgba(0,0,0,.28)!important;
  overflow:hidden!important;
}
html[data-catalog-profit-view="excel"] .excel-light:after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:9px;
  height:9px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#d6453d;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.18),0 0 4px rgba(214,69,61,.55);
}
html[data-catalog-profit-view="excel"] .excel-light.on,
html[data-catalog-profit-view="excel"] .excel-light.off{
  background:#263238!important;
  box-shadow:0 0 0 1px #263238,0 1px 2px rgba(0,0,0,.28)!important;
}
html[data-catalog-profit-view="excel"] .excel-light.on:after{
  background:#19a65a!important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.18),0 0 5px rgba(25,166,90,.65)!important;
}
html[data-catalog-profit-view="excel"] .excel-light.off:after{
  background:#d6453d!important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.18),0 0 5px rgba(214,69,61,.65)!important;
}


/* U37: solo numeros mas grandes; no modifica medidas ni anchos. */
html[data-catalog-profit-view="excel"] .excel-value{font-size:12px!important;}
html[data-catalog-profit-view="excel"] .excel-edit-cell input{font-size:12px!important;}
@media(max-width:1200px){
  html[data-catalog-profit-view="excel"] .excel-value,
  html[data-catalog-profit-view="excel"] .excel-edit-cell input{font-size:11px!important;}
}

/* U41 SoloColagenos: popup por parejas, sin tocar el resto de canales. */
.solo-pairs-wrap{display:grid;gap:12px}.solo-pair-row{border:1px solid var(--line);border-radius:10px;padding:10px;background:rgba(255,255,255,.55)}.solo-pair-row>h3{margin:0 0 8px;font-size:13px;text-transform:uppercase;letter-spacing:.04em}.solo-pair-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.solo-pair-card{min-width:0;border:1px solid #d7dfda;border-radius:11px;background:#fff;padding:11px}.solo-pair-card.missing{display:flex;flex-direction:column;justify-content:center;min-height:150px;background:#f7f8f7;color:var(--muted)}.solo-pair-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.solo-pair-title>strong{font-size:14px}.solo-pair-top{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start}.solo-pair-img{width:64px;height:64px;object-fit:contain;border:1px solid var(--line);border-radius:8px;background:#fff}.solo-pair-product{border:0;background:none;padding:0;text-align:left;font-weight:800;font-size:14px;color:inherit}.solo-pair-top p{margin:3px 0}.solo-commercial{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:9px 0}.solo-commercial span{border:1px solid var(--line);border-radius:7px;padding:6px;min-width:0}.solo-commercial small{display:block;font-size:9px;text-transform:uppercase;color:var(--muted);font-weight:700}.solo-commercial b{display:block;margin-top:2px;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}.solo-pair-card .listing-profit-form .profit-head strong{font-size:11px}.solo-pair-card .listing-profit-form .profit-edit-grid input{font-size:13px;font-weight:700}.solo-more{margin-top:8px;border-top:1px solid var(--line);padding-top:6px}.solo-more summary{cursor:pointer;font-size:11px;font-weight:700}.solo-more form{margin-top:8px}.solo-pair-card .profit-readonly-grid{font-size:10px}.solo-pair-card .profit-min-grid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:900px){.solo-pair-grid{grid-template-columns:1fr}.solo-commercial{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* U43: descuento editable en cada version SoloColagenos sin alterar la geometria del popup. */
.solo-commercial .solo-discount-edit{border:1px solid var(--line);border-radius:7px;padding:6px;min-width:0;display:block}
.solo-commercial .solo-discount-edit input{width:100%;min-width:0;margin-top:2px;padding:2px 4px;border:1px solid var(--line);border-radius:4px;background:#fff;font:700 13px/1.2 inherit;font-variant-numeric:tabular-nums}
.solo-commercial .solo-discount-edit em{display:block;min-height:10px;margin-top:2px;font-size:9px;font-style:normal;color:var(--muted);white-space:normal}
/* U44: estado independiente por referencia dentro de cada popup */
.listing-active-toggle{display:inline-flex;align-items:center;gap:5px;margin-left:auto;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}
.listing-active-toggle input{position:absolute;opacity:0;pointer-events:none}
.listing-light{width:14px;height:14px;border-radius:50%;display:inline-block;border:2px solid #fff;box-shadow:0 0 0 2px #22312f;background:#b3261e}
.listing-light.on{background:#138a45}.listing-light.off{background:#b3261e}
.listing-active-toggle input:focus-visible+.listing-light{outline:2px solid currentColor;outline-offset:3px}
.channel-listing-head,.solo-pair-title{align-items:center;gap:8px}
/* U46: referencias concretas que disparan la incidencia de margen. */
.incident-ref-list{display:grid;gap:4px;margin:7px 0 10px;padding:8px;border:1px solid #ead3a9;border-radius:7px;background:#fffaf0;font-size:11px}.incident-ref-list strong{font-size:11px}.incident-ref-list span{display:block;overflow-wrap:anywhere}
