/* TOMŻAL CRM 6.0.18 — lista Klienci na laptopie / małym monitorze.
   Naprawa obciętego szarego nagłówka + stabilne ikony po kliknięciu „Więcej”.
   Nie zmienia widoku kart na telefonach ani innych tabel CRM. */
@media (min-width:701px) and (max-width:1600px) {
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .tablewrap {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:auto !important;
    overflow-y:auto;
    border-radius:14px;
    box-sizing:border-box;
  }
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table {
    width:100% !important;
    min-width:760px !important;
    max-width:none !important;
    table-layout:fixed !important;
    border-spacing:0 !important;
  }
  /* Tło nagłówka biegnie od lewej do prawej krawędzi tabeli. */
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table thead,
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table thead tr,
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table thead th {
    background:#f8fafc !important;
  }
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table th,
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table tr[data-customer-id] > td {
    min-width:0 !important;
    max-width:none !important;
    box-sizing:border-box !important;
    padding-left:12px !important;
    padding-right:12px !important;
  }
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table th:nth-child(1),
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table tr[data-customer-id]>td:nth-child(1) {width:23% !important;}
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table th:nth-child(2),
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table tr[data-customer-id]>td:nth-child(2) {width:19% !important;}
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table th:nth-child(3),
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table tr[data-customer-id]>td:nth-child(3) {width:18% !important;}
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table th:last-child,
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table tr[data-customer-id]>td:last-child {
    width:40% !important;
    white-space:normal !important;
    text-align:right !important;
  }
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table tr[data-customer-id] > td:nth-child(1),
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .table tr[data-customer-id] > td:nth-child(2) {
    overflow-wrap:break-word !important;
  }
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .ui-row-actions {
    display:flex !important;
    flex-wrap:nowrap !important;
    justify-content:flex-end !important;
    align-items:center !important;
    width:100%;
    gap:5px !important;
  }
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode).kd-act-icons .ui-row-actions>.btn.ui-act:not(.ui-more-btn) {
    flex:0 0 38px !important;
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    max-width:38px !important;
    padding:7px !important;
    display:inline-flex !important;
    justify-content:center !important;
    align-items:center !important;
  }
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode).kd-act-icons .ui-row-actions>.ui-more-btn {
    flex:0 0 auto !important;
    padding:7px 10px !important;
    min-height:38px !important;
  }
  /* Obrót chevronu menu nie zmienia wymiarów przycisku ani kolumny. */
  html:not(.crm-mobile-device) body[data-crm-view="customers"] #content .customer-list-card:not(.archive-mode) .ui-more-btn .ui-ico {flex:none;}
}
