/* Graph and exact values are always presented together. */
.report{padding:24px 32px 16px}
.report-header{margin-bottom:16px}
.report-header h2{font-size:clamp(1.8rem,2.6vw,3rem);margin:4px 0}
.report-header .muted{font-size:.875rem}
.metrics{padding:15px 0;margin-bottom:12px}
.metric-label{font-size:.875rem;margin-bottom:6px}
.metric-value{font-size:clamp(1.5rem,2.2vw,2.65rem)}
.metric-unit{font-size:.9375rem;color:#d0ded5;margin-top:5px}
.tabs button{font-size:.9375rem;padding:10px 18px}
.chart-heading{margin:16px 0 10px}
.report-analysis{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:28px;flex:1;min-height:0;align-items:stretch}
.chart-panel{min-width:0;display:flex;flex-direction:column;min-height:300px}
.chart-panel .chart{height:100%;min-height:260px;flex:1 1 auto}
.chart-detail{font-size:.875rem;line-height:1.4;margin-top:6px;min-height:22px}
.report-analysis .table-wrap{min-width:0;max-height:none;margin:0;overflow:auto;border-left:1px solid var(--line);padding-left:24px;align-self:stretch}
#exactTable{font-size:clamp(1rem,1.05vw,1.25rem);line-height:1.3}
#exactTable caption{padding:0 0 10px;font-size:.875rem;color:#cfddd3}
#exactTable th,#exactTable td{padding:clamp(4px,.6vh,7px) 9px}
#exactTable thead th{font-size:.875rem;color:#d8e6dc;white-space:normal;vertical-align:bottom;padding-block:10px}
#exactTable tbody th{max-width:170px;white-space:normal;line-height:1.2;color:#edf2e9}
#exactTable tbody tr:nth-child(even){background:#ffffff04}
#exactTable tbody tr:hover{background:#ffffff0b}
#exactTable tbody td{font-weight:500}
#exactTable tfoot{background:#c4db810a}
#exactTable tfoot th{white-space:normal;font-size:.875rem}
#exactTable tfoot td{font-weight:650}
.report-footer{margin-top:12px;padding-top:7px;font-size:.8125rem}
.report-footer .text-button{font-size:.8125rem}
@media(min-width:1150px) and (max-height:850px){
  .report{padding:18px 26px 10px}
  .report-header{margin-bottom:10px}.report-header h2{font-size:2rem}
  .metrics{padding:10px 0;margin-bottom:8px}.metric-value{font-size:1.8rem}
  .metric-label{font-size:.8125rem}.metric-unit{font-size:.875rem}
  .chart-heading{margin:10px 0 6px}.chart-heading h3{font-size:1rem}
  #exactTable{font-size:1rem;line-height:1.2}
  #exactTable th,#exactTable td{padding:5px 7px}
  #exactTable thead th{padding-block:7px}
  #exactTable caption{padding-bottom:7px}
  .report-analysis{gap:18px}.report-analysis .table-wrap{padding-left:18px}
  .chart-panel{min-height:250px}.chart-panel .chart{min-height:225px}
  .report-footer{margin-top:7px;padding-top:3px}
}
@media(max-width:1149px){
  .report-analysis{display:flex;flex-direction:column;gap:18px;min-height:auto}
  .chart-panel{min-height:230px}.chart-panel .chart{height:240px;min-height:240px;flex:none}
  .report-analysis .table-wrap{border-left:0;padding-left:0;overflow-x:auto;flex:none}
  #exactTable{font-size:1rem}#exactTable th,#exactTable td{padding:7px 9px}
}
@media(max-width:760px){
  .report{padding:20px 16px}.report-header{gap:12px}
  .metrics{gap:18px}.metric-value{font-size:1.5rem}.metric-unit{font-size:.8125rem}
  .report-analysis{gap:18px}.chart-panel .chart{height:240px}
  #exactTable{font-size:1rem}#exactTable tbody th{min-width:85px}
  .report-footer{gap:10px}
}

.report:not([data-block="proveedores"]) .metric-unit{display:none}
.report:not([data-block="proveedores"]) .metric-value{font-size:clamp(1.35rem,1.7vw,2.15rem)}
@media(min-width:1150px) and (max-height:850px){
 .report{padding-top:14px}.report-header{margin-bottom:8px}
 .report-header h2{font-size:1.75rem}.metrics{padding:8px 0;margin-bottom:4px}
 .tabs button{padding-block:6px}.chart-heading{margin-top:8px;margin-bottom:5px}
 #exactTable td,#exactTable th{padding-block:4px}
 #exactTable thead th{padding-block:6px}
 .report-footer{padding-top:2px;margin-top:5px}
 .report:not([data-block="proveedores"]) .metric-value{font-size:1.5rem}
}
@media(min-width:1150px) and (max-height:750px){#exactTable tbody td,#exactTable tbody th{padding-block:3.5px}}

/* Pantalla de informes para reunión: cuatro KPIs, gráfico y cifras visibles a la vez.
   Solo la tabla se desplaza cuando la resolución no permite mostrar todas sus filas. */
.report-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
.report-header-actions .secondary{min-height:42px;padding:10px 14px;white-space:nowrap}
@media(min-width:1150px){
  .report{height:100dvh;overflow:hidden;min-height:0}
  .report-header,.metrics,.report-toolbar,.chart-heading,.report-footer{flex-shrink:0}
  .report-analysis{min-height:0;overflow:hidden;flex:1 1 0}
  .chart-panel{min-height:0;overflow:hidden}
  .chart-panel .chart{min-height:0;height:auto;flex:1 1 0}
  .report-analysis .table-wrap{min-height:0;max-height:100%;overflow-x:auto;overflow-y:auto;overscroll-behavior:contain}
  .report-footer{min-height:36px}
}
@media(max-width:760px){
  .report-header-actions{width:100%;justify-content:stretch}
  .report-header-actions button{flex:1}
}

/* Keep every category on one report screen; only the table may scroll. */
@media(min-width:761px){
 .report:not([data-block="ventas"]){height:100dvh;min-height:0;overflow:hidden;padding:12px 20px 8px}
 .report:not([data-block="ventas"]) .report-header{margin-bottom:6px}
 .report:not([data-block="ventas"]) .report-header h2{font-size:1.7rem;margin:2px 0}
 .report:not([data-block="ventas"]) .metrics{padding:7px 0;margin-bottom:5px}
 .report:not([data-block="ventas"]) .metric-value{font-size:clamp(1.25rem,1.7vw,2rem)}
 .report:not([data-block="ventas"]) .tabs button{padding-block:6px}
 .report:not([data-block="ventas"]) .chart-heading{margin:8px 0 5px}
 .report:not([data-block="ventas"]) .report-analysis{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:16px;flex:1 1 0;min-height:0;overflow:hidden}
 .report:not([data-block="ventas"]) .chart-panel{min-height:0;overflow:hidden}
 .report:not([data-block="ventas"]) .chart-panel .chart{height:auto;min-height:0;flex:1 1 0}
 .report:not([data-block="ventas"]) .table-wrap{min-height:0;max-height:100%;overflow:auto;overscroll-behavior:contain;padding-left:12px;border-left:1px solid var(--line)}
 .report:not([data-block="ventas"]) #exactTable{font-size:clamp(.8rem,1vw,1rem);line-height:1.15}
 .report:not([data-block="ventas"]) #exactTable th,.report:not([data-block="ventas"]) #exactTable td{padding:3px 7px}
 .report:not([data-block="ventas"]) #exactTable thead th{position:sticky;top:0;z-index:2;background:#17362f}
 .report:not([data-block="ventas"]) #exactTable tfoot th,.report:not([data-block="ventas"]) #exactTable tfoot td{position:sticky;bottom:0;z-index:1;background:#203c31}
 .report:not([data-block="ventas"]) .report-footer{margin-top:5px;min-height:30px;padding-right:190px}
}
@media(max-width:760px){
 .report:not([data-block="ventas"]) .chart-panel .chart{height:clamp(320px,65dvh,620px)}
 .report:not([data-block="ventas"]) .table-wrap{max-height:55dvh;overflow:auto}
}
