.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 40; }
.brand { height: var(--topbar-height); padding: 0 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg,var(--brand),var(--brand-2)); color: #fff; font-weight: 900; letter-spacing: -.08em; box-shadow: 0 10px 24px rgba(91,140,255,.28); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 16px; letter-spacing: .02em; }
.brand-copy span { margin-top: 4px; color: var(--text-3); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.nav { padding: 18px 12px; overflow: auto; flex: 1; }
.nav-section + .nav-section { margin-top: 20px; }
.nav-label { display: block; padding: 0 12px 8px; color: var(--text-3); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-item { width: 100%; min-height: 42px; border: 0; background: transparent; color: var(--text-2); display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; cursor: pointer; text-align: left; transition: .16s ease; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { color: #fff; background: linear-gradient(90deg,rgba(91,140,255,.24),rgba(91,140,255,.08)); box-shadow: inset 3px 0 0 var(--brand); }
html[data-theme="light"] .nav-item.active { color: #2459c4; }
.nav-icon { width: 19px; height: 19px; display: grid; place-items: center; flex: 0 0 auto; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-count { margin-left: auto; min-width: 24px; padding: 2px 6px; text-align: center; border-radius: 99px; background: var(--surface-3); font-size: 10px; font-weight: 700; }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid var(--border); }
.plan-mini { margin: 0 4px 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.plan-mini > div:first-child { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2); }
.plan-mini strong { color: var(--text); }
.plan-mini small { display: block; color: var(--text-3); margin-top: 7px; }
.account-card { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; text-align: left; }
.account-card:hover { background: var(--surface-2); }
.account-copy { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.account-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-copy small { margin-top: 3px; color: var(--text-3); font-size: 10px; }
.chevron { color: var(--text-3); font-size: 20px; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { height: var(--topbar-height); position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; background: color-mix(in srgb,var(--bg) 86%,transparent); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 14px; }
.topbar h1 { margin: 0; font-size: 18px; letter-spacing: -.015em; }
.topbar p { margin: 4px 0 0; color: var(--text-3); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.page-container { padding: 24px 28px 48px; max-width: 1800px; margin: 0 auto; }
.page { display: none; }
.page.active { display: block; animation: pageIn .18s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(3px);} to { opacity: 1; transform: none;} }
.mobile-menu { display: none !important; }
.sidebar-backdrop, .drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.52); opacity: 0; pointer-events: none; transition: .2s; z-index: 35; }
.detail-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px,92vw); background: var(--surface); border-left: 1px solid var(--border); z-index: 70; transform: translateX(100%); transition: .24s ease; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.detail-drawer.open { transform: translateX(0); }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; z-index: 65; }
.drawer-head { padding: 22px 22px 16px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 5px 0 4px; font-size: 22px; }
.drawer-head p { margin: 0; color: var(--text-3); font-size: 12px; }
.drawer-status { display: flex; gap: 16px; align-items: center; padding: 14px 22px; color: var(--text-2); font-size: 12px; border-bottom: 1px solid var(--border); }
.drawer-body { padding: 20px 22px 90px; overflow: auto; }
.drawer-footer { position: absolute; inset: auto 0 0; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; background: var(--surface); border-top: 1px solid var(--border); }
.prototype-badge { position: fixed; right: 14px; bottom: 12px; z-index: 90; padding: 6px 9px; border-radius: 7px; background: rgba(0,0,0,.72); color: rgba(255,255,255,.7); font-size: 9px; letter-spacing: .08em; pointer-events: none; }
@media (max-width: 1100px) {
  .sidebar { transform: translateX(-100%); transition: .22s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: grid !important; }
}
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 68px; padding: 12px 16px; }
  .topbar p { display: none; }
  .env-switcher, .topbar-actions .compact span:last-child { display: none; }
  .page-container { padding: 16px; }
  .prototype-badge { display: none; }
}
