.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 var(--space-6);
  background-color: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: var(--letter-spacing-tight);
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
  color: var(--color-text-primary);
}

.logoIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--color-accent-600);
  color: var(--color-text-on-accent);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  overflow: hidden;
}

.breadcrumbSep {
  color: var(--color-neutral-400);
  flex-shrink: 0;
}

.breadcrumbLink {
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbLink:hover {
  color: var(--color-accent-600);
  text-decoration: none;
}

.breadcrumbCurrent {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.headerSpacer {
  flex: 1;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.headerBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  font-family: var(--font-family);
}

.headerBtn:hover {
  background-color: var(--color-bg-hover);
  color: var(--color-text-primary);
}

/* ── Body ── */

.body {
  flex: 1;
  display: flex;
}

/* ── Sidebar ── */

.sidebar {
  display: none;
  width: var(--sidebar-width);
  border-right: 1px solid var(--color-border);
  background-color: var(--color-bg-elevated);
  padding: var(--space-4) 0;
  flex-shrink: 0;
  position: relative;
  transition: width var(--transition-normal);
}

.sidebarCollapsed {
  width: 56px;
}

.sidebarToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 var(--space-3) var(--space-3) auto;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.sidebarToggle:hover {
  background-color: var(--color-bg-hover);
  color: var(--color-text-primary);
}

.sidebarCollapsed .sidebarToggle {
  margin: 0 auto var(--space-3) auto;
}

.navLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebarCollapsed .navLabel {
  display: none;
}

.sidebarCollapsed .navItem {
  justify-content: center;
  padding: var(--space-2);
}

.navItem {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-5);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background-color var(--transition-fast),
    color var(--transition-fast);
}

.navItem:hover {
  background-color: var(--color-bg-hover);
  color: var(--color-text-primary);
  text-decoration: none;
}

.navItemActive {
  color: var(--color-accent-700);
  background-color: var(--color-accent-50);
  font-weight: var(--font-weight-medium);
}

.navItemActive:hover {
  background-color: var(--color-accent-50);
  color: var(--color-accent-700);
}

.navIcon {
  font-size: var(--font-size-md);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* ── Content ── */

.content {
  flex: 1;
  min-width: 0;
  padding: var(--space-6);
  overflow: hidden;
}

.contentInner {
  width: 100%;
  height: 100%;
}

/* ── Bottom nav (mobile) ── */

.bottomNav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg-elevated);
  position: sticky;
  bottom: 0;
  z-index: var(--z-sticky);
}

.bottomNavItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.bottomNavItem:hover {
  text-decoration: none;
}

.bottomNavItemActive {
  color: var(--color-accent-600);
  font-weight: var(--font-weight-medium);
}

.bottomNavIcon {
  font-size: var(--font-size-lg);
}

/* ── Desktop ── */

@media (min-width: 768px) {
  .sidebar {
    display: block;
  }

  .bottomNav {
    display: none;
  }

  .content {
    padding: var(--space-8);
  }
}
