/* C v2.2 — Historial de ventas. Fondo claro, blanco + sage + verde Valen,
   Instrument Sans, pesos ≤700, sin hero oscuro, sin sombras pesadas.
   Estructura (grid/flex/tamaños del gráfico) se conserva igual que antes de
   la migración; solo cambian tokens de color, tipografía y jerarquía. */

#oshv1Root .oshv1-shell{
  margin-top:0;
  padding:22px;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:var(--card);
  box-shadow:var(--shadow-card);
  font-family:'Instrument Sans', var(--sans);
  color:var(--ink);
}

#oshv1Root .oshv1-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
/* #oshv1Root suma un segundo ID para ganar por especificidad a las reglas
   !important de visualAuditV2 (font-weight:820, font-size:21px) y
   ownerVisualCleanupV1 (font-size:25px) sin tocar esos archivos. */
#ownerDashboardV1Root #oshv1Root .oshv1-head h5{
  margin:0;
  font-size:18px!important;
  font-weight:700!important;
  line-height:1.25!important;
  letter-spacing:-.01em!important;
  color:var(--brand-text)!important;
}

#oshv1Root .oshv1-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:20px 0;
}
#oshv1Root .oshv1-kpis article{
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
}
#oshv1Root .oshv1-kpis span,
#oshv1Root .oshv1-kpis small{
  display:block;
  color:var(--muted);
}
#oshv1Root .oshv1-kpis span{
  font-size:11.5px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.03em;
}
#oshv1Root .oshv1-kpis b{
  display:block;
  margin:7px 0 3px;
  font-size:20px;
  font-weight:700;
  line-height:1.2;
  color:var(--ink);
}
#oshv1Root .oshv1-kpis small{font-size:11px}
/* Últimos 7 días: mismo acento sage discreto que el resto de la migración. */
#oshv1Root .oshv1-kpis article:last-child{
  border-color:var(--sage-panel);
  background:linear-gradient(180deg,#FFFFFF 0%,var(--sage-panel) 220%);
}
#oshv1Root .oshv1-kpis article:last-child b{color:var(--brand-text)}

#oshv1Root .oshv1-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:4px 0 14px;
}
#oshv1Root .oshv1-seg,
#oshv1Root .oshv1-ranges{
  display:flex;
  gap:3px;
  padding:4px;
  border-radius:var(--radius);
  background:var(--line-soft);
}
#oshv1Root .oshv1-seg button,
#oshv1Root .oshv1-ranges button{
  border:0;
  background:transparent;
  padding:8px 13px;
  border-radius:8px;
  font-family:inherit;
  font-size:12.5px;
  font-weight:600;
  color:var(--muted);
  cursor:pointer;
}
#oshv1Root .oshv1-seg button.active,
#oshv1Root .oshv1-ranges button.active{
  background:var(--card);
  color:var(--brand-dk);
  font-weight:700;
  box-shadow:var(--shadow-card);
}

#oshv1Root .oshv1-chart{
  position:relative;
  height:330px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
  padding:18px 18px 10px;
  overflow:hidden;
}
#oshv1Root .oshv1-gridlines{
  position:absolute;
  inset:18px 18px 34px;
  display:grid;
  grid-template-rows:repeat(4,1fr);
  pointer-events:none;
}
#oshv1Root .oshv1-gridlines i{border-top:1px solid var(--line-soft)}
#oshv1Root .oshv1-bars{
  position:relative;
  height:100%;
  display:flex;
  align-items:stretch;
  gap:3px;
}
#oshv1Root .oshv1-col{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:stretch;
}
#oshv1Root .oshv1-barwrap{
  position:relative;
  flex:1;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}
#oshv1Root .oshv1-bar{
  display:block;
  width:72%;
  min-width:2px;
  max-width:24px;
  border-radius:5px 5px 1px 1px;
  background:linear-gradient(180deg,var(--brand),var(--brand-dk));
}
#oshv1Root .oshv1-bar.is-zero{visibility:hidden}
#oshv1Root .oshv1-col small{
  height:26px;
  padding-top:5px;
  text-align:center;
  font-size:10px;
  color:var(--muted-2);
  white-space:nowrap;
  overflow:visible;
}
#oshv1Root .oshv1-chart.medium .oshv1-bars{gap:2px}
#oshv1Root .oshv1-chart.medium .oshv1-bar{width:78%;min-width:2px}
#oshv1Root .oshv1-chart.dense .oshv1-bars{gap:1px}
#oshv1Root .oshv1-chart.dense .oshv1-bar{width:100%;min-width:1px;border-radius:2px 2px 0 0}
#oshv1Root .oshv1-chart.dense .oshv1-col small{font-size:9px}

#oshv1Root .oshv1-foot{margin-top:10px;color:var(--muted);font-size:13px}

#oshv1Root .oshv1-loading,
#oshv1Root .oshv1-error{
  margin-top:18px;
  padding:18px;
  border-radius:var(--radius);
  background:var(--line-soft);
  color:var(--muted);
  font-size:13px;
}
#oshv1Root .oshv1-error{border:1px solid var(--neg-tint);color:var(--neg)}
#oshv1Root .oshv1-error b,
#oshv1Root .oshv1-error span{display:block}
#oshv1Root .oshv1-error span{margin-top:4px}

.odv1-trend-bar[style="height:4%"]{height:0!important;min-height:0!important;opacity:0}

/* KPIs: 1440 4 cols / 1024 y 820 2x2 / 390 1 col. Controles Día-Semana-Mes y
   7d-30d-90d-365d hacen wrap sin overflow del documento. */
@media(max-width:1180px){
  #oshv1Root .oshv1-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  #oshv1Root .oshv1-chart{height:280px}
}
@media(max-width:760px){
  #oshv1Root .oshv1-shell{padding:18px}
  #oshv1Root .oshv1-head{flex-wrap:wrap}
  #oshv1Root .oshv1-seg,
  #oshv1Root .oshv1-ranges{flex-wrap:wrap}
  #oshv1Root .oshv1-seg button,
  #oshv1Root .oshv1-ranges button{flex:1 1 auto;text-align:center}
}
@media(max-width:480px){
  #oshv1Root .oshv1-kpis{grid-template-columns:1fr}
  #oshv1Root .oshv1-chart{height:250px;padding-left:10px;padding-right:10px}
  #oshv1Root .oshv1-gridlines{left:10px;right:10px}
}
