/* Weio app-shell sidebar — persistent left nav on signed-in workspace pages.
   Injected by weio-sidebar.js; pairs with the existing chat sidebar styling. */
.weio-shell {
  position: fixed; top: 0; left: 0; bottom: 0; width: 268px; z-index: 150;
  background: var(--surface, #fff); border-right: 1px solid var(--border, #e8e3dc);
  display: flex; flex-direction: column; overflow: hidden;
}
body.has-shell { padding-left: 268px; }
body.has-shell .nav { display: none; }   /* sidebar carries nav on app pages */

.shell-top { padding: 14px 14px 8px; }
.shell-brand { display: inline-flex; align-items: baseline; margin-bottom: 12px; text-decoration: none; }
.shell-newchat {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 10px; border-radius: 12px; background: var(--accent, #c8643c); color: #fff;
  border: none; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit;
}
.shell-newchat:hover { filter: brightness(1.05); }
.shell-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 12px; }
.shell-label { font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint, #A8A299); padding: 12px 10px 6px; }
.shell-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: var(--text, #1a1814); text-decoration: none; font-size: 14px; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left; font-family: inherit;
}
.shell-link:hover { background: var(--accent-soft, rgba(200,100,60,.1)); }
.shell-link.active { background: var(--accent-soft, rgba(200,100,60,.14)); color: var(--accent-h, #a44e2c); font-weight: 600; }
.shell-link .ico { width: 18px; display: inline-flex; justify-content: center; flex-shrink: 0; opacity: .85; }
.shell-link .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-link .pin { margin-left: auto; opacity: 0; font-size: 12px; }
.shell-link:hover .pin { opacity: .6; }
.shell-empty { font-size: 12px; color: var(--text-sec, #6b6560); padding: 4px 10px 8px; }
.shell-foot { border-top: 1px solid var(--border, #e8e3dc); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.shell-foot-item { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 10px; cursor: pointer; text-decoration: none; color: var(--text, #17150f); font-size: 14px; font-weight: 600; background: none; border: none; width: 100%; text-align: left; font-family: inherit; }
.shell-foot-item:hover { background: var(--accent-soft, rgba(200,100,60,.1)); }
.shell-foot-item svg { width: 18px; height: 18px; color: var(--text-sec, #6b6560); flex-shrink: 0; }
.shell-foot-lbl { line-height: 1; }
.shell-logout { color: var(--text-sec, #6b6560); }
.shell-logout:hover { background: rgba(192,57,43,.1); color: #c0392b; }
.shell-logout:hover svg { color: #c0392b; }
.shell-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent, #c8643c); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; text-transform: uppercase; flex-shrink: 0; }

/* Mobile: off-canvas drawer + hamburger */
.shell-toggle {
  position: fixed; top: 10px; left: 12px; z-index: 200; display: none;
  width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--border, #e8e3dc);
  background: var(--surface, #fff); cursor: pointer; padding: 0;
  align-items: center; justify-content: center; box-shadow: var(--shadow-sm, 0 1px 3px rgba(23,21,15,.08));
}
.shell-toggle:active { transform: scale(.96); }
/* When the drawer is open it shows its own weio brand — hide the floating toggle so
   it doesn't sit on top of and cover the sidebar's logo/wordmark. */
.weio-shell.open ~ .shell-toggle { display: none !important; }
.shell-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 149; }
@media (max-width: 820px) {
  body.has-shell { padding-left: 0; }
  /* Reserve a strip at the top so the floating logo button never overlaps page
     titles. Chat manages its own header, so it's excluded. */
  body.has-shell:not([data-page="chat"]) { padding-top: 60px; }
  body.has-shell:not([data-page="chat"]) .tmsg { height: calc(100dvh - 60px); }
  .weio-shell { transform: translateX(-100%); transition: transform .25s cubic-bezier(.4,0,.2,1); box-shadow: 4px 0 28px rgba(0,0,0,.16); }
  .weio-shell.open { transform: none; }
  .shell-toggle { display: flex; }
  .shell-backdrop.show { display: block; }
}

/* Shell brand = the standard text lockup: capital "Weio" + raised Weio Blue dot
   (BRAND-LOCKUP-STANDARD.md; geometry matches weio-marketing.css .brand/.brand-dot). */
.shell-brand { color: var(--weio-ink, #0C0F14); font-weight: 800; font-size: 18px; letter-spacing: -.035em; line-height: 1; }
.shell-brand-dot { width: .24em; height: .24em; border-radius: 50%; background: var(--weio-blue, #3D5AFE); display: inline-block; flex: none; margin-left: .07em; align-self: baseline; transform: translateY(-.54em); }

/* Tier-locked nav items (Tasks→Pro, Team→Teams) */
.shell-link.locked { color: var(--ink-faint, #A8A299); }
.shell-link.locked .ico { opacity: .6; }
.shell-link .lock { margin-left: auto; display: inline-flex; align-items: center; color: var(--ink-faint, #A8A299); flex-shrink: 0; }
.shell-link.locked:hover { background: var(--accent-soft, rgba(226,85,53,.1)); color: var(--accent-h, #C7401E); }
/* Unread-messages count pill on the Messages nav item. */
.shell-badge {
  margin-left: auto; flex-shrink: 0;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, #E25535); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; border-radius: 9px;
}
.shell-badge[hidden] { display: none; }
.shell-link.locked:hover .lock { color: var(--accent-h, #C7401E); }

/* Connected-apps sub-navigation (each opens /my/connections/<provider>) */
.shell-subnav { display: flex; flex-direction: column; margin: 0 0 2px 0; }
.shell-sublink {
  display: block; padding: 5px 10px 5px 38px; font-size: 13px; color: var(--ink-faint, #8a857c);
  text-decoration: none; border-radius: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shell-sublink:hover { background: var(--accent-soft, rgba(200,100,60,.1)); color: var(--text, #17150F); }
.shell-sublink.active { color: var(--accent-h, #a44e2c); font-weight: 600; background: var(--accent-soft, rgba(200,100,60,.12)); }

/* Connected-apps dropdown */
.shell-dd-head { cursor: pointer; }
.shell-caret { margin-left: auto; font-size: 10px; opacity: .7; transition: transform .15s ease; }
.shell-subnav { display: none; }   /* JS toggles to flex */
.shell-sublink-more { color: var(--accent, #c8643c); font-weight: 500; margin-top: 2px; }
.shell-sublink-more:hover { color: var(--accent-h, #a44e2c); }

/* Sidebar chat search */
.shell-search { display:flex; align-items:center; gap:7px; margin:4px 10px 8px; padding:7px 10px; border:1px solid var(--border,#e8e3dc); border-radius:9px; background:var(--surface2,#f5f3f0); color:var(--text-sec,#6b6560); }
.shell-search svg { flex-shrink:0; }
.shell-search input { border:none; background:none; outline:none; width:100%; font-size:13px; color:var(--text,#17150f); font-family:inherit; }
.shell-search-hit .lbl { display:flex; flex-direction:column; gap:1px; min-width:0; }
.hit-name { font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hit-snip { font-size:11.5px; color:var(--text-sec,#6b6560); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shell-search-hit { align-items:flex-start !important; }
/* E12: collapsible workflow groups in the sidebar nav. */
.shell-group{display:flex;align-items:center;justify-content:space-between;width:100%;background:none;border:0;cursor:pointer;font:inherit;
  padding:13px 12px 5px;color:var(--ink-faint,#A8A299);font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;font-family:var(--font-mono,ui-monospace,monospace);}
.shell-group:hover{color:var(--ink-muted,#8A857B);}
.shell-group-caret{transition:transform .15s;opacity:.65;flex-shrink:0;}
.shell-group.collapsed .shell-group-caret{transform:rotate(-90deg);}
.shell-group-items[hidden]{display:none;}

/* Cmd/Ctrl-K command palette (injected by weio-sidebar.js on app pages) */
.wp-ov { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 400; padding: 12vh 16px 16px; }
.wp-ov.open { display: flex; justify-content: center; align-items: flex-start; }
.wp-box { width: min(560px, 96vw); background: var(--surface, #fff); border-radius: 14px; box-shadow: 0 18px 60px rgba(0,0,0,.35); overflow: hidden; }
.wp-in { width: 100%; border: 0; outline: none; padding: 16px 18px; font: inherit; font-size: 15px; background: transparent; color: var(--text); border-bottom: 1px solid var(--border, #e8e3dc); box-sizing: border-box; }
.wp-res { max-height: 46vh; overflow-y: auto; padding: 6px; }
.wp-hit { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; text-decoration: none; color: var(--text); font-size: 13.5px; }
.wp-hit.sel, .wp-hit:hover { background: var(--accent-soft, #fdeae5); }
.wp-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-sec); background: var(--bg, #f6f3ef); border-radius: 5px; padding: 3px 6px; flex: 0 0 auto; }
.wp-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-s { color: var(--text-sec); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.wp-none { color: var(--text-sec); padding: 18px; text-align: center; font-size: 13px; }
