﻿/* PAC Control Tower v1.7.48 - RBAC hard gate + readable Commercial workbook */

/* Global filters: shorter header, no visual inner boxes crossing dropdowns */
.filters-panel.open {
  padding: 10px 16px !important;
  margin-bottom: 10px !important;
}
.filters-grid {
  gap: 8px 10px !important;
  grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
}
.filter-label,
.delivery-rule-field .filter-label {
  font-size: 10px !important;
  line-height: 12px !important;
  margin-bottom: 4px !important;
  letter-spacing: .03em !important;
}
.pac-dropdown .Select-control,
.pac-dropdown.compact .Select-control,
.Select-control {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
.pac-dropdown .Select-placeholder,
.pac-dropdown .Select-value,
.Select-placeholder,
.Select-value {
  line-height: 32px !important;
  border: 0 !important;
  box-shadow: none !important;
}
.pac-dropdown .Select-value-label,
.Select-value-label {
  line-height: 30px !important;
}
.pac-dropdown .Select--multi .Select-value,
.Select--multi .Select-value,
.Select--multi .Select-value-icon,
.Select--multi .Select-value-label {
  border: 0 !important;
  box-shadow: none !important;
  max-height: 26px !important;
  line-height: 24px !important;
}
.pac-dropdown .Select-input,
.Select-input {
  height: 32px !important;
}
.pac-dropdown .Select-input > input,
.Select-input > input {
  line-height: 20px !important;
  padding: 6px 0 !important;
}

/* Commercial-specific filters: only Year and Month shown, compact and clear */
.v1745-commercial-page .page-title-row {
  margin-bottom: 8px !important;
  padding: 14px 18px !important;
}
.v1745-commercial-page .page-title-row h2 {
  font-size: 22px !important;
  margin: 0 0 3px !important;
}
.v1745-commercial-page .page-title-row p {
  margin: 0 !important;
  font-size: 12px !important;
}
.commercial-filter-grid-v1748 {
  display: grid !important;
  grid-template-columns: minmax(180px, 220px) minmax(220px, 320px) 1fr !important;
  gap: 10px !important;
  align-items: end !important;
  margin: 0 0 10px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(153,233,242,.20) !important;
  border-radius: 12px !important;
  background: rgba(1,52,64,.38) !important;
}
.commercial-filter-grid-v1748 .delivery-rule-field {
  min-height: auto !important;
}
.commercial-filter-grid-v1748 .commercial-hidden-controls {
  display: none !important;
}

/* Workbook tabs: stable, no navigation side effects */
.excel-mirror-tabs-wrap {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: #f3f3f3 !important;
  border-top: 1px solid #d5d5d5 !important;
  border-left: 1px solid #d5d5d5 !important;
  border-right: 1px solid #d5d5d5 !important;
}
.excel-mirror-radio-tabs label.excel-mirror-tab-label {
  padding: 8px 12px 8px 12px !important;
  min-height: 36px !important;
  font-size: 11px !important;
}
.excel-mirror-radio-tabs .excel-mirror-tab-input { display: none !important; }

/* Commercial workbook canvas */
.commercial-excel-mirror,
.commercial-excel-loading,
.commercial-excel-loading > div,
.excel-sheet-canvas {
  min-height: 640px !important;
  background: #ffffff !important;
}
.excel-sheet-canvas {
  padding: 14px 18px 20px !important;
  overflow-x: hidden !important;
}
.excel-sheet-title {
  margin-bottom: 12px !important;
}
.excel-sheet-title-text {
  font-size: 20px !important;
  line-height: 1.2 !important;
}
.excel-section-title {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.25 !important;
}
.excel-section-body {
  overflow-x: hidden !important;
}

/* Tables: no lateral scroll, no clipped text, no long decimals */
.excel-html-table-wrap.no-horizontal-scroll,
.excel-html-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  border: 1px solid #bfbfbf !important;
}
.excel-html-table.excel-table-no-side-scroll,
.excel-html-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}
.excel-html-table th,
.excel-html-table td {
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  padding: 6px 7px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}
.excel-html-table thead th {
  text-align: center !important;
  vertical-align: middle !important;
}
.excel-html-table tbody td:first-child {
  min-width: 0 !important;
  width: auto !important;
}
.excel-dashboard-side-table .excel-html-table th,
.excel-dashboard-side-table .excel-html-table td {
  font-size: 10px !important;
  padding: 6px 5px !important;
}

