/* Längere Portalbezeichnung ohne Abschneiden oder horizontales Überlaufen. */
.topbar-final .brand{min-width:0;flex:1 1 auto}
.topbar-final .title-block{min-width:0}
.topbar-final .title-block h1,.topbar-final .title-block p{white-space:normal;overflow-wrap:anywhere}
.topbar-final .title-block h1{line-height:1.2}
.topbar-final .title-block .portal-brand-location{display:block;font-size:.8em;font-weight:600;line-height:1.3;margin-top:2px}
.topbar-final .title-block p{line-height:1.45;margin-top:5px}

/* Ein Raster für Marke, Schnellaktionen, Genehmigung und kompakten QR-Code. */
header.portal-header{display:grid;grid-template-columns:minmax(0,1fr) 200px minmax(270px,320px) 72px;gap:24px;align-items:center;justify-items:stretch;padding:18px 22px}
header.portal-header .header-left-final{display:flex;min-width:0;width:auto;gap:0;justify-content:flex-start}
header.portal-header .brand{width:100%;min-width:0;justify-content:flex-start;gap:14px}
header.portal-header .brand-logo{width:64px;height:64px;flex:0 0 64px}
header.portal-header .title-block p{max-width:40rem;font-size:.88rem}
header.portal-header .header-group-label{display:block;margin:0;color:var(--muted);font-size:.78rem;font-weight:700;line-height:1.3}
header.portal-header .header-middle-final{min-width:0;width:100%;gap:8px!important}
header.portal-header .header-middle-final .quick-action-buttons{flex-wrap:wrap!important;max-width:200px;gap:10px!important}
header.portal-header .hgw-button,header.portal-header .sb-button{width:60px;height:60px;min-width:60px;min-height:60px;max-width:60px;max-height:60px;flex:0 0 60px;box-shadow:none;font-size:1.12rem}
header.portal-header .sb-button:hover{transform:translateY(-1px)}
header.portal-header .header-middle-final .sb-status-row .sb-status{white-space:normal!important;text-align:center}
header.portal-header .header-right-final{display:flex!important;flex-direction:column;min-width:0;width:100%;align-items:stretch!important;justify-content:center!important;gap:8px!important}
header.portal-header .role-row{width:100%;min-width:0;max-width:none;min-height:0;justify-content:flex-start;flex-wrap:wrap}
header.portal-header .role-login{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-width:0;margin:0}
header.portal-header .role-login input{width:100%;min-width:0;min-height:44px;margin:0;box-sizing:border-box}
header.portal-header .role-login .btn{min-height:44px;margin:0}
header.portal-header .role-login .auth-lockout-inline{grid-column:1/-1;white-space:normal;margin:0}
header.portal-header .header-qr{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;gap:5px;margin:0;color:var(--muted);font-size:.7rem;font-weight:600;line-height:1.2;text-decoration:none;white-space:normal;text-align:center}
header.portal-header .header-qr img{display:block;width:56px;height:56px;flex:0 0 56px;box-sizing:border-box;border:1px solid var(--border);border-radius:6px;padding:3px;background:white}
header.portal-header .header-qr:focus-visible{outline:2px solid var(--primary);outline-offset:4px;border-radius:6px}
header.portal-header.public-topbar{grid-template-columns:minmax(0,1fr) 200px 72px}
@media(max-width:1120px){
 header.portal-header{grid-template-columns:minmax(160px,1fr) minmax(250px,1.5fr) 72px;gap:16px;padding:16px}
 header.portal-header .header-left-final{grid-column:1/-1;padding-bottom:14px;border-bottom:1px solid var(--border)}
 header.portal-header.public-topbar{grid-template-columns:minmax(0,1fr) 72px}
}
@media(max-width:700px){
 header.portal-header,header.portal-header.public-topbar{grid-template-columns:minmax(0,1fr);gap:14px;padding:14px}
 header.portal-header .header-left-final{grid-column:auto}
 header.portal-header .brand-logo{width:54px;height:54px;flex-basis:54px}
 header.portal-header .title-block p{font-size:.82rem}
 header.portal-header .header-right-final{padding-top:14px;border-top:1px solid var(--border)}
 header.portal-header .header-qr{display:none!important}
}
