/*
  Ecosonics shared visual layer.
  Scope: dashboard modules only. POS (/captura) does not load this file.
  Purpose: visual consistency without moving controls or changing behavior.
*/

:root{
  --eco-radius:12px;
  --eco-radius-sm:9px;
  --eco-border:var(--b,rgba(74,0,128,.12));
  --eco-border-strong:rgba(168,85,212,.22);
  --eco-card:#fff;
  --eco-card-soft:#fbf9fe;
  --eco-shadow:0 1px 3px rgba(26,13,51,.045);
  --eco-shadow-hover:0 6px 18px rgba(26,13,51,.075);
  --eco-active-bg:rgba(168,85,212,.095);
  --eco-active-border:rgba(168,85,212,.28);
  --eco-text:var(--tx,#160f2f);
  --eco-muted:var(--mu,#635985);
  --eco-safe-fab:104px;
  /* Acentos. Faltaban: 27 reglas de esta hoja pedian --eco-primary,
     --eco-success y --eco-danger, que no estaban definidos en ninguna parte.
     Un var() sin definir invalida la propiedad completa: `background` caia a
     transparent y `color:#fff` sobrevivia, asi que "Excel" y "Marcar
     confirmada" quedaban en blanco sobre la tarjeta blanca. Los tokens de
     texto son sensibles al tema; los `-solid` son fondo con texto blanco y
     no cambian, para que el contraste del boton no dependa del tema. */
  --eco-primary:#6b46c1;
  --eco-success:#15803d;
  --eco-danger:#dc2626;
  --eco-primary-solid:#6b46c1;
  --eco-success-solid:#15803d;
  --eco-danger-solid:#dc2626;
}

[data-theme="dark"]{
  --eco-card:var(--card,#16103d);
  --eco-card-soft:rgba(255,255,255,.035);
  --eco-border:rgba(255,255,255,.08);
  --eco-border-strong:rgba(168,85,212,.28);
  --eco-shadow:0 1px 3px rgba(0,0,0,.22);
  --eco-shadow-hover:0 8px 22px rgba(0,0,0,.28);
  /* Sobre tarjeta oscura los acentos del tema claro se pierden. Los `-solid`
     NO se redefinen: siguen llevando texto blanco encima. */
  --eco-primary:#c9a4f5;
  --eco-success:#5ecba1;
  --eco-danger:#f08a8a;
}

/* Canonical component aliases -------------------------------------------- */
/* `.eco-tabs` / `.eco-tab` VIVEN al final de este archivo, en el bloque
   "NAVEGACION CANONICA". Aqui hubo un alias que los dibujaba como pildoras y
   que nadie usaba; con `.page-section` delante le ganaba en especificidad a la
   clase real y habria pisado el subrayado. Retirado el 2026-08-17. */
.page-section .eco-toolbar{
  display:flex;
  align-items:center;
  gap:.35rem;
  flex-wrap:wrap;
}

/* Shell operativo canonico: contexto -> tabs -> toolbar -> contenido. */
.page-section .eco-module-intro{
  display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;
  margin:0 0 1rem;padding:0;background:transparent;border:0;box-shadow:none;
}
.eco-module-intro__eyebrow{color:var(--eco-nav-on,var(--p4));font:600 .68rem/1.4 "DM Sans",sans-serif}
.eco-module-intro h2{margin:.15rem 0 .25rem;color:var(--hd,var(--eco-text));font:800 1.32rem/1.2 "DM Sans",sans-serif;letter-spacing:-.02em}
.eco-module-intro p{margin:0;max-width:760px;color:var(--eco-muted);font:400 .82rem/1.55 "DM Sans",sans-serif}
.eco-module-intro__actions{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;flex-wrap:wrap}

.page-section .eco-directory-toolbar{
  display:grid;grid-template-columns:auto minmax(220px,1fr) auto;align-items:center;
  gap:.55rem;margin:-.35rem 0 1rem;padding:.65rem;background:var(--eco-card);
  border:1px solid var(--eco-border);border-radius:var(--eco-radius);box-shadow:var(--eco-shadow);
}
.eco-directory-toolbar__filters,.eco-directory-toolbar__actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.eco-directory-toolbar__search{position:relative;min-width:0}
.eco-directory-toolbar__search svg{position:absolute;left:.75rem;top:50%;width:16px;height:16px;transform:translateY(-50%);stroke:var(--eco-muted);fill:none;pointer-events:none}
.page-section .eco-directory-toolbar input,.page-section .eco-directory-toolbar select{
  min-height:44px;box-sizing:border-box;border:1px solid var(--eco-border);border-radius:var(--eco-radius-sm);
  background:var(--eco-card-soft);color:var(--eco-text);font:500 .8rem/1.2 "DM Sans",sans-serif;
}
.page-section .eco-directory-toolbar input{width:100%;padding:.65rem .8rem .65rem 2.25rem}
.page-section .eco-directory-toolbar select{padding:.6rem 2rem .6rem .75rem;cursor:pointer}
.page-section .eco-directory-toolbar input:focus,.page-section .eco-directory-toolbar select:focus{outline:2px solid rgba(139,0,204,.2);border-color:var(--eco-nav-on)}
.page-section .eco-directory-surface{background:var(--eco-card);border:1px solid var(--eco-border);border-radius:var(--eco-radius);box-shadow:var(--eco-shadow);padding:1rem}
.eco-directory-toolbar__count{color:var(--eco-muted);font:600 .72rem/1.2 "DM Sans",sans-serif;white-space:nowrap}
.page-section .eco-directory-toolbar--filters{display:flex;align-items:center;justify-content:flex-start;gap:.45rem;margin:.75rem 0 1rem;padding:.65rem .75rem}
/* Rango de fechas dentro de una barra de filtros: el input de fecha no lleva
   el hueco de la lupa ni ocupa todo el ancho como el buscador. */
.eco-directory-toolbar__fecha{display:inline-flex;align-items:center;gap:.35rem;color:var(--eco-muted);font:600 .72rem/1.2 "DM Sans",sans-serif;white-space:nowrap}
.page-section .eco-directory-toolbar .eco-directory-toolbar__fecha input{width:auto;padding:.6rem .7rem}

/* Compatibility layer for established modules. These aliases standardize the
   shell without changing their IDs, handlers, tab state or business flow. */
.page-section .invmc-app-head.eco-module-intro{margin-bottom:0}
.page-section .invmc-toolbar.eco-directory-toolbar{grid-template-columns:minmax(0,1fr) minmax(240px,340px);margin-top:0}
.page-section .invmc-toolbar.eco-directory-toolbar .eco-tabs {min-width:0;margin:0;border-bottom:0}
.page-section .invmc-toolbar.eco-directory-toolbar .invmc-search{width:100%}
.page-section .invmc-toolbar.eco-directory-toolbar .invmc-search input{width:100%;padding-left:.8rem}
.page-section .po-command-bar.eco-directory-toolbar{grid-template-columns:auto minmax(260px,1fr) auto}
.page-section .af-head.eco-module-intro,.page-section .gar-hero.eco-module-intro{margin-bottom:0}
.page-section .af-toolbar.eco-directory-toolbar,.page-section .gar-toolbar.eco-directory-toolbar{margin:0 0 .8rem}
.page-section .prod-shell>.eco-tabs {margin-bottom:1rem}

@media(max-width:768px){
  .page-section .eco-module-intro{flex-direction:column}
  .eco-module-intro__actions{width:100%;justify-content:flex-start}
  .page-section .eco-directory-toolbar{grid-template-columns:1fr;margin-top:0}
  .eco-directory-toolbar__filters,.eco-directory-toolbar__actions{width:100%}
  .eco-directory-toolbar__filters select{flex:1;min-width:140px}
  .page-section .invmc-toolbar.eco-directory-toolbar,.page-section .po-command-bar.eco-directory-toolbar{grid-template-columns:1fr}
}

.page-section .eco-card,
.page-section .eco-kpi-card,
.page-section .eco-empty-state,
.page-section .eco-callout{
  background:var(--eco-card);
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  box-shadow:var(--eco-shadow);
}

.page-section .eco-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.75rem;
}

.page-section .eco-kpi-card{
  padding:1rem 1.1rem;
}

.page-section .eco-kpi-label{
  color:var(--eco-muted);
  font-family:"DM Sans",sans-serif;
  font-size:.72rem;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
}

.page-section .eco-kpi-value{
  color:var(--eco-text);
  font-family:"DM Sans",sans-serif;
  font-size:1.75rem;
  font-weight:800;
  letter-spacing:-.02em;
}

.page-section .eco-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  background:var(--eco-card);
}

.page-section .eco-callout{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  min-height:48px;
  padding:.75rem .95rem;
  background:rgba(168,85,212,.045);
  border-color:rgba(168,85,212,.14);
}

.page-section .eco-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:140px;
  padding:1.25rem;
  text-align:center;
  color:var(--eco-muted);
}

