/* Shared order product views for Logistica + Faturamento */
.faturamento-products-mobile,
.logistica-products-mobile {
  display: none;
}

.logistica-order-card {
  overflow: hidden;
}

.faturamento-products-table,
.logistica-products-table {
  overflow-x: hidden;
}

.faturamento-products-desktop,
.logistica-products-desktop {
  table-layout: fixed;
  width: 100%;
}

.faturamento-products-desktop .fat-col-codigo,
.logistica-products-desktop .fat-col-codigo {
  width: 76px;
}

.faturamento-products-desktop .fat-col-num,
.logistica-products-desktop .fat-col-num {
  width: 96px;
}

.faturamento-products-desktop .fat-col-money,
.logistica-products-desktop .fat-col-money {
  width: 104px;
}

.faturamento-products-desktop .fat-col-markup,
.logistica-products-desktop .fat-col-markup {
  width: 86px;
}

.faturamento-products-desktop th,
.faturamento-products-desktop td,
.logistica-products-desktop th,
.logistica-products-desktop td {
  white-space: nowrap;
}

.logistica-products-desktop .logistica-products-total-label {
  width: 64px;
}

.logistica-products-desktop .logistica-products-total-value {
  min-width: 170px;
  overflow: visible;
  white-space: nowrap;
}

.faturamento-products-desktop tbody > tr,
.faturamento-products-desktop tbody > tr > td,
.logistica-products-desktop tbody > tr,
.logistica-products-desktop tbody > tr > td {
  cursor: default;
}

.faturamento-products-desktop td .lg-scroll-col,
.logistica-products-desktop td .lg-scroll-col {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  scrollbar-width: none !important;
  cursor: default;
}

.faturamento-products-desktop td .lg-scroll-col:hover,
.logistica-products-desktop td .lg-scroll-col:hover {
  scrollbar-width: none !important;
}

.faturamento-products-desktop td .lg-scroll-col::-webkit-scrollbar,
.faturamento-products-desktop td .lg-scroll-col:hover::-webkit-scrollbar,
.logistica-products-desktop td .lg-scroll-col::-webkit-scrollbar,
.logistica-products-desktop td .lg-scroll-col:hover::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.faturamento-products-desktop td .lg-scroll-col.is-scrollable,
.logistica-products-desktop td .lg-scroll-col.is-scrollable {
  cursor: grab;
}

.faturamento-products-desktop td .lg-scroll-col.is-scrollable.is-dragging,
.logistica-products-desktop td .lg-scroll-col.is-scrollable.is-dragging {
  cursor: grabbing;
}

.informes-table td .informes-scroll-col {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  scrollbar-width: none !important;
  cursor: default;
}

.informes-table td .informes-scroll-col:hover {
  scrollbar-width: none !important;
}

.informes-table td .informes-scroll-col.is-scrollable {
  cursor: grab;
}

.informes-table td .informes-scroll-col.is-scrollable.is-dragging {
  cursor: grabbing;
}

.informes-table td .informes-scroll-col::-webkit-scrollbar,
.informes-table td .informes-scroll-col:hover::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.informes-table .informes-col-faturamento {
  white-space: nowrap;
}

.informes-table thead .informes-col-faturamento {
  padding-right: 0;
  padding-left: 0;
  text-align: center;
}

.informes-table .informes-col-cidade {
  max-width: none !important;
}

.informes-cards-mobile {
  display: none;
}

.informes-mobile-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}

.informes-mobile-card-header,
.informes-mobile-grid {
  display: grid;
  gap: 12px;
}

.informes-mobile-card-header {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f3;
}

.informes-mobile-card-header > div,
.informes-mobile-grid > div,
.informes-mobile-client {
  min-width: 0;
}

.informes-mobile-client {
  padding: 12px 0;
  overflow-wrap: anywhere;
}

.informes-mobile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.informes-mobile-label {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
}

#informesPendentes .js-informe-field.is-pending-save {
  border-color: #198754;
  box-shadow: 0 0 0 .15rem rgba(25, 135, 84, .16);
}

#informesPendentes .js-informe-field.is-send-error {
  border-color: #dc3545;
  box-shadow: 0 0 0 .15rem rgba(220, 53, 69, .16);
}

.faturamento-filter.informes-filter {
  grid-template-columns: repeat(2, minmax(140px, 180px)) auto auto;
}

@media (max-width: 640px) {
  .faturamento-filter.informes-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "inicio fim"
      "consultar stepper";
  }

  .informes-filter > div:nth-child(1) { grid-area: inicio; }
  .informes-filter > div:nth-child(2) { grid-area: fim; }
  .informes-filter > .period-range-submit { grid-area: consultar; }
  .informes-filter > .faturamento-stepper { grid-area: stepper; }
}

.faturamento-products-desktop tr.is-filter-selected,
.faturamento-products-desktop tr.is-filter-selected td,
.logistica-products-desktop tr.is-filter-selected,
.logistica-products-desktop tr.is-filter-selected td,
.faturamento-product-card.is-filter-selected {
  color: #315a7a;
}

.faturamento-products-desktop tr.is-filter-selected .lg-scroll-col,
.logistica-products-desktop tr.is-filter-selected .lg-scroll-col,
.faturamento-product-card.is-filter-selected .faturamento-product-title,
.faturamento-product-card.is-filter-selected .faturamento-product-grid strong {
  color: #315a7a;
  font-weight: 700;
}

.logistica-products-desktop tr.has-negative-stock,
.logistica-products-desktop tr.has-negative-stock td,
.faturamento-product-card.has-negative-stock,
.logistica-route-products-summary-row.has-negative-stock,
.logistica-pedido-info-product.has-negative-stock {
  color: #b42318;
}

.logistica-products-desktop tr.has-negative-stock .lg-scroll-col,
.faturamento-product-card.has-negative-stock .faturamento-product-title,
.faturamento-product-card.has-negative-stock .faturamento-product-grid strong,
.logistica-route-products-summary-row.has-negative-stock span,
.logistica-route-products-summary-row.has-negative-stock strong,
.logistica-pedido-info-product.has-negative-stock span {
  color: #b42318;
  font-weight: 700;
}
@media (max-width: 992px) {
  .informes-table-desktop {
    display: none;
  }

  .informes-cards-mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .informes-mobile-empty {
    grid-column: 1 / -1;
    padding: 24px 12px;
  }

  .faturamento-products-table,
  .logistica-products-table {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
    overflow-x: hidden;
  }
}
@media (max-width: 576px) {
  .informes-cards-mobile {
    grid-template-columns: 1fr;
  }

  .faturamento-products-table,
  .logistica-products-table {
    display: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
    overflow-x: hidden;
  }
  .faturamento-products-mobile,
  .logistica-products-mobile {
    display: block;
  }
}
