.representacao-table-wrap {
  overflow-x: visible;
}

.representacao-card-list {
  display: none;
  gap: 10px;
}

.representacao-config-actions {
  margin-top: -8px;
  margin-bottom: 24px;
}

.representacao-order-card {
  position: relative;
  border-color: #e3e9ef;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(33, 37, 41, .035);
}

[data-representacao-row][aria-busy="true"],
[data-representacao-card][aria-busy="true"] {
  opacity: .72;
  pointer-events: none;
}

[data-representacao-card][aria-busy="true"]::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(50, 132, 255, .22);
  border-top-color: #3284ff;
  border-radius: 50%;
  animation: representacao-loading-spin .75s linear infinite;
}

[data-representacao-row][aria-busy="true"] td:first-child {
  position: relative;
}

[data-representacao-row][aria-busy="true"] td:first-child::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(50, 132, 255, .22);
  border-top-color: #3284ff;
  border-radius: 50%;
  animation: representacao-loading-spin .75s linear infinite;
}

@keyframes representacao-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.representacao-order-card .card-body {
  padding: 12px 14px;
}

.representacao-order-card .title-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.representacao-order-card .title-line .h5 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.representacao-card-representada {
  color: #198754;
  font-weight: 800;
}

.representacao-card-status {
  color: #343a40;
  font-weight: 800;
}

.representacao-card-details {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 10px;
  color: #4b5563;
  font-size: .84rem;
}

.representacao-card-details > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.representacao-card-details strong {
  display: block;
  margin-bottom: 1px;
  color: #6b7280;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.representacao-card-note {
  min-width: 0;
  grid-column: span 2;
  overflow: visible;
}

.representacao-card-note .representacao-observacao-scroll {
  display: block;
}

table.table--compras.table--representacao {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none;
  margin-bottom: 0;
  table-layout: fixed;
}

