/* Screen-only visual layer. Existing data, permissions and print layouts remain authoritative. */
@media screen {
  body.meal-depth-ui {
    --depth-gold: #fab157;
    --depth-line: #d4dce1;
    --depth-ink: #3e4b55;
    --depth-muted: #647783;
    --depth-light: #fff;
    --depth-control: linear-gradient(#fff, #eef2f5);
    --depth-header: linear-gradient(110deg, #ffdc91, #fac16b 55%, #fab157);
    font-family: "Microsoft JhengHei UI", "Microsoft JhengHei", "Segoe UI", sans-serif;
    letter-spacing: 0;
  }
  html body.meal-depth-ui:not(.auth-locked) {
    background: #edf0f2 !important;
    color: var(--depth-ink) !important;
    padding: 0 !important;
  }
  body.meal-depth-ui:not(.auth-locked) #app.app-shell {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body.meal-depth-ui:not(.auth-locked) #app > .sidebar {
    position: sticky !important;
    inset: 0 auto auto !important;
    z-index: 900 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 74px auto !important;
    grid-template-areas: "brand account" "navigation navigation" !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-top: 1px solid #fff3d5 !important;
    border-radius: 0 !important;
    background: var(--depth-header) !important;
    box-shadow: inset 0 1px rgb(255 255 255 / 60%), 0 3px 9px rgb(63 73 81 / 13%) !important;
    overflow: visible !important;
  }
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand {
    grid-area: brand !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 18px 0 max(24px, calc((100vw - 1440px) / 2 + 24px)) !important;
    border: 0 !important;
    background: transparent !important;
  }
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand-mark.app-image-mark {
    width: 43px !important;
    height: 43px !important;
    min-width: 43px !important;
    border-radius: 8px !important;
    box-shadow: 0 3px 5px rgb(146 91 18 / 23%), 0 0 0 1px rgb(255 255 255 / 65%) !important;
    overflow: hidden !important;
  }
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand h1 {
    margin: 0 !important;
    color: #503719 !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 1px rgb(255 255 255 / 45%) !important;
    white-space: normal !important;
  }
  body.meal-depth-ui:not(.auth-locked) .brand-facility {
    display: block !important;
    color: #866338 !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
    margin: 1px 0 0 !important;
  }
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand-title-line { display: block !important; }
  html body.meal-depth-ui [hidden] { display: none !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .hidden,
  html body.meal-depth-ui:not(.auth-locked) #app .hidden,
  html body.meal-depth-ui:not(.auth-locked) #app .nav-group .nav-btn.hidden { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar-footer {
    grid-area: account !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 max(24px, calc((100vw - 1440px) / 2 + 24px)) 0 12px !important;
    background: transparent !important;
    border: 0 !important;
  }
  body.meal-depth-ui:not(.auth-locked) .auth-bar { display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; gap: 7px !important; }
  body.meal-depth-ui:not(.auth-locked) .auth-pill { background: rgb(255 251 239 / 65%) !important; border: 1px solid #dfb16a !important; color: #775329 !important; font-size: 12px !important; padding: 5px 9px !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar .nav {
    grid-area: navigation !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    justify-self: stretch !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 47px !important;
    padding: 5px max(24px, calc((100vw - 1440px) / 2 + 24px)) !important;
    margin: 0 !important;
    border-top: 1px solid #d99b45 !important;
    border-bottom: 1px solid #cad2d9 !important;
    background: linear-gradient(#fff, #f4f6f7) !important;
    overflow: visible !important;
  }
  body.meal-depth-ui:not(.auth-locked) .nav-group { flex: 0 0 auto !important; width: auto !important; position: relative !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) .nav > .nav-btn,
  body.meal-depth-ui:not(.auth-locked) .nav-group > summary {
    display: flex !important; align-items: center !important; justify-content: center !important;
    min-height: 35px !important; height: auto !important; width: auto !important;
    padding: 7px 13px !important; margin: 0 !important;
    border: 1px solid transparent !important; border-radius: 5px !important;
    background: transparent !important; color: #626d76 !important; font-size: 13px !important;
    font-weight: 600 !important; line-height: 1.35 !important; white-space: nowrap !important; box-shadow: none !important;
  }
  body.meal-depth-ui:not(.auth-locked) .nav-group > summary::after { width: 6px !important; height: 6px !important; content: "" !important; border: solid currentColor !important; border-width: 0 1px 1px 0 !important; transform: rotate(45deg) !important; margin: -3px 0 0 10px !important; }
  body.meal-depth-ui:not(.auth-locked) .nav-group > summary:hover,
  body.meal-depth-ui:not(.auth-locked) .nav > .nav-btn:hover { color: #916224 !important; border-color: #ead3ac !important; background: #fff2dd !important; }
  body.meal-depth-ui:not(.auth-locked) .nav-group.active > summary,
  body.meal-depth-ui:not(.auth-locked) .nav-group[open] > summary,
  body.meal-depth-ui:not(.auth-locked) .nav > .nav-btn.active {
    border-color: #d69a44 !important; background: linear-gradient(#ffe4ab, #fab157) !important; color: #654218 !important;
    box-shadow: inset 0 1px #fff1d2, 0 1px 1px rgb(137 95 33 / 16%) !important;
  }
  body.meal-depth-ui:not(.auth-locked) .nav-group .nav-group-items {
    position: absolute !important; top: calc(100% + 4px) !important; left: 0 !important; right: auto !important;
    min-width: 196px !important; width: max-content !important; max-width: min(320px, 90vw) !important;
    padding: 5px !important; margin: 0 !important; border: 1px solid #d2d9df !important; border-radius: 6px !important;
    background: #fff !important; box-shadow: 0 9px 24px rgb(55 69 80 / 19%) !important;
    z-index: 2 !important; overflow: visible !important;
  }
  body.meal-depth-ui:not(.auth-locked) .nav-group[open] > .nav-group-items { display: grid !important; gap: 2px !important; }
  body.meal-depth-ui:not(.auth-locked) .nav-group:not([open]) > .nav-group-items { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) .nav-group .nav-btn {
    display: block !important; width: 100% !important; min-height: 37px !important; padding: 8px 11px !important;
    border: 0 !important; border-radius: 4px !important; box-shadow: none !important; background: #fff !important;
    color: #606d77 !important; text-align: left !important; font-size: 13px !important; line-height: 1.4 !important;
  }
  body.meal-depth-ui:not(.auth-locked) .nav-group .nav-btn.active,
  body.meal-depth-ui:not(.auth-locked) .nav-group .nav-btn:hover { background: #fff0d4 !important; color: #92601d !important; }
  body.meal-depth-ui:not(.auth-locked) .nav > .nav-btn[data-view="rules"] { margin-left: auto !important; }
  .meal-depth-menu-toggle { display: none; }
  body.meal-depth-ui:not(.auth-locked) #app > .content {
    width: 100% !important; max-width: 1440px !important; min-width: 0 !important; margin: 0 auto !important;
    padding: 24px 24px 40px !important; background: transparent !important; border: 0 !important;
  }
  html body.meal-depth-ui:not(.auth-locked) .content > .view { background: transparent !important; }
  html body.meal-depth-ui:not(.auth-locked) .meal-dashboard-topbar {
    min-height: 49px !important; margin: 0 0 18px !important; padding: 0 !important; border: 0 !important;
    border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
    display: flex !important; flex-wrap: wrap !important; justify-content: space-between !important; align-items: center !important; gap: 12px !important;
  }
  body.meal-depth-ui:not(.auth-locked) .topbar h2 { font-size: 25px !important; line-height: 1.35 !important; color: #394852 !important; margin: 0 !important; letter-spacing: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) .meal-session-field { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 9px !important; }
  body.meal-depth-ui:not(.auth-locked) .meal-session-field span { color: #7e8a92 !important; font-size: 12px !important; }
  body.meal-depth-ui:not(.auth-locked) :is(.panel, .settings-panel) { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
  body.meal-depth-ui:not(.auth-locked) .panel-head { border-bottom: 1px solid #d6dee4 !important; background: transparent !important; border-radius: 0 !important; padding-inline: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) :is(.primary-btn, .ghost-btn, .small-btn, .btn-primary, .stepper-btn) {
    border-color: #c4ced6 !important; border-radius: 5px !important; color: #596b78 !important;
    background: var(--depth-control) !important; box-shadow: inset 0 1px #fff, 0 2px 1px rgb(61 77 89 / 10%) !important;
    letter-spacing: 0 !important; transition: filter 120ms, box-shadow 120ms !important;
  }
  body.meal-depth-ui:not(.auth-locked) :is(.primary-btn, .btn-primary) {
    border: 1px solid #d38b2e !important; border-bottom: 3px solid #c47c24 !important;
    background: linear-gradient(#ffda89, #fab157 75%, #f2a242) !important; color: #684214 !important;
    box-shadow: inset 0 1px #fff1d0, 0 3px 5px rgb(154 100 27 / 17%) !important;
  }
  body.meal-depth-ui:not(.auth-locked) :is(.primary-btn, .ghost-btn, .small-btn, .stepper-btn):hover { filter: brightness(1.025); }
  body.meal-depth-ui:not(.auth-locked) :is(.primary-btn, .ghost-btn, .small-btn, .stepper-btn):active { box-shadow: inset 0 2px 3px rgb(91 98 103 / 18%) !important; }
  body.meal-depth-ui:not(.auth-locked) button:disabled { opacity: .62; cursor: default; }
  body.meal-depth-ui:not(.auth-locked) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    border-color: #c8d2da !important; border-radius: 4px !important; color: #536672 !important; background: #fff !important;
    box-shadow: inset 0 1px 3px rgb(53 70 85 / 7%), 0 1px #fff !important;
  }
  body.meal-depth-ui :is(button,summary,input,select,textarea):focus-visible { outline: 2px solid #b77522 !important; outline-offset: 2px !important; }
  body.meal-depth-ui input[type="checkbox"], body.meal-depth-ui input[type="radio"] { accent-color: #d89232 !important; }
  body.meal-depth-ui:not(.auth-locked) #residents .resident-summary-row { display: flex !important; align-items: stretch !important; gap: 12px !important; margin-bottom: 16px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid { display: flex !important; flex: 1 1 auto !important; flex-wrap: wrap !important; gap: 0 !important; padding: 9px 4px !important; min-width: 0 !important; border: 1px solid #d5dce2 !important; border-top-color: #fff !important; border-radius: 6px !important; background: linear-gradient(#fff,#f8fafb) !important; box-shadow: 0 1px 2px rgb(59 75 86 / 9%) !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi { display: flex !important; flex: 1 1 180px !important; align-items: center !important; justify-content: flex-start !important; flex-wrap: wrap !important; gap: 8px !important; padding: 4px 13px !important; min-height: 45px !important; border: 0 !important; border-right: 1px solid #e0e5e9 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi:last-child { border-right: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi::before { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi-main > div { display: flex !important; gap: 8px !important; align-items: center !important; justify-content: flex-start !important; width: auto !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .value small { font-size: 11px !important; color: #85929b !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .resident-paused-detail { display: block !important; padding: 0 !important; border: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .resident-paused-caption { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .resident-paused-names { display: block !important; max-height: 29px !important; overflow-y: auto !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; font-size: 10px !important; font-weight: 400 !important; line-height: 1.4 !important; color: #89959e !important; background: transparent !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .resident-kpi-action-label { position: static !important; margin: 0 !important; padding: 0 !important; background: transparent !important; font-size: 10px !important; color: #a37637 !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid :is(.label,.value) { display: inline-flex !important; align-items: center !important; width: auto !important; flex: 0 0 auto !important; margin: 0 !important; padding: 0 !important; line-height: 1.3 !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .label { color: #76838c !important; font-size: 12px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .value { color: #3e505d !important; font-size: 24px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi-icon { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi-main { display: contents !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi-breakdown { display: flex !important; flex: 1 0 100% !important; flex-direction: row !important; justify-content: flex-start !important; align-items: center !important; flex-wrap: wrap !important; gap: 4px 9px !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: transparent !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi-floor-chip { display: inline-flex !important; flex-direction: row !important; flex: 0 0 auto !important; align-items: center !important; justify-content: flex-start !important; gap: 4px !important; padding: 0 !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; font-size: 10px !important; background: transparent !important; color: #8a969e !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi-floor-chip strong { font-size: 11px !important; color: #6c7f8c !important; }
  body.meal-depth-ui:not(.auth-locked) #residents .resident-page-actions { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  html body.meal-depth-ui:not(.auth-locked) #residents .resident-summary-row { background: transparent !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; }
  body.meal-depth-ui:not(.auth-locked) .resident-filter-summary { background: transparent !important; border: 0 !important; padding: 0 0 10px !important; color: #7b8b96 !important; gap: 8px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentTable .resident-details-callout { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) :is(#residentTable,#thickenerTable) { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
  body.meal-depth-ui:not(.auth-locked) :is(.resident-excel-table,.thickener-excel-table) { border: 1px solid #cbd4db !important; background: #fff !important; }
  body.meal-depth-ui:not(.auth-locked) #residentTable .resident-sort-row > th,
  body.meal-depth-ui:not(.auth-locked) #residentTable .resident-sort-row > th:nth-child(-n+4),
  body.meal-depth-ui:not(.auth-locked) #thickenerTable .thickener-sort-row > th {
    background: linear-gradient(#ffe1a6,#fac16e) !important; color: #654b28 !important; border-bottom-color: #d49c50 !important;
  }
  body.meal-depth-ui:not(.auth-locked) :is(.resident-filter-row,.thickener-filter-row) > th { background: #f6f8f9 !important; border-bottom-color: #d9e1e6 !important; }
  body.meal-depth-ui:not(.auth-locked) .resident-excel-table tbody td { background-color: #fff !important; color: #4d5e6a !important; border-color: #e0e6ea !important; }
  body.meal-depth-ui:not(.auth-locked) .resident-excel-table tbody tr:nth-child(even) td { background-color: #fffaf1 !important; }
  body.meal-depth-ui:not(.auth-locked) .resident-excel-table tbody tr:hover td { background-color: #fff1d8 !important; }
  html body.meal-depth-ui:not(.auth-locked) :is(#residentTable,#thickenerTable) .table-multi-filter { display: flex !important; justify-content: center !important; align-items: center !important; gap: 3px !important; padding: 5px 3px !important; min-height: 31px !important; white-space: nowrap !important; font-size: 11px !important; color: #697d8b !important; background: var(--depth-control) !important; border-color: #cbd5dd !important; border-radius: 4px !important; box-shadow: inset 0 1px #fff, 0 1px 1px rgb(58 78 92 / 6%) !important; }
  html body.meal-depth-ui:not(.auth-locked) :is(#residentTable,#thickenerTable) .table-multi-filter span { white-space: nowrap !important; text-align: center !important; word-break: normal !important; }
  html body.meal-depth-ui:not(.auth-locked) :is(#residentTable,#thickenerTable) :is(th,td) { border-color: #dbe2e7 !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentTable .resident-filter-summary { background: #fff !important; border: 1px solid #d5dfe6 !important; border-radius: 5px 5px 0 0 !important; padding: 7px 10px !important; }
  body.meal-depth-ui:not(.auth-locked) .mobile-record-card { border-color: #d6dfe5 !important; border-radius: 6px !important; background: #fff !important; box-shadow: 0 2px 4px rgb(63 81 94 / 7%) !important; }
  body.meal-depth-ui:not(.auth-locked) .dialog:not(#residentDialog) { background: #fff !important; border-color: #c9d2d9 !important; border-radius: 8px !important; box-shadow: 0 16px 50px rgb(35 49 60 / 24%) !important; }
  body.meal-depth-ui:not(.auth-locked) .dialog:not(#residentDialog) .dialog-head { background: var(--depth-header) !important; border-color: #d69b48 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentSaveConfirmDialog .resident-save-value { background: #f4f7f9; border-color: #dce4e9; color: #526572; }
  body.meal-depth-ui:not(.auth-locked) #residentSaveConfirmDialog .resident-save-change.deleted .resident-save-value.new { background: #fff0ed; color: #b13c30; }

  html body.meal-depth-ui:not(.auth-locked) #residentDialog {
    --ui-bg: #fff; --ui-surface: #fff; --ui-surface-soft: #f3f6f8; --ui-line: #dce4e9;
    --ui-line-strong: #c7d2db; --ui-text: #4c5d69; --ui-muted: #81909b; --ui-accent: #e7a03e; --ui-accent-dark: #926223; --meal-amber: #d99132;
    width: min(1220px, calc(100vw - 40px)) !important; max-height: calc(100dvh - 40px) !important;
    border: 1px solid #c5cfd7 !important; border-radius: 8px !important; background: #fff !important;
    box-shadow: 0 18px 65px rgb(30 43 54 / 28%), 0 2px 8px rgb(30 43 54 / 14%) !important;
  }
  body.meal-depth-ui:not(.auth-locked) #residentDialog::backdrop { background: rgb(43 54 62 / 43%) !important; backdrop-filter: blur(2px); }
  body.meal-depth-ui:not(.auth-locked) #residentDialog form { height: min(1080px, calc(100dvh - 40px)) !important; max-height: calc(100dvh - 40px) !important; grid-template-rows: 60px minmax(0,1fr) 62px !important; background: #fff !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-head { padding: 12px 22px !important; background: var(--depth-header) !important; border-bottom: 1px solid #d69a46 !important; box-shadow: inset 0 1px #fff2d7 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-head h3 { font-size: 21px !important; color: #65441d !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-close.icon-btn { width: 31px !important; height: 31px !important; min-height: 31px !important; border: 1px solid #dcab66 !important; border-radius: 5px !important; background: linear-gradient(#fff9eb,#ffe4b1) !important; color: #8e622b !important; box-shadow: inset 0 1px #fff !important; font-size: 22px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-form-layout { padding: 0 !important; gap: 0 !important; grid-template-columns: 1fr 1fr !important; grid-template-areas: "identity identity" "meal meal" "diet portion" "notes notes" !important; background: #fff !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog[data-mode="thickener"] .resident-form-layout { grid-template-columns: 1fr !important; grid-template-areas: "identity" "thickener" !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog[data-mode="thickener"] .resident-form-layout { grid-template-columns: 1fr !important; grid-template-areas: "identity" "thickener" !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .ui-section { padding: 17px 22px !important; border: 0 !important; border-bottom: 1px solid #dfe6eb !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .ui-section h4 { display: flex !important; align-items: center !important; gap: 9px !important; margin: 0 0 13px !important; color: #53616b !important; font-size: 15px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .ui-section h4::before { display: inline-block !important; content: "" !important; width: 3px !important; height: 15px !important; border-radius: 1px !important; background: #eaa044 !important; flex: 0 0 3px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-strip { background: #f5f8fa !important; padding-block: 14px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-heading h4 { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-heading { display: block !important; margin-bottom: 9px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-hint { margin: 0 !important; font-size: 10px !important; line-height: 1.4 !important; color: #87949d !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-fields { grid-template-columns: .6fr .9fr 1.25fr 1.2fr 1.2fr 1.15fr 1.2fr 1.15fr !important; gap: 9px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-photo-layout { grid-template-columns: 64px minmax(0,1fr) !important; gap: 14px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-hms-photo-tile { background: linear-gradient(#e8edf1,#f5f8fa) !important; border-color: #d4dee5 !important; color: #93a0aa !important; box-shadow: inset 0 2px 4px rgb(61 77 88 / 7%) !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .field > span,
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-choice-label { color: #81909b !important; font-size: 11px !important; font-weight: 600 !important; line-height: 1.4 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .field :is(input,select,textarea) { min-height: 34px !important; height: 34px !important; font-size: 13px !important; line-height: 1.35 !important; border: 1px solid #c8d3dc !important; border-radius: 4px !important; padding: 6px 9px !important; color: #5a6d7b !important; background: #fff !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .field :is(input,select):disabled { color: #7c8c98 !important; background: #f0f4f7 !important; border-color: #d6e0e7 !important; box-shadow: none !important; opacity: 1 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .field textarea { height: auto !important; min-height: 64px !important; resize: vertical !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-workbench { display: grid !important; grid-template-columns: 1.05fr .85fr 1.2fr !important; align-items: start !important; gap: 22px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-group { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-group + .resident-meal-group { padding-left: 22px !important; border-left: 1px solid #e2e8ed !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-group-title { color: #8b98a1 !important; font-size: 12px !important; font-weight: 600 !important; margin: 0 0 12px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dish-choice-grid { grid-template-columns: 1fr !important; gap: 9px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dish-editor-slot { padding: 0 !important; border: 0 !important; background: transparent !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dish-editor-main-row { grid-template-columns: minmax(0,1fr) 76px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.dish-secondary-toggle,.dish-split-control,.meal-session-restriction-toggle) { color: #6f818d !important; background: transparent !important; border: 0 !important; padding: 2px 0 !important; font-size: 12px !important; min-height: 26px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.choice-checks,.meal-check-grid) { gap: 5px !important; border: 0 !important; background: transparent !important; padding: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.choice-checks label,.meal-check-grid .check-field,.check-field) {
    min-height: 29px !important; padding: 4px 7px !important; border: 1px solid #d5dee5 !important; border-radius: 4px !important;
    background: linear-gradient(#fff,#f3f6f8) !important; color: #71838f !important; font-size: 12px !important; line-height: 1.4 !important; box-shadow: inset 0 1px #fff !important;
  }
  body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.choice-checks label,.meal-check-grid .check-field,.check-field):has(input:checked) { border-color: #dfb168 !important; background: linear-gradient(#fff5df,#ffe2ae) !important; color: #916329 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-serving-choice { display: grid !important; grid-template-columns: 73px minmax(0,1fr) !important; gap: 7px !important; padding: 8px 0 !important; border: 0 !important; border-bottom: 1px solid #edf0f3 !important; background: transparent !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-serving-choice:last-child { border-bottom: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-serving-choice > .resident-choice-label { padding-top: 6px !important; font-size: 11px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-serving-choice .choice-checks { display: flex !important; flex-wrap: wrap !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-session-hint { color: #95a1aa !important; font-size: 10px !important; margin-top: 5px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-notes-panel { grid-area: notes !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-lower-panel.portion { border-left: 1px solid #dfe6eb !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .tag-editor { border: 0 !important; background: transparent !important; padding: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .tag-item { border: 1px solid #ebd8b7 !important; background: #fff8eb !important; color: #916d3d !important; border-radius: 4px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .allowed-food-rule { grid-template-columns: minmax(0,1fr) 132px !important; gap: 7px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .allowed-food-target { grid-template-columns: 25px minmax(0,1fr) !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .stepper-grid { grid-template-columns: 1fr 1fr !important; gap: 10px 14px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .portion-stepper-row { grid-template-columns: 30px 28px minmax(0,1fr) 28px !important; gap: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .portion-stepper-row > span { font-size: 12px !important; color: #82919c !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .stepper-btn { width: 28px !important; min-width: 28px !important; height: 34px !important; min-height: 34px !important; padding: 0 !important; font-size: 17px !important; box-shadow: inset 0 1px #fff !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .portion-stepper-row input { width: 100% !important; height: 34px !important; min-height: 34px !important; border-radius: 0 !important; border-color: #c9d4dd !important; text-align: center !important; color: #607583 !important; font-size: 13px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog [data-resident-change-key].is-dirty { outline: 2px solid #edbe77 !important; outline-offset: 2px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-actions { position: relative !important; min-height: 62px !important; padding: 11px 22px !important; background: linear-gradient(#fff,#eef3f6) !important; border-top: 1px solid #d3dee6 !important; box-shadow: 0 -3px 10px rgb(60 80 94 / 5%) !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-actions button { min-height: 36px !important; height: auto !important; font-size: 13px !important; padding: 7px 15px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-dirty-state { color: #8b99a3 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-dirty-state.has-changes { color: #ae792e !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .ui-section > h4 { background: transparent !important; border: 0 !important; border-left: 3px solid #f0aa47 !important; padding: 0 0 0 9px !important; margin: 0 0 16px !important; color: #586c7b !important; font-size: 15px !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .ui-section > h4::before { display: none !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-strip .resident-identity-hint { background: transparent !important; border: 0 !important; padding: 0 !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.dish-editor-main-row,.resident-choice-group,.resident-custom-special-meals,.adjustment-editor) { background: transparent !important; border: 0 !important; box-shadow: none !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.dish-editor-main-row,.resident-choice-group:not(.resident-serving-choice),.resident-custom-special-meals,.adjustment-editor) { padding: 0 !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-choice-group:not(.resident-serving-choice) { margin-top: 13px !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-session-hint { margin: 6px 0 0 !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog .allowed-food-rule > label { box-shadow: none !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.field > span,.resident-choice-label,.resident-meal-group-title,.resident-meal-session-hint,.resident-dirty-state) { color: #647783 !important; }
}

@media screen and (max-width: 1200px) {
  body.meal-depth-ui:not(.auth-locked) .nav-group > summary,
  body.meal-depth-ui:not(.auth-locked) .nav > .nav-btn { padding-inline: 8px !important; font-size: 12px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-fields { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-workbench { gap: 14px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-group + .resident-meal-group { padding-left: 14px !important; }
}
@media screen and (max-width: 1024px) {
  body.meal-depth-ui:not(.auth-locked) #app.app-shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  html body.meal-depth-ui:not(.auth-locked) #app > .sidebar { grid-template-columns: minmax(0,1fr) auto !important; grid-template-rows: 64px !important; grid-template-areas: "brand toggle" !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand { padding: 0 14px !important; gap: 9px !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand h1 { font-size: 16px !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand-mark.app-image-mark { width: 34px !important; height: 34px !important; min-width: 34px !important; }
  body.meal-depth-ui:not(.auth-locked) .brand-facility { font-size: 10px !important; }
  body.meal-depth-ui:not(.auth-locked) .meal-depth-menu-toggle { display: inline-grid !important; grid-area: toggle !important; place-items: center !important; width: 42px !important; height: 42px !important; margin: 0 12px 0 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; color: #7b5426 !important; font-size: 24px !important; box-shadow: none !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar .nav,
  body.meal-depth-ui:not(.auth-locked) .sidebar-footer { display: none !important; }
  html body.meal-depth-ui:not(.auth-locked) #app > .sidebar.meal-depth-nav-open { grid-template-rows: 64px auto auto !important; grid-template-areas: "brand toggle" "navigation navigation" "account account" !important; max-height: 90dvh !important; overflow-y: auto !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar.meal-depth-nav-open .nav { display: grid !important; gap: 3px !important; padding: 8px 14px !important; }
  body.meal-depth-ui:not(.auth-locked) .sidebar.meal-depth-nav-open .sidebar-footer { display: block !important; padding: 10px 14px !important; background: #f2f5f7 !important; }
  body.meal-depth-ui:not(.auth-locked) .nav-group > summary,
  body.meal-depth-ui:not(.auth-locked) .nav > .nav-btn { width: 100% !important; justify-content: flex-start !important; min-height: 40px !important; font-size: 14px !important; padding: 9px 12px !important; }
  body.meal-depth-ui:not(.auth-locked) .nav > .nav-btn[data-view="rules"] { margin-left: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) .nav-group .nav-group-items { position: static !important; min-width: 0 !important; max-width: 100% !important; width: 100% !important; border: 0 !important; border-radius: 0 !important; padding: 4px 0 4px 15px !important; box-shadow: none !important; background: #f5f8fa !important; }
  body.meal-depth-ui:not(.auth-locked) #app > .content { padding: 17px 12px 24px !important; }
  html body.meal-depth-ui:not(.auth-locked) #mobilePrimaryNav { display: grid !important; grid-template-columns: repeat(5,minmax(0,1fr)) !important; gap: 3px !important; min-height: 65px !important; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important; background: linear-gradient(#fff,#f0f4f7) !important; border-top: 1px solid #cfd9e1 !important; box-shadow: 0 -3px 12px rgb(54 72 88 / 12%) !important; }
  html body.meal-depth-ui:not(.auth-locked) #mobilePrimaryNav button { min-width: 0 !important; min-height: 49px !important; padding: 6px 2px !important; font-size: 12px !important; border: 1px solid transparent !important; border-radius: 5px !important; background: transparent !important; color: #637986 !important; }
  html body.meal-depth-ui:not(.auth-locked) #mobilePrimaryNav button.active { color: #79501e !important; border-color: #e4b46d !important; background: linear-gradient(#fff3d9,#ffdfa2) !important; box-shadow: inset 0 1px #fff !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-list-toolbar { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 7px !important; margin: 13px 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-list-toolbar :is(button,input) { min-height: 42px !important; font-size: 14px !important; border: 1px solid #c8d3dd !important; background: #fff !important; color: #536b7b !important; border-radius: 4px !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-list-toolbar input { grid-column: 1 !important; width: 100% !important; min-width: 0 !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-list-toolbar > button:last-child { grid-column: 2 !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-record-head { background: #f4f7f9 !important; border-color: #d8e1e7 !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-record-identity :is(span,strong),
  html body.meal-depth-ui:not(.auth-locked) .mobile-record-field dt,
  html body.meal-depth-ui:not(.auth-locked) .mobile-record-footer { color: #627786 !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-record-field { border-color: #e0e7ec !important; background: #fff !important; }
  html body.meal-depth-ui:not(.auth-locked) .mobile-record-field dd { color: #4d6372 !important; }
  body.meal-depth-ui:not(.auth-locked) .topbar h2 { font-size: 21px !important; }
  body.meal-depth-ui:not(.auth-locked) .meal-dashboard-topbar { margin-bottom: 13px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents .resident-summary-row { display: block !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid { display: grid !important; grid-template-columns: 1fr 1fr !important; margin-bottom: 10px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .kpi { padding: 6px 10px !important; gap: 5px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .value { font-size: 23px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents #inputKpiGrid .label { font-size: 12px !important; }
  body.meal-depth-ui:not(.auth-locked) #residents .resident-page-actions { display: flex !important; justify-content: flex-end !important; }
  html body.meal-depth-ui:not(.auth-locked) #residentDialog[open] { inset: 0 !important; width: 100% !important; height: 100dvh !important; max-width: none !important; max-height: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog form { height: 100dvh !important; max-height: none !important; grid-template-rows: 58px minmax(0,1fr) 66px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-head { padding: 10px 14px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-head h3 { font-size: 20px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-close.icon-btn { width: 38px !important; height: 38px !important; min-height: 38px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-form-layout { grid-template-columns: 1fr !important; grid-template-areas: "identity" "meal" "diet" "portion" "notes" !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .ui-section { padding: 16px 14px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-workbench { grid-template-columns: 1fr !important; gap: 17px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-meal-group + .resident-meal-group { padding: 15px 0 0 !important; border-left: 0 !important; border-top: 1px solid #e1e8ed !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-lower-panel.portion { border-left: 0 !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .field :is(input,select,textarea) { min-height: 42px !important; height: 42px !important; font-size: 16px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog :is(.choice-checks label,.meal-check-grid .check-field,.check-field) { min-height: 36px !important; padding: 6px 9px !important; font-size: 14px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-serving-choice { grid-template-columns: 83px minmax(0,1fr) !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-serving-choice > .resident-choice-label { padding-top: 9px !important; font-size: 12px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-actions { min-height: 66px !important; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .dialog-actions button { min-height: 43px !important; font-size: 15px !important; }
}
@media screen and (max-width: 620px) {
  body.meal-depth-ui:not(.auth-locked) .sidebar .brand h1 { font-size: 15px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-fields { grid-template-columns: 1fr 1fr !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-photo-layout { grid-template-columns: 1fr !important; gap: 11px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-hms-photo-tile { display: none !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-identity-heading { margin-bottom: 11px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .stepper-grid { grid-template-columns: 1fr 1fr !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .portion-stepper-row { grid-template-columns: 25px 29px minmax(0,1fr) 29px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .stepper-btn { width: 29px !important; min-width: 29px !important; height: 38px !important; min-height: 38px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .portion-stepper-row input { min-height: 38px !important; height: 38px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .allowed-food-rule { grid-template-columns: minmax(0,1fr) 132px !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-dialog-action-buttons { width: auto !important; margin-left: auto !important; }
  body.meal-depth-ui:not(.auth-locked) #residentDialog .resident-dirty-state { display: block !important; font-size: 10px !important; max-width: 46% !important; white-space: normal !important; }
}
@media screen and (prefers-reduced-motion: reduce) {
  body.meal-depth-ui button { transition: none !important; }
}

/* 20261031-control-press-feedback: keep every enabled control visibly tactile. */
@media screen {
  body.meal-depth-ui :is(button, summary, a.button, [role="button"]):not(:disabled):not([aria-disabled="true"]) {
    transform-origin: center !important;
    transition:
      transform 140ms cubic-bezier(.22,1,.36,1),
      filter 140ms ease,
      box-shadow 140ms cubic-bezier(.22,1,.36,1) !important;
  }
  body.meal-depth-ui :is(button, summary, a.button, [role="button"]):not(:disabled):not([aria-disabled="true"]):active {
    transform: translateY(1px) scale(.98) !important;
    filter: brightness(.96) !important;
    box-shadow: inset 0 2px 4px rgb(61 70 77 / 24%) !important;
  }
}
@media screen and (prefers-reduced-motion: reduce) {
  body.meal-depth-ui :is(button, summary, a.button, [role="button"]):not(:disabled):not([aria-disabled="true"]) {
    transition: filter 120ms ease, box-shadow 120ms ease !important;
  }
  body.meal-depth-ui :is(button, summary, a.button, [role="button"]):not(:disabled):not([aria-disabled="true"]):active {
    transform: none !important;
  }
}