.page-section .eco-empty-state svg{
  width:34px;
  height:34px;
  color:var(--p3,#a855d4);
  opacity:.78;
}

.page-section .eco-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.75rem;
}

/* Unified tab bars -------------------------------------------------------- */
.page-section .fb-chip,
.page-section .invmc-tab,
.page-section .mtab,
.page-section .ped-tab,
.page-section .cli-tab,
.page-section .af-tab,
.page-section .asis-mod-tab,
.page-section .asis-cat-tab,
.page-section .asis-emp-tab,
.page-section .snt-evt-tab,
.page-section .inv-readonly-tab{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.38rem;
  padding:.46rem .72rem;
  border:1px solid transparent;
  border-radius:var(--eco-radius-sm);
  background:transparent;
  color:var(--eco-muted);
  font-family:"DM Sans",sans-serif;
  font-size:.74rem;
  font-weight:650;
  letter-spacing:0;
  text-transform:none;
  line-height:1.1;
  box-shadow:none;
  white-space:nowrap;
}

.page-section .fb-chip:hover,
.page-section .invmc-tab:hover,
.page-section .mtab:hover,
.page-section .ped-tab:hover,
.page-section .cli-tab:hover,
.page-section .af-tab:hover,
.page-section .asis-mod-tab:hover,
.page-section .asis-cat-tab:hover,
.page-section .asis-emp-tab:hover,
.page-section .snt-evt-tab:hover,
.page-section .inv-readonly-tab:hover{
  background:rgba(168,85,212,.055);
  border-color:var(--eco-active-border);
  color:var(--eco-text);
  transform:none;
}