table.table--compras.table--representacao th,
table.table--compras.table--representacao td {
  font-size: 1rem;
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

table.table--compras.table--representacao th {
  color: #212529;
  background: #fff !important;
  font-weight: 700;
  text-align: center !important;
  text-transform: none;
}

table.table--compras.table--representacao .compras-filterable-head {
  position: relative;
  cursor: pointer;
  padding-right: 1.65rem;
  user-select: none;
}

table.table--compras.table--representacao .compras-filterable-head > span {
  display: block;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.table--compras.table--representacao .compras-head-filter {
  position: absolute;
  top: 50%;
  right: .35rem;
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #6c757d;
  font-size: .85rem;
  line-height: 1;
  transform: translateY(-50%);
}

table.table--compras.table--representacao .compras-filterable-head:hover .compras-head-filter,
table.table--compras.table--representacao .compras-filterable-head.is-open .compras-head-filter,
table.table--compras.table--representacao .compras-filterable-head.is-filtered .compras-head-filter,
table.table--compras.table--representacao .compras-filterable-head.is-sorted .compras-head-filter {
  background: rgba(13, 110, 253, .1);
  color: #0d6efd;
}

table.table--compras.table--representacao .compras-filterable-head.is-filtered,
table.table--compras.table--representacao .compras-filterable-head.is-sorted {
  box-shadow: inset 0 -2px 0 rgba(13, 110, 253, .45);
}

.representacao-floating-head {
  position: fixed;
  top: 0;
  z-index: 1020;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}

.representacao-floating-head table {
  margin: 0;
  table-layout: fixed;
}

.representacao-floating-head th {
  box-sizing: border-box;
  overflow: hidden;
  color: #212529;
  background: #fff !important;
  font-size: 1rem;
  font-weight: 700;
  text-align: center !important;
  vertical-align: middle;
}

.representacao-floating-head .compras-filterable-head {
  position: relative;
  cursor: pointer;
  padding-right: 1.65rem;
  user-select: none;
}

.representacao-floating-head .compras-filterable-head > span {
  display: block;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.representacao-floating-head .compras-head-filter {
  position: absolute;
  top: 50%;
  right: .35rem;
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #6c757d;
  font-size: .85rem;
  line-height: 1;
  transform: translateY(-50%);
}

.representacao-floating-head .compras-filterable-head:hover .compras-head-filter,
.representacao-floating-head .compras-filterable-head.is-open .compras-head-filter,
.representacao-floating-head .compras-filterable-head.is-filtered .compras-head-filter,
.representacao-floating-head .compras-filterable-head.is-sorted .compras-head-filter {
  background: rgba(13, 110, 253, .1);
  color: #0d6efd;
}

.representacao-floating-head .compras-filterable-head.is-filtered,
.representacao-floating-head .compras-filterable-head.is-sorted {
  box-shadow: inset 0 -2px 0 rgba(13, 110, 253, .45);
}

table.table--compras.table--representacao th:nth-child(1),
table.table--compras.table--representacao td:nth-child(1) { width: 6%; }
table.table--compras.table--representacao th:nth-child(2),
table.table--compras.table--representacao td:nth-child(2) { width: 9%; }
table.table--compras.table--representacao th:nth-child(3),
table.table--compras.table--representacao td:nth-child(3) { width: 4.5%; }
table.table--compras.table--representacao th:nth-child(4),
table.table--compras.table--representacao td:nth-child(4) { width: 20.719%; }
table.table--compras.table--representacao th:nth-child(5),
table.table--compras.table--representacao td:nth-child(5),
table.table--compras.table--representacao th:nth-child(6),
table.table--compras.table--representacao td:nth-child(6) { width: 8.5%; }
table.table--compras.table--representacao th:nth-child(7),
table.table--compras.table--representacao td:nth-child(7) { width: 9%; }
table.table--compras.table--representacao th:nth-child(8),
table.table--compras.table--representacao td:nth-child(8) { width: 33.781%; }

table.table--compras.table--representacao td[data-label="Data Pedido"],
table.table--compras.table--representacao td[data-label="Faturamento"] {
  text-align: center !important;
}

table.table--compras.table--representacao td[data-label="Cliente"],
table.table--compras.table--representacao td[data-label="Cliente"] .scroll-col {
  text-align: left !important;
}

.table--representacao td[data-open-representacao] {
  cursor: pointer;
}

.table--representacao td[data-open-representacao]:hover {
  background: #f8fafc;
}

.representacao-pedido-cell {
  text-align: left !important;
  white-space: nowrap;
}

.representacao-pedido-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.representacao-folder-button,
.representacao-observacao {
  width: 100%;
  border: 0;
  padding: 0;
  color: #343a40;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.representacao-folder-button {
  width: auto;
  line-height: 1;
}

.representacao-observacao {
  display: block;
  width: max-content;
  min-width: 100%;
  min-height: 22px;
  color: #000;
  font-weight: 600;
  white-space: pre-line !important;
}

.representacao-observacao-scroll {
  width: 100%;
  min-width: 0;
}

.representacao-observacao-scroll,
.representacao-observacao-scroll * {
  white-space: nowrap !important;
}

.representacao-observacao-scroll .representacao-observacao {
  white-space: pre-line !important;
}

.representacao-observacao-scroll .representacao-observacao-input {
  white-space: pre !important;
}

.representacao-observacao-input {
  display: block;
  width: max(100%, calc(var(--representacao-observacao-ch, 1) * 1ch));
  min-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  border: 0 !important;
  border-radius: 0;
  padding: 0;
  color: #000;
  background: transparent !important;
  font: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  text-overflow: clip;
  white-space: pre;
  overflow: hidden;
  resize: none !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
}

.representacao-observacao-input:focus {
  box-shadow: none !important;
}

td[data-date-cell] {
  position: relative;
  cursor: pointer;
}

.representacao-date-label {
  display: block;
  min-height: 1.25em;
  text-align: center;
}

.representacao-date-input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  border: 0;
  padding: 0;
  opacity: 0;
  outline: none;
  pointer-events: none;
}

.representacao-date-input:focus {
  box-shadow: none;
}

.representacao-status-cell {
  vertical-align: middle;
}

.representacao-inline-select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 26px;
  border: 0;
  padding: 0;
  color: #202b36;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.representacao-status-cell .representacao-inline-select {
  width: 100%;
}

.representacao-inline-select--readonly {
  pointer-events: none;
}

.representacao-inline-select--readonly .representacao-caret {
  display: none;
}

.representacao-inline-select span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.representacao-inline-select:hover,
.representacao-inline-select.is-open {
  color: #212529;
}

.representacao-caret {
  flex: 0 0 auto;
  color: #65717d;
  font-size: .78rem;
  line-height: 1;
}

.representacao-quick-menu {
  position: fixed;
  z-index: 1080;
  width: 210px;
  max-height: 270px;
  padding: 6px;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
  overflow: auto;
}

.representacao-quick-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  color: #202b36;
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.representacao-quick-menu button:hover,
.representacao-quick-menu button:focus {
  background: #f1f5f9;
}

.representacao-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #343a40;
  background: #e9ecef;
  font-size: .82rem;
  font-weight: 800;
}

