/* INBOX (static/js/pages/inbox.js) — every rule under html.ui-new, so only "Try the new screens"
   sees it. The pieces are the portal's: .card, .avatar, .badge, .chip, the ONE COMMENT COMPOSER
   (.cmp) from static/portal/css/app.css, and the message block below, copied as written from
   atomic-client-portal app/templates/internal/_threads.html threads_css() (the same rules the
   person page's Messages tab vendors). The two-pane layout, the channel mark on the timeline's
   rail and the status chip on each message are the Unipile screenshot's (Tania, 23:13). */

/* the portal's message block (_threads.html), scoped to the inbox */
html.ui-new .ib-page .thr-msg { display:flex; gap:12px; border:1px solid var(--paper-200, #e7e4ee); border-radius:var(--radius-lg, 16px); padding:14px 18px; margin-bottom:0; background:var(--white, #fff); flex:1; min-width:0; }
html.ui-new .ib-page .thr-msg-client { border-left:3px solid var(--hr-purple, #9140b0); }
html.ui-new .ib-page .thr-msg-us { border-left:3px solid var(--paper-300, #cfc9dd); }
html.ui-new .ib-page .thr-msg-head { display:flex; gap:10px; flex-wrap:wrap; align-items:baseline; }
html.ui-new .ib-page .thr-msg-when { font-size:var(--text-xs); color:var(--ink-500); margin-left:auto; }
html.ui-new .ib-page .thr-msg-to { margin:4px 0 8px; font-size:var(--text-xs); color:var(--ink-500); word-break:break-word; }
html.ui-new .ib-page .thr-msg-body { white-space:pre-wrap; word-break:break-word; font-family:inherit; font-size:var(--text-sm); margin:0; }
html.ui-new .ib-page .thr-avatar { flex:0 0 36px; width:36px; height:36px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-weight:700; color:#fff; background:var(--hr-purple, #9140b0); }
html.ui-new .ib-page .thr-avatar-us { background:var(--ink-900, #111); }
html.ui-new .ib-page .thr-msg-main { flex:1; min-width:0; }
html.ui-new .ib-page .thr-msg-addr { color:var(--ink-500); font-size:var(--text-xs); }
html.ui-new .ib-page .thr-msg.is-old { opacity:.75; }
html.ui-new .ib-page .thr-quoted summary { cursor:pointer; color:var(--ink-500); font-size:var(--text-xs); margin-top:6px; list-style:none; }
html.ui-new .ib-page .thr-quoted summary::before { content:"···  "; letter-spacing:2px; }
html.ui-new .ib-page .thr-msg-quoted { color:var(--ink-500); border-left:2px solid var(--paper-200,#e7e4ee); padding-left:10px; margin-top:6px; }

/* the page: list left, conversation right */
html.ui-new .ib-page .wrap { max-width:1280px; }
/* one panel (Tania's picture, 04:39 UTC 10-21): the list on white, a hairline, the person on paper */
html.ui-new .ib-split { display:grid; grid-template-columns:minmax(260px, 340px) minmax(0, 1fr); padding:0; align-items:stretch; }
html.ui-new .ib-split.is-empty { grid-template-columns:minmax(260px, 420px) minmax(0, 1fr); }
html.ui-new .ib-list { padding:0; border-right:1px solid var(--hairline); background:var(--white); border-radius:var(--radius-lg, 16px) 0 0 var(--radius-lg, 16px); overflow:hidden; display:flex; flex-direction:column;
  position:sticky; top:84px; align-self:start; max-height:calc(100vh - 110px); }
html.ui-new .ib-list-head { display:flex; align-items:center; gap:8px; padding:14px 16px; border-bottom:1px solid var(--hairline); font-size:var(--text-sm); }
html.ui-new .ib-list-head .btn { margin-left:auto; }
html.ui-new .ib-late { color:#B3261E; font-weight:var(--fw-semibold); font-size:var(--text-xs); }
html.ui-new .ib-rows { overflow-y:auto; }
html.ui-new .ib-row { display:flex; align-items:center; gap:14px; width:100%; padding:14px 16px; border:0; border-bottom:1px solid var(--hairline);
  border-left:3px solid transparent; background:var(--white); text-align:left; font:inherit; color:inherit; cursor:pointer; }
html.ui-new .ib-row:hover { background:var(--paper-50, #faf9fc); }
html.ui-new .ib-row.is-on { background:var(--paper-50, #faf9fc); border-left-color:var(--hr-purple); }
html.ui-new .ib-row:focus-visible { outline:none; box-shadow:inset 0 0 0 2px var(--hr-purple); }
html.ui-new .ib-row-main { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
html.ui-new .ib-name { display:flex; align-items:center; gap:8px; min-width:0; font-weight:var(--fw-semibold); color:var(--ink-900); }
html.ui-new .ib-name-t { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
html.ui-new .ib-stage, html.ui-new .ib-owner { font-size:var(--text-xs); color:var(--ink-600); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html.ui-new .ib-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; vertical-align:1px; background:var(--paper-300, #cfc9dd); }
html.ui-new .ib-dot.is-invited { background:#dcc3ea; }
html.ui-new .ib-dot.is-in_conversation { background:var(--hr-purple); }
html.ui-new .ib-dot.is-screening { background:#5a2569; }
html.ui-new .ib-dot.is-sent { background:var(--orbit-blue); }
html.ui-new .ib-dot.is-hired { background:var(--orbit-green); }
html.ui-new .ib-dot.is-dropped { background:var(--ink-400); }
html.ui-new .ib-row-r { display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex:none; }
html.ui-new .ib-who { font-size:var(--text-xs); color:var(--hr-purple); font-weight:var(--fw-semibold); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html.ui-new .ib-answering { display:flex; align-items:flex-start; gap:8px; margin:0 0 var(--space-4); padding:10px 14px; border-radius:var(--radius-md, 10px);
  background:var(--hr-purple-100); color:var(--ink-800, #2a2a2a); font-size:var(--text-sm); line-height:1.45; }
html.ui-new .ib-answering[hidden] { display:none; }
html.ui-new .ib-answering svg { flex:none; margin-top:2px; color:var(--hr-purple); }
html.ui-new .ib-link { color:var(--ink-700); text-decoration:none; text-underline-offset:2px; cursor:pointer; }
html.ui-new .ib-link:hover, html.ui-new .ib-link:focus-visible { color:var(--hr-purple); text-decoration:underline; outline:none; }
html.ui-new .ib-ctx-sep { color:var(--ink-400); }
html.ui-new .ib-row { align-items:flex-start; }
html.ui-new .ib-av { position:relative; flex:none; }
html.ui-new .ib-av .avatar { width:44px; height:44px; font-size:15px; }
html.ui-new .ib-av-ch { position:absolute; right:-4px; bottom:-4px; width:20px; height:20px; border-radius:50%; display:inline-flex; align-items:center;
  justify-content:center; background:var(--white); box-shadow:0 0 0 2px var(--white), 0 1px 3px rgba(0,0,0,.15); }
html.ui-new .ib-av-ch svg { width:12px; height:12px; }
html.ui-new .ib-av-ch.is-li { color:#0a66c2; }
html.ui-new .ib-av-ch.is-mail { color:#c5221f; }
html.ui-new .ib-line1 { display:flex; align-items:baseline; gap:8px; min-width:0; }
html.ui-new .ib-line1 .ib-name-t { font-weight:var(--fw-semibold); color:var(--ink-900); }
html.ui-new .ib-line1 .ib-age { margin-left:auto; flex:none; }
html.ui-new .ib-count { flex:none; min-width:18px; padding:0 6px; border-radius:999px; background:var(--hr-purple); color:#fff; font-size:11px; font-weight:var(--fw-semibold); text-align:center; line-height:18px; }
html.ui-new .ib-preview { font-size:var(--text-sm); color:var(--ink-800, #2a2a2a); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* tools over the list: search, tabs, filters, the bulk bar (Tania 05:08) */
html.ui-new .ib-tools { padding:14px 16px 0; border-bottom:1px solid var(--hairline); display:flex; flex-direction:column; gap:10px; }
html.ui-new .ib-search { display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--hairline); border-radius:999px; background:var(--paper-50, #faf9fc); color:var(--ink-500); }
html.ui-new .ib-search input { flex:1; min-width:0; border:0; background:transparent; padding:9px 0; font:inherit; font-size:var(--text-sm); color:var(--ink-900); box-shadow:none; outline:none; }
html.ui-new .ib-find { display:flex; gap:8px; }
html.ui-new .ib-find .ib-search { flex:1; min-width:0; }
html.ui-new .ib-filter-btn { flex:none; display:inline-flex; align-items:center; gap:4px; padding:0 10px; border:1px solid var(--hairline); border-radius:999px; background:var(--white); color:var(--ink-600); cursor:pointer; font:inherit; font-size:var(--text-xs); font-weight:var(--fw-semibold); }
html.ui-new .ib-filter-btn.is-on { border-color:var(--hr-purple); color:var(--hr-purple); }
html.ui-new .ib-panel { display:flex; flex-direction:column; gap:8px; padding:12px; border:1px solid var(--hairline); border-radius:12px; background:var(--white); box-shadow:0 6px 18px rgba(20,10,40,.08); }
html.ui-new .ib-panel[hidden] { display:none; }
html.ui-new .ib-prow { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.3fr); align-items:center; gap:8px; margin:0; font-size:var(--text-sm); font-weight:var(--fw-regular); color:var(--ink-800, #2a2a2a); text-transform:none; letter-spacing:0; }
html.ui-new .ib-prow > span { display:inline-flex; align-items:center; gap:6px; }
html.ui-new .ib-prow > span svg { color:var(--ink-500); width:14px; height:14px; }
html.ui-new .ib-prow select { width:100%; min-width:0; padding:7px 8px; font-size:var(--text-sm); border:1px solid var(--hairline); border-radius:8px; background:var(--white); color:var(--ink-800, #2a2a2a); }
html.ui-new .ib-panel .btn { align-self:flex-end; }
html.ui-new .ib-tabs { display:flex; gap:2px; margin:0 -4px; }
html.ui-new .ib-tab { flex:none; border:0; background:none; padding:8px 8px 10px; font:inherit; font-size:var(--text-sm); color:var(--ink-600); cursor:pointer; border-bottom:2px solid transparent; }
html.ui-new .ib-tab.is-on { color:var(--hr-purple); font-weight:var(--fw-semibold); border-bottom-color:var(--hr-purple); }
html.ui-new .ib-tab-n { font-size:11px; color:var(--ink-500); }
html.ui-new .ib-tabs { order:3; margin-bottom:-1px; }
html.ui-new .ib-bulk { display:flex; align-items:center; flex-wrap:wrap; gap:2px 4px; padding:6px 8px; border-radius:10px; background:var(--hr-purple-100); font-size:var(--text-sm); }
html.ui-new .ib-bulk[hidden] { display:none; }
html.ui-new .ib-bulk b { margin-right:6px; }
html.ui-new .ib-group { position:sticky; top:0; z-index:1; display:flex; align-items:center; gap:8px; padding:8px 16px; background:var(--paper-100, #f4f2f8);
  border-bottom:1px solid var(--hairline); font-size:var(--text-xs); font-weight:var(--fw-semibold); color:var(--ink-700); text-transform:none; }
html.ui-new .ib-group .ib-late { margin-left:auto; }
html.ui-new .ib-tick { flex:none; align-self:center; width:18px; height:18px; border:1.5px solid var(--paper-300, #cfc9dd); border-radius:5px; display:inline-flex;
  align-items:center; justify-content:center; color:#fff; background:var(--white); cursor:pointer; opacity:.55; }
html.ui-new .ib-row:hover .ib-tick, html.ui-new .ib-tick:focus-visible { opacity:1; }
html.ui-new .ib-row.is-sel .ib-tick { opacity:1; background:var(--hr-purple); border-color:var(--hr-purple); }
html.ui-new .ib-row.is-sel { background:var(--hr-purple-100); }
html.ui-new .ib-row.is-unread .ib-name-t { font-weight:var(--fw-bold, 700); }
html.ui-new .ib-row:not(.is-unread) .ib-preview { color:var(--ink-600); }
html.ui-new .ib-unread-dot { flex:none; width:8px; height:8px; border-radius:50%; background:var(--hr-purple); align-self:center; }
html.ui-new .ib-star { flex:none; display:inline-flex; color:var(--ink-400); cursor:pointer; align-self:center; }
html.ui-new .ib-star:hover { color:var(--ink-700); }
html.ui-new .ib-star.is-on { color:#e3a008; }
html.ui-new .ib-star.is-on svg, html.ui-new .ib-icon.is-on svg { fill:currentColor; }
html.ui-new .ib-head-acts { display:inline-flex; gap:2px; margin-left:4px; }
html.ui-new .ib-icon { width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:50%; background:transparent; color:var(--ink-600); cursor:pointer; }
html.ui-new .ib-icon:hover { background:var(--paper-200, #e7e4ee); color:var(--ink-900); }
html.ui-new .ib-icon.is-on { color:#e3a008; }
html.ui-new .ib-new { padding:0 8px; flex:none; font-size:11px; }
html.ui-new .ib-age { font-size:var(--text-xs); color:var(--ink-500); white-space:nowrap; }
html.ui-new .ib-age.is-soon { color:var(--energy-yellow-800); font-weight:var(--fw-semibold); }
html.ui-new .ib-age.is-overdue { color:#B3261E; font-weight:var(--fw-semibold); }
html.ui-new .ib-list-head { flex-wrap:wrap; }
html.ui-new .ib-quiet-note { flex-basis:100%; margin:6px 0 0; font-size:var(--text-xs); line-height:1.4; }
html.ui-new .ib-empty { padding:var(--space-6) var(--space-5); text-align:center; color:var(--ink-700); }
html.ui-new .ib-empty svg { color:var(--ink-400); }
html.ui-new .ib-empty h3 { margin:8px 0 6px; font-size:var(--text-base); }
html.ui-new .ib-empty p { margin:0 0 8px; font-size:var(--text-sm); line-height:1.5; }
html.ui-new .ib-pane { padding:var(--space-5) var(--space-6); min-height:520px; background:var(--paper-50, #faf9fc); min-width:0; border-radius:0 var(--radius-lg, 16px) var(--radius-lg, 16px) 0; }
html.ui-new .ib-head { display:flex; align-items:center; gap:16px; margin:0 0 var(--space-4); }
html.ui-new .ib-head .avatar { flex:none; }
html.ui-new .ib-head-who { flex:1; min-width:0; }
html.ui-new .ib-head-who h2 { margin:0; font-size:var(--text-xl, 1.35rem); line-height:1.2; width:fit-content; max-width:100%; }  /* the heading is the name: a click anywhere on it lands on the link */
html.ui-new .ib-head-name { color:inherit; text-decoration:none; }
html.ui-new .ib-head-name:hover, html.ui-new .ib-head-name:focus-visible { color:var(--hr-purple); text-decoration:underline; text-underline-offset:3px; }
html.ui-new .ib-head-av { flex:none; display:inline-flex; }
html.ui-new .ib-head-sub { display:flex; align-items:center; flex-wrap:wrap; gap:4px 8px; margin-top:2px; font-size:var(--text-sm); color:var(--ink-600); }
html.ui-new .ib-head-role { color:var(--ink-700); text-decoration:underline; text-decoration-color:var(--paper-300, #cfc9dd); text-underline-offset:2px; }
html.ui-new .ib-head-role:hover { color:var(--hr-purple); text-decoration-color:currentColor; }
html.ui-new .ib-head-from { display:inline-flex; align-items:center; gap:6px; }
html.ui-new .ib-head-from svg { color:#0a66c2; }
html.ui-new .ib-pill { flex:none; padding:6px 14px; border-radius:999px; font-size:var(--text-sm); font-weight:var(--fw-semibold);
  background:var(--paper-200, #e7e4ee); color:var(--ink-800, #2a2a2a); }
html.ui-new .ib-pill.is-invited { background:#f1e6f7; color:#5a2569; }
html.ui-new .ib-pill.is-in_conversation { background:var(--hr-purple-100); color:var(--hr-purple); }
html.ui-new .ib-pill.is-screening { background:#e9dcef; color:#5a2569; }
html.ui-new .ib-pill.is-sent { background:#e3ecfb; color:#1f4fa8; }
html.ui-new .ib-pill.is-hired { background:#e2f3e8; color:#1e6b3a; }
/* The person page's conversation, inside the Inbox: the head above already names the person, so
   its own title and count line are not repeated here (UX asked for a mount option for this). */
html.ui-new .ib-pane .pp-conv > h1, html.ui-new .ib-pane .pp-conv > p.sub { display:none; }
html.ui-new .ib-pane .pp-conv { padding:0; max-width:none; }
html.ui-new .ib-pane-empty { padding:var(--space-6); text-align:center; font-size:var(--text-sm); }
html.ui-new .ib-back { display:none; margin:0; }
/* ‹ Previous · 3 of 12 · Next › above the person: walks the list as it is shown */
html.ui-new .ib-nav { display:flex; align-items:center; gap:8px; margin:0 0 var(--space-3); }
html.ui-new .ib-nav:has(.ib-trail:empty) { display:none; }
html.ui-new .ib-trail { display:flex; align-items:center; gap:6px; margin-left:auto; font-size:var(--text-sm); white-space:nowrap; }
html.ui-new .ib-trail:empty { display:none; }

/* the list's small pieces (the conversation itself is the person page's) */
html.ui-new .cv-wait, html.ui-new .cv-mut { color:var(--ink-500); }
html.ui-new .cv-wait { padding:var(--space-5); font-size:var(--text-sm); }
html.ui-new .cv-mark { flex:none; display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:8px;
  border:1px solid var(--hairline); background:var(--white); color:var(--ink-600); position:relative; z-index:1; }
html.ui-new .cv-mark.is-li { color:#0a66c2; }
html.ui-new .cv-mark.is-mail { color:#c5221f; }
html.ui-new .cv-mark.is-doc { color:var(--hr-purple); }
html.ui-new .cv-mark.is-event { color:var(--ink-500); background:var(--paper-50, #faf9fc); }

@media (max-width: 860px) {
  html.ui-new .ib-split, html.ui-new .ib-split.is-empty { grid-template-columns:minmax(0, 1fr); }
  html.ui-new .ib-list { position:static; max-height:none; }
  html.ui-new .ib-split.is-reading .ib-list { display:none; }
  html.ui-new .ib-split:not(.is-reading) .ib-pane { display:none; }
  html.ui-new .ib-split.is-empty .ib-pane { display:none; }
  html.ui-new .ib-back { display:inline-flex; }
  html.ui-new .ib-nav:has(.ib-trail:empty) { display:flex; }
  html.ui-new .ib-pane { padding:var(--space-4); }
  html.ui-new .ib-list { border-right:0; max-height:none; position:static; }
  html.ui-new .ib-page .thr-msg { padding:12px 14px; }
  html.ui-new .ib-page .thr-avatar { display:none; }
}
/* Tags on the card (#753): small chips in the row, chips with × and an add box in the head. */
html.ui-new .ib-tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:2px; }
html.ui-new .ib-tag { display:inline-flex; align-items:center; gap:2px; padding:1px 8px; border-radius:999px; background:var(--ink-100, #f1f0f4);
  color:var(--ink-700, #3d3a48); font-size:var(--text-xs); line-height:1.6; white-space:nowrap; }
html.ui-new .ib-tag.is-more { background:transparent; color:var(--ink-600); }
html.ui-new .ib-head { flex-wrap:wrap; }
html.ui-new .ib-head-tags { flex-basis:100%; display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:var(--ink-600); padding-left:4px; }
html.ui-new .ib-head-tags .ib-tag { font-size:var(--text-sm); padding:2px 4px 2px 10px; }
html.ui-new .ib-tag-x { border:0; background:transparent; color:var(--ink-600); cursor:pointer; font-size:15px; line-height:1; padding:0 4px; border-radius:999px; }
html.ui-new .ib-tag-x:hover { background:var(--ink-200, #e4e2ea); color:var(--ink-900, #1d1b24); }
html.ui-new .ib-tag-in { border:1px dashed var(--ink-300, #cfccd8); border-radius:999px; padding:3px 10px; font:inherit; font-size:var(--text-sm);
  background:transparent; width:auto; flex:0 1 190px; min-width:120px; }
html.ui-new .ib-tag-in:focus { outline:none; border-style:solid; border-color:var(--hr-purple); }
html.ui-new .ib-bulk .ib-tag-in { min-width:110px; padding:2px 10px; background:#fff; }

/* Sort, fit and red flags, what happened, gone cold (Tania 10-27: "options to sort, and see the
   flags/% match somewhere ... pretty old conversations and im not sure what happened") */
html.ui-new .ib-sort { display:flex; align-items:center; gap:8px; font-size:var(--text-xs); }
html.ui-new .ib-sort select { flex:1; min-width:0; font-size:var(--text-sm); padding:5px 8px; border:1px solid var(--hairline); border-radius:8px; background:var(--white); color:var(--ink-800, #2a2a2a); }
html.ui-new .ib-fit { display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; white-space:nowrap; font-size:var(--text-xs); }
html.ui-new .ib-fit > b { font-weight:600; color:var(--ink-800, #2a2a2a); }
html.ui-new .ib-fit-rf { display:flex; gap:4px; min-width:0; overflow:hidden; }
html.ui-new .ib-clean { color:var(--success, #1f7a4d); }
html.ui-new .ib-last { font-size:var(--text-xs); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html.ui-new .ib-age.is-done { color:var(--ink-500, #8a8a8a); font-weight:400; }
html.ui-new .ib-head-fit { margin-top:6px; }
html.ui-new .ib-head-fit .ib-fit { font-size:var(--text-sm); flex-wrap:wrap; white-space:normal; }
html.ui-new .ib-head-last { margin-top:4px; font-size:var(--text-sm); line-height:1.4; }
html.ui-new .ib-group.ib-cold { margin-top:6px; }
html.ui-new .ib-group.ib-cold > span + span { margin-left:auto; }
html.ui-new .ib-sort select { flex:1 1 0; }
html.ui-new .ib-closed { flex:none; align-self:center; font-size:var(--text-xs); font-weight:600; padding:3px 10px; border-radius:999px; background:var(--paper-100, #f4f2f8); color:var(--ink-600); border:1px solid var(--hairline); }

/* New chats, no card yet (Tania 10-27 15:31) */
/* Sourcer picker under Sort (Tania 10-28: filter the Inbox by sourcer) */
html.ui-new .ib-sourcer { margin-top:6px; }
html.ui-new .ib-sourcer .btn { flex:none; white-space:nowrap; }
