/* One full-width vintage navigation shared by every application page. */
body[class] .topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: grid;
  width: 100%;
  height: 72px;
  min-height: 72px;
  flex: 0 0 72px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  margin: 0;
  left: auto;
  padding: 0 clamp(18px, 4vw, 56px);
  transform: none;
  border: 0;
  border-bottom: 1px solid rgba(245, 239, 229, 0.15);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f5efe5;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[class] header.topbar {
  height: 72px;
  min-height: 72px;
}

body #topbar {
  height: 72px;
  min-height: 72px;
}

body[class] .brand-logo {
  width: max-content;
  gap: 10px;
  color: #f5efe5;
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

body[class] .brand-logo:hover {
  opacity: 1;
}

body[class] .brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(245, 239, 229, 0.62);
  border-radius: 50%;
  color: #f5efe5;
}

body[class] .brand-mark .lucide {
  width: 17px;
  height: 17px;
}

body[class] .nav {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.5vw, 34px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  visibility: visible;
  transform: none;
}

body[class] .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  border-radius: 0;
  background: none;
  color: rgba(245, 239, 229, 0.78);
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  white-space: nowrap;
}

body[class] .nav-link:hover,
body[class] .nav-link.active {
  background: none;
  color: #fffaf3;
}

body[class] .nav-link.active {
  font-weight: 600;
}

body[class] .nav-link.active::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: #c9a875;
  content: '';
}

body[class] .nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body[class] .nav-start {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(245, 239, 229, 0.7);
  border-radius: 4px;
  background: transparent;
  color: #fffaf3;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

body[class] .nav-start:hover {
  border-color: #f5efe5;
  background: #f5efe5;
  color: #2b0910;
}

body[class] .nav-start .lucide {
  width: 14px;
  height: 14px;
}

body[class] .nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 239, 229, 0.38);
  border-radius: 4px;
  background: rgba(245, 239, 229, 0.08);
  color: #f5efe5;
}

body[class] .nav-toggle:hover {
  background: rgba(245, 239, 229, 0.16);
}

@media (max-width: 760px) {
  body[class] .topbar {
    height: 64px;
    min-height: 64px;
    flex-basis: 64px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  body[class] header.topbar {
    height: 64px;
    min-height: 64px;
  }

  body #topbar {
    height: 64px;
    min-height: 64px;
  }

  body[class] .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border: 1px solid rgba(245, 239, 229, 0.18);
    border-radius: 8px;
    background: rgba(43, 9, 16, 0.97);
    box-shadow: 0 12px 28px rgba(25, 6, 10, 0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  body[class] .nav.is-open {
    display: flex;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  body[class] .nav-link {
    padding: 10px 12px;
  }

  body[class] .nav-link.active::after {
    right: 12px;
    bottom: 7px;
    left: auto;
    width: 20px;
  }

  body[class] .nav-toggle {
    display: inline-flex;
  }

  body[class] .nav-start {
    min-height: 34px;
    padding: 0 10px;
  }

  body.nav-open .topbar {
    border-bottom-color: rgba(245, 239, 229, 0.24);
  }
}

@media (max-width: 360px) {
  body[class] .topbar {
    padding-right: 10px;
    padding-left: 10px;
  }

  body[class] .brand-logo {
    gap: 7px;
    font-size: 1.15rem;
  }

  body[class] .brand-mark {
    width: 30px;
    height: 30px;
  }

  body[class] .nav-actions {
    gap: 6px;
  }

  body[class] .nav-start {
    gap: 5px;
    padding: 0 7px;
  }
}

@media print {
  body .topbar {
    display: none !important;
  }
}