.table--representacao tbody td,
.table--representacao tbody td button,
.table--representacao tbody td input,
.table--representacao tbody td span,
.table--representacao tbody td .scroll-col {
  color: #000;
  font-weight: 400;
}

.table--representacao .representacao-observacao-input {
  color: #000;
  font-weight: 600;
}

table.table--compras.table--representacao td[data-label="Representada"] {
  color: #000;
  font-weight: 600;
  text-align: left !important;
}

table.table--compras.table--representacao td[data-label="Representada"] *,
table.table--compras.table--representacao td[data-label="Representada"] .representacao-inline-select {
  color: #000;
  font-weight: 600;
  text-align: left;
}

.table--representacao tr.is-saved {
  animation: representacao-saved .9s ease;
}

@keyframes representacao-saved {
  0% { background-color: #e9f8ee; }
  100% { background-color: transparent; }
}

.representacao-modal-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.representacao-modal .modal-body {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding-top: 12px;
  padding-bottom: 12px;
}

.representacao-modal .modal-content {
  height: 100%;
  max-height: calc(100vh - 2rem);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
  overflow: hidden;
}

.representacao-modal .modal-dialog {
  width: min(1110px, calc(100vw - 2rem));
  max-width: min(1110px, calc(100vw - 2rem));
}

.representacao-modal .modal-dialog-scrollable {
  height: calc(100vh - 2rem);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.representacao-modal .modal-header,
.representacao-modal .modal-footer {
  padding-right: 18px;
  padding-left: 18px;
  background: #fff;
}

.representacao-modal .modal-footer {
  border-top: 1px solid #e7ecf1;
}

.representacao-modal-section {
  display: grid;
  gap: 9px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid #e7ecf1;
  border-radius: 0;
  background: transparent;
}

.representacao-modal-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.representacao-modal-section h3 {
  margin: 0;
  color: #334155;
  font-size: .88rem;
  font-weight: 700;
}

.representacao-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px 12px;
}

.representacao-form-grid--main {
  grid-template-columns: 120px 120px minmax(260px, 1.2fr) 145px 145px 170px;
}

.representacao-field-wide {
  grid-column: span 2;
}

.representacao-status-modal-field {
  grid-column: span 2;
}

.representacao-observacao-modal-field {
  grid-column: span 4;
}

.representacao-form-grid label,
.representacao-toggle-grid fieldset,
.representacao-toggle-grid > label {
  min-width: 0;
}

.representacao-modal label,
.representacao-modal legend {
  margin-bottom: .2rem;
  font-size: .76rem;
  font-weight: 400;
}

.representacao-modal .form-control,
.representacao-modal .form-select {
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: .92rem;
}

.representacao-modal input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.representacao-modal input[type="number"]::-webkit-outer-spin-button,
.representacao-modal input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.representacao-modal textarea[name="observacao"] {
  height: auto;
  min-height: 34px;
  resize: vertical;
}

.representacao-modal textarea[name="observacao_frete"] {
  height: auto;
  min-height: 34px;
  resize: vertical;
}

.representacao-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}

.representacao-frete-observacao-field {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  margin: 0;
}

.representacao-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.representacao-fieldset legend {
  margin-bottom: .35rem;
  color: #4b5563;
  font-size: .82rem;
  font-weight: 400;
}

.representacao-option-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.representacao-option-toggle .btn,
.representacao-venda-produtos > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #cfd6de;
  border-radius: 8px;
  color: #212529;
  background: #fff;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.representacao-option-toggle .btn:focus,
.representacao-option-toggle .btn:active,
.representacao-venda-produtos > .btn:focus,
.representacao-venda-produtos > .btn:active {
  border-color: #cfd6de;
  color: #212529;
  background: #fff;
  box-shadow: none;
}

.representacao-option-toggle .btn:hover,
.representacao-venda-produtos > .btn:hover {
  border-color: #0d6efd;
  color: #0d6efd;
  background: #fff;
}

