.ash-app-page {
  --headerH: 74px;
}

.ash-app-header {
  align-items: center;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid rgba(47, 36, 29, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #241c16;
  display: flex;
  height: var(--headerH);
  justify-content: center;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .ash-app-header {
  background: rgba(35, 23, 16, 0.96);
  border-bottom-color: rgba(232, 223, 212, 0.14);
  color: #f0ebe3;
}

.ash-app-header__inner {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  height: 100%;
  max-width: 1220px;
  width: 100%;
}

.ash-app-logo {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.ash-app-logo img {
  display: block;
  height: 46px;
  object-fit: contain;
  width: 46px;
}

.ash-app-logo__text {
  display: grid;
  line-height: 1.05;
}

.ash-app-logo__name {
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.ash-app-logo__sub {
  color: #75685e;
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  white-space: nowrap;
}

[data-theme="dark"] .ash-app-logo__sub {
  color: #b09a8e;
}

.ash-app-nav {
  align-items: center;
  display: flex;
  gap: 2px;
  justify-content: center;
  min-width: 0;
}

.ash-app-nav a {
  border-radius: 8px;
  color: inherit;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 12px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.ash-app-nav a:hover,
.ash-app-nav a:focus-visible,
.ash-app-nav a[aria-current="page"] {
  background: rgba(98, 58, 37, 0.1);
  outline: 0;
}

[data-theme="dark"] .ash-app-nav a:hover,
[data-theme="dark"] .ash-app-nav a:focus-visible,
[data-theme="dark"] .ash-app-nav a[aria-current="page"] {
  background: rgba(185, 121, 56, 0.18);
}

.ash-app-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.ash-app-action,
.ash-app-menu-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(47, 36, 29, 0.14);
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 7px;
  justify-content: center;
  min-height: 40px;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.ash-app-action:hover,
.ash-app-action:focus-visible,
.ash-app-menu-toggle:hover,
.ash-app-menu-toggle:focus-visible {
  background: rgba(98, 58, 37, 0.1);
  border-color: rgba(47, 36, 29, 0.28);
  outline: 0;
}

.ash-app-menu-toggle {
  display: none;
}

.ash-app-menu-toggle__icon {
  display: grid;
  gap: 4px;
  width: 18px;
}

.ash-app-menu-toggle__icon span {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
}

@media (max-width: 1080px) {
  .ash-app-page {
    --headerH: 64px;
  }

  .ash-app-header {
    padding: 0 12px;
  }

  .ash-app-header__inner {
    gap: 10px;
    grid-template-columns: auto 1fr auto;
    position: relative;
  }

  .ash-app-logo img {
    height: 40px;
    width: 40px;
  }

  .ash-app-logo__name {
    font-size: 14px;
  }

  .ash-app-logo__sub {
    display: none;
  }

  .ash-app-menu-toggle {
    display: inline-flex;
  }

  .ash-app-nav {
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid rgba(47, 36, 29, 0.12);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 18px 35px rgba(40, 32, 23, 0.16);
    display: none;
    flex-direction: column;
    gap: 0;
    left: -12px;
    padding: 8px;
    position: absolute;
    right: -12px;
    top: 100%;
  }

  [data-theme="dark"] .ash-app-nav {
    background: rgba(35, 23, 16, 0.98);
    border-color: rgba(232, 223, 212, 0.14);
  }

  .ash-app-header.is-open .ash-app-nav {
    display: flex;
  }

  .ash-app-nav a {
    border-radius: 8px;
    justify-content: space-between;
    padding: 14px 12px;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .ash-app-action--optional {
    display: none;
  }

  .ash-app-logo__name {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ash-app-actions {
    gap: 6px;
  }

  .ash-app-action,
  .ash-app-menu-toggle {
    min-height: 38px;
    padding: 8px 10px;
  }
}
