﻿/* PAC Business Control Tower v1.7.30
   Operational date, semantic tables, explicit Detail 360 and Plotly resize guard. */

.pac-sidebar-home {
  margin: 3px 5px 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(153,233,242,.18);
}
.pac-sidebar-home .pac-nav-button {
  width: 100%;
  border-color: rgba(153,233,242,.42) !important;
  background: linear-gradient(135deg,rgba(153,233,242,.16),rgba(3,53,65,.86)) !important;
}
.filter-date-basis-note {
  margin: 9px 2px 0;
  padding: 9px 12px;
  border: 1px solid rgba(153,233,242,.24);
  border-radius: 10px;
  background: rgba(4,40,50,.74);
  color: #bfe9ef;
  font-size: 11px;
  line-height: 1.45;
}
.filter-date-basis-note strong { color:#fff; }

/* Direction client table replaces the visually dense card wall. */
.v1730-client-table-wrap {
  width: 100%;
  max-height: 680px;
  overflow: auto;
  margin-top: 12px;
  border: 1px solid rgba(153,233,242,.25);
  border-radius: 14px;
  background: #052f39;
  scrollbar-color: rgba(153,233,242,.55) rgba(4,31,39,.9);
}
.v1730-client-table {
  width: 100%;
  min-width: 1550px;
  border-collapse: separate;
  border-spacing: 0;
  color: #e9faff;
  table-layout: fixed;
}
.v1730-client-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 9px;
  background: #073b48;
  color: #aaf3fb;
  border-right: 1px solid rgba(153,233,242,.14);
  border-bottom: 1px solid rgba(153,233,242,.32);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;
  white-space: normal;
}
.v1730-client-table td {
  padding: 10px 9px;
  border-right: 1px solid rgba(153,233,242,.10);
  border-bottom: 1px solid rgba(153,233,242,.11);
  background: rgba(2,31,39,.72);
  color: #e8f8fb;
  font-size: 11px;
  line-height: 1.35;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.v1730-client-table tr:nth-child(even) td { background: rgba(7,49,59,.82); }
.v1730-client-table tr:hover td { background: rgba(153,233,242,.10); }
.v1730-client-table .v1730-client-name { font-weight: 850; color:#fff; }
.v1730-client-table .v1730-message-cell { min-width: 240px; color:#c8e4e8; }
.v1730-semantic-row.red td:first-child { border-left: 5px solid #f21d56; }
.v1730-semantic-row.yellow td:first-child { border-left: 5px solid #f2bf43; }
.v1730-semantic-row.green td:first-child { border-left: 5px solid #35c77a; }
.v1730-semantic-row.neutral td:first-child { border-left: 5px solid #8299a2; }

/* Dynamic Dash tables receive semantic colors even when their columns are built by callbacks. */
.dash-table-container .dash-cell.pac-sem-red,
.dash-table-container .dash-cell.pac-sem-red .dash-cell-value {
  background: #8f1743 !important;
  color: #fff !important;
  font-weight: 900 !important;
}
.dash-table-container .dash-cell.pac-sem-yellow,
.dash-table-container .dash-cell.pac-sem-yellow .dash-cell-value {
  background: #805200 !important;
  color: #fff8de !important;
  font-weight: 900 !important;
}
.dash-table-container .dash-cell.pac-sem-green,
.dash-table-container .dash-cell.pac-sem-green .dash-cell-value {
  background: #166534 !important;
  color: #e9fff1 !important;
  font-weight: 900 !important;
}
.dash-table-container .dash-cell.pac-sem-blue,
.dash-table-container .dash-cell.pac-sem-blue .dash-cell-value {
  background: #155065 !important;
  color: #e4faff !important;
  font-weight: 900 !important;
}
.dash-table-container .dash-cell.pac-sem-gray,
.dash-table-container .dash-cell.pac-sem-gray .dash-cell-value {
  background: #475569 !important;
  color: #fff !important;
  font-weight: 850 !important;
}

/* Intelligence Comercial-Operativa is the only graph-enabled page. Restore every Plotly layer
   and give hidden-at-mount figures a measurable viewport before resize. */
#page-customers-routes .dash-graph,
#page-customers-routes .dash-graph.pac-v1729-source-graph-hidden {
  display: block !important;
  position: relative !important;
  left: auto !important;
  width: 100% !important;
  height: 380px !important;
  min-height: 340px !important;
  max-height: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}
#page-customers-routes .route-map-card-main .dash-graph {
  height: 460px !important;
  min-height: 430px !important;
}
#page-customers-routes .dash-graph .js-plotly-plot,
#page-customers-routes .dash-graph .plot-container,
#page-customers-routes .dash-graph .svg-container,
#page-customers-routes .dash-graph .main-svg,
#page-customers-routes .dash-graph svg,
#page-customers-routes .dash-graph canvas {
  display: block !important;
  position: relative !important;
  left: auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
  pointer-events: auto !important;
}
#page-customers-routes .pac-v1729-graph-semaphore { display:none !important; }

/* Detail 360 is fully absent until an explicit row/KPI/button interaction. */
.detail360-launcher { display:none !important; }

@media (max-width: 900px) {
  .v1730-client-table-wrap { max-height: 620px; }
  #page-customers-routes .dash-graph { height: 330px !important; min-height: 300px !important; }
  #page-customers-routes .route-map-card-main .dash-graph { height: 380px !important; min-height: 350px !important; }
}