.page-section .fb-chip.active,
.page-section .invmc-tab.active,
.page-section .mtab.active,
.page-section .ped-tab.active,
.page-section .cli-tab.active,
.page-section .af-tab.active,
.page-section .asis-mod-tab-active,
.page-section .asis-mod-tab.asis-tab-active,
.page-section .asis-cat-tab.asis-cat-active,
.page-section .asis-emp-tab-active,
.page-section .asis-emp-tab.active,
.page-section .snt-evt-tab.active,
.page-section .inv-readonly-tab.active{
  background:var(--eco-active-bg);
  border-color:var(--eco-active-border);
  color:var(--p4,#8b00cc);
  box-shadow:none;
}

.page-section .module-tabs,
.page-section .invmc-tabs,
.page-section .cli-tabs,
.page-section .af-tabs,
.page-section .asis-mod-tabs,
.page-section .asis-cat-tabs,
.page-section .asis-emp-tabs,
.page-section .inv-readonly-tabs{
  gap:.35rem;
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.page-section .module-tabs::-webkit-scrollbar,
.page-section .invmc-tabs::-webkit-scrollbar,
.page-section .cli-tabs::-webkit-scrollbar,
.page-section .af-tabs::-webkit-scrollbar,
.page-section .asis-mod-tabs::-webkit-scrollbar,
.page-section .asis-cat-tabs::-webkit-scrollbar,
.page-section .asis-emp-tabs::-webkit-scrollbar,
.page-section .inv-readonly-tabs::-webkit-scrollbar{
  display:none;
}

/* Unified cards and KPI cards -------------------------------------------- */
.page-section .kpi-card,
.page-section .invmc-metric,
.page-section .v-kpi,
.page-section .ped-kpi,
.page-section .af-kpi,
.page-section .af-chip,
.page-section .prov-metric,
.page-section .asis-kpi,
.page-section .asis-kpi-card,
.page-section .asis-rot-kpi,
.page-section .asis-gantt-kpi,
.page-section .asis-ia-kpi,
.page-section .snt-kpi,
.page-section .ent-metric,
.page-section .mlc-metric,
.page-section .chart-card,
.page-section .invmc-panel,
.page-section .invmc-eco-item,
.page-section .invmc-sale-card,
.page-section .invmc-priority-card,
.page-section .hunter-card,
.page-section .meta-bar-card{
  background:var(--eco-card);
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  box-shadow:var(--eco-shadow);
}

.page-section .kpi-card:hover,
.page-section .invmc-metric:hover,
.page-section .v-kpi:hover,
.page-section .ped-kpi:hover,
.page-section .af-kpi:hover,
.page-section .af-chip:hover,
.page-section .asis-kpi:hover,
.page-section .asis-kpi-card:hover,
.page-section .asis-rot-kpi:hover,
.page-section .asis-gantt-kpi:hover,
.page-section .asis-ia-kpi:hover,
.page-section .snt-kpi:hover,
.page-section .chart-card:hover,
.page-section .invmc-eco-item:hover,
.page-section .invmc-sale-card:hover,
.page-section .invmc-priority-card:hover{
  border-color:var(--eco-border-strong);
  box-shadow:var(--eco-shadow-hover);
  transform:none;
}

.page-section .kpi-card::before,
.page-section .invmc-metric::before,
.page-section #asisSectionHome .asis-kpi::before{
  opacity:0;
}

.page-section .kpi-glow,
.page-section .v-kpi-glow{
  opacity:.04;
  filter:blur(18px);
}

.page-section .kpi-label,
.page-section .v-kpi-label,
.page-section .ped-kpi-lbl,
.page-section .af-kpi span,
.page-section .af-chip span,
.page-section .asis-kpi-lbl,
.page-section .asis-rot-kpi-label,
.page-section .asis-gantt-kpi-label,
.page-section .asis-ia-kpi-lbl,
.page-section .snt-kpi-lbl,
.page-section .ent-metric-lbl,
.page-section .mlc-metric-lbl,
.page-section .invmc-metric span{
  font-family:"DM Sans",sans-serif;
  color:var(--eco-muted);
  font-size:.72rem;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  opacity:.9;
}

.page-section .kpi-value,
.page-section .v-kpi-value,
.page-section .ped-kpi-val,
.page-section .af-kpi strong,
.page-section .af-chip strong,
.page-section .asis-kpi-val,
.page-section .asis-rot-kpi-value,
.page-section .asis-gantt-kpi-value,
.page-section .asis-ia-kpi-val,
.page-section .snt-kpi-val,
.page-section .ent-metric-val,
.page-section .mlc-metric-val,
.page-section .invmc-metric strong{
  font-family:"DM Sans",sans-serif;
  color:var(--eco-text);
  font-weight:800;
  letter-spacing:-.02em;
}

/* Unified tables ---------------------------------------------------------- */
.page-section table,
.page-section .invmc-table,
.page-section .v-table,
.page-section .ped-table,
.page-section .hunter-table,
.page-section .af-table,
.page-section .asis-table,
.page-section .asis-excel-table,
.page-section .inv-readonly-table,
.page-section .inv-snapshot-table,
.page-section .inv-imp-table{
  border-collapse:collapse;
  color:var(--eco-text);
}

.page-section table th,
.page-section .invmc-table th,
.page-section .v-table th,
.page-section .ped-table th,
.page-section .hunter-table th,
.page-section .af-table th,
.page-section .asis-table th,
.page-section .asis-excel-table th,
.page-section .inv-readonly-table th,
.page-section .inv-snapshot-table th,
.page-section .inv-imp-table th{
  background:var(--eco-card-soft);
  color:var(--eco-muted);
  font-family:"DM Sans",sans-serif;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
  border-bottom:1px solid var(--eco-border);
}

.page-section table td,
.page-section .invmc-table td,
.page-section .v-table td,
.page-section .ped-table td,
.page-section .hunter-table td,
.page-section .af-table td,
.page-section .asis-table td,
.page-section .asis-excel-table td,
.page-section .inv-readonly-table td,
.page-section .inv-snapshot-table td,
.page-section .inv-imp-table td{
  border-bottom:1px solid var(--eco-border);
  color:var(--eco-text);
}

.page-section table tr:hover td,
.page-section .invmc-table tr:hover td,
.page-section .v-table tr:hover td,
.page-section .ped-table tr:hover td,
.page-section .hunter-table tr:hover td,
.page-section .af-table tr:hover td,
.page-section .asis-table tr:hover td,
.page-section .asis-excel-table tr:hover td{
  background:rgba(168,85,212,.04);
}

.page-section .af-table-wrap,
.page-section .inv-table-wrap,
.page-section .invmc-table-wrap,
.page-section .ped-table-wrap,
.page-section .asis-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* Unified form and action surfaces --------------------------------------- */
.page-section input,
.page-section select,
.page-section textarea{
  border-color:var(--eco-border);
  border-radius:var(--eco-radius-sm);
  box-shadow:none;
}

.page-section input:focus,
.page-section select:focus,
.page-section textarea:focus{
  border-color:var(--eco-active-border);
  outline:2px solid rgba(168,85,212,.12);
  outline-offset:0;
}

.page-section .invmc-btn-primary,
.page-section .sm-btn-primary,
.page-section .af-primary,
.page-section .nd-cta.primary,
.page-section .ped-demo-cta,
.page-section .ped-wiz-btn-next,
.page-section .tpl-dl-btn,
.page-section .empty-state-cta{
  background:var(--p4,#8b00cc);
  border-color:var(--p4,#8b00cc);
  color:#fff;
  box-shadow:none;
}

.page-section .invmc-btn-secondary,
.page-section .af-secondary,
.page-section .empty-state-cta.secondary{
  background:transparent;
  border-color:var(--eco-active-border);
  color:var(--p4,#8b00cc);
  box-shadow:none;
}

/* Compact callouts. Keep content and actions in place, only quiet the visual. */
.page-section .v-discovery,
.page-section .invmc-hero,
.page-section .capital-alert,
.page-section .dash-agentic-bar,
.page-section .tpl-banner,
.page-section .af-hero,
.page-section .wa-banner{
  background:rgba(168,85,212,.045);
  border:1px solid rgba(168,85,212,.14);
  border-radius:var(--eco-radius);
  box-shadow:var(--eco-shadow);
}

.page-section .empty-state,
.page-section .af-empty,
.page-section .invmc-empty,
.page-section .ped-empty,
.page-section .asis-empty{
  border-radius:var(--eco-radius);
  color:var(--eco-muted);
}

.page-section .filter-bar,
.page-section .invmc-filter-row,
.page-section .af-toolbar,
.page-section .prov-toolbar{
  gap:.55rem;
}

/* Inventory physical count ------------------------------------------------ */
.page-section .inv-cnt-panel{
  max-width:760px;
  padding:1.1rem 1.2rem;
  background:rgba(168,85,212,.045);
  border:1px solid rgba(168,85,212,.14);
  border-radius:var(--eco-radius);
  box-shadow:var(--eco-shadow);
}

.page-section .inv-cnt-head,
.page-section .inv-cnt-actions,
.page-section .inv-cnt-inline,
.page-section .inv-cnt-row{
  display:flex;
  align-items:center;
  gap:.6rem;
  flex-wrap:wrap;
}

.page-section .inv-cnt-head{
  justify-content:space-between;
  margin-bottom:.85rem;
}

.page-section .inv-cnt-title{
  display:flex;
  align-items:center;
  gap:.45rem;
  color:var(--eco-text);
  font-size:.98rem;
  font-weight:800;
  line-height:1.25;
}

.page-section .inv-cnt-section-title{
  color:var(--eco-text);
  font-size:.84rem;
  font-weight:750;
  margin:.45rem 0 .45rem;
}

.page-section .inv-cnt-muted{
  color:var(--eco-muted);
  font-size:.74rem;
  line-height:1.55;
}

.page-section .inv-cnt-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.7rem;
  margin-bottom:.85rem;
}

.page-section .inv-cnt-label{
  display:block;
  color:var(--eco-muted);
  font-size:.72rem;
  font-weight:650;
}

.page-section .inv-cnt-input{
  width:100%;
  box-sizing:border-box;
  margin-top:.25rem;
  padding:.55rem .72rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card);
  color:var(--eco-text);
  font-size:.8rem;
}

.page-section .inv-cnt-input.mono{
  font-family:"DM Mono",monospace;
}

.page-section .inv-cnt-options{
  display:flex;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:1rem;
}

.page-section .inv-cnt-option{
  display:flex;
  align-items:center;
  gap:.35rem;
  color:var(--eco-text);
  font-size:.77rem;
  cursor:pointer;
}

.page-section .inv-cnt-btn{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  padding:.5rem .95rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:transparent;
  color:var(--eco-text);
  font-size:.76rem;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  box-shadow:none;
}

.page-section .inv-cnt-btn.primary{
  background:var(--p4,#8b00cc);
  border-color:var(--p4,#8b00cc);
  color:#fff;
}

.page-section .inv-cnt-btn.success{
  background:#22c55e;
  border-color:#22c55e;
  color:#fff;
}

.page-section .inv-cnt-btn.danger{
  border-color:#ef4444;
  color:#ef4444;
}

.page-section .inv-cnt-btn.ghost{
  color:var(--eco-muted);
}

.page-section .inv-cnt-history{
  margin-top:1.15rem;
}

.page-section .inv-cnt-list{
  display:flex;
  flex-direction:column;
  gap:.4rem;
}

.page-section .inv-cnt-row{
  justify-content:space-between;
  padding:.5rem .75rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card);
  font-size:.75rem;
}

.page-section .inv-cnt-row-main{
  flex:1;
  min-width:180px;
}

.page-section .inv-cnt-status.ok{
  color:#16a34a;
  font-weight:750;
}

.page-section .inv-cnt-kpis{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:.6rem;
  margin-bottom:.9rem;
}

.page-section .inv-cnt-kpi{
  padding:.7rem .9rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  background:var(--eco-card);
}

.page-section .inv-cnt-kpi-label{
  color:var(--eco-muted);
  font-size:.7rem;
  font-weight:650;
}

.page-section .inv-cnt-kpi-value{
  color:var(--eco-text);
  font-size:1.28rem;
  font-weight:800;
  letter-spacing:-.015em;
}

.page-section .inv-cnt-scan{
  padding:1rem 1.05rem;
  margin-bottom:.9rem;
  background:rgba(168,85,212,.055);
  border:1px solid var(--eco-active-border);
  border-radius:var(--eco-radius);
}

.page-section .inv-cnt-manual{
  margin-bottom:.9rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  overflow:hidden;
  background:var(--eco-card);
}

.page-section .inv-cnt-manual summary{
  padding:.65rem .95rem;
  color:var(--eco-text);
  font-size:.8rem;
  font-weight:750;
  cursor:pointer;
  list-style:none;
  background:var(--eco-card-soft);
}

.page-section .inv-cnt-manual-body{
  padding:.75rem .95rem;
}

.page-section .inv-cnt-callout{
  padding:.6rem .85rem;
  border-radius:var(--eco-radius-sm);
  border:1px solid var(--eco-border);
  background:var(--eco-card-soft);
  color:var(--eco-muted);
  font-size:.78rem;
  line-height:1.5;
}

.page-section .inv-cnt-callout.warn{
  border-color:rgba(245,158,11,.35);
  background:rgba(245,158,11,.07);
}

.page-section .inv-cnt-callout.success{
  border-color:rgba(34,197,94,.28);
  background:rgba(34,197,94,.07);
}

.page-section .inv-cnt-callout.danger{
  border-color:rgba(239,68,68,.28);
  background:rgba(239,68,68,.06);
}

.page-section .inv-cnt-table-wrap{
  overflow-x:auto;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  background:var(--eco-card);
  -webkit-overflow-scrolling:touch;
}

.page-section .inv-cnt-table{
  width:100%;
  min-width:620px;
  border-collapse:collapse;
  font-size:.76rem;
}

.page-section .inv-cnt-table th,
.page-section .inv-cnt-table td{
  padding:.38rem .55rem;
  border-bottom:1px solid var(--eco-border);
}

.page-section .inv-cnt-table th{
  background:var(--eco-card-soft);
  color:var(--eco-muted);
  font-size:.68rem;
  font-weight:700;
  text-align:left;
}

.page-section .inv-cnt-num{
  text-align:right;
  font-family:"DM Mono",monospace;
}

.page-section .inv-cnt-link-num{
  cursor:pointer;
  border-bottom:1px dashed var(--eco-muted);
}

.page-section .inv-cnt-icon{
  width:17px;
  height:17px;
  color:currentColor;
}

/* Proveedores / Ordenes de Compra ---------------------------------------- */
.page-section .prov-oc-loading,
.page-section .prov-oc-empty,
.page-section .prov-oc-error{
  padding:1rem;
  color:var(--eco-muted);
  font-size:.8rem;
  line-height:1.5;
  text-align:center;
}

.page-section .prov-oc-empty{
  padding:2rem 1rem;
}

.page-section .prov-oc-error{
  color:var(--eco-danger);
}

.page-section .prov-oc-card{
  padding:.95rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  background:rgba(168,85,212,.045);
}

.page-section .prov-oc-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}

.page-section .prov-oc-main{
  flex:1 1 280px;
  min-width:0;
}

.page-section .prov-oc-title-row{
  display:flex;
  align-items:center;
  gap:.55rem;
  flex-wrap:wrap;
}

.page-section .prov-oc-title{
  color:var(--eco-text);
  font-family:"DM Mono",monospace;
  font-size:.94rem;
  font-weight:800;
}

.page-section .prov-oc-badge{
  display:inline-flex;
  align-items:center;
  min-height:21px;
  padding:2px 8px;
  border-radius:999px;
  background:var(--eco-card-soft);
  color:var(--eco-muted);
  font-size:.64rem;
  font-weight:800;
  line-height:1;
  text-transform:uppercase;
}

.page-section .prov-oc-badge.manual{
  background:rgba(168,85,212,.13);
  color:var(--eco-primary);
}

.page-section .prov-oc-badge[data-state="borrador"]{
  background:rgba(107,114,128,.12);
  color:#6b7280;
}

.page-section .prov-oc-badge[data-state="enviada"]{
  background:rgba(59,130,246,.12);
  color:#2563eb;
}

.page-section .prov-oc-badge[data-state="confirmada"]{
  background:rgba(139,92,246,.13);
  color:#7c3aed;
}

.page-section .prov-oc-badge[data-state="recibida_parcial"]{
  background:rgba(245,158,11,.14);
  color:#b45309;
}

.page-section .prov-oc-badge[data-state="recibida"],
.page-section .prov-oc-badge[data-state="cerrada"]{
  background:rgba(34,197,94,.13);
  color:#15803d;
}

.page-section .prov-oc-badge[data-state="cancelada"]{
  background:rgba(239,68,68,.11);
  color:var(--eco-danger);
}

.page-section .prov-oc-meta{
  margin-top:.28rem;
  color:var(--eco-muted);
  font-size:.78rem;
  line-height:1.45;
}

.page-section .prov-oc-remision{
  display:flex;
  align-items:center;
  gap:.45rem;
  flex-wrap:wrap;
  margin-top:.55rem;
  color:var(--eco-muted);
  font-size:.74rem;
}

.page-section .prov-oc-remision-label{
  font-weight:700;
}

.page-section .prov-oc-input,
.page-section .prov-manual-input,
.page-section .prov-manual-select,
.prov-manual-overlay .prov-manual-input,
.prov-manual-overlay .prov-manual-select{
  min-height:34px;
  padding:.43rem .58rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card);
  color:var(--eco-text);
  font-size:.78rem;
  outline:none;
}

.page-section .prov-oc-input:focus,
.page-section .prov-manual-input:focus,
.page-section .prov-manual-select:focus,
.prov-manual-overlay .prov-manual-input:focus,
.prov-manual-overlay .prov-manual-select:focus{
  border-color:var(--eco-active-border);
  box-shadow:0 0 0 3px rgba(168,85,212,.11);
}

.page-section .prov-oc-input.mono,
.page-section .prov-manual-input.mono,
.prov-manual-overlay .prov-manual-input.mono{
  font-family:"DM Mono",monospace;
}

.page-section .prov-oc-rem-status{
  color:var(--eco-muted);
  font-size:.66rem;
}

.page-section .prov-oc-rem-status.is-success{
  color:var(--eco-success);
}

.page-section .prov-oc-rem-status.is-error{
  color:var(--eco-danger);
}

.page-section .prov-oc-total{
  text-align:right;
}

.page-section .prov-oc-total span{
  display:block;
  color:var(--eco-muted);
  font-size:.65rem;
}

.page-section .prov-oc-total strong{
  color:var(--eco-text);
  font-size:1rem;
  font-weight:800;
}

.page-section .prov-oc-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.45rem;
  margin-top:.75rem;
  font-size:.74rem;
}

