/* Compact company workspace bar. Scoped so report and entry typography stay independent. */
.portal-header.topbar{display:grid;grid-template-columns:minmax(145px,190px) minmax(0,1fr);align-items:center;gap:16px;padding:14px 24px;background:#eef4f8;border-bottom:1px solid #d7e3ec;box-shadow:0 2px 8px #123c5705;min-height:76px}
.portal-header .topbar-title{min-width:0;width:auto;flex:initial}
.portal-header .topbar-title h1{margin:0;font-size:20px;line-height:1.22;letter-spacing:-.45px;overflow-wrap:anywhere}
.portal-header .topbar-title p{margin:4px 0 0;font-size:11px;line-height:1.35}
.portal-header .user-badge{display:block;max-width:100%;margin:5px 0 0;padding:0;background:none;border:0;border-radius:0;color:#60778a;font-size:10px;font-weight:500;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.portal-header .top-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:auto;min-width:0;max-width:none;flex:initial}
.portal-header .top-actions .company-switch{display:flex;align-items:center;gap:5px;min-width:0;max-width:none;width:auto;padding:4px 5px 4px 10px;margin:0;border:1px solid #d2dfea;border-radius:10px;background:#fff;box-shadow:0 1px 2px #163e5910;flex:initial}
.portal-header .company-switch-label{flex:0 0 auto;margin:0;color:#60778a;font-size:9px;line-height:1;font-weight:700;letter-spacing:.7px;text-transform:uppercase}
.portal-header .company-switch select{flex:1 1 0;min-width:0;width:0;max-width:none;min-height:32px;height:32px;margin:0;border:0;box-shadow:none;background-color:transparent;color:#174d70;font-family:inherit;font-size:12px;font-weight:700;padding:5px 22px 5px 5px;text-overflow:ellipsis}
.portal-header .company-switch-actions,.portal-header .portal-utility-bar,.portal-header .portal-live-tools{display:flex;align-items:center;gap:4px;flex:0 0 auto;width:auto;min-width:0}
.portal-header .portal-utility-bar{gap:8px}
.portal-header .btn,.portal-header .company-switch .btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;min-width:34px;width:34px;height:34px;min-height:34px;padding:0;margin:0;border-radius:8px;font-size:13px;line-height:1;border:1px solid transparent;box-shadow:none}
.portal-header .btn.secondary{background:transparent;color:#3c647e}
.portal-header .btn.secondary:hover{background:#e1ecf4;color:#075f9b}
.portal-header .btn.primary{background:#e7f3fc;color:#0969a5;border-color:#d4e9f8}
.portal-header .btn.primary:hover{background:#d3eafb}
.portal-header button svg{width:18px;height:18px;flex:0 0 18px}
.portal-header .portal-refresh:disabled{opacity:.45}
.portal-header .portal-notification-toggle{position:relative;overflow:visible}
.portal-header #portal-notification-count{position:absolute;right:-2px;top:-3px;display:flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 3px;border-radius:9px;background:#d66b25;color:#fff;border:2px solid #eef4f8;font-size:9px;line-height:12px;font-variant-numeric:tabular-nums}
.portal-header #portal-notification-count[hidden]{display:none}
.portal-header .lang-switch{display:flex;gap:2px;flex:0 0 auto;padding:3px;border:1px solid #d6e2eb;border-radius:9px;background:#e3ecf3;box-shadow:none}
.portal-header .lang-switch button{display:flex;align-items:center;justify-content:center;width:29px;min-width:29px;height:28px;min-height:28px;padding:0;border:0;border-radius:6px;background:transparent;color:#5b7284;font-family:inherit;font-size:10px;font-weight:700;line-height:1}
.portal-header .lang-switch button.active{background:#fff;color:#075f9b;box-shadow:0 1px 3px #183e561c}
.portal-header .portal-logout{border-left:1px solid #d6e2eb;border-radius:0;margin-left:1px}
.portal-header button:focus-visible,.portal-header select:focus-visible{outline:2px solid #1684c8;outline-offset:2px}
.portal-sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media (min-width:961px) and (max-width:1179px){
  .portal-header.topbar{grid-template-columns:1fr;gap:10px;padding:12px 22px}
  .portal-header .topbar-title{display:flex;align-items:baseline;gap:12px}
  .portal-header .topbar-title h1{font-size:19px}
  .portal-header .user-badge{margin:0;max-width:45%}
}
@media (max-width:960px){
  .portal-header.topbar{grid-template-columns:44px minmax(0,1fr);gap:7px 10px;padding:10px 14px 9px;min-height:0;position:relative}
  .portal-header .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;border:1px solid #d4e2ec;border-radius:10px;background:#fff;color:#075f9b;font-size:19px}
  .portal-header .topbar-title{display:block;min-width:0}
  .portal-header .topbar-title h1{font-size:18px;line-height:1.25}
  .portal-header .user-badge{display:block;margin-top:3px;font-size:10px;max-width:100%}
  .portal-header .top-actions{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr);gap:6px;width:100%}
  .portal-header .top-actions .company-switch{width:100%;min-width:0;box-sizing:border-box;padding:2px 3px 2px 7px;gap:2px;border-radius:10px}
  .portal-header .company-switch-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
  .portal-header .company-switch select{height:44px;min-height:44px;font-size:16px;padding-left:2px}
  .portal-header .company-switch-actions{gap:1px}
  .portal-header .btn,.portal-header .company-switch .btn{width:44px;min-width:44px;flex-basis:44px;height:44px;min-height:44px}
  .portal-header .portal-utility-bar{width:100%;justify-content:flex-end;gap:10px}
  .portal-header .portal-live-tools{display:flex;grid-template-columns:none;width:auto;gap:3px;margin-right:auto}
  .portal-header .lang-switch{padding:2px;gap:1px}
  .portal-header .lang-switch button{width:44px;min-width:44px;height:44px;min-height:44px;font-size:11px}
  .portal-header #portal-notification-count{top:1px;right:1px}
  .portal-header .portal-logout{margin-left:0}
}
@media (max-width:359px){
  .portal-header.topbar{padding-left:10px;padding-right:10px}
  .portal-header .portal-utility-bar{gap:6px}
  .portal-header .topbar-title h1{font-size:17px}
}
@media print{.portal-header.topbar{display:none}}
