.top-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(220, 229, 255, 0.6);
  background: rgba(253, 247, 242, 0.82);
  backdrop-filter: blur(14px);
}

.top-header__inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.78rem;
}

.brand-mark__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-main);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-mark__text {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-mark__text strong {
  font-family: var(--font-heading);
  line-height: 1;
}

.brand-mark__text small {
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1;
}

.top-header__nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-5);
}

.top-header__nav a {
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

.top-header__nav a:hover {
  color: var(--brand-blue);
}

.top-header__actions {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
}

.top-header__search-wrap {
  flex: 1;
  max-width: 540px;
}

.top-header__search {
  width: 100%;
}

.dashboard-view .top-header .container {
  width: 100%;
}

.app-shell {
  width: var(--content-container);
  margin-inline: auto;
  min-height: 100vh;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: var(--space-5);
  padding: var(--space-5) 0 var(--space-8);
}

.app-shell[data-sidebar-state="collapsed"] {
  grid-template-columns: 1fr;
}

.app-shell[data-sidebar-state="collapsed"] .sidebar {
  display: none;
}

.app-shell__main {
  min-width: 0;
}

.app-shell__content-wrap {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.app-shell__content {
  display: grid;
  gap: var(--space-5);
}

.sidebar {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: grid;
  align-content: start;
  gap: var(--space-5);
  position: sticky;
  top: 1.25rem;
  height: calc(100vh - 2.5rem);
  overflow: auto;
}

.sidebar__label {
  color: var(--text-light);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.sidebar__title {
  margin-top: var(--space-1);
  font-size: 1.1rem;
}

.sidebar__nav {
  display: grid;
  gap: 0.4rem;
}

.sidebar__link {
  padding: 0.62rem 0.8rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.2s ease;
}

.sidebar__link:hover {
  background: rgba(244, 121, 32, 0.08);
  color: var(--brand-blue);
}

.sidebar__link.is-active {
  background: var(--gradient-main);
  color: #fff;
}

.sidebar__footer {
  padding: var(--space-4);
}

.page-hero {
  background: linear-gradient(135deg, rgba(244, 121, 32, 0.08), rgba(224, 85, 0, 0.11), rgba(30, 155, 42, 0.08));
  border: 1px solid rgba(244, 121, 32, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-5);
}

.page-hero h1 {
  font-size: clamp(1.55rem, 2.2vw, 2.3rem);
  margin-top: var(--space-2);
}

.page-hero__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.site-footer {
  padding: var(--space-8) 0 calc(var(--space-8) + 4rem);
  position: relative;
  z-index: 3;
}

.site-footer__inner {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-6);
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  align-items: center;
}

.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(253, 247, 242, 0), rgba(253, 247, 242, 0.85) 36%, rgba(253, 247, 242, 1));
  display: none;
}

.mobile-nav {
  position: fixed;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 35;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.mobile-nav__item {
  border: 0;
  background: transparent;
  border-radius: 14px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.6rem 0.35rem;
  text-align: center;
}

.mobile-nav__item.is-active,
.mobile-nav__item--action {
  background: var(--gradient-main);
  color: #fff;
}

/* Compact dashboard tuning */
.dashboard-view .top-header__inner {
  min-height: 70px;
}

.dashboard-view .brand-mark__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.dashboard-view .app-shell {
  grid-template-columns: 260px 1fr;
  gap: var(--space-4);
  padding: var(--space-4) 0 var(--space-6);
}

.dashboard-view .app-shell__content-wrap {
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.dashboard-view .app-shell__content {
  gap: var(--space-4);
}

.dashboard-view .sidebar {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  gap: var(--space-4);
}

.dashboard-view .sidebar__link {
  padding: 0.52rem 0.72rem;
  font-size: 0.92rem;
}

.dashboard-view .page-hero {
  padding: var(--space-5);
}

.dashboard-view .page-hero h1 {
  font-size: clamp(1.35rem, 1.75vw, 1.9rem);
}