.representacao-option-toggle .btn-check:checked + .btn,
.representacao-toggle-grid .btn-check:checked + .btn {
  border-color: #cfd6de;
  color: #172033;
  background: #f1f3f5;
}

.representacao-venda-produtos {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.representacao-venda-produtos > .btn {
  justify-self: start;
  width: max-content;
  max-width: 100%;
}

.representacao-venda-produtos-list {
  display: grid;
  gap: 8px;
}

.representacao-venda-produto-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 130px 130px 34px;
  gap: 8px;
  align-items: end;
}

.representacao-venda-produto-row label {
  min-width: 0;
  margin: 0;
}

.representacao-venda-produto-select {
  min-width: 0;
}

.representacao-venda-produto-row .orc-rem {
  display: inline-flex;
  position: static;
  align-items: center;
  justify-content: center;
  width: var(--icon-btn-size);
  height: var(--icon-btn-size);
  min-width: var(--icon-btn-size);
  max-width: var(--icon-btn-size);
  min-height: var(--icon-btn-size);
  max-height: var(--icon-btn-size);
  box-sizing: border-box;
  flex: 0 0 var(--icon-btn-size);
  margin: 0 0 calc((34px - var(--icon-btn-size)) / 2);
  padding: 0;
  border: 1px solid #dc3545 !important;
  border-radius: var(--icon-btn-radius);
  color: #dc3545 !important;
  background: transparent !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0;
  font-weight: 400;
  line-height: 1;
  text-decoration: none !important;
  transform: none !important;
  vertical-align: middle;
  transition: none !important;
}

.representacao-venda-produto-row .orc-rem::before {
  content: "\00d7";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.representacao-venda-produto-row .orc-rem:hover,
.representacao-venda-produto-row .orc-rem:focus {
  color: #fff !important;
  background: #dc3545 !important;
  transform: none !important;
}

.representacao-toggle-grid fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.representacao-toggle-grid legend {
  margin-bottom: .35rem;
  color: #4b5563;
  font-size: .82rem;
  font-weight: 400;
}

.representacao-toggle-grid .btn-group {
  display: flex;
  width: 100%;
}

.representacao-toggle-grid .btn {
  flex: 1 1 0;
  min-height: 30px;
  border: 1px solid #cfd6de;
  color: #212529;
  background: #fff;
  padding-right: 8px;
  padding-left: 8px;
  font-size: .82rem;
  font-weight: 800;
}

.representacao-modal-status {
  min-height: 18px;
  color: #697581;
  font-size: .82rem;
  font-weight: 400;
}

.representacao-modal-status.is-success {
  color: #198754;
}

.representacao-modal-status.is-error {
  color: #b42318;
}

.representacao-config-modal .logistica-modal-body {
  padding: 0;
}

.representacao-config-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
}

.representacao-tabelas-dialog {
  width: min(980px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 28px));
}

.representacao-tabelas-dialog > .logistica-modal-header {
  flex: 0 0 auto;
}

.representacao-tabelas-dialog > .logistica-modal-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.representacao-config-layout {
  display: grid;
  grid-template-columns: minmax(260px, .35fr) minmax(0, 1fr);
  min-height: min(680px, calc(100vh - 160px));
  min-width: 0;
  overflow: hidden;
}

.representacao-config-list-panel {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-right: 1px solid #e7ecf1;
}

.representacao-config-list-panel .search-wrap {
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
  margin: 0;
}