/* Dashboard: chart has a business reading, side table stays readable */
.excel-dashboard-kpis {
  grid-template-columns: repeat(6, minmax(130px, 1fr)) !important;
}
.excel-dashboard-main-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 2fr) minmax(0, .95fr) !important;
  gap: 14px !important;
}
.excel-dashboard-side-table .excel-section-body {
  min-height: 0 !important;
}
.excel-chart-note {
  margin: 8px 10px 4px !important;
  padding: 9px 11px !important;
  border-left: 4px solid #1f4e78 !important;
  background: #eef6fb !important;
  color: #17365d !important;
  font-family: Calibri, "Segoe UI", Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
}
.excel-graph-wrap,
.excel-graph {
  width: 100% !important;
  min-height: 390px !important;
}

/* Growth and scorecard grids */
.excel-three-column-grid.readable,
.excel-three-column-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}
.excel-two-column-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

/* Expandable customer behavior / WOW */
.excel-client-accordion {
  display: grid !important;
  gap: 8px !important;
}
.excel-client-details {
  border: 1px solid #b7d7e8 !important;
  background: #ffffff !important;
}
.excel-client-details > summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 130px 110px !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 9px 12px !important;
  background: #d9edf7 !important;
  color: #17365d !important;
  cursor: pointer !important;
  font-weight: 850 !important;
  overflow-wrap: anywhere !important;
}
.excel-client-details[open] > summary {
  background: #1f4e78 !important;
  color: #ffffff !important;
}
.excel-client-details .client-gp,
.excel-client-details .client-count {
  text-align: right !important;
  font-weight: 900 !important;
}
.client-summary-line {
  padding: 8px 12px !important;
  background: #f7fbff !important;
  color: #17365d !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.excel-client-details .excel-html-table-wrap {
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
}

@media (max-width: 1400px) {
  .filters-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)) !important; }
  .excel-dashboard-kpis { grid-template-columns: repeat(3, minmax(140px, 1fr)) !important; }
  .excel-dashboard-main-grid,
  .excel-two-column-grid,
  .excel-three-column-grid.readable,
  .excel-three-column-grid { grid-template-columns: 1fr !important; }
}

/* PAC Control Tower v1.7.49 - filter artifact cleanup + semaphores + chart readability */
.Select--multi.has-value .Select-input,
.pac-dropdown .Select--multi.has-value .Select-input,
.dash-dropdown .Select--multi.has-value .Select-input {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.Select--multi.has-value .Select-multi-value-wrapper,
.pac-dropdown .Select--multi.has-value .Select-multi-value-wrapper,
.dash-dropdown .Select--multi.has-value .Select-multi-value-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  overflow: hidden !important;
  min-height: 32px !important;
}
.Select--multi.has-value .Select-value {
  margin-top: 4px !important;
}
.excel-html-table th,
.excel-html-table td {
  color: #111827 !important;
  font-variant-numeric: tabular-nums !important;
}
.excel-html-table td.sem-danger,
.excel-client-details.sem-danger > summary {
  background: #FDE2E1 !important;
  color: #8A1538 !important;
  font-weight: 850 !important;
}
.excel-html-table td.sem-warning,
.excel-client-details.sem-warning > summary {
  background: #FFF4CC !important;
  color: #7A5200 !important;
  font-weight: 850 !important;
}
.excel-html-table td.sem-ok,
.excel-client-details.sem-ok > summary {
  background: #E2F4E8 !important;
  color: #145A32 !important;
  font-weight: 850 !important;
}
.excel-client-details > summary {
  grid-template-columns: minmax(0, 1fr) 125px 110px 90px !important;
}

.excel-html-table td.sem-neutral,
.excel-client-details.sem-neutral > summary {
  background: #EEF2F6 !important;
  color: #334155 !important;
  font-weight: 750 !important;
}