.page-section .prov-oc-stat span,
.page-section .prov-oc-progress{
  color:var(--eco-muted);
}

.page-section .prov-oc-stat strong{
  color:var(--eco-text);
  font-weight:800;
}

.page-section .prov-oc-stat strong.is-complete{
  color:var(--eco-success);
}

.page-section .prov-oc-actions{
  display:flex;
  gap:.45rem;
  flex-wrap:wrap;
  margin-top:.7rem;
}

.page-section .prov-oc-btn,
.page-section .prov-manual-btn,
.prov-manual-overlay .prov-manual-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:.42rem .72rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:transparent;
  color:var(--eco-text);
  font-size:.72rem;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}

.page-section .prov-oc-btn.primary,
.page-section .prov-manual-btn.primary,
.prov-manual-overlay .prov-manual-btn.primary{
  border-color:var(--eco-primary-solid);
  background:var(--eco-primary-solid);
  color:#fff;
}

.page-section .prov-oc-btn.success,
.page-section .prov-manual-btn.success,
.prov-manual-overlay .prov-manual-btn.success{
  border-color:var(--eco-success-solid);
  background:var(--eco-success-solid);
  color:#fff;
}

.page-section .prov-oc-btn.info{
  border-color:#2563eb;
  background:#2563eb;
  color:#fff;
}

.page-section .prov-oc-btn.warn{
  border-color:#d97706;
  background:#d97706;
  color:#fff;
}

.page-section .prov-oc-btn.danger,
.page-section .prov-manual-btn.danger,
.prov-manual-overlay .prov-manual-btn.danger{
  border-color:rgba(239,68,68,.35);
  background:rgba(239,68,68,.08);
  color:var(--eco-danger);
}

.prov-manual-overlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
  background:rgba(15,10,26,.56);
}

.page-section .prov-manual-modal,
.prov-manual-overlay .prov-manual-modal{
  width:min(920px,96vw);
  max-height:90vh;
  overflow-y:auto;
  padding:1.2rem;
  border:1px solid var(--eco-border);
  border-radius:14px;
  background:var(--eco-card);
}