.representacao-config-list {
  display: flex;
  flex: 1 1 auto;
  height: 100%;
  align-content: flex-start;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.representacao-config-row {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #dde4ec;
  border-radius: 8px;
  color: #172033;
  background: #fff;
  text-align: left;
}

.representacao-config-row:hover,
.representacao-config-row:focus-visible {
  border-color: #b8c3cf;
  background: #f7f9fb;
}

.representacao-config-row strong,
.representacao-config-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.representacao-config-row strong {
  font-size: .92rem;
  font-weight: 700;
}

.representacao-config-row small {
  color: #64748b;
  font-size: .75rem;
  font-weight: 400;
}

.representacao-config-empty {
  padding: 12px;
  color: #64748b;
  font-size: .88rem;
  font-weight: 400;
}

.representacao-config-form {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
}

.representacao-config-form .representacao-modal-section,
.representacao-config-form .representacao-form-grid {
  min-width: 0;
  max-width: 100%;
}

.representacao-config-form .representacao-modal-section {
  border-bottom: 0;
  padding-bottom: 0;
}

.representacao-config-form .representacao-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.representacao-config-form textarea {
  min-height: 58px;
  resize: vertical;
}

.representacao-tabelas-form {
  display: grid;
  flex: 1 1 auto;
  height: 100%;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: none;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  align-items: stretch;
  justify-content: stretch;
  justify-items: stretch;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.representacao-tabelas-list {
  display: grid;
  align-self: stretch;
  height: 100%;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  align-content: start;
  gap: 14px;
  margin-right: auto;
  margin-left: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.representacao-tabela-grupo {
  display: grid;
  width: min(600px, 100%);
  min-width: 0;
  gap: 8px;
  margin-inline: auto;
  padding-bottom: 14px;
  border-bottom: 1px solid #e7ecf1;
}

.representacao-tabela-grupo:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.representacao-tabela-grupo h3 {
  margin: 0;
  color: #172033;
  font-size: .98rem;
  font-weight: 700;
}

.representacao-tabela-produtos {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.representacao-tabela-produto {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  margin: 0;
}

.representacao-tabela-produto span {
  min-width: 0;
  color: #212529;
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.25;
}

.representacao-tabela-produto-descricao {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
  user-select: none;
}

.representacao-tabela-produto-descricao:active {
  cursor: grabbing;
}

.representacao-tabela-produto.is-dragging {
  opacity: .45;
}

.representacao-tabela-produto.is-dragging .form-control {
  pointer-events: none;
}

.representacao-tabela-produto .form-control {
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: .9rem;
  font-weight: 400;
  text-align: right;
}

.representacao-config-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid #e7ecf1;
  box-sizing: border-box;
}

.representacao-tabelas-form .representacao-config-footer {
  grid-column: 1;
  min-width: 0;
  margin-top: 0;
  background: #fff;
}

.representacao-config-footer .me-auto {
  margin-right: 0 !important;
}

@media (max-width: 992px) {
  .representacao-form-grid,
  .representacao-form-grid--main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .representacao-venda-produto-row {
    grid-template-columns: minmax(0, 1fr) 110px 130px 34px;
  }

  .representacao-venda-produto-row label:nth-of-type(4) {
    grid-column: 2 / 4;
  }

  .representacao-toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .representacao-config-layout {
    grid-template-columns: 1fr;
  }

  .representacao-config-list-panel {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid #e7ecf1;
  }

  .representacao-tabela-produto {
    grid-template-columns: minmax(0, 1fr) 130px;
  }

  .representacao-field-wide {
    grid-column: span 2;
  }
}

.representacao-cell-filter-trigger {
  display: none;
}

@media (max-width: 1700px) {
  .representacao-card-list {
    display: none;
  }

  .representacao-table-wrap {
    display: block;
    overflow: visible;
  }

  .representacao-floating-head {
    display: none !important;
  }

  table.table--compras.table--representacao {
    display: block;
    width: 100% !important;
  }

  table.table--compras.table--representacao thead {
    display: none;
  }

  table.table--compras.table--representacao tbody {
    display: grid;
    gap: 12px;
  }

  table.table--compras.table--representacao tbody tr[data-representacao-row] {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 14px;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .05);
    cursor: pointer;
  }

  table.table--compras.table--representacao [data-representacao-row][aria-busy="true"] td:first-child {
    position: static;
  }

  table.table--compras.table--representacao [data-representacao-row][aria-busy="true"] td:first-child::after {
    top: 12px;
    right: 12px;
    margin-top: 0;
    z-index: 1;
  }

  table.table--compras.table--representacao #representacaoEmptyRow {
    display: block;
    padding: 1rem;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    background: #fff;
  }

  table.table--compras.table--representacao #representacaoEmptyRow td {
    display: block;
    border: 0;
  }

  table.table--compras.table--representacao tbody tr[data-representacao-row] > td {
    display: flex;
    min-width: 0;
    width: auto !important;
    padding: 0;
    border: 0;
    flex-direction: column;
    align-items: flex-start;
    text-align: left !important;
  }

  table.table--compras.table--representacao.table-hover > tbody > tr[data-representacao-row]:hover > *,
  table.table--compras.table--representacao.table-hover > tbody > tr[data-representacao-row]:active > *,
  table.table--compras.table--representacao.table-hover > tbody > tr[data-representacao-row]:focus-within > * {
    --bs-table-bg-state: transparent;
    background-color: transparent !important;
  }

  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(1) { grid-column: span 3; }
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(2) { grid-column: span 3; }
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(3) { grid-column: span 2; }
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(4) { grid-column: span 4; }
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(5),
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(6) { grid-column: span 3; }
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(7) { grid-column: span 3; }
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(8) { grid-column: span 3; }

  table.table--compras.table--representacao td[data-label]::before {
    content: none;
  }

  table.table--compras.table--representacao .representacao-cell-filter-trigger {
    display: flex;
    width: max-content;
    max-width: 100%;
    align-items: center;
    gap: .25rem;
    margin: 0 0 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6c757d;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
  }

  table.table--compras.table--representacao .representacao-cell-filter-trigger span {
    color: inherit;
    font-weight: inherit;
  }

  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger span {
    color: #6c757d;
    font-weight: 800;
  }

  table.table--compras.table--representacao .representacao-cell-filter-trigger span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  table.table--compras.table--representacao .representacao-cell-filter-trigger:hover,
  table.table--compras.table--representacao .representacao-cell-filter-trigger:focus-visible,
  table.table--compras.table--representacao .representacao-cell-filter-trigger.is-filtered,
  table.table--compras.table--representacao .representacao-cell-filter-trigger.is-sorted {
    color: #0d6efd;
    outline: none;
  }

  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger:hover,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger:focus-visible,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger.is-filtered,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger.is-sorted,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger:hover span,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger:focus-visible span,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger.is-filtered span,
  table.table--compras.table--representacao td[data-label="Representada"] .representacao-cell-filter-trigger.is-sorted span {
    color: #0d6efd;
  }

  table.table--compras.table--representacao .representacao-cell-filter-caret {
    flex: 0 0 auto;
    font-size: .78rem;
    line-height: 1;
  }

  table.table--compras.table--representacao .scroll-col,
  table.table--compras.table--representacao .lg-scroll-col {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 1200px) {
  .representacao-card-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(1),
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(3),
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(5),
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(6) {
    grid-column: span 6;
  }

  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(2),
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(4),
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(7),
  table.table--compras.table--representacao tbody tr[data-representacao-row] > td:nth-child(8) {
    grid-column: 1 / -1;
  }

  .representacao-form-grid,
  .representacao-form-grid--main,
  .representacao-toggle-grid {
    grid-template-columns: 1fr;
  }

  .representacao-venda-produto-row {
    grid-template-columns: 1fr 1fr 34px;
  }

  .representacao-venda-produto-select {
    grid-column: 1 / -1;
  }

  .representacao-venda-produto-row label:nth-of-type(4) {
    grid-column: 1 / 3;
  }

  .representacao-tabela-produto {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .representacao-tabela-produto .form-control {
    text-align: left;
  }

  .representacao-field-wide {
    grid-column: span 1;
  }

  .representacao-card-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .representacao-card-note {
    grid-column: span 2;
  }
}

.fc .fc-daygrid-event.evento-representacao-agendado {
  border: none !important;
  color: #fff !important;
  background-color: #4f8ee0 !important;
}

.fc .fc-daygrid-event.evento-representacao-prev {
  border: none !important;
  color: #000 !important;
  background-color: #edc33f !important;
}

.fc .fc-daygrid-event.evento-representacao-carregamento {
  border: none !important;
  color: #fff !important;
  background-color: #43976d !important;
}

.fc .fc-daygrid-event.evento-representacao-porto {
  border: none !important;
  color: #fff !important;
  background-color: #d85a68 !important;
}

.fc .fc-daygrid-event.evento-representacao-transbordo {
  border: none !important;
  color: #fff !important;
  background-color: #a78bfa !important;
}

.fc .fc-list-event[class*="evento-representacao-"] {
  border: 0 !important;
  color: #212529 !important;
  background-color: #fff !important;
}

.fc .fc-list-event[class*="evento-representacao-"] a,
.fc .fc-list-event[class*="evento-representacao-"] .fc-event-title {
  color: #212529 !important;
}

.fc .fc-list-event.evento-representacao-agendado .fc-list-event-dot {
  border-color: #4f8ee0 !important;
}

.fc .fc-list-event.evento-representacao-prev .fc-list-event-dot {
  border-color: #edc33f !important;
}

.fc .fc-list-event.evento-representacao-carregamento .fc-list-event-dot {
  border-color: #43976d !important;
}

.fc .fc-list-event.evento-representacao-porto .fc-list-event-dot {
  border-color: #d85a68 !important;
}

.fc .fc-list-event.evento-representacao-transbordo .fc-list-event-dot {
  border-color: #a78bfa !important;
}

.fc .fc-daygrid-event[class*="evento-representacao-"] .calendar-event-pedido,
.fc .fc-daygrid-event[class*="evento-representacao-"] .calendar-event-pedido strong {
  color: #fff !important;
  font-family: inherit;
  font-weight: 700;
}

.representacao-calendar-event-representada,
.representacao-calendar-event-status,
.representacao-calendar-event-client {
  color: #000 !important;
  font-weight: 400;
  overflow-wrap: anywhere;
  white-space: normal;
}

.representacao-calendar-event-representada {
  font-size: .85em;
}

.representacao-calendar-event-status {
  font-size: .85em;
}

.representacao-calendar-event-status .compass-lucide {
  color: #fff;
}

.fc .fc-list-event .representacao-calendar-event-status .compass-lucide {
  color: #212529 !important;
}

.representacao-calendar-event-client {
  font-size: .78em;
  font-weight: 700;
}

.representacao-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  margin-bottom: 14px;
}

.representacao-calendar-legend .legend-item {
  align-items: center;
  white-space: nowrap;
}

.representacao-calendar-legend .dot.rep-agendado {
  background: #4f8ee0;
}

.representacao-calendar-legend .dot.rep-prev {
  background: #edc33f;
}

.representacao-calendar-legend .dot.rep-carregamento {
  background: #43976d;
}

.representacao-calendar-legend .dot.rep-porto {
  background: #d85a68;
}

.representacao-calendar-legend .dot.rep-transbordo {
  background: #a78bfa;
}

.representacao-calendar-page .fc-daygrid-day-number,
.representacao-calendar-page .fc-list-day[data-date] .fc-list-day-text,
.representacao-calendar-page .fc-list-day[data-date] .fc-list-day-side-text {
  cursor: pointer;
}

.representacao-calendar-day-copy-feedback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  color: #198754;
  vertical-align: middle;
}

