[hidden] { display: none !important; }
body { font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif; }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bs-tertiary-bg, #f4f6f9);
}
.login-box { width: min(100%, 390px); border-radius: 4px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--bs-primary, #0d6efd);
  font-weight: 700;
  letter-spacing: -.04em;
}
.password-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 25, 31, .55);
}
.password-box { width: min(100%, 430px); }
.app-header .nav-link { color: var(--bs-body-color); }
.app-header .nav-link:hover { color: var(--bs-primary); }
.app-header button.nav-link { border: 0; background: transparent; }
.header-identity { white-space: nowrap; }
.bi-logo {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9ecef;
  color: #343a40;
  font-size: 13px;
  font-weight: 800;
  margin-inline: 4px 9px;
}
.sidebar-static { cursor: default; pointer-events: none; color: #adb5bd !important; }
.sidebar-static:hover { background: transparent !important; }
.dashboard-toolbar { min-height: 31px; }
.refresh-progress { display:inline-flex; align-items:center; gap:10px; min-width:270px; padding:8px 12px; border:1px solid #cfe2f3; border-radius:10px; background:linear-gradient(110deg,#f1f8fd,#fff); box-shadow:0 3px 12px rgba(21,81,125,.08); color:#24435e; }
.refresh-progress-icon { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:50%; background:#dceefa; color:#1976ad; font-size:1.1rem; }
.refresh-progress-icon i { display:block; animation:refresh-spin 1.15s linear infinite; }
.refresh-progress-copy { display:grid; gap:1px; min-width:0; }
.refresh-progress-copy strong { font-size:.78rem; line-height:1.2; }
.refresh-progress-copy small { color:#718294; font-size:.69rem; white-space:nowrap; }
.refresh-progress-meter { position:relative; flex:0 0 42px; width:42px; height:4px; overflow:hidden; border-radius:9px; background:#dce7ef; }
.refresh-progress-meter i { position:absolute; inset:0 auto 0 0; width:42%; border-radius:9px; background:#2588bf; animation:refresh-flow 1.3s ease-in-out infinite; }
.refresh-error { margin-bottom:12px; }
@keyframes refresh-spin { to { transform:rotate(360deg); } }
@keyframes refresh-flow { 0% { transform:translateX(-110%); } 100% { transform:translateX(250%); } }
@media(prefers-reduced-motion:reduce) { .refresh-progress-icon i,.refresh-progress-meter i { animation:none; } .refresh-progress-meter i { width:100%; opacity:.7; } }
.small-box { height: 142px; display: flex; flex-direction: column; }
.small-box .inner { flex: 1; min-height: 0; padding-right: 36px; }
.small-box .inner h3 {
  font-size: 2rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.small-box .inner h3.money-value { font-size: clamp(1.25rem, 1.75vw, 1.7rem); padding-top: 4px; min-height: 42px; }
.small-box .inner p { margin-bottom: 0; font-weight: 600; }
.small-box-footer { display: block; padding: 5px 10px; text-align: center; }
.small-box-footer strong { font-weight: 700; }
.card-header .card-title { font-size: 1rem; }
#filters { scroll-margin-top: 70px; }
#trend, #products { scroll-margin-top: 70px; }
#filters .form-label { font-weight: 600; font-size: .875rem; margin-bottom: 4px; }
#filters .form-control, #filters .form-select { min-height: 36px; }
.info-box { height: 100%; min-height: 90px; }
.info-box .info-box-number { font-size: 1.15rem; white-space: nowrap; }
.info-box .info-box-content { min-width: 0; }
.info-box .info-box-icon { font-size: 1.6rem; }
.trend-chart { min-height: 220px; width: 100%; }
.trend-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #dee2e6; margin-top: 8px; padding-top: 14px; }
.trend-summary > div { display: flex; flex-direction: column; gap: 3px; }
.trend-summary-label, .trend-summary-comparison > span { color: #6c757d; font-size: .82rem; }
.trend-summary-total { font-size: 1.2rem; font-weight: 700; }
.trend-summary-comparison { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; text-align: right; }
.trend-comparison-item { display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 8px; }
.trend-comparison-item > span, .trend-comparison-item > small { grid-column: 1 / -1; }
.trend-change { display: inline-flex; align-items: center; gap: 5px; font-size: 1rem; }
.trend-change.is-up { color: #198754; }
.trend-change.is-down { color: #dc3545; }
.trend-change.is-flat, .trend-change.is-na { color: #6c757d; }
.trend-change i { font-size: 1.2rem; }
.trend-summary-comparison small { font-size: .78rem; }
.trend-recap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-top: 1px solid #dee2e6; margin-top: 8px; }
.trend-recap-item { min-width: 0; padding: 14px 18px 4px; border-right: 1px solid #dee2e6; }
.trend-recap-item:first-child { padding-left: 0; }
.trend-recap-item:last-child { border-right: 0; padding-right: 0; }
.trend-recap-item .trend-summary-label { display: block; color: #6c757d; font-size: .88rem; }
.trend-recap-item .trend-summary-total { display: block; margin: 2px 0 12px; font-size: 1.35rem; line-height: 1.2; }
.trend-recap-changes { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; color: #6c757d; font-size: .78rem; }
.trend-recap-changes > span { grid-column: 1 / -1; margin-top: 4px; }
.trend-recap-changes > span:first-child { margin-top: 0; }
.trend-recap-changes small { text-align: right; white-space: nowrap; font-size: .72rem; }
.ranking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.ranking-value { font-size: .875rem; font-weight: 700; }
.ranking-track { grid-column: 1 / -1; height: 5px; background: #e9ecef; overflow: hidden; }
.ranking-fill { height: 100%; background: #0d6efd; }
.empty-state { color: #6c757d; padding: 45px 10px; text-align: center; }
@media (max-width: 1199px) {
  .small-box .inner h3.money-value { font-size: 1.5rem; }
}
@media (max-width: 767px) {
  .dashboard-toolbar { align-items: flex-start !important; }
  .refresh-progress { order:3; width:100%; }
  .small-box .inner h3.money-value { font-size: 1.35rem; }
  .trend-chart { min-height: 190px; }
  .trend-summary { align-items: flex-start; }
  .trend-summary-comparison { align-items: flex-start; text-align: left; }
  .trend-recap-grid { grid-template-columns: 1fr; }
  .trend-recap-item, .trend-recap-item:first-child, .trend-recap-item:last-child { padding: 13px 0; border-right: 0; border-bottom: 1px solid #dee2e6; }
.trend-recap-item:last-child { border-bottom: 0; }
}
.trend-recap.card-footer { background: #f4f6f9 !important; border-top: 1px solid #dee2e6; color: #495057; }
.trend-recap-item { min-width: 0; padding: 10px 5px !important; }
.trend-recap-changes { display: flex; justify-content: center; align-items: center; gap: 9px; margin: 0 0 5px; color: #6c757d; font-size: .78rem; }
.trend-recap-changes > span { display: inline-flex; grid-column: auto; align-items: center; gap: 3px; margin: 0; white-space: nowrap; }
.trend-recap-changes .trend-change { font-size: .78rem; }
.trend-recap-changes .trend-change i { font-size: .85rem; }
.trend-recap-changes small { color: #6c757d; text-align: left; white-space: nowrap; font-size: .64rem; text-transform: uppercase; }
.trend-recap .trend-summary-total { font-size: 1.1rem; line-height: 1.25; }
.trend-recap .trend-summary-label { font-size: .68rem; letter-spacing: .035em; }
@media (max-width: 767px) {
  .trend-recap-item { padding: 9px 2px !important; }
  .trend-recap-changes { gap: 4px; font-size: .68rem; }
  .trend-recap-changes .trend-change { gap: 2px; font-size: .68rem; }
  .trend-recap-changes .trend-change i { font-size: .72rem; }
  .trend-recap-changes small { font-size: .55rem; }
  .trend-recap .trend-summary-total { font-size: .93rem; }
  .trend-recap .trend-summary-label { font-size: .57rem; letter-spacing: 0; }
}
.trend-recap-changes .trend-margin-reference { font-size: .78rem; font-weight: 600; }
.trend-recap-changes .trend-margin-reference.is-up { color: #198754; }
.trend-recap-changes .trend-margin-reference.is-down { color: #dc3545; }
.trend-recap-changes .trend-margin-reference.is-flat,
.trend-recap-changes .trend-margin-reference.is-na { color: #6c757d; }
.trend-recap-changes .trend-margin-reference .bi,
.trend-recap-changes .trend-margin-reference > span { color: inherit; }
.trend-recap-changes .trend-margin-reference i { font-size: .85rem; }
.trend-recap-changes .trend-margin-reference small { color: #6c757d; font-size: .64rem; font-weight: 400; }
.trend-change[data-trend-tooltip] { position:relative; cursor:help; }
.trend-value-tooltip { position:absolute; z-index:30; left:50%; bottom:calc(100% + 10px); display:grid; min-width:170px; padding:0; overflow:hidden; border:1px solid #dfe3e8; border-radius:4px; background:#fff; box-shadow:0 4px 12px rgba(0,0,0,.16); color:#495057; text-align:left; white-space:nowrap; opacity:0; visibility:hidden; pointer-events:none; transform:translate(-50%,4px); transition:opacity .12s ease,transform .12s ease,visibility .12s ease; }
.trend-value-tooltip::after { content:""; position:absolute; top:100%; left:50%; border:6px solid transparent; border-top-color:#fff; transform:translateX(-50%); }
.trend-change[data-trend-tooltip]:hover .trend-value-tooltip,.trend-change[data-trend-tooltip]:focus-visible .trend-value-tooltip { opacity:1; visibility:visible; transform:translate(-50%,0); }
.trend-value-tooltip-period { display:block; padding:6px 10px; border-bottom:1px solid #e3e6e8; background:#f3f4f5; color:#495057; font-size:.76rem; font-weight:500; }
.trend-value-tooltip strong { display:block; padding:7px 10px; color:#343a40; font-size:.9rem; font-weight:700; }
@media (max-width: 767px) {
  .trend-recap-changes .trend-margin-reference { gap: 2px; font-size: .68rem; }
  .trend-recap-changes .trend-margin-reference i { font-size: .72rem; }
  .trend-recap-changes .trend-margin-reference small { font-size: .55rem; }
}

/* Overview filters: wider branch picker and a dropdown that overlays the dashboard. */
@media (min-width: 1200px) {
  #filters-form .overview-period-column { flex: 0 0 14%; max-width: 14%; }
  #filters-form .overview-branch-column { flex: 0 0 25%; max-width: 25%; }
  #filters-form .overview-select-column { flex: 0 0 15.25%; max-width: 15.25%; }
}
.sales-filter-header > div > small { display: none !important; }
.sales-filter-panel, #filters-form, #filters-form > .row { overflow: visible; }
.branch-multiselect { position: relative; }
.branch-multiselect.is-open { z-index: 1060; }
.branch-checkbox-list {
  position: absolute; z-index: 1060; top: calc(100% + 4px); left: 0;
  width: max(100%, 280px); max-height: 280px; overflow: auto; padding: 7px;
  border: 1px solid #ccd6df; border-radius: 7px; background: #fff;
  box-shadow: 0 8px 24px rgba(16, 42, 67, .19);
}
.branch-checkbox-option { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 4px; cursor: pointer; font-size: .9rem; }
.branch-checkbox-option:hover { background: #f1f6fa; }
.branch-checkbox-option input { width: 16px; height: 16px; accent-color: #0d6efd; flex: none; }
.branch-checkbox-option span { overflow-wrap: anywhere; }

/* Filter header: keep the expand control at the far right. */
.sales-filter-header {
  display: flex; align-items: center; justify-content: space-between;
}
.sales-filter-header > div { flex: 1 1 auto; min-width: 0; }
.sales-filter-header > button {
  flex: 0 0 38px; width: 38px; margin-left: auto; align-self: center;
  justify-self: auto; text-align: center;
}

.ranking-row-button {
  width: 100%; border: 0; background: transparent; color: inherit; text-align: left;
  font: inherit; cursor: pointer;
}
.ranking-row-button:hover .ranking-name { color: #0d6efd; text-decoration: none; }
.ranking-row-button:focus-visible { outline: 2px solid #0d6efd; outline-offset: 2px; }
.sales-dialog { border: 0; border-radius: 12px; padding: 0; width: min(760px, calc(100% - 30px)); max-height: 85vh; box-shadow: 0 20px 70px rgba(12,35,71,.5); }
.sales-dialog::backdrop { background: rgba(11,29,50,.67); }
.sales-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e7edf2; }
.sales-dialog-head h5 { margin: 0; color: #183951; }
.sales-dialog-body { padding: 18px 20px; overflow: auto; max-height: calc(85vh - 65px); }
.department-ranking-dialog .ranking { max-height: 60vh; overflow-y: auto; }

/* Polished AdminLTE-style detail dialogs for overview indicators. */
.sales-dialog { color:#34495e; border:1px solid rgba(33,55,77,.08); border-radius:14px; overflow:hidden; background:#fff; }
.sales-dialog::backdrop { background:rgba(21,34,50,.62); backdrop-filter:blur(2px); }
.sales-dialog-head.sales-dialog-heading { min-height:86px; justify-content:flex-start; gap:14px; padding:16px 20px; background:linear-gradient(110deg,#f4f7fa,#fff 72%); border-top:4px solid #3c8dbc; }
.sales-dialog-heading-copy { min-width:0; flex:1; }
.sales-dialog-heading-copy h5 { font-size:1.12rem; font-weight:700; line-height:1.25; }
.sales-dialog-kicker { display:block; margin-bottom:4px; color:#7b8b99; font-size:.66rem; font-weight:800; letter-spacing:.09em; }
.sales-dialog-icon { display:grid; place-items:center; flex:0 0 46px; width:46px; height:46px; border-radius:12px; background:#e7f1f8; color:#3c8dbc; font-size:1.25rem; }
.sales-dialog-icon.department { background:#e7f4ef; color:#198754; }
.sales-dialog .btn-close { flex:0 0 auto; margin-left:auto; padding:9px; border-radius:8px; opacity:.62; }
.sales-dialog .btn-close { transition:opacity .15s ease,filter .15s ease; }
.sales-dialog .btn-close:hover { background-color:transparent; filter:invert(28%) sepia(76%) saturate(2255%) hue-rotate(330deg) brightness(91%) contrast(92%); opacity:1; }
.sales-dialog-body { padding:18px 20px 20px; }
.sales-dialog-context { display:flex; align-items:center; gap:8px; min-height:38px; margin:0 0 15px; padding:9px 12px; border:1px solid #e6edf2; border-radius:8px; background:#f8fafc; color:#627486; font-size:.82rem; }
.sales-dialog-context::before { content:""; flex:0 0 7px; width:7px; height:7px; border-radius:50%; background:#3c8dbc; }
.branch-breakdown-dialog { width:min(1500px,calc(100% - 28px)); max-height:90vh; }
.branch-breakdown-dialog[data-mode="returns"] .sales-dialog-head { border-top-color:#dc3545; }
.branch-breakdown-dialog[data-mode="returns"] .sales-dialog-icon { background:#fdebed; color:#dc3545; }
.branch-breakdown-dialog[data-mode="returns"] .sales-dialog-context::before { background:#dc3545; }
.branch-breakdown-dialog[data-mode="pending"] .sales-dialog-head { border-top-color:#f0ad4e; }
.branch-breakdown-dialog[data-mode="pending"] .sales-dialog-icon { background:#fff5df; color:#c88919; }
.branch-breakdown-dialog[data-mode="pending"] .sales-dialog-context::before { background:#f0ad4e; }
.branch-breakdown-scroll { max-height:calc(90vh - 190px); overflow:auto; border:1px solid #e3eaf0; border-radius:9px; }
.branch-breakdown-table { min-width:1120px; margin:0; }
.branch-breakdown-scroll thead { position:sticky; top:0; z-index:2; box-shadow:0 1px 0 #dfe6ec; }
.branch-breakdown-table thead th { padding:11px 12px; color:#627486; font-size:.69rem; letter-spacing:.035em; white-space:nowrap; }
.branch-breakdown-table tbody td { padding:10px 12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.branch-breakdown-table tbody tr:nth-child(even):not(.branch-breakdown-total-row) { background:#fafbfd; }
.branch-breakdown-clickable { cursor:pointer; transition:background-color .15s ease,color .15s ease; }
.branch-breakdown-clickable:hover td { background:#eaf4fb !important; color:#176b9b; }
.branch-breakdown-clickable:focus-visible { outline:2px solid #3c8dbc; outline-offset:-2px; }
.branch-breakdown-table .branch-breakdown-highlight,.branch-breakdown-scroll thead th:nth-child(2),.branch-breakdown-scroll thead th:nth-child(5),.branch-breakdown-scroll thead th:nth-child(8) { background:#fff0a6 !important; }
.branch-breakdown-scroll thead th:nth-child(1) { min-width:220px; }
.branch-breakdown-total-row td { color:#183951; font-weight:800; background:#edf2f6; border-top:2px solid #aab9c6; }
.branch-breakdown-total-row td.branch-breakdown-highlight { background:#ffe985 !important; }
.branch-breakdown-dialog[data-mode="returns"] .branch-breakdown-table .branch-breakdown-highlight:nth-child(7) { background:#fff0a6 !important; }
.branch-breadcrumb-link { padding:0; border:0; background:none; color:#1877ad; font:inherit; font-weight:600; cursor:pointer; }
.branch-breadcrumb-link:hover { color:#0d527e; text-decoration:underline; }
.department-ranking-dialog .ranking { max-height:62vh; padding:2px 4px 2px 0; }
@media(max-width:767px) {
  .sales-dialog-head.sales-dialog-heading { min-height:74px; padding:13px 15px; gap:11px; }
  .sales-dialog-icon { flex-basis:40px; width:40px; height:40px; }
  .sales-dialog-heading-copy h5 { font-size:1rem; }
  .sales-dialog-body { padding:14px; }
  .sales-dialog-context { font-size:.75rem; }
  .branch-breakdown-dialog { width:calc(100% - 16px); max-height:94vh; }
  .branch-breakdown-scroll { max-height:calc(94vh - 170px); }
}

/* Identidade ControlByte no topo da navegação */
.sidebar-brand { background:transparent; border-bottom-color:rgba(255,255,255,.24); }
.sidebar-brand .brand-link { display:flex; justify-content:center; align-items:center; height:57px; padding:6px 12px; }
.sidebar-brand .brand-logo { display:block; width:100%; max-width:224px; height:54px; object-fit:contain; filter:brightness(0) invert(1); }

/* Menu ControlByte no mesmo azul do ERP */
.app-sidebar { --lte-sidebar-color:#fff; --lte-sidebar-hover-color:#fff; --lte-sidebar-hover-bg:rgba(0,30,85,.18); --lte-sidebar-menu-active-color:#fff; --lte-sidebar-menu-active-bg:rgba(0,30,85,.27); --lte-sidebar-submenu-color:#fff; --lte-sidebar-submenu-hover-color:#fff; --lte-sidebar-submenu-hover-bg:rgba(0,30,85,.18); --lte-sidebar-submenu-active-color:#fff; --lte-sidebar-submenu-active-bg:rgba(0,30,85,.32); --lte-sidebar-header-color:rgba(255,255,255,.78); background:linear-gradient(180deg,#0a58ca 0%,#0d6efd 100%); }
.app-sidebar .sidebar-brand { background:transparent; border-bottom-color:rgba(255,255,255,.24); }
.app-sidebar .brand-logo { filter:brightness(0) invert(1); }
.app-sidebar .sidebar-menu .nav-link .nav-icon { color:rgba(255,255,255,.86); }
.app-sidebar .sidebar-menu .nav-link.active { color:#fff; background:rgba(0,30,85,.27); }
.app-sidebar .sidebar-menu .nav-header { color:rgba(255,255,255,.78); }

/* Controles e horario da ultima carga dentro do painel de filtros */
.sales-filter-header { gap:12px; }
.sales-filter-header .filter-heading { flex:1 1 auto; min-width:160px; }
.filter-header-actions { display:flex; align-items:center; justify-content:flex-end; flex:0 1 auto; gap:10px; margin-left:auto; }
.filter-updated-at { white-space:nowrap; font-size:.8rem; }
.filter-header-actions .refresh-progress { min-width:240px; padding:5px 9px; }
.filter-header-actions .refresh-progress-icon { flex-basis:28px; width:28px; height:28px; }
.filter-header-actions .filter-toggle-button { flex:0 0 38px; width:38px; margin-left:0; }
@media(max-width:767px){ .sales-filter-header { flex-wrap:wrap; } .filter-header-actions { flex:1 1 100%; flex-wrap:wrap; justify-content:flex-end; gap:8px; } .filter-updated-at { margin-right:auto; } .filter-header-actions .refresh-progress { flex:1 1 100%; min-width:0; order:3; } }

/* O horario da carga permanece visivel no cabecalho; os resumos dos filtros continuam ocultos */
.sales-filter-header > .filter-header-actions > #updated-at { display:inline-flex !important; align-items:center; white-space:nowrap; }

/* Centraliza o aviso de atualizacao na linha do titulo do dashboard */
.dashboard-title-row { position:relative; min-height:48px; }
.dashboard-refresh-slot { position:absolute; top:50%; left:50%; z-index:5; width:max-content; max-width:100%; transform:translate(-50%,-50%); pointer-events:none; }
@media(max-width:767px){ .dashboard-title-row { row-gap:8px; } .dashboard-refresh-slot { position:static; transform:none; order:2; display:flex; justify-content:center; width:100%; } .dashboard-title-row > div:first-child { order:1; } .dashboard-title-row > div:last-child { order:3; } }

/* Mix industrial com o acabamento do detalhamento de faturamento por filial */
.industrial-table-scroll { max-height:65vh; overflow:auto; border:1px solid #e3eaf0; border-radius:9px; }
.industrial-table-scroll .sales-table { min-width:1450px; margin:0; font-size:.84rem; }
.industrial-table-scroll thead { position:sticky; top:0; z-index:2; box-shadow:0 1px 0 #dfe6ec; }
.industrial-table-scroll .sales-table thead th { padding:11px 12px; color:#627486; font-size:.69rem; letter-spacing:.035em; white-space:nowrap; vertical-align:middle; background:#f8fafc; border-bottom:1px solid #dfe6ec; }
.industrial-table-scroll .sales-table tbody td { padding:10px 12px; font-variant-numeric:tabular-nums; white-space:nowrap; vertical-align:middle; }
.industrial-table-scroll .sales-table tbody tr:nth-child(even):not(.industrial-total-row) > * { background:#fafbfd; }
.industrial-table-scroll .industrial-table-row { cursor:pointer; transition:background-color .15s ease,color .15s ease; }
.industrial-table-scroll .industrial-table-row:hover td { background:#eaf4fb !important; color:#176b9b; }
.industrial-table-scroll .industrial-table-row:focus-visible { outline:2px solid #3c8dbc; outline-offset:-2px; }
.industrial-table-scroll .industrial-highlight,.industrial-table-scroll thead th:nth-child(4),.industrial-table-scroll thead th:nth-child(5),.industrial-table-scroll thead th:nth-child(8) { background:#fff0a6 !important; }
.industrial-table-scroll .industrial-total-row td { color:#183951; font-weight:800; background:#edf2f6; border-top:2px solid #aab9c6; }
.industrial-table-scroll .industrial-total-row td.industrial-highlight { background:#ffe985 !important; }
.industrial-table-scroll .sales-empty { padding:20px; color:#82909e; text-align:center; }

/* Popups industriais no mesmo padrao da tabela de faturamento por filial */
.industrial-popup-scroll { max-height:calc(90vh - 190px); overflow:auto; border:1px solid #e3eaf0; border-radius:9px; }
.industrial-popup-scroll .industrial-metrics-table { min-width:1450px; margin:0; font-size:.84rem; }
.industrial-popup-scroll thead { position:sticky; top:0; z-index:2; box-shadow:0 1px 0 #dfe6ec; }
.industrial-popup-scroll .industrial-metrics-table thead th { padding:11px 12px; color:#627486; font-size:.69rem; letter-spacing:.035em; white-space:nowrap; vertical-align:middle; background:#f8fafc; border-bottom:1px solid #dfe6ec; }
.industrial-popup-scroll .industrial-metrics-table thead th:first-child { min-width:220px; }
.industrial-popup-scroll .industrial-metrics-table tbody td { padding:10px 12px; font-variant-numeric:tabular-nums; white-space:nowrap; vertical-align:middle; }
.industrial-popup-scroll .industrial-metrics-table tbody tr:nth-child(even):not(.industrial-total-row) > * { background:#fafbfd; }
.industrial-popup-scroll .industrial-table-row { cursor:pointer; transition:background-color .15s ease,color .15s ease; }
.industrial-popup-scroll .industrial-table-row:hover td { background:#eaf4fb !important; color:#176b9b; }
.industrial-popup-scroll .industrial-table-row:focus-visible { outline:2px solid #3c8dbc; outline-offset:-2px; }
.industrial-popup-scroll .industrial-highlight,.industrial-popup-scroll thead th:nth-child(4),.industrial-popup-scroll thead th:nth-child(5),.industrial-popup-scroll thead th:nth-child(8) { background:#fff0a6 !important; }
.industrial-popup-scroll .industrial-total-row td { color:#183951; font-weight:800; background:#edf2f6; border-top:2px solid #aab9c6; }
.industrial-popup-scroll .industrial-total-row td.industrial-highlight { background:#ffe985 !important; }
.industrial-popup-scroll .sales-empty { padding:20px; color:#82909e; text-align:center; }

/* Navegacao das visoes da tabela de mix */
.sales-tabs { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:4px; margin:0 0 14px; border:1px solid #dce5ee; border-radius:10px; background:#f3f6f9; box-shadow:inset 0 1px 2px rgba(28,52,73,.045); }
.sales-tabs button { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:7px 15px; border:1px solid transparent; border-radius:7px; background:transparent; color:#607488; font-size:.82rem; font-weight:600; line-height:1.2; white-space:nowrap; cursor:pointer; transition:color .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .16s ease; }
.sales-tabs button:hover { color:#245b80; background:#e8eef4; }
.sales-tabs button.active { border-color:#d8e7f2; background:#fff; color:#176399; font-weight:700; box-shadow:0 1px 3px rgba(27,61,87,.12); }
.sales-tabs button:focus-visible { outline:2px solid #3c8dbc; outline-offset:2px; }
@media (max-width:575.98px) { .sales-tabs { display:flex; width:100%; } .sales-tabs button { flex:1; padding-inline:10px; } }



/* Navegacao das visoes da tabela de mix */
.sales-tabs { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:4px; margin:0 0 14px; border:1px solid #dce5ee; border-radius:10px; background:#f3f6f9; box-shadow:inset 0 1px 2px rgba(28,52,73,.045); }
.sales-tabs button { display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:7px 15px; border:1px solid transparent; border-radius:7px; background:transparent; color:#607488; font-size:.82rem; font-weight:600; line-height:1.2; white-space:nowrap; cursor:pointer; transition:color .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .16s ease; }
.sales-tabs button:hover { color:#245b80; background:#e8eef4; }
.sales-tabs button.active { border-color:#d8e7f2; background:#fff; color:#176399; font-weight:700; box-shadow:0 1px 3px rgba(27,61,87,.12); }
.sales-tabs button:focus-visible { outline:2px solid #3c8dbc; outline-offset:2px; }
@media (max-width:575.98px) { .sales-tabs { display:flex; width:100%; } .sales-tabs button { flex:1; padding-inline:10px; } }

/* Distribuicao financeira por dia de vencimento */
.finance-daily { min-height:290px; display:flex; flex-direction:column; gap:12px; }
.finance-daily-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; border:1px solid #e5ebf1; border-radius:10px; background:linear-gradient(115deg,#f7fafc,#fff); }
.finance-daily-total-group { display:flex; flex-direction:column; gap:3px; min-width:0; }
.finance-daily-label { color:#718195; font-size:.7rem; font-weight:700; letter-spacing:.045em; text-transform:uppercase; }
.finance-daily-total { color:#233f59; font-size:1.2rem; font-weight:800; font-variant-numeric:tabular-nums; }
.finance-daily-meta { display:flex; flex-direction:column; align-items:flex-end; gap:4px; color:#77879a; font-size:.74rem; white-space:nowrap; }
.finance-daily-day-count { padding:3px 8px; border-radius:20px; background:#eaf0f5; color:#52697f; font-weight:700; }
.finance-daily-peak { font-weight:600; }
.finance-daily-list { max-height:350px; overflow:auto; padding:0 5px 0 1px; scrollbar-color:#c7d3de transparent; scrollbar-width:thin; }
.finance-daily-row { display:grid; grid-template-columns:42px minmax(70px,1fr) minmax(112px,auto); align-items:center; gap:11px; padding:7px 9px; border-radius:8px; transition:background-color .15s ease; }
.finance-daily-row:hover { background:#f5f8fa; }
.finance-day { display:grid; place-items:center; width:34px; height:28px; border-radius:7px; background:#f0f4f7; color:#687c90; font-size:.78rem; font-weight:800; font-variant-numeric:tabular-nums; }
.finance-daily-track { height:9px; overflow:hidden; border-radius:10px; background:#edf1f4; }
.finance-daily-fill { height:100%; min-width:3px; border-radius:inherit; background:#2786a9; transition:width .45s ease; }
.finance-daily.is-receivable .finance-daily-fill { background:linear-gradient(90deg,#49a8bd,#237e9b); }
.finance-daily.is-payable .finance-daily-fill { background:linear-gradient(90deg,#f1bd5a,#d68b22); }
.finance-daily-amount { color:#344e66; font-size:.82rem; font-weight:700; font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap; }
.finance-daily-row.is-peak .finance-day { background:#e5f2f5; color:#176b82; }
.finance-daily.is-payable .finance-daily-row.is-peak .finance-day { background:#fff1d8; color:#9c6314; }
@media(max-width:575px) { .finance-daily { min-height:0; } .finance-daily-summary { padding:11px 12px; } .finance-daily-total { font-size:1.05rem; } .finance-daily-row { grid-template-columns:35px minmax(35px,1fr) minmax(94px,auto); gap:7px; padding-inline:4px; } .finance-daily-amount { font-size:.75rem; } }

/* Tabelas de titulos com leitura rapida de vencimento e saldo */
.finance-titles-table { min-width:560px; }
.finance-table-scroll { border-top:1px solid #e7edf2; }
.finance-table-scroll thead { background:#f7f9fb; }
.finance-table-scroll thead th { padding:11px 14px; border-bottom:1px solid #e1e8ee; color:#718195; font-size:.68rem; font-weight:800; letter-spacing:.045em; text-transform:uppercase; white-space:nowrap; }
.finance-table-scroll tbody td { padding:11px 14px; border-color:#edf1f4; vertical-align:middle; }
.finance-table-scroll tbody tr:nth-child(even) > * { background:#fafbfd; }
.finance-table-scroll tbody tr:hover > * { background:#f0f6fa; }
.finance-title-due { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.finance-title-date { color:#344d64; font-size:.82rem; font-variant-numeric:tabular-nums; }
.finance-title-status { padding:3px 7px; border-radius:12px; background:#e8f4ee; color:#28734f; font-size:.62rem; font-weight:800; letter-spacing:.015em; }
.finance-title-status.is-overdue { background:#fdebed; color:#b33b45; }
.finance-title-row.is-overdue > *:first-child { box-shadow:inset 3px 0 #dc5962; }
.finance-title-partner { display:flex; flex-direction:column; gap:3px; min-width:0; }
.finance-title-partner-name { max-width:350px; overflow:hidden; color:#344d64; font-size:.82rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.finance-title-partner-meta { color:#8795a4; font-size:.68rem; white-space:nowrap; }
.finance-title-amount-cell { min-width:145px; }
.finance-title-amount { display:inline-block; padding:5px 9px; border-radius:6px; background:#f0f4f7; color:#27445e; font-size:.82rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.finance-payable-table .finance-title-amount { background:#fff5e4; color:#885813; }
@media(max-width:575px) { .finance-table-scroll thead th,.finance-table-scroll tbody td { padding:9px 10px; } .finance-title-due { align-items:flex-start; flex-direction:column; gap:4px; } .finance-title-partner-name { max-width:190px; } }

/* Alinhamento dos cabecalhos e status dos titulos */
.finance-title-card-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.finance-title-card-header .card-title { margin:0; }
.finance-title-cap { flex:0 0 auto; margin-left:auto; text-align:right; white-space:nowrap; }
.finance-title-due { align-items:flex-start; flex-direction:column; gap:3px; }
.finance-title-status { line-height:1.2; }
@media(max-width:575px) { .finance-title-card-header { flex-wrap:wrap; } .finance-title-cap { margin-left:auto; } }
