.invoice-company-cell {
  width: 12rem;
  max-width: 12rem;
}
.invoice-company-name {
  display: block;
  max-width: 12rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.manual-print-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  margin-top: 4px;
  padding: 2px 0;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.manual-print-choice:hover {
  color: var(--text);
}
.manual-print-choice:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}
.manual-print-chevron {
  font-size: 9px;
}
.line-table .manual-print-choice select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
#load-sewing-orders {
  scroll-margin-top: 1rem;
}
.shipment-tracking {
  width: 100%;
  min-width: 0;
}
.shipment-tracking-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #f5f7fa;
  border: 1px solid #dce2e9;
  border-radius: 0.6rem;
}
.shipment-tracking-summary div {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}
.shipment-tracking-summary strong {
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.shipment-tracking-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.shipment-tracking-description {
  line-height: 1.5;
}
.shipment-tracking-events {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}
.shipment-tracking-events li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  column-gap: 1rem;
  border-left: 2px solid #dce2e9;
  padding: 0 0 1.25rem 1rem;
  margin-left: 0.4rem;
  position: relative;
}
.shipment-tracking-events li::before {
  content: "";
  position: absolute;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #a5afbe;
  left: -0.36rem;
  top: 0.25rem;
}
.shipment-tracking-events li.latest::before {
  background: #2563eb;
}
.shipment-tracking-events time {
  color: #596577;
  font-size: 0.85rem;
  line-height: 1.5;
}
.shipment-tracking-events strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.shipment-tracking-events small {
  display: block;
  margin-top: 0.25rem;
}
@media (max-width: 600px) {
  .shipment-tracking-summary {
    flex-wrap: wrap;
  }
  .shipment-tracking-events li {
    grid-template-columns: 1fr;
    row-gap: 0.2rem;
  }
}

#invoice-table .invoice-company-name { width: 12rem; max-width: 12rem; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.invoice-actions-trigger { min-width: 36px; font-size: 22px; line-height: 1; }
.invoice-actions-menu { position: fixed; margin: 0; width: 210px; max-height: calc(100dvh - 16px); overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 8px 24px #18243a26; }
.invoice-actions-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; text-align: left; background: white; }
.invoice-actions-menu button:hover, .invoice-actions-menu button:focus-visible { background: #f3f4f6; }
#invoice-table { table-layout: fixed; width: 100%; min-width: 1050px; }
#invoice-table th, #invoice-table td { padding: 10px 7px; white-space: normal; overflow-wrap: anywhere; }
#invoice-table th .text-button { white-space: normal; text-align: left; }
#invoice-table .badge { white-space: normal; }
#invoice-table .invoice-company-cell { width: auto; max-width: 12rem; }
#invoice-table .invoice-company-name { width: 100%; }
#invoice-table th:last-child, #invoice-table td:last-child { width: 64px; }
#invoice-table th:first-child, #invoice-table td:first-child { width: auto; }
#invoice-table th button, #invoice-table td > .text-button { max-width: 100%; overflow-wrap: anywhere; }

.allegro-form-indicator { display: inline-block; margin-left: 7px; padding: 3px 7px; border-radius: 12px; background: #e4f3e8; color: #237040; font-size: 10px; font-weight: 700; }
.allegro-form-indicator[hidden] { display: none; }
.allegro-forms-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.allegro-forms-toolbar h2 { margin: 0 0 6px; font-size: 18px; }
.allegro-forms-toolbar p { color: #747d78; font-size: 12px; margin: 0; }
.allegro-forms-switch { display: flex; gap: 6px; }
.allegro-forms-switch [aria-pressed="true"] { background: #edf5ef; color: #24614e; border-color: #a8c9b4; }
.allegro-forms-empty { text-align: center; padding: 42px 22px; background: #f7f9f8; border: 1px dashed #d7e1da; border-radius: 10px; margin: 18px 0; }
.allegro-forms-empty p { color: #6d7871; font-size: 12px; max-width: 490px; margin: 10px auto 0; line-height: 1.7; }
[data-forms-pagination] { margin-top: 16px; }


/* Compact view of the shared credit editor inside CRM commercial terms. */
.crm-credit-terms {
  min-width: 0;
}
.crm-credit-terms .table-card {
  border: 0;
  overflow: visible;
}
.crm-credit-terms table {
  display: block;
  width: 100%;
  min-width: 0;
  white-space: normal;
}
.crm-credit-terms thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.crm-credit-terms tbody {
  display: grid;
  gap: 12px;
}
.crm-credit-terms tbody tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.crm-credit-terms tbody th,
.crm-credit-terms tbody td {
  position: static;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.crm-credit-terms tbody th {
  grid-column: 1 / -1;
  font-size: 12px;
}
.crm-credit-terms [data-credit-control] {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  align-content: end;
  gap: 5px;
}
.crm-credit-terms [data-credit-control] input,
.crm-credit-terms [data-credit-control] select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.crm-credit-terms [data-credit-save] {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  gap: 5px;
}
.crm-credit-terms [data-credit-save] button {
  width: 100%;
  padding: 8px 9px;
  white-space: nowrap;
}
.crm-credit-terms [data-discard-limit] {
  padding: 4px 6px;
  color: var(--muted);
  font-size: 11px;
  background: transparent;
}
.crm-credit-terms [data-credit-balance] {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.crm-credit-terms [data-credit-balance]::before {
  content: attr(data-label) ": ";
  font-weight: 500;
}
@media (max-width: 420px) {
  .crm-credit-terms tbody tr {
    grid-template-columns: minmax(0, 1fr);
  }
  .crm-credit-terms [data-credit-control] {
    grid-column: 1;
    grid-row: 2;
  }
  .crm-credit-terms [data-credit-save] {
    grid-column: 1;
    grid-row: 3;
  }
}
