/* Orders table: hug compact columns even when an old table-fixed chunk is cached. */
.orders-desktop-scroll table {
  table-layout: auto !important;
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.orders-desktop-scroll table thead th,
.orders-desktop-scroll table tbody td {
  width: 1% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

.orders-desktop-scroll table .gm-col-hug {
  width: 1% !important;
  min-width: 0 !important;
  white-space: nowrap;
  padding-inline: 8px !important;
}

/* Product takes leftover space (new gm-col-fill + old max-w-[148px] cell). */
.orders-desktop-scroll table .gm-col-fill,
.orders-desktop-scroll table thead th[class*="max-w-[148px]"],
.orders-desktop-scroll table tbody td[class*="max-w-[148px]"] {
  width: auto !important;
  min-width: 132px !important;
  max-width: none !important;
  white-space: normal;
}

.orders-desktop-scroll table thead th:last-child,
.orders-desktop-scroll table tbody td:last-child {
  width: 112px !important;
  min-width: 112px !important;
}

/* Old City / Delivery rate utilities that stretched under table-fixed. */
.orders-desktop-scroll [class*="w-[96px]"],
.orders-desktop-scroll [class*="w-[112px]"],
.orders-desktop-scroll [class*="min-w-[148px]"],
.orders-desktop-scroll [class*="w-[160px]"],
.orders-desktop-scroll [class*="w-[132px]"] {
  width: 1% !important;
  min-width: 0 !important;
}

[data-gm="bosta-rate"] {
  min-width: 92px !important;
  max-width: 118px !important;
  padding: 6px 8px !important;
  box-sizing: border-box;
}

.orders-desktop-scroll table [role="combobox"] {
  min-width: 88px !important;
}

/* Shipping analytics: Growthmerce cards + product table hug. */
.shipping-analytics-page h1 {
  font-weight: 900 !important;
  letter-spacing: -0.02em;
}

.shipping-analytics-page [class*="rounded-lg"] {
  border-radius: 1rem !important;
}

.shipping-analytics-page [class*="shadow-sm"],
.shipping-analytics-page .shadow-card {
  box-shadow: var(--shadow-sm) !important;
}

.shipping-analytics-page .gm-analytics-kpis > * {
  min-height: 118px;
}

@media (min-width: 1280px) {
  .shipping-analytics-page [class*="xl:grid-cols-7"],
  .shipping-analytics-page [class*="xl:grid-cols-9"] {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1536px) {
  .shipping-analytics-page [class*="2xl:grid-cols-10"] {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

[data-layout="fit-product-performance"] {
  overflow-x: auto !important;
  border-radius: 1rem !important;
}

[data-layout="fit-product-performance"] table {
  table-layout: auto !important;
  width: 100% !important;
  min-width: 1080px;
  font-size: 12px !important;
  border-collapse: separate;
  border-spacing: 0;
}

[data-layout="fit-product-performance"] thead th:first-child,
[data-layout="fit-product-performance"] tbody td:first-child,
[data-layout="fit-product-performance"] .gm-col-fill {
  width: auto !important;
  min-width: 200px !important;
  max-width: 280px;
  white-space: normal;
}

[data-layout="fit-product-performance"] thead th:not(:first-child),
[data-layout="fit-product-performance"] tbody td:not(:first-child),
[data-layout="fit-product-performance"] .gm-col-hug {
  width: 1% !important;
  white-space: nowrap !important;
  padding-inline: 10px !important;
  box-sizing: border-box;
}
