.accounting-header__grid {
  min-height: auto;
  padding: 0.45rem 0.65rem 0.6rem;
  grid-template-columns: 46px 46px minmax(0, 1fr) 46px 46px;
  grid-template-rows: auto auto;
  column-gap: 0.45rem;
  row-gap: 0.45rem;
}

.accounting-nav-toggle {
  grid-column: 1;
  grid-row: 1;
  display: inline-grid;
}

.accounting-brand {
  grid-column: 3;
  grid-row: 1;
}

.accounting-brand__mark {
  width: 116px;
  height: auto;
}

.accounting-header__actions {
  grid-column: 4 / 6;
  grid-row: 1;
}

.header-help {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
}

.header-help span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.accounting-search-row {
  grid-column: 1 / 6;
  grid-row: 2;
  width: 100%;
}

.accounting-search {
  min-height: 42px;
}

.accounting-navigation-shell {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-sidebar);
  width: min(88vw, 350px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 0.85rem 1rem;
  border-right: 1px solid var(--color-line);
  background: linear-gradient(180deg, #fbfdff, #edf6fb);
  box-shadow: 22px 0 55px rgba(29, 68, 95, 0.22);
  transform: translateX(-105%);
  transition: transform 0.24s;
}

.accounting-navigation-shell.is-open {
  transform: none;
}

body.is-nav-open .accounting-header {
  z-index: calc(var(--z-sidebar) + 1);
}

body.is-nav-open .accounting-header__grid > :not(.accounting-navigation-shell) {
  pointer-events: none;
}

body.is-nav-open .accounting-navigation-shell {
  pointer-events: auto;
}

.accounting-navigation-shell__header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--color-line);
}

.accounting-header__controls {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 0.25rem;
}

.accounting-nav {
  order: 2;
  width: 100%;
  display: grid;
  gap: 0.45rem;
  justify-content: stretch;
}

.accounting-nav__form {
  width: 100%;
}

.accounting-nav__button {
  width: 100%;
  min-height: 44px;
  text-align: left;
}

html[data-theme="dark"] .accounting-navigation-shell {
  background: var(--color-shell);
}


.help-sidebar {
  width: min(94vw, 430px);
}

.accounting-ai-visual {
  width: min(52vw, 160px);
}

@media (max-width: 360px) {
  .accounting-header__grid {
    padding-inline: .4rem;
    grid-template-columns: 40px 40px minmax(0, 1fr) 40px 40px;
    column-gap: .25rem;
  }

  .accounting-brand__mark {
    width: min(100%, 96px);
  }

  .header-help {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }
}
