.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  width: var(--sidebar-width); background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; transition: transform var(--ease), width var(--ease);
}
.brand {
  height: var(--topbar-height); display: flex; align-items: center; gap: 10px;
  padding: 0 20px; border-bottom: 1px solid var(--border);
}
.brand-mark {
  position: relative; width: 28px; height: 28px; border-radius: 50%;
  background: conic-gradient(from 10deg, #2db5ec, #5a73ff, #6a4bff, #2db5ec);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.2);
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 17px; height: 7px;
  border-radius: 999px; background: white; transform: translate(-50%,-50%) rotate(35deg); opacity: .92;
}
.brand-mark::after { transform: translate(-50%,-50%) rotate(-35deg); }
.brand-copy { min-width: 0; display: flex; align-items: baseline; gap: 4px; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.03em; color: #395bd8; }
.brand-tier { font-size: 12px; font-weight: 650; color: var(--text-soft); }
.sidebar-scroll { flex: 1; overflow: auto; padding: 10px 10px 24px; scrollbar-width: thin; }
.sidebar-footer { padding: 10px; border-top: 1px solid var(--border); }
.nav-section { margin: 2px 0 4px; }
.nav-section-title, .nav-subitem {
  width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 10px; min-height: 38px; border-radius: 9px;
  color: var(--text-soft); transition: background var(--ease), color var(--ease), transform var(--ease);
}
.nav-section-title { padding: 0 10px; font-size: 12.5px; font-weight: 750; }
.nav-section-title:hover, .nav-subitem:hover { background: var(--surface-hover); color: var(--primary-strong); }
.nav-section-title.active, .nav-subitem.active { background: var(--primary-soft); color: var(--primary-strong); }
.nav-section-title .nav-number { color: var(--muted); font-size: 11px; min-width: 13px; }
.nav-section-title .nav-label { flex: 1; }
.nav-chevron { margin-left: auto; transition: transform var(--ease); }
.nav-section.open .nav-chevron { transform: rotate(180deg); }
.nav-children { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--ease); }
.nav-section.open .nav-children { grid-template-rows: 1fr; }
.nav-children-inner { overflow: hidden; }
.nav-subitem { padding: 0 10px 0 40px; font-size: 12px; min-height: 31px; }
.nav-subitem .icon { margin-left: -20px; }
.topbar {
  position: fixed; inset: 0 0 auto var(--sidebar-width); z-index: 40; height: var(--topbar-height);
  background: rgba(255,255,255,.94); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px;
  padding: 0 20px; transition: left var(--ease);
}
.workspace-switcher {
  min-width: 220px; max-width: 280px; display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  cursor: pointer; box-shadow: var(--shadow-xs);
}
.workspace-avatar {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 12px; background: linear-gradient(135deg,#725cff,#4857de);
}
.workspace-copy { min-width: 0; flex: 1; line-height: 1.15; }
.workspace-copy strong { display: block; font-size: 12px; }
.workspace-copy span { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.global-search {
  margin: 0 auto; width: min(390px, 36vw); height: 38px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-subtle); color: var(--muted);
  display: flex; align-items: center; gap: 9px; padding: 0 12px; cursor: pointer;
}
.global-search span { flex: 1; text-align: left; font-size: 12px; }
.kbd { font-size: 10px; line-height: 1; padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; background: white; color: var(--faint); }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.icon-button {
  position: relative; width: 38px; height: 38px; border: 0; border-radius: 10px;
  display: grid; place-items: center; background: transparent; cursor: pointer; color: var(--text-soft);
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.icon-button:hover { background: var(--surface-muted); color: var(--primary); }
.icon-button:active { transform: scale(.96); }
.notification-dot {
  position: absolute; right: 3px; top: 1px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: white; display: grid; place-items: center;
  font-size: 9px; font-weight: 800; border: 2px solid white;
}
.user-menu-button {
  border: 0; background: transparent; display: flex; align-items: center; gap: 9px;
  padding: 4px 7px; border-radius: 10px; cursor: pointer;
}
.user-menu-button:hover { background: var(--surface-muted); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  color: white; font-size: 11px; font-weight: 800; background: linear-gradient(135deg,#20345f,#7454be);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.avatar.small { width: 26px; height: 26px; font-size: 9px; }
.avatar.tiny { width: 21px; height: 21px; font-size: 8px; }
.user-copy { text-align: left; line-height: 1.18; }
.user-copy strong { display: block; font-size: 11.5px; }
.user-copy span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.mobile-nav-button { display: none; }
.main-wrap { margin-left: var(--sidebar-width); padding-top: var(--topbar-height); min-height: 100vh; transition: margin-left var(--ease); }
.main-content { padding: 18px 20px 32px; min-height: calc(100vh - var(--topbar-height)); }
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px;
}
.page-title h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.035em; }
.page-title p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.content-grid { display: grid; gap: 14px; }
.content-grid.two { grid-template-columns: minmax(0,1fr) minmax(300px,.7fr); }
.content-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.content-grid.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.content-grid.six { grid-template-columns: repeat(6,minmax(0,1fr)); }
.section-stack { display: grid; gap: 14px; }
.drawer-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(13,20,41,.18); backdrop-filter: blur(2px); }
.drawer {
  position: fixed; z-index: 71; right: 0; top: 0; bottom: 0; width: min(420px, 94vw);
  background: white; box-shadow: var(--shadow-lg); overflow: auto; animation: drawer-in .22s ease-out;
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.popover {
  position: fixed; z-index: 90; min-width: 220px; padding: 8px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lg);
  animation: pop-in .14s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.popover-item {
  width: 100%; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center;
  gap: 9px; padding: 9px 10px; border-radius: 8px; font-size: 12px; text-align: left;
}
.popover-item:hover { background: var(--surface-muted); }
