/* Sidebar & Shell Layout */
.app-shell {
  display: none;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--forest-950) 0%, var(--forest-900) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 200;
  border-right: 1px solid rgba(223, 192, 131, 0.22);
  transition: transform 0.24s ease;
}

.sidebar__brand {
  padding: 1.25rem 1.25rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  text-decoration: none;
  color: #fff;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(223, 192, 131, 0.55);
  padding: 6px;
  object-fit: contain;
}

.sidebar__title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.05;
}

.sidebar__sub {
  display: block;
  font-size: 0.67rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-top: 0.14rem;
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar__group-label {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.44);
  padding: 0.75rem 0.75rem 0.35rem;
}

.side-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.68rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.side-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.side-link.is-active {
  background: rgba(184, 146, 74, 0.2);
  border-color: rgba(223, 192, 131, 0.45);
  color: #fbe8be;
}

.side-link.is-active svg {
  opacity: 1;
  color: var(--gold-300);
}

.sidebar__footer {
  padding: 0.95rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.18);
}

.user-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.user-chip__email {
  font-size: 0.77rem;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip__role {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(184, 146, 74, 0.25);
  color: var(--gold-300);
  white-space: nowrap;
}

.sidebar__foot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.side-foot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.side-foot-btn:hover {
  background: rgba(255, 255, 255, 0.13);
}

/* Content Area */
.workspace {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-w));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.42rem 0.55rem;
  cursor: pointer;
  color: var(--forest-900);
}

.page-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--forest-900);
  margin: 0;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--canvas);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--forest-900);
}

.season-pill select {
  border: none;
  background: transparent;
  font-weight: 800;
  color: var(--forest-900);
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
}

.main-content {
  padding: 1.65rem 1.75rem 3.5rem;
  max-width: 1440px;
  width: 100%;
}

.view-section {
  display: none;
}

.view-section.is-active {
  display: block;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 28, 23, 0.55);
  z-index: 190;
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-backdrop.is-open {
    display: block;
  }
  .workspace {
    margin-left: 0;
    width: 100%;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .topbar {
    padding: 0 1rem;
  }
  .main-content {
    padding: 1.2rem 1rem 3rem;
  }
}