.page-section .prov-manual-head,
.page-section .prov-manual-row-head,
.page-section .prov-manual-footer,
.prov-manual-overlay .prov-manual-head,
.prov-manual-overlay .prov-manual-row-head,
.prov-manual-overlay .prov-manual-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}

.page-section .prov-manual-head,
.prov-manual-overlay .prov-manual-head{
  margin-bottom:.8rem;
}

.page-section .prov-manual-kicker,
.prov-manual-overlay .prov-manual-kicker{
  color:var(--eco-muted);
  font-size:.7rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.page-section .prov-manual-title,
.prov-manual-overlay .prov-manual-title{
  margin:.2rem 0 0;
  color:var(--eco-text);
  font-size:1.05rem;
}

.page-section .prov-manual-close,
.prov-manual-overlay .prov-manual-close{
  width:34px;
  height:34px;
  padding:0;
  border:0;
  background:transparent;
  color:var(--eco-muted);
  font-size:1.4rem;
  line-height:1;
  cursor:pointer;
}

.page-section .prov-manual-grid,
.prov-manual-overlay .prov-manual-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.65rem;
  margin-bottom:.75rem;
}

.page-section .prov-manual-field,
.prov-manual-overlay .prov-manual-field{
  display:flex;
  flex-direction:column;
  gap:.25rem;
  color:var(--eco-muted);
  font-size:.74rem;
  font-weight:650;
}

.page-section .prov-manual-note,
.prov-manual-overlay .prov-manual-note{
  margin-bottom:.55rem;
  color:var(--eco-muted);
  font-size:.72rem;
  line-height:1.45;
}

.page-section .prov-manual-items,
.prov-manual-overlay .prov-manual-items{
  display:flex;
  flex-direction:column;
  gap:.45rem;
  margin-bottom:.75rem;
}

.page-section .prov-manual-item,
.prov-manual-overlay .prov-manual-item{
  position:relative;
  display:grid;
  grid-template-columns:minmax(230px,1.25fr) 135px minmax(180px,1fr) 74px 105px 34px;
  gap:.45rem;
  align-items:start;
  padding:.6rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  background:var(--eco-card-soft);
}

.page-section .prov-manual-search,
.prov-manual-overlay .prov-manual-search{
  position:relative;
}

.page-section .prov-manual-input,
.prov-manual-overlay .prov-manual-input{
  width:100%;
}

.page-section .prov-manual-input.num,
.prov-manual-overlay .prov-manual-input.num{
  text-align:right;
}

.page-section .prov-manual-suggest,
.prov-manual-overlay .prov-manual-suggest{
  display:none;
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  right:-280px;
  z-index:4;
  max-height:230px;
  overflow:auto;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  background:var(--eco-card);
  box-shadow:0 16px 35px rgba(15,10,26,.16);
}

.page-section .prov-manual-helper,
.prov-manual-overlay .prov-manual-helper{
  grid-column:1 / -1;
  min-height:16px;
  color:var(--eco-muted);
  font-size:.68rem;
  line-height:1.4;
}

.page-section .prov-manual-footer,
.prov-manual-overlay .prov-manual-footer{
  justify-content:flex-end;
  padding-top:.75rem;
  border-top:1px solid var(--eco-border);
}

.page-section .prov-manual-suggest-error,
.prov-manual-overlay .prov-manual-suggest-error{
  padding:.65rem;
  color:var(--eco-danger);
  font-size:.74rem;
}

.page-section .prov-manual-suggest-btn,
.prov-manual-overlay .prov-manual-suggest-btn{
  display:flex;
  justify-content:space-between;
  gap:.8rem;
  width:100%;
  padding:.58rem .68rem;
  border:0;
  border-bottom:1px solid var(--eco-border);
  background:transparent;
  color:var(--eco-text);
  text-align:left;
  cursor:pointer;
}

.page-section .prov-manual-suggest-btn strong,
.prov-manual-overlay .prov-manual-suggest-btn strong{
  display:block;
  font-size:.76rem;
}

.page-section .prov-manual-suggest-btn small,
.page-section .prov-manual-suggest-meta,
.prov-manual-overlay .prov-manual-suggest-btn small,
.prov-manual-overlay .prov-manual-suggest-meta{
  color:var(--eco-muted);
  font-size:.67rem;
}

.page-section .prov-manual-suggest-meta,
.prov-manual-overlay .prov-manual-suggest-meta{
  white-space:nowrap;
  text-align:right;
}

/* Pedidos operativos / Logistica ----------------------------------------- */
.page-section .po-state-msg,
.page-section .log-state-msg{
  padding:2rem 1rem;
  color:var(--eco-muted);
  font-size:.74rem;
  line-height:1.45;
  text-align:center;
}

.page-section .po-state-msg.compact,
.page-section .log-state-msg.compact{
  padding:1rem;
}

.page-section .po-state-msg.error,
.page-section .log-state-msg.error{
  color:var(--eco-danger);
}

.page-section .po-row,
.page-section .log-row{
  border-bottom:1px solid var(--eco-border);
  transition:background .18s ease;
}

.page-section .po-row:hover,
.page-section .log-row:hover{
  background:var(--eco-card-soft);
}

.page-section .po-cell,
.page-section .log-cell{
  padding:.75rem;
  vertical-align:top;
}

.page-section .po-cell.compact,
.page-section .log-cell.compact{
  padding:.5rem .75rem;
}

.page-section .po-order-id,
.page-section .log-order-id{
  color:var(--eco-text);
  font-size:.8rem;
  font-weight:800;
}

.page-section .po-muted,
.page-section .log-muted{
  color:var(--eco-muted);
  font-size:.68rem;
  line-height:1.4;
}

.page-section .po-total{
  color:var(--eco-text);
  font-weight:800;
}

.page-section .po-stack-sm,
.page-section .log-stack-sm{
  margin-top:.25rem;
}

.page-section .po-actions,
.page-section .log-actions{
  display:flex;
  align-items:center;
  gap:.28rem;
  flex-wrap:wrap;
}

.page-section .po-btn-compact,
.page-section .log-btn-compact{
  min-height:30px;
  padding:.28rem .52rem;
  font-size:.7rem;
}

.page-section .po-btn-compact.danger,
.page-section .log-btn-compact.danger{
  border-color:rgba(239,68,68,.35);
  color:var(--eco-danger);
}

.page-section .po-btn-compact.full,
.page-section .log-btn-compact.full{
  width:100%;
}

.page-section .po-btn-compact.flex,
.page-section .log-btn-compact.flex{
  flex:1 1 auto;
}

.page-section .po-invoice-badge{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  padding:.22rem .52rem;
  border:1px solid rgba(168,85,212,.24);
  border-radius:var(--eco-radius-sm);
  background:rgba(168,85,212,.09);
  color:var(--eco-primary);
  font-size:.72rem;
  font-weight:800;
}

.page-section .po-invoice-empty,
.page-section .po-sync-muted,
.page-section .log-flow-closed{
  color:var(--eco-muted);
  font-size:.68rem;
}

.page-section .log-flow-closed{
  color:var(--eco-success);
  font-weight:800;
}

.page-section .po-tracking,
.page-section .log-delivery{
  margin-top:.32rem;
  color:var(--eco-muted);
  font-size:.7rem;
  line-height:1.35;
}

.page-section .po-link{
  color:var(--eco-primary);
  font-weight:750;
  text-decoration:underline;
}

.po-modal-highlight{
  color:var(--eco-primary);
}

.po-modal-help{
  margin-bottom:1rem;
  color:var(--eco-muted);
  font-size:.74rem;
  line-height:1.45;
}

.page-section .log-route-note{
  margin-top:.35rem;
}

.page-section .log-route-close{
  float:right;
}

.page-section .log-route-check-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  padding:.45rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card-soft);
  font-size:.74rem;
}

.page-section .log-route-select{
  min-height:30px;
  padding:.18rem .34rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card);
  color:var(--eco-text);
  font-size:.72rem;
  outline:none;
}

