/*!
 * Icon glyphs subset from Bootstrap Icons v1.11.3
 * Copyright 2019-2024 The Bootstrap Authors, MIT Licence
 * https://github.com/twbs/icons/blob/main/LICENSE
 */

@font-face {
  font-family: "AffixNavIcons";
  src: url("/fonts/affix-nav-icons.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --icon-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M15 14s1 0 1-1-1-4-5-4-5 3-5 4 1 1 1 1h8Zm-7.978-1L7 12.996c.001-.264.167-1.03.76-1.72C8.312 10.629 9.282 10 11 10c1.717 0 2.687.63 3.24 1.276.593.69.758 1.457.76 1.72l-.008.002-.014.002H7.022ZM11 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm3-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0ZM6.936 9.28a5.88 5.88 0 0 0-1.23-.247A7.35 7.35 0 0 0 5 9c-4 0-5 3-5 4 0 .667.333 1 1 1h4.216A2.238 2.238 0 0 1 5 13c0-1.01.377-2.042 1.09-2.904.243-.294.526-.569.846-.816ZM4.92 10A5.493 5.493 0 0 0 4 13H1c0-.26.164-1.03.76-1.724.545-.636 1.492-1.256 3.16-1.275ZM1.5 5.5a3 3 0 1 1 6 0 3 3 0 0 1-6 0Zm3-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/svg%3E");
  --icon-billing: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M0 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm2-1a1 1 0 0 0-1 1v1h14V4a1 1 0 0 0-1-1H2zm13 4H1v5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V7z'/%3E%3C/svg%3E");
  --icon-admin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872l-.1-.34zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z'/%3E%3C/svg%3E");
}

.header-nav {
  display: none;
  align-items: center;
  gap: 2px;
}

@media (min-width: 720px) {
  .header-nav {
    display: inline-flex;
  }
}

.header-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.header-nav a[hidden] {
  display: none;
}

.header-nav a::before {
  font-family: "AffixNavIcons";
  font-weight: 400;
  font-style: normal;
  font-variant: normal;
  font-size: 19px;
  line-height: 1;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.header-nav a[data-nav="stats"]::before {
  content: "\f17e";
}

.header-nav a[data-nav="credentials"]::before {
  content: "\f44f";
}

.header-nav a[data-nav="billing"]::before {
  content: "";
  width: 19px;
  height: 19px;
  background-color: currentColor;
  -webkit-mask: var(--icon-billing) center / 19px 19px no-repeat;
  mask: var(--icon-billing) center / 19px 19px no-repeat;
}

.header-nav a[data-nav="webhooks"]::before {
  content: "\f1d6";
}

.header-nav a[data-nav="export"]::before {
  content: "\f30a";
}

.header-nav a[data-nav="sso"]::before {
  content: "\f538";
}

.header-nav a[data-nav="analytics"]::before {
  content: "\f3ee";
}

.header-nav a[data-nav="users"]::before {
  content: "";
  width: 19px;
  height: 19px;
  background-color: currentColor;
  -webkit-mask: var(--icon-users) center / 19px 19px no-repeat;
  mask: var(--icon-users) center / 19px 19px no-repeat;
}

.header-nav a[data-nav="admin"]::before {
  content: "";
  width: 19px;
  height: 19px;
  background-color: currentColor;
  -webkit-mask: var(--icon-admin) center / 19px 19px no-repeat;
  mask: var(--icon-admin) center / 19px 19px no-repeat;
}

.header-nav a[data-nav="account"]::before {
  content: "\f4d7";
}

.header-nav a:hover {
  color: var(--color-text);
  background: var(--color-accent-soft);
}

.header-nav a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.header-nav a.is-active {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.header-nav .nav-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--color-text);
  color: var(--color-surface);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .header-nav .nav-label {
    transition: opacity 120ms ease;
  }
}

.header-nav a:hover .nav-label,
.header-nav a:focus-visible .nav-label {
  opacity: 1;
}

.btn-nav-toggle {
  display: none;
}

.nav-backdrop {
  display: none;
}

@media (max-width: 719px) {
  .btn-nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    border: 1px solid var(--color-border, #e5e2dc);
    border-radius: 10px;
    background: var(--color-surface, #fff);
    color: var(--color-text, #1a1a1a);
    font-family: var(--font, "Inter", sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
  }

  .btn-nav-toggle:focus-visible {
    outline: 2px solid var(--color-accent, #1f4b7a);
    outline-offset: 2px;
  }

  .btn-nav-toggle:not(.is-hidden) {
    display: inline-flex;
  }

  .nav-toggle-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 14px;
  }

  .nav-toggle-icon span {
    display: block;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transform-origin: center;
  }

  @media (prefers-reduced-motion: no-preference) {
    .nav-toggle-icon span {
      transition: transform 140ms ease, opacity 140ms ease;
    }
  }

  body.hub-nav-open .nav-toggle-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.hub-nav-open .nav-toggle-icon span:nth-child(2) {
    opacity: 0;
  }

  body.hub-nav-open .nav-toggle-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  body.hub-nav-open {
    overflow: hidden;
  }

  body.hub-nav-open .header-nav:not(.is-hidden) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: var(--header-h, 60px);
    left: 0;
    right: 0;
    z-index: 39;
    max-height: calc(100dvh - var(--header-h, 60px));
    overflow-y: auto;
    padding: 8px;
    gap: 2px;
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border, #e5e2dc);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.06);
  }

  body.hub-nav-open .header-nav a {
    width: auto;
    height: auto;
    min-height: 48px;
    justify-content: flex-start;
    padding: 0 16px;
    gap: 14px;
  }

  body.hub-nav-open .header-nav .nav-label {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: normal;
  }

  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 38;
    background: rgba(26, 26, 26, 0.28);
  }
}

.session-meta {
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}

@media (min-width: 560px) {
  .session-meta {
    display: flex;
  }
}

.session-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.session-chip {
  max-width: 30ch;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .session-chip {
    max-width: 18ch;
  }
}