.excel-client-details .client-margin {
  text-align: right !important;
  font-weight: 900 !important;
}
.excel-graph .xtick text,
.excel-graph .ytick text,
.excel-graph .gtitle,
.excel-graph .xtitle,
.excel-graph .ytitle {
  fill: #1F1F1F !important;
  color: #1F1F1F !important;
}
.excel-chart-note {
  border-left-width: 5px !important;
}
.excel-table-limit-note {
  white-space: normal !important;
}
.excel-section-body,
.excel-html-table-wrap {
  contain: layout style !important;
}

/* PAC Control Tower v1.7.50 - Finance commercial access + readable filters/tables */
.filterbar.is-hidden {
  display: none !important;
}
.commercial-filter-grid-v1750 {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(145px, 1fr)) !important;
  gap: 8px !important;
  align-items: end !important;
  margin: 0 0 10px !important;
  padding: 9px 10px !important;
  border: 1px solid rgba(153,233,242,.18) !important;
  border-radius: 12px !important;
  background: rgba(1,52,64,.34) !important;
}
.commercial-filter-grid-v1750 .delivery-rule-field {
  min-width: 0 !important;
  min-height: auto !important;
}
.commercial-filter-grid-v1750 .commercial-hidden-controls {
  display: none !important;
}
.commercial-filter-grid-v1750 .Select-control,
.commercial-filter-grid-v1750 .Select-placeholder,
.commercial-filter-grid-v1750 .Select-value,
.commercial-filter-grid-v1750 .Select-input {
  min-height: 32px !important;
  height: 32px !important;
  line-height: 30px !important;
}
.commercial-filter-grid-v1750 .Select-value-label {
  line-height: 28px !important;
}
/* Elimina la barra vertical/cursor residual visible después de seleccionar valores. */
.Select--multi.has-value .Select-input,
.Select--multi.has-value .Select-input > input,
.pac-dropdown .Select--multi.has-value .Select-input,
.pac-dropdown .Select--multi.has-value .Select-input > input,
.commercial-filter-grid-v1750 .Select--multi.has-value .Select-input,
.commercial-filter-grid-v1750 .Select--multi.has-value .Select-input > input {
  position: absolute !important;
  left: -9999px !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
}
.Select--multi.has-value .Select-multi-value-wrapper {
  padding-right: 24px !important;
}
.Select-control,
.Select-multi-value-wrapper,
.Select-value,
.Select-input,
.Select-input > input,
.Select-placeholder {
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
}
/* Tablas: sin recortes ni superposiciones. */
.excel-html-table-wrap.excel-wrap-v1750,
.excel-html-table-wrap.no-horizontal-scroll {
  overflow-x: hidden !important;
  overflow-y: visible !important;
  width: 100% !important;
  max-width: 100% !important;
}
.excel-html-table.excel-table-v1750,
.excel-html-table.excel-table-no-side-scroll,
.excel-html-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}
.excel-html-table.excel-table-v1750 th,
.excel-html-table.excel-table-v1750 td,
.excel-html-table th,
.excel-html-table td {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  vertical-align: top !important;
  height: auto !important;
  min-height: 28px !important;
  font-size: 10.5px !important;
  line-height: 1.28 !important;
  padding: 6px 6px !important;
}
.excel-html-table thead th {
  font-size: 10px !important;
  line-height: 1.22 !important;
  min-height: 34px !important;
}
.excel-dashboard-side-table .excel-html-table th,
.excel-dashboard-side-table .excel-html-table td {
  font-size: 9.5px !important;
  padding: 5px 4px !important;
}
.excel-graph-wrap .js-plotly-plot,
.excel-graph-wrap .plot-container,
.excel-graph-wrap .svg-container {
  overflow: visible !important;
}
.excel-graph-wrap {
  min-height: 420px !important;
}
.excel-chart-note {
  font-size: 12px !important;
  line-height: 1.45 !important;
}
@media (max-width: 1600px) {
  .commercial-filter-grid-v1750 { grid-template-columns: repeat(3, minmax(170px, 1fr)) !important; }
}
@media (max-width: 1050px) {
  .commercial-filter-grid-v1750 { grid-template-columns: 1fr !important; }
}