/* Inventario / Carga proveedor ------------------------------------------- */
.page-section .inv-prov-alert{
  color:var(--eco-muted);
  font-size:.76rem;
  line-height:1.5;
}

.page-section .inv-prov-alert.error{
  color:var(--eco-danger);
}

.page-section .inv-prov-toolbar,
.page-section .inv-prov-actions{
  display:flex;
  align-items:center;
  gap:.6rem;
  flex-wrap:wrap;
}

.page-section .inv-prov-toolbar{
  margin-bottom:.6rem;
}

.page-section .inv-prov-select{
  min-width:200px;
  min-height:38px;
  padding:.5rem .7rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card);
  color:var(--eco-text);
  font-size:.78rem;
  outline:none;
}

.page-section .inv-prov-choice{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  color:var(--eco-text);
  font-size:.76rem;
  font-weight:650;
  cursor:pointer;
}

.page-section .inv-prov-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:.5rem 1rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:transparent;
  color:var(--eco-text);
  font-size:.76rem;
  font-weight:750;
  cursor:pointer;
}

.page-section .inv-prov-btn.primary{
  border-color:var(--eco-success-solid);
  background:var(--eco-success-solid);
  color:#fff;
}

.page-section .inv-prov-file-name{
  color:var(--eco-muted);
  font-size:.72rem;
}

.page-section .inv-prov-file{
  display:none;
}

.page-section .inv-prov-status{
  display:none;
  margin-top:.7rem;
  padding:.65rem .8rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card-soft);
  color:var(--eco-muted);
  font-size:.74rem;
  line-height:1.5;
}

.page-section .inv-prov-status.is-visible{
  display:block;
}

.page-section .inv-prov-status.success{
  border-color:rgba(34,197,94,.28);
  background:rgba(34,197,94,.07);
  color:var(--eco-success);
}

.page-section .inv-prov-status.warn{
  border-color:rgba(245,158,11,.35);
  background:rgba(245,158,11,.07);
  color:#b45309;
}

.page-section .inv-prov-status.error{
  border-color:rgba(239,68,68,.28);
  background:rgba(239,68,68,.06);
  color:var(--eco-danger);
}

.page-section .inv-prov-table-wrap{
  max-height:220px;
  overflow:auto;
  margin-top:.45rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card);
}

.page-section .inv-prov-table{
  width:100%;
  border-collapse:collapse;
  font-size:.72rem;
}

.page-section .inv-prov-table td{
  padding:.24rem .5rem;
  border-bottom:1px solid var(--eco-border);
}

.page-section .inv-prov-table .num{
  text-align:right;
  font-family:"DM Mono",monospace;
}

.page-section .inv-prov-warn{
  margin-top:.35rem;
  color:#b45309;
}

/* Inventario Multi-Canal / MercadoLibre sync ------------------------------ */
.page-section .invmc-head-actions--compact{
  gap:.35rem;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.page-section .invmc-items-list{
  display:flex;
  flex-direction:column;
  gap:.2rem;
  margin-top:.4rem;
  padding-left:.6rem;
  border-left:2px solid var(--eco-border);
  color:var(--eco-muted);
  font-size:.74rem;
}

.page-section .ml-sync-row{
  border-bottom:1px solid var(--eco-border);
}

.page-section .ml-sync-cell{
  padding:.5rem .75rem;
}

.page-section .ml-sync-cell.actions{
  text-align:right;
}

.page-section .ml-sync-sku{
  color:var(--eco-text);
}

.page-section .ml-sync-product-name{
  color:var(--eco-muted);
  font-size:.68rem;
}

.page-section .ml-sync-empty{
  text-align:center;
  padding:1rem;
  color:var(--eco-muted);
}

.page-section .ml-sync-empty.error{
  color:var(--eco-danger);
}

.page-section .ml-sync-status{
  color:var(--eco-muted);
  font-size:.68rem;
}

.page-section .ml-sync-status.error{
  color:var(--eco-danger);
}

.page-section .ml-sync-action{
  padding:.2rem .45rem;
  border:1px solid var(--eco-active-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-active-bg);
  color:var(--p4);
  font-size:.68rem;
  font-weight:750;
  cursor:pointer;
}

.page-section .ml-sync-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:.18rem .55rem;
  font-family:"DM Mono",monospace;
  font-size:.58rem;
  font-weight:800;
  text-transform:uppercase;
}

.page-section .ml-sync-badge.sent{
  border:1px solid rgba(34,197,94,.25);
  background:rgba(34,197,94,.12);
  color:var(--eco-success);
}

.page-section .ml-sync-badge.off{
  border:1px solid rgba(156,163,175,.25);
  background:rgba(156,163,175,.12);
  color:#64748b;
}

.page-section .ml-sync-badge.pending,
.page-section .ml-sync-badge.queued{
  border:1px solid var(--eco-active-border);
  background:var(--eco-active-bg);
  color:var(--p4);
}

.page-section .ml-sync-badge.failed{
  border:1px solid rgba(239,68,68,.25);
  background:rgba(239,68,68,.10);
  color:var(--eco-danger);
}

/* Integraciones ----------------------------------------------------------- */
.page-section .eco-integ-banner{
  margin-bottom:1.1rem;
  padding:1.15rem 1.25rem;
  border:1px solid var(--eco-active-border);
  border-radius:var(--eco-radius);
  background:linear-gradient(135deg,#2A0A4A,#4A0080);
  color:#fff;
}

.page-section .eco-integ-kicker{
  color:#c79be8;
  font-size:.64rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.page-section .eco-integ-title{
  margin:.25rem 0 .35rem;
  font-size:1.12rem;
  font-weight:800;
  letter-spacing:0;
}

.page-section .eco-integ-copy{
  max-width:680px;
  color:#e3d6f4;
  font-size:.82rem;
  line-height:1.55;
}

.page-section .eco-integ-flow,
.page-section .eco-integ-pill-row,
.page-section .eco-integ-toolbar,
.page-section .eco-integ-filters,
.page-section .eco-integ-card-head,
.page-section .eco-integ-actions,
.page-section .eco-integ-health-row,
.page-section .eco-integ-feed-row,
.page-section .eco-integ-guide-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
}

.page-section .eco-integ-flow{
  gap:.6rem;
  margin-top:1rem;
}

.page-section .eco-integ-flow-step{
  min-width:76px;
  text-align:center;
}

.page-section .eco-integ-mark,
.page-section .eco-integ-drawer-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(199,155,232,.42);
  border-radius:12px;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:.68rem;
  font-weight:850;
  letter-spacing:0;
}

.page-section .eco-integ-mark{
  width:38px;
  height:38px;
}

.page-section .eco-integ-flow-step span{
  display:block;
  margin-top:.25rem;
  color:#fff;
  font-size:.62rem;
  font-weight:750;
}

.page-section .eco-integ-arrow{
  color:#c79be8;
  font-size:1rem;
  font-weight:800;
}

.page-section .eco-integ-pill-row,
.page-section .eco-integ-filters,
.page-section .eco-integ-actions,
.page-section .eco-integ-feed-row{
  gap:.35rem;
}

.page-section .eco-integ-pill{
  border:1px solid rgba(199,155,232,.4);
  border-radius:999px;
  padding:.25rem .7rem;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:.68rem;
  font-weight:750;
  white-space:nowrap;
}

.page-section .eco-integ-section-title{
  margin:1.25rem 0 .55rem;
}

.page-section .eco-integ-section-title strong{
  display:block;
  color:var(--eco-text);
  font-size:.92rem;
}

.page-section .eco-integ-section-title span{
  display:block;
  color:var(--eco-muted);
  font-size:.72rem;
}

.page-section .eco-integ-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(232px,1fr));
  gap:.85rem;
}

.page-section .eco-integ-card{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:.95rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius);
  background:var(--eco-card);
}

