/* Let the shared header, content and footer share the available screen.
   The document grows naturally when records or larger text need more room. */
@media screen {
  body.app-ready.bcp-workspace {
    display:flex!important;
    flex-direction:column!important;
    min-height:100vh!important;
    min-height:100dvh!important;
    height:auto!important;
    max-height:none!important;
    overflow-x:clip!important;
    overflow-y:visible!important;
  }
  body.app-ready.bcp-workspace > header.main-header {
    flex:0 0 auto!important;
    position:sticky!important;
    top:0!important;
  }
  body.app-ready.bcp-workspace > main {
    flex:1 0 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.app-ready.bcp-workspace > footer.bc-app-footer {
    flex:0 0 auto!important;
    position:relative!important;
    margin-top:0!important;
    margin-bottom:0!important;
    max-width:none!important;
  }
  body.app-ready.bcp-workspace .bcp-home-utilities:empty {display:none!important}

  /* Security remains accessible alongside Sign out on narrow phones. */
  body.app-ready.bcp-workspace #bc-command-bar #bcpAccountSecurity {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-height:36px!important;
    height:36px!important;
    margin:0!important;
    padding:0 10px!important;
    font:600 12px/1.2 Inter,'Segoe UI',sans-serif!important;
  }
  body.app-ready.bcp-workspace #bcpAccountSecurity svg {width:18px;height:18px;flex:none}
}

/* Reduce decorative spacing on shorter laptops; never clip content to fit. */
@media screen and (min-width:801px) and (max-height:820px) {
  body.app-ready.bcp-workspace .bcp-home-heading {margin-bottom:18px}
  body.app-ready.bcp-workspace .bcp-app-grid {gap:14px}
  body.app-ready.bcp-workspace .bcp-app-tile {
    min-height:158px!important;
    padding:14px 12px!important;
    gap:6px!important;
  }
  body.app-ready.bcp-workspace .bcp-tile-art {width:68px;height:62px;margin-bottom:2px}
  body.app-ready.bcp-workspace .bcp-home-utilities {margin-top:18px;padding-top:12px}
  body.app-ready.bcp-workspace .bcp-platform-note {margin-top:18px}
  body.app-ready.bcp-workspace .bc-footer-inner {min-height:72px;padding-top:10px;padding-bottom:10px}
}

@media screen and (max-width:760px) {
  body.app-ready.bcp-workspace #bcpAccountSecurity span {display:none!important}
  body.app-ready.bcp-workspace #bc-command-bar #bcpAccountSecurity {
    width:36px!important;
    padding:8px!important;
  }
}
