/* Compliance Werkbank – Header, Branding und Benachrichtigungen (Release 1.6.4) */
.cw-topbar{
  background:#fff;
  color:var(--cw-navy);
  border-bottom:1px solid #dce4ec;
  box-shadow:0 3px 14px rgba(15,23,42,.07);
}
.cw-topbar-inner{
  min-height:76px;
  padding:4px 22px;
  gap:22px;
  flex-wrap:nowrap;
}
.cw-brand-wrap{
  flex:1 1 auto;
  gap:20px;
  min-width:0;
  overflow:hidden;
}
.cw-brand{
  flex:0 0 auto;
  min-width:0;
  color:var(--cw-navy);
}
.cw-brand-logo{
  display:block;
  width:162px;
  height:auto;
  max-height:70px;
  object-fit:contain;
  object-position:left center;
  flex:0 0 auto;
}
.cw-tenant-pill{
  flex:0 1 380px;
  max-width:min(380px,32vw);
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  padding:9px 13px;
  border:1px solid #d7e0e9;
  background:#f7f9fb;
  color:var(--cw-navy);
  text-decoration:none;
  box-shadow:none;
}
a.cw-tenant-pill:hover{
  border-color:#b9c8d7;
  background:#eef3f7;
}
a.cw-tenant-pill:focus-visible{
  outline:none;
  box-shadow:var(--cw-focus);
}
.cw-top-actions{
  flex:0 0 auto;
  flex-wrap:nowrap;
  gap:8px;
}
.cw-top-btn,
.logout-form button{
  min-height:42px;
  padding:9px 14px;
  border:1px solid #d4dee8;
  background:#fff;
  color:var(--cw-navy);
  box-shadow:none;
}
.cw-top-btn:hover,
.logout-form button:hover{
  border-color:#b9c8d7;
  background:#f3f6f9;
  color:var(--cw-navy);
}
.cw-top-btn:focus-visible,
.logout-form button:focus-visible{
  outline:none;
  box-shadow:var(--cw-focus);
}
.cw-system-menu[open]>.cw-top-btn,
.cw-system-menu[open]>summary{
  border-color:rgba(180,106,60,.45);
  background:#fff6f0;
  color:#8e4d29;
}
.cw-system-menu>summary::after{
  content:"";
  width:6px;
  height:6px;
  margin-left:8px;
  border-right:1.7px solid currentColor;
  border-bottom:1.7px solid currentColor;
  transform:rotate(45deg) translateY(-2px);
}
.cw-system-menu[open]>summary::after{
  transform:rotate(225deg) translate(-1px,-1px);
}
.cw-system-panel{
  width:280px;
  top:calc(100% + 10px);
}
.cw-system-panel a:focus-visible{
  outline:none;
  background:#fff4ec;
  box-shadow:inset 0 0 0 2px rgba(180,106,60,.35);
}
.cw-notification-button{
  position:relative;
  width:42px;
  height:42px;
  display:inline-grid;
  place-items:center;
  flex:0 0 42px;
  border:1px solid #d4dee8;
  border-radius:999px;
  background:#fff;
  color:var(--cw-navy);
  text-decoration:none;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
.cw-notification-button:hover{
  border-color:#b9c8d7;
  background:#f3f6f9;
}
.cw-notification-button:focus-visible{
  outline:none;
  box-shadow:var(--cw-focus);
}
.cw-notification-button svg{
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.cw-notification-badge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:20px;
  height:20px;
  display:grid;
  place-items:center;
  padding:0 5px;
  border:2px solid #fff;
  border-radius:999px;
  background:#ed6b18;
  color:#fff;
  font-size:10px;
  font-weight:900;
  line-height:1;
  box-shadow:0 2px 7px rgba(15,23,42,.22);
}
.cw-system-menu>summary,
.logout-form button{
  min-width:86px;
}
.cw-mobile-menu{
  width:auto;
  gap:7px;
  padding:8px 12px;
  font-size:12px;
}
.cw-mobile-menu span[aria-hidden="true"]{
  font-size:17px;
  line-height:1;
}
.cw-mobile-account-section{
  display:none;
}
.cw-sidebar-logout{
  margin:0;
}
.cw-sidebar-logout button{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 11px;
  border:0;
  background:transparent;
  color:#26364c;
  font-size:13px;
  font-weight:720;
  text-align:left;
  cursor:pointer;
}
.cw-sidebar-logout button::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:3px;
  background:#c9d3de;
  flex:0 0 auto;
}
.cw-sidebar-logout button:hover{
  color:var(--cw-navy);
}
.cw-sidebar-logout button:hover::before{
  background:var(--cw-copper);
}
.cw-sidebar-logout button:focus-visible{
  outline:none;
  box-shadow:var(--cw-focus);
}
.cw-app-footer{
  margin-top:30px;
  padding:15px 4px 0;
  border-top:1px solid rgba(199,210,223,.7);
  color:#7a8798;
  font-size:10px;
  font-weight:650;
  letter-spacing:.04em;
  text-align:right;
}

