.app-header, .app-header * { box-sizing: border-box; }
.app-header { position: relative; display: grid; grid-template-columns: minmax(210px,1fr) auto minmax(210px,1fr); align-items: center; gap: 18px; padding: 13px 18px !important; min-height: 72px; background: #fff; border: 1px solid #e1e7ef; border-radius: 14px; box-shadow: 0 3px 14px #1720330a !important; }
.app-header__brand h1 { margin: 0; color: #172033; font-size: 19px; line-height: 1.15; letter-spacing: .02em; }
.app-header__brand p { margin: 3px 0 0 !important; color: #667085; font-size: 12px; line-height: 1.25; }
.app-header__nav { display: flex; align-items: center; gap: 3px; padding: 3px; background: #f4f7fb; border-radius: 10px; }
.app-header__nav[aria-busy="true"] { visibility: hidden; }
.app-header__nav a { display: block; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: #536175; text-decoration: none; font-size: 13px; font-weight: 650; white-space: nowrap; }
.app-header__nav a:hover { color: #1769e0; background: #eaf2ff; }
.app-header__nav a[aria-current="page"] { color: #fff; background: #1769e0; box-shadow: 0 2px 6px #1769e02b; }
.app-header__user { position: relative; display: flex; justify-content: flex-end; min-width: 0; }
.user-menu__trigger { display: grid !important; grid-template-columns: 34px minmax(0,auto) auto; align-items: center; gap: 9px; max-width: 235px; min-height: 42px; padding: 4px 8px 4px 4px !important; border: 1px solid #dce4ee !important; border-radius: 22px !important; background: #fff !important; color: #172033 !important; box-shadow: none !important; }
.user-menu__trigger:hover { background: #f7f9fc !important; border-color: #b9c7d8 !important; }
.user-menu__avatar, .admin-users__avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #1769e0; color: #fff; font-size: 14px; font-weight: 750; }
.user-menu__identity { min-width: 0; text-align: left; }
.user-menu__name { display: block; overflow: hidden; color: #172033; font-size: 13px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__role { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 8px; background: #eaf2ff; color: #175bb8; font-size: 10px; font-weight: 700; line-height: 1.4; }
.user-menu__chevron { color: #667085; font-size: 11px; transition: transform .15s ease; }
.user-menu__trigger[aria-expanded="true"] .user-menu__chevron { transform: rotate(180deg); }
.user-menu__popover { position: absolute; z-index: 50; top: calc(100% + 7px); right: 0; width: 210px; padding: 6px; border: 1px solid #dce4ee; border-radius: 11px; background: #fff; box-shadow: 0 10px 28px #1720331f; }
.user-menu__popover[hidden] { display: none; }
.user-menu__item { display: flex !important; width: 100%; align-items: center; min-height: 40px; padding: 8px 10px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: #27364a !important; font-size: 13px; font-weight: 650; text-align: left; box-shadow: none !important; }
.user-menu__item:hover { background: #f1f5fa !important; }
.user-menu__item--logout { margin-top: 4px; border-top: 1px solid #edf1f5 !important; border-radius: 0 0 8px 8px !important; color: #b42318 !important; }
.app-header :focus-visible, .user-menu__popover :focus-visible { outline: 3px solid #84adff !important; outline-offset: 2px; }
@media (max-width: 800px) {
  .app-header { grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 10px 11px !important; }
  .app-header__brand h1 { font-size: 17px; }
  .app-header__brand p { display: none; }
  .app-header__nav { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: center; overflow: hidden; }
  .app-header__nav a { flex: 1; min-width: 0; padding: 7px 4px; text-align: center; font-size: 11px; line-height: 1.15; white-space: normal; }
  .user-menu__trigger { grid-template-columns: 34px auto; width: 44px; padding: 4px !important; overflow: hidden; }
  .user-menu__identity { display: none; }
  .user-menu__chevron { display: none; }
  .user-menu__popover { position: fixed; top: 58px; right: 8px; width: min(260px, calc(100vw - 16px)); }
}
