/* Shared compact page header. Clip horizontal overflow without creating a scroll container. */
html:has(.dhun-sticky-header){scroll-padding-top:110px}
body:has(.dhun-sticky-header){overflow-x:clip}
#app>.app-shell:has(.dhun-sticky-header){overflow-x:clip!important;overflow-y:visible!important}
:is(#app,#portal) .dhun-sticky-header {
  position:sticky!important;
  top:0!important;
  z-index:50!important;
  display:flex!important;
  align-items:center!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  justify-content:flex-start!important;
  gap:12px!important;
  padding:calc(12px + env(safe-area-inset-top,0px)) 16px 14px!important;
  min-height:78px!important;
  max-width:none!important;
  border:0!important;
  border-radius:0!important;
  background:linear-gradient(115deg,#07336d,#0758ad)!important;
  color:#fff!important;
  box-shadow:0 4px 14px #153b6520!important;
  box-sizing:border-box;
}
.dhun-sticky-header>.dhun-header-title,
.saas-workspace .saas-topbar.dhun-sticky-header>.saas-topbar-title {
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
  margin:0!important;
}
:is(#app,#portal) .dhun-sticky-header :is(h1,h2) {
  color:#fff!important;
  font-size:clamp(18px,4.8vw,24px)!important;
  line-height:1.25!important;
  margin:3px 0 0!important;
  overflow-wrap:anywhere;
}
:is(#app,#portal) .dhun-sticky-header :is(small,.saas-eyebrow) {
  display:block;
  color:#bcd4ee!important;
  font-size:12px!important;
  line-height:1.3!important;
  letter-spacing:normal!important;
}
:is(#app,#portal) .dhun-sticky-header>.app-back-button {
  width:44px!important;
  height:44px!important;
  min-height:44px!important;
  min-width:44px!important;
  padding:0!important;
  flex:0 0 44px!important;
  background:#fff!important;
  color:#12659d!important;
  border:1px solid #d6e5ef!important;
  border-radius:12px!important;
}
.dhun-sticky-header>.app-back-button>span{display:none!important}
.dhun-header-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:12px 16px;
  background:var(--bg,#f4f7fb);
  color:var(--text,#17324d);
  min-width:0;
}
.dhun-header-actions[hidden],.dhun-heading-source{display:none!important}
.dhun-header-actions>.head-actions,.dhun-header-actions>.tenant-actions {
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center;
  gap:8px!important;
  min-width:0;
  max-width:100%;
  margin:0!important;
}
.dhun-header-actions :is(button,a){max-width:100%}
.dhun-header-actions>.saas-account-menu{margin-left:auto}
.dhun-header-actions>.saas-topbar-brand{min-width:0;flex:1 1 auto}
.dhun-header-actions .saas-brand{padding:0}
html[data-dhun-theme="dark"] .saas-workspace .dhun-header-actions{background:#15273b;color:#edf5ff}
@media(min-width:900px){
 #app>.app-shell:has(>.desktop-sidebar)>.dhun-header-actions{margin-left:260px;width:calc(100% - 260px)}
 #app>.app-shell:has(>.desktop-sidebar.ds-compact)>.dhun-header-actions{margin-left:76px;width:calc(100% - 76px)}
}
@media print{
 :is(#app,#portal) .dhun-sticky-header{position:static!important;box-shadow:none!important;padding-top:12px!important}
 .dhun-header-actions{display:none!important}
}

/* Pin the dashboard welcome header on phone/tablet, as with other page headers. */
@media screen and (max-width:899.98px){
 body:has(#app>.app-shell>.dashboard-top){overflow-x:clip}
 #app>.app-shell:has(>.dashboard-top){overflow-x:clip!important;overflow-y:visible!important}
 #app>.app-shell>.dashboard-top{position:sticky!important;top:0!important;z-index:50!important}
}
@media print{
 #app>.app-shell>.dashboard-top{position:static!important}
}

/* Keep the cashier mode controls clear of the action buttons on phones. */
@media screen and (max-width:700px){
 .dhun-header-actions > .head-actions:has(> .cashier-mode-switch){
  flex:1 1 100%;
  justify-content:flex-start;
 }
 .dhun-header-actions .head-actions > .cashier-mode-switch{
  flex:0 0 100%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  box-sizing:border-box;
 }
 .dhun-header-actions .cashier-mode-switch > button{
  min-width:0;
  min-height:44px;
 }
}
