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

.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar);
  color: #cbd5e1;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease;
}

.app-main {
  margin-left: var(--sidebar-width);
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
}

.topbar {
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.main-content {
  padding: 28px;
  max-width: 1800px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 18px 24px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(79, 70, 229, .3);
}

.brand-name {
  color: #fff;
  font: 800 17px Manrope, sans-serif;
  letter-spacing: -.02em;
}

.brand-sub {
  color: #8492a8;
  font-size: 10px;
  margin-top: 1px;
}

.nav {
  padding: 0 12px;
  flex: 1;
}

.nav-section {
  padding: 14px 10px 8px;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #718096;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #aeb9ca;
  margin: 2px 0;
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--color-sidebar-soft);
  color: #fff;
}

.nav-link.active {
  background: rgba(99, 102, 241, .16);
  color: #fff;
  box-shadow: inset 3px 0 0 #818cf8;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex: none;
  display: grid;
  place-items: center;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.user-mini {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 10px;
}

.user-mini:hover {
  background: var(--color-sidebar-soft);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #818cf8, #4338ca);
  color: #fff;
  font-weight: 700;
  flex: none;
}

.avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

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

.page-title p {
  margin-top: 7px;
  color: var(--color-text-secondary);
}

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

.search-wrap {
  position: relative;
  width: min(360px, 38vw);
}

.search-wrap input {
  width: 100%;
  padding: 10px 38px 10px 38px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 100;
}