/* Approved term-safe layout; full details scroll inside the table, never the page. */
html body.meal-depth-ui table thead th,
html body.meal-depth-ui table thead th :is(.table-sort-btn,.table-header-content,.table-header-line){
  text-align:center!important;vertical-align:middle!important;font-weight:700!important;
}
html body.meal-depth-ui .meal-term{
  display:inline-block!important;white-space:nowrap!important;word-break:keep-all!important;
  overflow-wrap:normal!important;max-width:none!important;
}
html body.meal-depth-ui table thead th .table-sort-btn{justify-content:center!important;}
html body.meal-depth-ui .table-header-content{white-space:normal!important;line-height:1.5!important;}
html body.meal-depth-ui #app table.meal-room-table{border-collapse:collapse!important;border-spacing:0!important;}
html body.meal-depth-ui #app .meal-room-table tbody :is(td,th).meal-room-top{border-top:5px solid #59656f!important;}
html body.meal-depth-ui #app .meal-room-table tbody :is(td,th).meal-room-bottom{border-bottom:5px solid #59656f!important;}
html body.meal-depth-ui .mobile-record-card.meal-room-top{border-top:5px solid #59656f!important;}
html body.meal-depth-ui .mobile-record-card.meal-room-bottom{border-bottom:5px solid #59656f!important;}
@media screen{
  html body.meal-depth-ui #residentTable{
    overflow:auto!important;max-width:100%!important;min-width:0!important;
    max-height:70dvh!important;isolation:isolate;overscroll-behavior:contain;
  }
  html body.meal-depth-ui #residentTable table[data-table-layout-managed="residentWeb"]{
    width:var(--resident-table-width)!important;min-width:100%!important;max-width:none!important;table-layout:fixed!important;
  }
  html body.meal-depth-ui #app #residentTable table :is(th,td){
    padding:8px 7px!important;line-height:1.5!important;word-break:normal!important;overflow-wrap:normal!important;
    position:static!important;left:auto!important;right:auto!important;overflow:visible!important;
  }
  /* 20261031-resident-frozen-identity: keep identity columns visible while details scroll. */
  html body.meal-depth-ui #app #residentTable table[data-table-layout-managed="residentWeb"] :is(th,td)[data-resident-column="action"]{
    position:sticky!important;left:0!important;
  }
  html body.meal-depth-ui #app #residentTable table[data-table-layout-managed="residentWeb"] :is(th,td)[data-resident-column="floor"]{
    position:sticky!important;left:var(--resident-left-floor,42px)!important;
  }
  html body.meal-depth-ui #app #residentTable table[data-table-layout-managed="residentWeb"] :is(th,td)[data-resident-column="bed"]{
    position:sticky!important;left:var(--resident-left-bed,90px)!important;
  }
  html body.meal-depth-ui #app #residentTable table[data-table-layout-managed="residentWeb"] :is(th,td)[data-resident-column="name"]{
    position:sticky!important;left:var(--resident-left-name,186px)!important;box-shadow:2px 0 0 #8b969e;
  }
  html body.meal-depth-ui #app #residentTable table[data-table-layout-managed="residentWeb"] tbody :is(th,td):is([data-resident-column="action"],[data-resident-column="floor"],[data-resident-column="bed"],[data-resident-column="name"]){
    z-index:4!important;
  }
  html body.meal-depth-ui #app #residentTable table[data-table-layout-managed="residentWeb"] thead :is(th,td):is([data-resident-column="action"],[data-resident-column="floor"],[data-resident-column="bed"],[data-resident-column="name"]){
    z-index:6!important;
  }
  html body.meal-depth-ui #app #residentTable table thead th{position:sticky!important;top:0!important;z-index:3!important;background:#ffebcb!important;}
  html body.meal-depth-ui #residentTable table .resident-sort-row th{height:56px!important;}
  html body.meal-depth-ui #app #residentTable table .resident-filter-row th{top:var(--meal-header-height,56px)!important;z-index:2!important;background:#fffaf1!important;}
  html body.meal-depth-ui #app #residentTable table[data-table-layout-managed="residentWeb"] .resident-filter-row :is(th,td):is([data-resident-column="action"],[data-resident-column="floor"],[data-resident-column="bed"],[data-resident-column="name"]){z-index:5!important;}
  html body.meal-depth-ui #app #residentTable :is(.resident-filter-summary,.resident-pagination){position:sticky!important;left:0!important;right:auto!important;top:auto!important;bottom:auto!important;z-index:1!important;box-sizing:border-box;width:100%;}
  html body.meal-depth-ui #residentTable table :is(.resident-dish-cell,.resident-dish-base,.resident-dish-line,.resident-staple-chip,.status-badge,.resident-feeding-safety > span){
    white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;max-width:none!important;
  }
  html body.meal-depth-ui #residentTable table :is(.resident-cell-text,.resident-update-staff,.resident-update-time){
    white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;overflow:visible!important;
  }
  html body.meal-depth-ui #residentTable table [data-resident-column="foodTexture"] .resident-cell-text{white-space:nowrap!important;}
  html body.meal-depth-ui #residentTable table :is([data-resident-column="floor"],[data-resident-column="bed"],[data-resident-column="name"]){white-space:nowrap!important;}
  html body.meal-depth-ui #app #residentTable table td[data-resident-column="bed"]{font-size:17px!important;}
  html body.meal-depth-ui #app #residentTable table td[data-resident-column="name"]{font-size:15px!important;}
  html body.meal-depth-ui #residentTable table :is([data-resident-column="bed"],[data-resident-column="name"]) .identity-fit-text{font-size:inherit!important;white-space:nowrap!important;}
}
@media print{
  html body.meal-depth-ui #app .meal-room-table tbody :is(td,th).meal-room-top{border-top:3pt solid #000!important;}
  html body.meal-depth-ui #app .meal-room-table tbody :is(td,th).meal-room-bottom{border-bottom:3pt solid #000!important;}
}
