/* Shared public header: desktop navigation, compact tablet menu. */
dialog.cookie-consent{width:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;overflow-y:auto}
dialog.cookie-consent::backdrop{background:transparent}
@media (min-width: 681px) and (max-width: 1180px) {
  body:not(.client-auth-page):not(.home-page) > .page { padding-top: 126px; }
}

@media (max-width: 600px) {
  .privacy-page h1 { font-size: clamp(23px, 6vw, 30px); line-height: 1.2; hyphens: auto; }
  .privacy-page p { overflow-wrap: anywhere; }
}

@media (min-width: 1181px) {
  .topbar {
    grid-template-columns: 82px minmax(0, 1fr) max-content;
    column-gap: 14px;
  }

  .topbar .nav {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-self: stretch;
    justify-content: center;
    gap: clamp(3px, .7vw, 10px);
    overflow: hidden;
  }

  .topbar .nav a {
    flex: 0 1 auto;
    min-width: 0;
    padding-right: clamp(7px, .8vw, 12px);
    padding-left: clamp(7px, .8vw, 12px);
    font-size: clamp(12px, 1vw, 15px);
  }

  .topbar .header-actions {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    justify-self: end;
    min-width: 142px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,.08);
    isolation: isolate;
  }
}

@media (min-width: 681px) and (max-width: 1180px) {
  .topbar { display:grid; grid-template-columns:minmax(80px,1fr) auto 44px; gap:0 16px; align-items:center; height:auto; min-height:80px; padding:14px 18px; max-height:calc(100dvh - 36px); overflow-y:auto; box-sizing:border-box; }
  .topbar .brand { grid-column:1; grid-row:1; width:80px; height:50px; }
  .topbar .brand img { width:76px; height:50px; object-fit:contain; }
  .topbar .nav-toggle { display:block; position:relative; inset:auto; grid-column:3; grid-row:1; width:44px; height:44px; }
  .topbar .header-actions { grid-column:2; grid-row:1; justify-self:end; display:flex; flex-wrap:nowrap; gap:8px; width:auto; max-height:none; opacity:1; overflow:visible; padding:0; background:transparent; }
  .topbar .header-actions .icon-link { flex:0 0 44px; width:44px; height:44px; }
  .topbar .nav { grid-column:1/-1; grid-row:2; display:none; width:100%; gap:8px; padding:14px 0 0; margin-top:14px; border-top:1px solid rgba(255,255,255,.08); box-sizing:border-box; }
  .topbar.is-nav-open .nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); animation:tablet-menu-in .18s ease-out; }
  .topbar .nav a { display:flex; align-items:center; min-height:44px; padding:10px 14px; font-size:15px; box-sizing:border-box; }
  .topbar.is-nav-open .nav-toggle span:nth-child(1) { transform:translate(-50%,7px) rotate(45deg); }
  .topbar.is-nav-open .nav-toggle span:nth-child(2) { opacity:0; }
  .topbar.is-nav-open .nav-toggle span:nth-child(3) { transform:translate(-50%,-7px) rotate(-45deg); }
}
@keyframes tablet-menu-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { .topbar .nav { animation:none!important; transition:none!important; } }

@media (max-width: 680px) {
  .topbar {
    height: auto;
    min-height: 74px;
    max-height: calc(100dvh - 24px);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .topbar.is-nav-open {
    height: auto;
    padding-bottom: 14px;
  }

  .topbar .brand {
    flex: 0 0 auto;
  }

  .topbar .nav {
    box-sizing: border-box;
  }

  .topbar.is-nav-open .nav {
    max-height: 420px;
    overflow: visible;
  }

  .topbar .header-actions {
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }

  .topbar.is-nav-open .header-actions {
    max-height: 70px;
    overflow: visible;
    padding-top: 10px;
    padding-bottom: 2px;
  }

  .topbar .header-actions .icon-link {
    width: 100%;
    min-width: 0;
    height: clamp(42px, 12vw, 46px);
    min-height: 42px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    overflow: visible;
    padding: 0;
    font-size: clamp(18px, 6vw, 21px);
    line-height: 1;
  }

  .topbar .header-actions .icon-link > i {
    display: block;
    line-height: 1;
  }

  .topbar .header-client-avatar,
  .topbar .header-profile-letter {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
  }
}

@media (max-width: 420px) {
  .topbar {
    min-height: 68px;
    max-height: calc(100dvh - 16px);
  }

  .topbar .header-actions .icon-link {
    height: 42px;
  }
}

@media(max-width:680px){.topbar:not(.is-nav-open) .nav,.topbar:not(.is-nav-open) .header-actions{visibility:hidden}.topbar .header-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.topbar .header-actions:has(.board-chat-header-link){grid-template-columns:repeat(4,minmax(0,1fr))}}
