.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar,
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  color: #fff;
  background: linear-gradient(180deg, var(--navy) 0%, #08112a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 18px;
  margin-bottom: 10px;
}

.brand-badge,
.sidebar-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 900;
}

.brand-text,
.sidebar-brand-copy {
  min-width: 0;
}

.brand-title,
.sidebar-brand-title {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.brand-subtitle,
.sidebar-brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.nav-link,
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-link:hover,
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(1px);
}

.nav-link.active,
.sidebar-link.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.2);
}

.sidebar-section,
.sidebar-mode,
.sidebar-footer {
  margin-top: 26px;
  padding: 0 8px;
}

.sidebar-label,
.sidebar-mode-label {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.mode-pill,
.sidebar-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.mode-pill,
.sidebar-mode-pill {
  background: #dcfce7;
  color: #166534;
}

.mode-pill.sim {
  background: #e0e7ff;
  color: #3730a3;
}

.sidebar-mode-pill {
  background: #e0e7ff;
  color: #3730a3;
}

.sidebar-footer-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-footer-link:hover {
  color: #ffffff;
}

.main,
.app-main {
  min-width: 0;
  padding: 28px 28px 40px;
}

.demo-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: #ffffff;
  border: 1px solid #d9e1ef;
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.demo-banner-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #64748b;
}

.demo-banner-text {
  margin-top: 6px;
  color: #475569;
  font-size: 15px;
}

.demo-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--muted);
}

.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 900;
  color: var(--text);
}

.page-subtitle {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .app-sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .main,
  .app-main {
    padding: 18px;
  }

  .demo-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