/* Benachrichtigungsübersicht */
.cw-notification-page{
  display:grid;
  gap:16px;
}
.cw-notification-pagehead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
.cw-notification-list{
  display:grid;
  gap:10px;
}
.cw-notification-item{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:16px;
  border:1px solid var(--cw-border);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--cw-shadow-soft);
}
.cw-notification-item.is-unread{
  border-color:rgba(180,106,60,.36);
  box-shadow:0 8px 24px rgba(180,106,60,.09);
}
.cw-notification-level{
  width:11px;
  height:11px;
  border-radius:50%;
  background:#94a3b8;
  box-shadow:0 0 0 5px rgba(148,163,184,.13);
}
.cw-notification-level.critical,
.cw-notification-level.high{
  background:#b42318;
  box-shadow:0 0 0 5px rgba(180,35,24,.11);
}
.cw-notification-level.medium{
  background:#b54708;
  box-shadow:0 0 0 5px rgba(181,71,8,.11);
}
.cw-notification-copy{
  min-width:0;
}
.cw-notification-copy strong{
  display:block;
  color:var(--cw-navy);
  font-size:14px;
}
.cw-notification-copy p{
  margin:5px 0 0;
  color:var(--cw-muted);
  font-size:12px;
  line-height:1.5;
}
.cw-notification-open{
  margin:0;
}
.cw-notification-open button{
  white-space:nowrap;
}
.cw-notification-state{
  display:inline-flex;
  margin-left:7px;
  padding:3px 7px;
  border-radius:999px;
  background:#fff1e8;
  color:#9a4c20;
  font-size:9px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  vertical-align:2px;
}

@media(max-width:1180px){
  .cw-topbar-inner{gap:14px;padding-inline:16px}
  .cw-brand-wrap{gap:13px}
  .cw-brand-logo{width:150px}
  .cw-tenant-pill{max-width:250px}
}

@media(max-width:1020px){
  .cw-topbar-inner{padding:4px 14px}
  .cw-mobile-menu{display:inline-flex}
  .cw-mobile-account-section{display:block}
  .cw-tenant-pill{max-width:210px}
}

@media(max-width:820px){
  .cw-topbar-inner{min-height:72px}
  .cw-brand-logo{width:148px;max-height:64px}
  .cw-tenant-pill{display:none}
  .cw-system-menu,
  .cw-top-actions>.logout-form{display:none}
  .cw-top-actions{gap:7px}
  .cw-notification-button{display:inline-grid}
  .cw-mobile-menu{display:inline-flex}
}

@media(max-width:560px){
  .cw-topbar-inner{min-height:68px;padding:4px 9px;gap:7px}
  .cw-brand-wrap{gap:7px}
  .cw-brand-logo{width:138px;max-height:60px}
  .cw-notification-button{width:40px;height:40px;flex-basis:40px}
  .cw-mobile-menu{min-width:40px;padding:8px 9px}
  .cw-mobile-menu span:last-child{display:none}
  .cw-notification-pagehead{flex-direction:column}
  .cw-notification-item{grid-template-columns:auto minmax(0,1fr)}
  .cw-notification-open{grid-column:1/-1}
  .cw-notification-open button{width:100%}
  .cw-app-footer{text-align:left}
}

@media(max-width:370px){
  .cw-brand-logo{width:125px;max-height:55px}
  .cw-notification-button{width:38px;height:38px;flex-basis:38px}
  .cw-mobile-menu{min-width:38px;min-height:38px}
}
