/* Shared report density. Keep calendars and print documents independent. */
@media screen {
  :is(#main-content, #modal) table:not([role="grid"]) > thead > tr > th {
    padding: 12px 10px;
    color: #3c5d50;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    vertical-align: middle;
  }
  :is(#main-content, #modal) table:not([role="grid"]) > thead > tr > th small {
    margin-top: 4px;
    color: #62766c;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
  }
  #main-content table:not([role="grid"]) > :is(tbody, tfoot) > tr > :is(th, td) {
    padding: 12px 10px;
    font-size: 12px;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
  }
  #modal table:not([role="grid"]) > tbody > tr > td { font-size: 12px; }
  #main-content table .cell-title { font-size: 12px; }
  #main-content table .cell-subtitle { font-size: 11px; }
  #main-content table :is(.numeric, .order-grid-date, .ad-date) { font-variant-numeric: tabular-nums; }

  /* Fixed semantic widths keep count columns compact, with wider money columns. */
  .sales-report-table { table-layout: fixed; min-width: 0; }
  .sales-report-table thead th { width: 96px; }
  .sales-report-table :is(th, td):first-child { min-width: 0; max-width: none; width: 180px; }
  .sales-report-table td:nth-child(2), .sales-report-table td:nth-child(3), .sales-report-table td.numeric { min-width: 0; }
  .sales-report-table th[data-column="shop"] { width: 112px; }
  .sales-report-table th[data-column="country"] { width: 76px; }
  .sales-report-table th:is([data-column="sales"], [data-column="spend"], [data-column="profit"], [data-column="todayProfit"]) { width: 104px; }
  .sales-report-table td[data-column="shop"] { white-space: normal; overflow-wrap: anywhere; }
  .sales-report-table td.numeric { white-space: nowrap; }
  .sales-report-table .sales-sort-heading { gap: 4px; align-items: center; }
  .sales-report-table .sales-sort-heading > span:first-child { min-width: 0; white-space: normal; word-break: keep-all; }
  .sales-report-table .sales-sort-arrows { flex: 0 0 24px; }
  .sales-report-table .sales-sort-arrows button { min-width: 24px; min-height: 24px; }

  .order-grid-table { min-width: var(--order-grid-width, 2540px); }
  .order-grid-table .order-grid-photos { text-align: center; }
  .order-grid-table :is(.order-grid-currency, .order-grid-cost-note, .order-grid-logistics-time) { font-size: 11px; }
  .order-grid-table .order-list-status-trigger { font-size: 11px; }
  .order-grid-table .order-grid-detail-button { white-space: nowrap; }

  .ad-grid-table { font-size: 12px; }
  .ad-grid-table .ad-date { font-size: 12px; }
  .ad-grid-table :is(.ad-date-source, .ad-name-meta) { font-size: 11px; }
  .ad-grid-table td.numeric { white-space: nowrap; overflow-wrap: normal; }
  #main-content .ad-grid-table .ad-select-cell { padding: 0; text-align: center; }
  .ad-sort-button { position: relative; display: block; padding-right: 12px; }
  .ad-sort-button .ad-sort-icon { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
  .ad-sort-button small { margin-right: -12px; white-space: nowrap; }

  .country-product-table { min-width: 1920px; }
  .country-product-table td { min-width: 72px; }
  .country-product-table td:first-child { min-width: 50px; width: 50px; }
  .country-product-table td:nth-child(2) { min-width: 150px; max-width: 190px; white-space: normal; }
  .country-product-table td:last-child,
  .country-product-table td.product-authorized-shops-cell { min-width: 112px; max-width: 180px; white-space: normal; }
  .country-product-table td.product-actions-cell { min-width: 216px; max-width: none; white-space: nowrap; }
  .country-product-table td.numeric { white-space: nowrap; }
  .country-product-table small { font-size: 11px; }
  .country-product-table .product-lifecycle-cell { min-width: 96px; }
  .country-product-table .product-lifecycle-actions { gap: 10px; }
  #main-content .country-product-table--shop :is(th, td):nth-child(3) {
    min-width: 70px; width: 70px; max-width: 70px;
    padding-left: 8px; padding-right: 8px;
    white-space: normal; overflow-wrap: anywhere;
  }
  .product-grid-table .product-grid-name { min-width: 130px; }
  .product-grid-table .product-region-heading { min-width: 150px; }
  .product-grid-table .product-region-estimate, .product-grid-table .product-region-reference { min-width: 75px; }
  .product-grid-table .shipping-cost-cell { min-width: 110px; }

  /* Analytics: one readable shop column and aligned, compact numeric columns. */
  .data-center-table, .data-center-unified .data-center-table { min-width: 1300px; }
  .data-center-table .data-center-shop-col,
  .data-center-table th:first-child,
  .data-center-unified .data-center-table :is(tbody, tfoot) th { width: 170px; }
  .data-center-table .data-center-count-col { width: 76px; }
  .data-center-table .data-center-average-col { width: 82px; }
  .data-center-table .data-center-money-col { width: 112px; }
  .data-center-table .data-center-rate-col { width: 90px; }
  .data-center-table td small, .data-center-shop-link small, .data-center-table tfoot th small { font-size: 11px; }
  .monthly-stats .monthly-table { min-width: 1120px; }
  .monthly-stats .monthly-table th:first-child, .monthly-stats .monthly-table .monthly-month-col { width: 100px; }
  .ad-data-table { min-width: 2200px; }
  .ad-data-table th { min-width: 86px; }
  .ad-data-table th:first-child { min-width: 170px; }
  .ad-data-detail-table { min-width: 1350px; }
  .ad-data-detail-table th:first-child { min-width: 190px; width: 190px; }
  .ad-monthly-table { min-width: 860px; }
  .ad-monthly-table th:first-child { min-width: 105px; width: 105px; }
  .ad-overview-table { min-width: 980px; }
  .ad-compare-table { min-width: 1080px; }

  /* Operational tables retain space for controls, filenames and form inputs. */
  .shipping-template-table { min-width: 1160px; }
  .shipping-template-table td:nth-child(2) { min-width: 145px; }
  .shipment-files-table { min-width: 1300px; }
  .shipment-global-table { min-width: 1300px; }
  .lg-table { min-width: 880px; }
  .integration-table { min-width: 900px; }
  .integration-preview-table :is(th, td) { min-width: 110px; max-width: 260px; }
  .quote-profile-table { min-width: 960px; }
  .quote-history-table { min-width: 1020px; }
  .quote-sheet-table { min-width: 1558px; }
  .quote-sheet-table th { height: auto; }
  .ad-label-table { min-width: 820px; }
  .product-category-table { min-width: 440px; }
}
