.topbar{
  min-height:72px;
  display:grid;
  grid-template-columns:minmax(310px,auto) minmax(360px,620px) minmax(360px,auto);
  align-items:center;
  gap:22px;
  padding:12px 24px;
  background:linear-gradient(90deg,#123f70,#1a4c8b);
  color:#fff;
  box-shadow:0 6px 18px rgba(10,38,70,.18);
}
.topbar .brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.brand-mark{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.13);
  color:#fff;
  font-weight:900;
  letter-spacing:.02em;
}
.topbar .brand strong{
  display:block;
  color:#fff;
  font-size:15px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar .brand small,
.topbar .brand span#apiStatus{
  display:block;
  margin-top:3px;
  color:#d8e8f8;
  font-size:12px;
  line-height:1.15;
  white-space:nowrap;
}
.global-search{
  height:44px;
  display:flex;
  align-items:center;
  gap:10px;
  justify-self:center;
  width:100%;
  max-width:620px;
  padding:0 16px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:999px;
  background:rgba(255,255,255,.13);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}
.global-search span{color:#dcecff;font-weight:900;line-height:1;}
.global-search input{
  width:100%;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#fff;
  font-size:14px;
}
.global-search input::placeholder{color:#dcecff;opacity:.95;}
.profile{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:0;
}
#profileAvatar{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.72);
  background:#fff;
  color:#123f70;
  font-weight:900;
  overflow:hidden;
}
#profileAvatar img,.profile-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  border:0;
}
.profile select#role{
  height:38px;
  min-width:150px;
  max-width:180px;
  border:1px solid rgba(255,255,255,.32);
  border-radius:8px;
  background:rgba(255,255,255,.12);
  color:#fff;
  padding:0 34px 0 12px;
  font-weight:800;
  outline:0;
}
.profile select#role option{color:#0b2341;background:#fff;}
#logoutBtn,.profile-tools button{
  height:38px;
  min-width:72px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.32);
  background:#fff;
  color:#123f70;
  padding:0 14px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
  box-shadow:0 3px 9px rgba(6,26,52,.12);
}
.profile-tools{display:flex;align-items:center;gap:0;}
.profile-tools button#profileBtn{
  min-width:104px;
  border-radius:8px;
  background:rgba(255,255,255,.14);
  color:#fff;
  box-shadow:none;
}
#logoutBtn:hover,.profile-tools button:hover{filter:brightness(1.04);transform:translateY(-1px);}
@media (max-width:1100px){
  .topbar{grid-template-columns:1fr;gap:12px;padding:14px;}
  .global-search{justify-self:stretch;max-width:none;}
  .profile{justify-content:flex-start;flex-wrap:wrap;}
  .topbar .brand strong,.topbar .brand small,.topbar .brand span#apiStatus{white-space:normal;}
}
@media (max-width:560px){
  .profile select#role{min-width:128px;}
  #logoutBtn,.profile-tools button#profileBtn{min-width:auto;padding:0 12px;}
}