/* SRD OS | ONE DASHBOARD MAL FOR AUTHENTICATED WORKROOMS
   The existing native-cleanroom-v2.js attaches srd-submenu-dashboard
   without changing any server-authorised controls, links, data or forms.
   Dashboard provides the header typography. No competing room frame. */
html[data-srd-theme-box] body.srd-os-workspace main.srd-frontdoor-shell >
 section.srd-frontdoor-card--wide.srd-submenu-dashboard {
  box-sizing:border-box!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
  border-radius:0!important;
  padding:0!important;
  width:100%!important;
}
html[data-srd-theme-box] body.srd-os-workspace main.srd-frontdoor-shell >
 section.srd-submenu-dashboard > header.cr-identity-head.srd-dash-heading {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  flex-wrap:wrap;
  gap:16px!important;
  min-height:0;
  background:var(--dash-bg)!important;
  background-image:none!important;
  color:var(--dash-text)!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:4px 0 20px!important;
  margin:0 0 18px!important;
}
body.srd-os-workspace .srd-submenu-dashboard .cr-identity-head .cr-identity-title {
  min-width:240px;flex:1 1 340px;
}
body.srd-os-workspace .srd-submenu-dashboard .cr-identity-head .cr-identity-title h1 {
  margin:0 0 8px!important;
  font-size:clamp(27px,2.4vw,35px)!important;
  line-height:1.15!important;
  letter-spacing:-.035em!important;
  color:var(--dash-text)!important;
  font-weight:790!important;
}
body.srd-os-workspace .srd-submenu-dashboard .cr-identity-head .cr-identity-title p {
  margin:0!important;color:var(--dash-muted)!important;
  font-size:14px!important;
}
body.srd-os-workspace .srd-submenu-dashboard .cr-identity-head .cr-identity-controls {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px;
  flex:0 1 auto;
  min-width:0;
  flex-wrap:wrap;
  grid-column:auto!important;
}
html[data-srd-theme-box] body.srd-os-workspace .srd-submenu-dashboard
 .cr-identity-head .srd-submenu-actions {
  display:flex!important;
  flex-wrap:wrap;
  width:auto!important;
  margin:0!important;
  padding:0!important;
  gap:8px!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
body.srd-os-workspace .srd-submenu-dashboard .srd-submenu-actions > * {
  min-width:0;
}
@media(max-width:800px){
  html[data-srd-theme-box] body.srd-os-workspace main.srd-frontdoor-shell >
  section.srd-submenu-dashboard > header.cr-identity-head.srd-dash-heading {
    gap:10px!important;padding:4px 0 16px!important;
  }
  body.srd-os-workspace .srd-submenu-dashboard .cr-identity-head .cr-identity-title {
    flex-basis:100%;min-width:0;
  }
  body.srd-os-workspace .srd-submenu-dashboard .cr-identity-head .cr-identity-controls {
    width:100%;justify-content:flex-start!important;
  }
}
/* Search/list-only workrooms: fixed shared heading and controls; the
   existing data-srd-ui=core-list-1 result area alone scrolls. */
@media(min-width:801px) and (min-height:620px){
  body.srd-os-workspace[data-srd-frame-scroll="1"] main.srd-frontdoor-shell >
  section.srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"] {
    display:flex!important;
    flex-direction:column!important;
    gap:13px!important;
    align-items:stretch!important;
    overflow:hidden!important;
    min-height:0!important;
  }
  body.srd-os-workspace[data-srd-frame-scroll="1"] main.srd-frontdoor-shell >
  section.srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"] >
  section[aria-label="Machines"] {
    flex:1 1 auto;
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  body.srd-os-workspace[data-srd-frame-scroll="1"] main.srd-frontdoor-shell >
  section.srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"]
  [data-srd-ui="core-list-1"] {
    flex:1 1 auto;
    min-height:0;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
}


/* MACHINEKAMER - reserve natural height for filter and input rails.
   Previously flex shrink clipped the search field behind the sticky nav. */
@media(min-width:801px) and (min-height:620px){
  html[data-srd-theme-box] body.srd-os-workspace[data-srd-frame-scroll="1"]
  main.srd-frontdoor-shell > section.srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"]
  > :is(header.cr-identity-head,nav.srd-k06-filters,section.srd-k06-search-grid,
       .srd-k06-flash,.srd-k06-customer-card,.srd-k06-head){
    flex:0 0 auto!important;
    min-height:max-content;
    overflow:visible!important;
  }
  html[data-srd-theme-box] body.srd-os-workspace[data-srd-frame-scroll="1"]
  main.srd-frontdoor-shell > section.srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"]
  > section.srd-k06-search-grid {
    position:relative;
    z-index:1;
    min-height:74px;
    align-content:start;
  }
  body.srd-os-workspace[data-srd-frame-scroll="1"] .srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"]
  .srd-k06-search input {
    flex:none;
    height:42px!important;
    min-height:42px!important;
    display:block!important;
    visibility:visible!important;
  }
  body.srd-os-workspace[data-srd-frame-scroll="1"]
  main.srd-frontdoor-shell > section.srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"]
  > section[aria-label="Machines"]{
    flex:1 1 0!important;
    min-height:105px!important;
    overflow:hidden!important;
  }
  body.srd-os-workspace[data-srd-frame-scroll="1"]
  .srd-submenu-dashboard[data-srd-surface="MACHINEKAMER"] nav.srd-k06-filters {
    position:relative!important;
    top:auto!important;
  }
}
