/* CleanMat Housing: use unused desktop dashboard width for equal-size trainee cards. */
@media screen and (min-width: 1000px) {
  #layoutPage.content {
    box-sizing: border-box;
    width: 100%;
    max-width: none !important;
    padding-left: clamp(14px, 2vw, 32px);
    padding-right: clamp(14px, 2vw, 32px);
  }
  /* Each building gets the available horizontal room instead of squeezing bedrooms into two columns. */
  #layoutPage > .buildings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    gap: 16px;
  }
  #layoutPage .hills-plan {
    grid-template-columns: minmax(0, 1.2fr) 32px minmax(0, 1fr) !important;
  }
  #layoutPage .room-grid,
  #layoutPage .hills-plan .room-grid { gap: 10px; }
  #layoutPage .person,
  #layoutPage .hills-plan .person {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    gap: 8px;
    padding: 5px 7px;
  }
  #layoutPage .person-details { flex: 1 1 auto; min-width: 0; }
  #layoutPage .person-name,
  #layoutPage .hills-plan .person-name {
    font-size: 11px;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    line-height: 1.35;
  }
  #layoutPage .person .workplace,
  #layoutPage .hills-plan .person .workplace {
    font-size: 10px;
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  #housingDragPeople { justify-content: center; gap: 10px; }
  #housingDragPeople .housing-unassigned-person {
    box-sizing: border-box;
    flex: 0 0 260px;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    min-height: 54px;
    padding: 6px 9px;
    overflow: visible;
  }
  #housingDragPeople .housing-unassigned-card { overflow: visible; }
  #housingDragPeople .housing-unassigned-text {
    width: auto;
    flex: 1 1 auto;
    overflow: visible;
    white-space: nowrap;
  }
  #housingDragPeople .housing-unassigned-text strong,
  #housingDragPeople .housing-unassigned-text .workplace {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    width: auto;
    max-width: none;
  }
  #housingDragPeople .housing-unassigned-text strong { font-size: 11px; }
  #housingDragPeople .housing-unassigned-text .workplace { font-size: 10px; }
}
/* Small screens keep the original responsive layout rather than causing horizontal scrolling. */
