/* The signed-in shell (sidebar and top bar), restyled from the styleguide
   (styleguides/bite/projects-index.html + style.css). Only the look changes: the
   fixed sidebar, the mobile drawer and the page flow still come from application.css.
   Every rule is scoped under .app-shell, and the tokens are --sg-* so they cannot
   collide with the application's own. */
.app-shell{
  --sg-accent:#2093df;--sg-accent-dark:#0f6398;--sg-accent-mid:#93d4ff;--sg-accent-pale:#eaf6ff;--sg-ink:#292b31;--sg-muted:#595d6c;--sg-faint:#75798c;
  --sg-border-light:#e4e7f5;--sg-surface:#f7f9fc;--sg-navy:#172c43;--sg-radius:8px;
  --sg-shadow:0 1px 2px rgba(23,44,67,.06),0 6px 20px rgba(23,44,67,.06);
  --sg-sans:"Inter",system-ui,sans-serif;--sg-display:"Afacad","Inter",system-ui,sans-serif;
  --sidebar:264px;
}

/* sidebar */
.app-shell .sidebar{gap:20px;padding:20px 16px;border-right:1px solid var(--sg-border-light);background:var(--sg-surface);font-family:var(--sg-sans)}
.app-shell .sidebar .brand{margin-left:0;gap:10px;color:var(--sg-navy);font:600 22px var(--sg-display);letter-spacing:-.02em}
.app-shell .sidebar .brand:hover{text-decoration:none}
.app-shell .sidebar .brand-mark{display:inline-flex;width:auto;height:auto;border-radius:0;background:none;color:var(--sg-accent);transform:none}
.app-shell .sidebar .brand-mark svg{transform:none;width:30px;height:30px}
.app-shell .sidebar .brand-period{color:var(--sg-accent)}
.app-shell .workspace{gap:10px;padding:10px;border:1px solid var(--sg-border-light);border-radius:12px;background:#fff;color:var(--sg-ink)}
.app-shell .workspace:hover{border-color:var(--sg-accent-mid);background:#fff;text-decoration:none}
.app-shell .workspace strong{font-size:14px;font-weight:600;line-height:1.2}
.app-shell .workspace small{color:var(--sg-faint);font-size:12px}
.app-shell .workspace-icon{width:34px;height:34px;border-radius:9px;background:var(--sg-navy);color:#fff;font:600 15px var(--sg-display)}
.app-shell .workspace-arrow{color:var(--sg-faint);font-size:16px}
.app-shell .nav-label{margin:0 8px 6px;padding:0;color:var(--sg-faint);font-size:11px;font-weight:600;letter-spacing:.08em}
.app-shell .nav-list{gap:2px}
.app-shell .nav-item{min-height:0;padding:8px 10px;border-radius:var(--sg-radius);color:#3f424d;font-size:14px;font-weight:500}
.app-shell .nav-item:hover{background:#fff;color:var(--sg-ink)}
.app-shell .nav-item.active,.app-shell .nav-item[aria-current="page"]{background:#fff;color:var(--sg-accent-dark);font-weight:500;box-shadow:inset 3px 0 0 var(--sg-accent),var(--sg-shadow)}
.app-shell .nav-count{padding:0 8px;border:1px solid var(--sg-border-light);border-radius:999px;background:#fff;color:var(--sg-faint);font-size:12px}
.app-shell .sidebar-bottom{gap:8px}
.app-shell .profile{padding:8px;border-top:0;border-radius:var(--sg-radius);color:var(--sg-ink)}
.app-shell .identity-copy strong{font-size:14px;font-weight:600;line-height:1.2}
.app-shell .identity-copy small{color:var(--sg-faint);font-size:12px;line-height:1.2}

/* top bar and page area */
.app-shell .app-main{background:#fff}
.app-shell .topbar{position:sticky;top:0;z-index:5;height:auto;min-height:0;padding:14px 32px;border-bottom:1px solid var(--sg-border-light);background:#fff}
.app-shell .breadcrumbs{gap:8px;color:var(--sg-faint);font-size:14px}
.app-shell .breadcrumbs strong{color:var(--sg-ink);font-weight:500}
.app-shell .topbar-right{gap:12px}
.app-shell .topbar-right .eyebrow{margin:0;color:var(--sg-faint);font-size:12px;font-weight:600;letter-spacing:.08em}

/* avatars in the shell, and the user block at the foot of the sidebar */
.app-shell .topbar .avatar,.app-shell .profile .avatar{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;background:var(--sg-accent-pale,#eaf6ff);color:var(--sg-accent-dark);font:600 11px var(--sg-sans)}
.app-shell .topbar .avatar-agent,.app-shell .profile .avatar-agent{border-radius:9px;background:#ece8ff;color:#5b3fd1}
.app-shell .profile{display:flex;align-items:center;gap:10px}

/* type, matching the styleguide's base (15px / 1.6) */
.app-shell .sidebar,.app-shell .topbar{color:var(--sg-ink);font-size:15px;line-height:1.6}
.app-shell .workspace strong,.app-shell .identity-copy strong{font-weight:700}
.app-shell .workspace small{display:inline}
.app-shell .topbar-right .eyebrow{text-transform:uppercase}
.app-shell .topbar .avatar,.app-shell .profile .avatar{width:34px;height:34px;border:2px solid #fff;font-size:12px}

/* The drawer's backdrop stays out of the way until the drawer is open (on phones the
   mobile rule in application.css made it display:block even while [hidden]). */
.app-shell .nav-backdrop[hidden]{display:none}

/* Phones: the top bar runs edge to edge (the content area has its own padding). */
@media (max-width:600px){
  .app-shell .app-main{padding:0}
  .app-shell .topbar{padding:12px 16px}
}

/* The drawer's menu and close buttons have an icon but nothing sized it. */
.app-shell .topbar .icon,.app-shell .nav-close .icon{width:20px;height:20px;flex:none}
.app-shell .topbar > .row{display:flex;align-items:center;gap:8px;min-width:0}
/* User menu in the sidebar footer (replaces the top-right avatar). */
.app-shell .user-menu{position:relative}
.app-shell .user-menu summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px}
.app-shell .user-menu summary::-webkit-details-marker{display:none}
.app-shell .user-menu summary:hover,.app-shell .user-menu[open] summary{background:#fff}
.app-shell .user-menu .chev{width:16px;height:16px;color:var(--sg-faint);margin-left:auto;transition:transform .15s}.app-shell .user-menu[open] .chev{transform:rotate(180deg)}
.app-shell .user-pop{position:absolute;left:0;right:0;bottom:calc(100% + 6px);background:#fff;border:1px solid var(--sg-border);border-radius:12px;box-shadow:0 18px 44px rgba(23,44,67,.22);padding:6px;z-index:20;display:grid}
.app-shell .user-pop a,.app-shell .user-pop button{display:block;width:100%;text-align:left;padding:8px 10px;border:0;border-radius:8px;background:none;color:var(--sg-ink);font:inherit;font-size:14px;cursor:pointer;text-decoration:none}
.app-shell .user-pop a:hover,.app-shell .user-pop button:hover{background:var(--sg-surface,#f7f9fc)}
.app-shell .user-pop form{margin:0}
.app-shell .user-pop-head{padding:8px 10px 10px;border-bottom:1px solid var(--sg-border-light);margin-bottom:4px}.app-shell .user-pop-head strong{display:block;font-size:14px;line-height:1.2}.app-shell .user-pop-head small{color:var(--sg-faint);font-size:12px;word-break:break-all}
