/* WHMCS dashboard panels are positioned by Masonry inline styles.
   Let the concept grid place every native/add-on panel in document order. */
body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels {
  position: static !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 16px !important;
}

body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels > [class*="col-"]:not(.column-sizer) {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  display: block !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels > :has(#servicesPanel),
body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels > :has(#ticketsPanel) {
  grid-column: 1 / -1;
}

body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels > [class*="col-"] > .panel {
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0 !important;
}

body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels .panel-body,
body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels .panel-heading {
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels > :has(#servicesPanel),
  body.page-clientareahome.page-user-logged:not(.page-order):not(.page-type-full) .client-home-panels > :has(#ticketsPanel) {
    grid-column: auto;
  }
}