.representacao-popover-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.representacao-popover-title {
  flex: 1 1 auto;
  min-width: 0;
}

.representacao-popover-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}

.representacao-popover-copy {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #212529;
  font-size: 1rem;
  line-height: 1;
}

.representacao-popover-copy:hover,
.representacao-popover-copy:focus {
  background: #e9ecef;
}

.representacao-popover-copy.is-copy-success {
  color: #198754;
}

.mobile-popover-close {
  display: none;
}

@media (max-width: 768px) {
  .popover.mobile-centered-popover {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: calc(100vw - 24px);
    max-width: 900px;
    max-height: calc(100vh - 24px);
    overflow: auto;
    transform: translate(-50%, -50%) !important;
  }

  .popover.mobile-centered-popover .popover-arrow {
    display: none;
  }

  .popover.mobile-close-popover .popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 8px 10px 8px 12px;
  }

  .mobile-popover-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .representacao-popover-actions {
    align-self: flex-start;
    margin-left: auto;
  }

  .popover.mobile-close-popover .representacao-popover-copy {
    margin-left: 0;
  }

  .mobile-popover-close {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #495057;
    font-family: Arial, sans-serif;
    font-size: 24px;
    line-height: 1;
  }

  .mobile-popover-close:hover,
  .mobile-popover-close:focus {
    background: #e9ecef;
  }
}
.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa {
  background: #98a0a9 !important;
  border-color: #94a3b8 !important;
  color: #334155 !important;
}

.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-numero,
.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-numero strong {
  color: #fff !important;
  font-weight: 700;
}

.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-titulo,
.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-observacao,
.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-observacao span {
  color: #000 !important;
  font-weight: 400 !important;
}

.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-titulo,
.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-observacao {
  font-size: .85em;
}

.representacao-calendar-page .fc .fc-event.evento-operacao-avulsa .operacao-avulsa-observacao .compass-lucide {
  color: #fff !important;
  stroke: currentColor;
}

.representacao-calendar-page .fc .fc-list-event.evento-operacao-avulsa > td {
  background: #98a0a9 !important;
}