.page-section .eco-integ-card-head{
  justify-content:space-between;
  gap:.5rem;
  align-items:flex-start;
}

.page-section .eco-integ-logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:46px;
  height:46px;
  flex:none;
  border:1px solid var(--eco-active-border);
  border-radius:12px;
  background:var(--eco-active-bg);
  color:var(--p4);
  font-size:.74rem;
  font-weight:850;
}

.page-section .eco-integ-state{
  border-radius:999px;
  padding:3px 9px;
  font-size:.54rem;
  font-weight:800;
  letter-spacing:.03em;
}

.page-section .eco-integ-state.available{
  background:#e9f9ef;
  color:#0b7a3b;
}

.page-section .eco-integ-state.soon{
  background:#f3eafb;
  color:var(--p4);
}

.page-section .eco-integ-category{
  margin-top:.6rem;
  color:var(--eco-muted);
  font-size:.56rem;
  font-weight:750;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.page-section .eco-integ-name{
  margin:.05rem 0 .25rem;
  color:var(--eco-text);
  font-size:.95rem;
  font-weight:800;
}

.page-section .eco-integ-tagline{
  color:var(--eco-text);
  font-size:.72rem;
  line-height:1.45;
  opacity:.68;
}

.page-section .eco-integ-chips{
  display:flex;
  gap:.3rem;
  flex-wrap:wrap;
  margin-top:.6rem;
}

.page-section .eco-integ-chip{
  border-radius:6px;
  padding:2px 7px;
  background:var(--eco-active-bg);
  color:var(--p4);
  font-size:.56rem;
  font-weight:800;
}

.page-section .eco-integ-actions{
  margin-top:auto;
  padding-top:.85rem;
  gap:.45rem;
}

.page-section .eco-integ-guide-btn,
.page-section .eco-integ-filter{
  border:1px solid var(--eco-border);
  background:transparent;
  color:var(--eco-muted);
  cursor:pointer;
  font-weight:750;
}

.page-section .eco-integ-guide-btn{
  border-radius:var(--eco-radius-sm);
  padding:.42rem .75rem;
  color:var(--p4);
  font-size:.7rem;
}

.page-section .eco-integ-toolbar{
  gap:.6rem;
  margin:.8rem 0 .2rem;
}

.page-section .eco-integ-search{
  flex:1;
  min-width:200px;
  padding:.5rem .8rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card);
  color:var(--eco-text);
  font-size:.8rem;
}

.page-section .eco-integ-filter{
  border-radius:999px;
  padding:.32rem .8rem;
  font-size:.68rem;
}

.page-section .eco-integ-filter.active{
  border-color:transparent;
  background:var(--p4);
  color:#fff;
}

.page-section .eco-integ-empty{
  padding:1.6rem;
  text-align:center;
  color:var(--eco-muted);
  font-size:.8rem;
}

.page-section .eco-integ-health-card{
  margin-bottom:1rem;
}

.page-section .eco-integ-health-row{
  gap:.75rem;
}

.page-section .eco-integ-health-title{
  color:var(--eco-text);
  font-size:.92rem;
  font-weight:800;
}

.page-section .eco-integ-health-stats{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}

.page-section .eco-integ-stat{
  display:flex;
  align-items:center;
  gap:.45rem;
  padding:.4rem .75rem;
  border:1px solid var(--eco-border);
  border-radius:var(--eco-radius-sm);
  background:var(--eco-card-soft);
}

.page-section .eco-integ-stat-code{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:24px;
  border-radius:8px;
  background:var(--eco-active-bg);
  color:var(--p4);
  font-size:.62rem;
  font-weight:850;
}

.page-section .eco-integ-stat strong{
  display:block;
  color:var(--eco-text);
  font-size:.92rem;
}

.page-section .eco-integ-stat span{
  color:var(--eco-muted);
  font-size:.58rem;
}

.page-section .eco-integ-health-note{
  margin-left:auto;
  color:var(--eco-muted);
  font-size:.66rem;
}

.eco-integ-overlay{
  position:fixed;
  inset:0;
  z-index:9998;
  display:none;
  background:rgba(20,10,40,.45);
}

.eco-integ-overlay.is-open{
  display:block;
}

.eco-integ-drawer{
  position:fixed;
  top:0;
  right:0;
  z-index:9999;
  width:min(440px,92vw);
  height:100%;
  overflow-y:auto;
  background:#fff;
  box-shadow:-10px 0 40px rgba(74,0,128,.18);
  transform:translateX(100%);
  transition:transform .28s ease;
}

.eco-integ-drawer.is-open{
  transform:translateX(0);
}

