/* Guscio dell'app: barra laterale con menu globale e menu del sito, barra alta con percorso. */

.app-layout {
  grid-template-columns: var(--ui-sidebar-width) minmax(0, 1fr);
}

.shell-sidebar {
  gap: var(--ui-space-3);
  padding: var(--ui-space-4) var(--ui-space-3);
  overflow-y: auto;
  font-family: var(--ui-font);
}

.shell-workspace {
  padding: var(--ui-space-2) var(--ui-space-3);
  background: var(--ui-surface-muted);
  border-radius: var(--ui-radius-sm);
}
.shell-workspace span {
  display: block;
  color: var(--ui-text-subtle);
  font-size: var(--ui-font-size-xs);
}
.shell-workspace strong,
.shell-workspace select {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--ui-text);
  font-size: var(--ui-font-size);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-workspace select {
  margin-top: 2px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.shell-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.shell-nav-section {
  margin: var(--ui-space-4) var(--ui-space-3) var(--ui-space-1);
  color: var(--ui-text-subtle);
  font-size: var(--ui-font-size-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.shell-nav-link {
  display: block;
  padding: 7px var(--ui-space-3);
  color: var(--ui-text-muted);
  font-size: var(--ui-font-size);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--ui-radius-sm);
}
.shell-nav-link:hover {
  color: var(--ui-text);
  background: var(--ui-surface-muted);
}
.shell-nav-link.is-active {
  color: var(--ui-primary-hover);
  background: var(--ui-primary-soft);
  font-weight: 600;
}
.shell-nav-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ui-focus);
}

.shell-site {
  margin: var(--ui-space-3) 0 var(--ui-space-1);
  padding: var(--ui-space-3) 0 var(--ui-space-2);
  border-top: 1px solid var(--ui-border);
  border-bottom: 1px solid var(--ui-border);
}
.shell-site-company {
  margin: 0 var(--ui-space-3);
  color: var(--ui-text-subtle);
  font-size: var(--ui-font-size-xs);
  font-weight: 600;
}
.shell-site-name {
  display: block;
  margin: 0 var(--ui-space-3) var(--ui-space-1);
  overflow: hidden;
  color: var(--ui-text);
  font-size: var(--ui-font-size-lg);
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shell-site .shell-nav-section {
  margin-top: var(--ui-space-3);
}

.shell-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-4);
  min-height: 56px;
  font-family: var(--ui-font);
}
.shell-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ui-space-2);
  min-width: 0;
  color: var(--ui-text-subtle);
  font-size: var(--ui-font-size);
}
.shell-breadcrumb a {
  color: var(--ui-text-muted);
  text-decoration: none;
}
.shell-breadcrumb a:hover {
  color: var(--ui-text);
}
.shell-breadcrumb [aria-current="page"] {
  color: var(--ui-text);
  font-weight: 600;
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .shell-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--ui-border);
  }
  .shell-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .shell-nav-section {
    width: 100%;
  }
  .shell-site {
    width: 100%;
  }
}