.eco-integ-drawer-head{
  position:relative;
  padding:1.2rem 1.3rem;
  background:linear-gradient(135deg,#2A0A4A,#4A0080);
  color:#fff;
}

.eco-integ-close{
  position:absolute;
  top:.7rem;
  right:.8rem;
  width:30px;
  height:30px;
  border:0;
  border-radius:8px;
  background:rgba(255,255,255,.15);
  color:#fff;
  cursor:pointer;
  font-size:1rem;
}

.eco-integ-drawer-mark{
  width:40px;
  height:40px;
}

.eco-integ-drawer-cat{
  margin-top:.45rem;
  color:#c79be8;
  font-size:.6rem;
  font-weight:750;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.eco-integ-drawer-title{
  color:#fff;
  font-size:1.25rem;
  font-weight:800;
}

.eco-integ-drawer-intro{
  margin-top:.3rem;
  color:#e3d6f4;
  font-size:.78rem;
  line-height:1.45;
}

.eco-integ-drawer-body{
  padding:1.1rem 1.3rem;
}

.eco-integ-drawer-label{
  margin:.6rem 0 .45rem;
  color:var(--p4);
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.eco-integ-guide-row{
  gap:.5rem;
  align-items:flex-start;
  margin-bottom:.45rem;
}

.eco-integ-guide-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:none;
  width:24px;
  height:24px;
  border-radius:999px;
  background:var(--p4);
  color:#fff;
  font-size:.72rem;
  font-weight:800;
}

.eco-integ-guide-row b{
  color:var(--eco-text);
  font-size:.78rem;
}

.eco-integ-guide-row div{
  color:var(--eco-muted);
  font-size:.72rem;
}

.eco-integ-soon{
  margin-top:.4rem;
  padding:.6rem;
  border-radius:var(--eco-radius-sm);
  background:#f3eafb;
  color:var(--eco-muted);
  text-align:center;
  font-size:.72rem;
}

.eco-integ-full-btn{
  width:100%;
  margin-top:.75rem;
}

.eco-integ-sync{
  padding:.6rem .8rem;
  border-left:3px solid var(--p4);
  border-radius:var(--eco-radius-sm);
  background:#faf6fe;
  color:var(--eco-muted);
  font-size:.74rem;
  line-height:1.45;
}

/* Mobile guardrails ------------------------------------------------------- */
@media (max-width:768px){
  .content,
  .main-content,
  .page-section{
    padding-bottom:calc(var(--eco-safe-fab) + env(safe-area-inset-bottom,0px));
  }

  .page-section .kpi-grid,
  .page-section .v-kpi-row,
  .page-section .invmc-kpi-row,
  .page-section .eco-kpi-grid,
  .page-section .af-kpis,
  .page-section .ped-kpis-grid,
  .page-section .asis-kpi-grid,
  .page-section #asisSectionHome .asis-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .page-section .fb-chip,
  .page-section .invmc-tab,
  .page-section .mtab,
  .page-section .ped-tab,
  .page-section .cli-tab,
  .page-section .af-tab,
  .page-section .asis-mod-tab,
  .page-section .asis-cat-tab,
  .page-section .asis-emp-tab,
  .page-section .snt-evt-tab,
  .page-section .inv-readonly-tab{
    min-height:44px;
    padding:.55rem .72rem;
    font-size:.72rem;
    flex:0 0 auto;
  }

  .page-section input,
  .page-section select,
  .page-section textarea{
    min-height:44px;
    font-size:max(16px,1em);
  }

  .page-section .eco-form-grid{
    grid-template-columns:1fr;
  }

  .page-section .inv-cnt-grid{
    grid-template-columns:1fr;
  }

  .page-section .inv-cnt-btn{
    min-height:44px;
  }

  .page-section .prov-oc-actions,
  .page-section .po-actions,
  .page-section .log-actions,
  .page-section .prov-manual-footer,
  .prov-manual-overlay .prov-manual-footer{
    align-items:stretch;
    flex-direction:column;
  }

  .page-section .prov-oc-btn,
  .page-section .po-btn-compact,
  .page-section .log-btn-compact,
  .page-section .prov-manual-btn,
  .prov-manual-overlay .prov-manual-btn{
    min-height:44px;
    width:100%;
  }

  .page-section .prov-oc-stats,
  .page-section .prov-manual-grid,
  .page-section .prov-manual-item,
  .prov-manual-overlay .prov-manual-grid,
  .prov-manual-overlay .prov-manual-item{
    grid-template-columns:1fr;
  }

  .page-section .prov-oc-total{
    width:100%;
    text-align:left;
  }

  .page-section .prov-manual-suggest,
  .prov-manual-overlay .prov-manual-suggest{
    right:0;
  }

  .page-section .eco-toolbar,
  .page-section .filter-bar,
  .page-section .invmc-filter-row,
  .page-section .af-toolbar,
  .page-section .prov-toolbar{
    align-items:stretch;
  }

  .page-section .eco-toolbar input,
  .page-section .filter-bar input,
  .page-section .invmc-filter-row input,
  .page-section .af-toolbar input{
    min-width:0;
    width:100%;
  }

  .page-section table,
  .page-section .invmc-table,
  .page-section .v-table,
  .page-section .ped-table,
  .page-section .hunter-table,
  .page-section .af-table,
  .page-section .asis-table,
  .page-section .asis-excel-table,
  .page-section .inv-readonly-table,
  .page-section .inv-snapshot-table,
  .page-section .inv-imp-table{
    min-width:680px;
  }
}

@media (max-width:420px){
  .page-section .kpi-value,
  .page-section .v-kpi-value,
  .page-section .ped-kpi-val,
  .page-section .asis-kpi-val,
  .page-section .invmc-metric strong{
    font-size:1.22rem;
  }

  .page-section .eco-callout{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   NAVEGACION CANONICA — migas de pan + pestañas
   ─────────────────────────────────────────────────────────────────────────
   Reemplaza a las 9 familias que convivian (invmc-tabs, ped-tab, cli-tab-btn,
   mtab, log-tabs, strategy-tabs, asis-*, invmc-sodtabs, sm-mod-tabs). Ver
   AGENTS.md § "Navegacion" para las reglas; no crear una decima familia.

   Acento propio: --p3 (#a855d4) sobre blanco queda en 3.1:1 y el subrayado se
   pierde. En claro se usa el morado profundo; en oscuro, el claro.
   ══════════════════════════════════════════════════════════════════════════ */
:root{
  --eco-nav-on:#8b00cc;
  --eco-nav-off:var(--mu,#5b4b9e);
}
[data-theme="dark"]{
  --eco-nav-on:#c9a4f5;
  --eco-nav-off:var(--mu,#bbaedd);
}

/* ── Migas de pan ───────────────────────────────────────────────────────── */
.eco-crumbs{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.28rem;
  font-family:"DM Mono","SF Mono",ui-monospace,monospace;
  font-size:.68rem;
  letter-spacing:.02em;
  line-height:1.5;
  color:var(--eco-nav-off);
  margin-bottom:.3rem;
  min-height:1.02rem;
}
.eco-crumbs:empty{display:none}
.eco-crumb{
  background:none;
  border:0;
  padding:0;
  font:inherit;
  color:inherit;
  cursor:pointer;
  border-bottom:1px solid transparent;
  transition:color .15s,border-color .15s;
}
.eco-crumb:hover{color:var(--eco-nav-on);border-bottom-color:currentColor}
.eco-crumb-sep{opacity:.42;user-select:none}
/* El ultimo tramo es donde ya estas: texto, nunca enlace. */
.eco-crumbs [aria-current="page"]{color:var(--tx,#1a0e4a);font-weight:600;cursor:default}

/* ── Pestañas de primer nivel ───────────────────────────────────────────── */
.eco-tabs{
  display:flex;
  gap:.15rem;
  /* Se desplaza, nunca se parte: dos filas hacen que la segunda parezca de
     otro nivel — es lo que hoy colapsa a Asistencia. */
  flex-wrap:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  border-bottom:1px solid var(--b,rgba(90,50,190,.12));
  margin-bottom:1.1rem;
}
.eco-tabs::-webkit-scrollbar{display:none}
.eco-tab{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  white-space:nowrap;
  min-height:44px;
  padding:.55rem .8rem;
  background:none;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:8px 8px 0 0;
  color:var(--eco-nav-off);
  font-family:"DM Sans",sans-serif;
  font-size:.82rem;
  font-weight:650;
  line-height:1;
  cursor:pointer;
  transition:color .15s,border-color .15s;
}
.eco-tab:hover{color:var(--eco-nav-on)}
/* `.active` se acepta ademas de aria-selected: media docena de modulos ya
   marcan asi su pestaña, y obligarlos a reescribir el manejo de estado es
   justo donde se rompen las cosas. aria-selected sigue siendo lo correcto
   para lo nuevo — montarTabs solo escribe eso. */
.eco-tab[aria-selected="true"],
.eco-tab.active{color:var(--eco-nav-on);border-bottom-color:var(--eco-nav-on)}
.eco-tab:focus-visible{outline:2px solid var(--eco-nav-on);outline-offset:-3px}
.eco-tab-ico{
  width:15px;height:15px;flex:0 0 auto;
  stroke:currentColor;fill:none;
  stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;
}
.eco-tab-badge{
  font-family:"DM Mono","SF Mono",ui-monospace,monospace;
  font-size:.64rem;line-height:1;
  padding:.24em .42em;border-radius:5px;
  background:var(--b,rgba(90,50,190,.12));
  color:var(--eco-nav-off);
  font-variant-numeric:tabular-nums;
}
.eco-tab[aria-selected="true"] .eco-tab-badge,
.eco-tab.active .eco-tab-badge{
  background:rgba(168,85,212,.16);
  color:var(--eco-nav-on);
}
.eco-tab-badge:empty{display:none}

/* ── Segundo nivel: control segmentado ──────────────────────────────────── */
/* Dibujo distinto a proposito: dos filas de subrayados no dejan ver cual
   manda. Si hiciera falta un tercer nivel, no es navegacion — es otra
   pantalla, y va con su propio tramo en la miga. */
.eco-seg{
  display:inline-flex;
  gap:.15rem;
  padding:3px;
  border-radius:9px;
  background:var(--b,rgba(90,50,190,.12));
  margin-bottom:1rem;
  max-width:100%;
  overflow-x:auto;
  scrollbar-width:none;
}
.eco-seg::-webkit-scrollbar{display:none}
.eco-seg-btn{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  border:0;
  background:transparent;
  color:var(--eco-nav-off);
  border-radius:7px;
  padding:.4rem .75rem;
  font-family:"DM Sans",sans-serif;
  font-size:.74rem;
  font-weight:600;
  white-space:nowrap;
  cursor:pointer;
  transition:background .15s,color .15s;
}
.eco-seg-btn[aria-selected="true"],
.eco-seg-btn.active{
  background:var(--card,#fff);
  color:var(--hd,#0a0520);
  box-shadow:0 1px 2px rgba(26,13,51,.12);
}
.eco-seg-btn:focus-visible{outline:2px solid var(--eco-nav-on);outline-offset:1px}

@media (max-width:640px){
  .eco-tab{padding:.55rem .62rem;font-size:.78rem}
  .eco-crumbs{font-size:.64rem}
}
