/* Team chat (portal/teamchat.js): two panes on a desktop, one on a phone. */
#bpx#bpx#bpx#bpx .tc{display:grid;grid-template-columns:320px minmax(0,1fr);height:calc(100vh - 150px);min-height:460px;
  background:var(--card);border:1px solid var(--line);border-radius:12px;overflow:hidden;box-shadow:var(--hl-sh);font-family:var(--sans)}
#bpx#bpx#bpx#bpx .tc svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
#bpx#bpx#bpx#bpx .tc-empty-page{display:flex;align-items:center;justify-content:center}

/* thread list */
#bpx#bpx#bpx#bpx .tc-side{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line);background:var(--card)}
#bpx#bpx#bpx#bpx .tc-sh{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 14px 12px 16px;border-bottom:1px solid var(--line-2)}
#bpx#bpx#bpx#bpx .tc-sh>b{font-size:16px;font-weight:600;color:var(--ink)}
#bpx#bpx#bpx#bpx .tc-acts{display:flex;gap:6px;align-items:center}
#bpx#bpx#bpx#bpx .tc-list{flex:1;overflow-y:auto;padding:6px}
#bpx#bpx#bpx#bpx .tc-row{display:flex;gap:10px;align-items:center;width:100%;padding:10px;margin:0;border:0;border-radius:8px;background:transparent;
  text-align:left;cursor:pointer;color:var(--ink);font:inherit;min-height:0;box-shadow:none;transition:background 120ms}
#bpx#bpx#bpx#bpx .tc-row:hover{background:var(--hl-hover)}
#bpx#bpx#bpx#bpx .tc-row.on{background:var(--blue-l)}
#bpx#bpx#bpx#bpx .tc-rb{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
#bpx#bpx#bpx#bpx .tc-rt,#bpx#bpx#bpx#bpx .tc-rl{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
#bpx#bpx#bpx#bpx .tc-rt b{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bpx#bpx#bpx#bpx .tc-rt small{font-size:12px;color:var(--mu);flex:none}
#bpx#bpx#bpx#bpx .tc-rl span{font-size:13px;color:var(--mu);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bpx#bpx#bpx#bpx .tc-row.un .tc-rt b{font-weight:600}
#bpx#bpx#bpx#bpx .tc-row.un .tc-rl span{color:var(--ink-2);font-weight:500}
#bpx#bpx#bpx#bpx .tc-dot{flex:none;min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:var(--blue);color:#fff;font:600 11px/18px var(--sans);text-align:center;font-style:normal}

/* avatars */
#bpx#bpx#bpx#bpx .tc-av{flex:none;width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  background:var(--c,#475467);color:#fff;font:600 14px/1 var(--sans);letter-spacing:.02em}
#bpx#bpx#bpx#bpx .tc-av.g{border-radius:10px}
#bpx#bpx#bpx#bpx .tc-av.sm{width:32px;height:32px;font-size:12px}
#bpx#bpx#bpx#bpx .tc-av.g.sm{border-radius:8px}
#bpx#bpx#bpx#bpx .tc-av svg{width:18px;height:18px}

/* buttons */
#bpx#bpx#bpx#bpx .tc-ib{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;min-height:0;padding:0;margin:0;border:1px solid var(--line-in);
  border-radius:8px;background:var(--card);color:var(--ink-2);cursor:pointer;box-shadow:var(--hl-sh)}
#bpx#bpx#bpx#bpx .tc-ib:hover{background:var(--hl-hover)}
#bpx#bpx#bpx#bpx .tc-btn{display:inline-flex;align-items:center;gap:6px;height:34px;min-height:0;padding:0 12px;margin:0;border:0;border-radius:8px;background:var(--blue);color:#fff;
  font:600 13px/1 var(--sans);cursor:pointer;width:auto;box-shadow:var(--hl-sh)}
#bpx#bpx#bpx#bpx .tc-btn:hover{background:var(--blue-d)}
#bpx#bpx#bpx#bpx .tc-btn svg{width:16px;height:16px}

/* conversation */
#bpx#bpx#bpx#bpx .tc-pane{padding:0 !important;margin:0;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg)}
#bpx#bpx#bpx#bpx .tc-ph{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--card)}
#bpx#bpx#bpx#bpx .tc-pt{flex:1;min-width:0;display:flex;flex-direction:column}
#bpx#bpx#bpx#bpx .tc-pt b{font-size:15px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bpx#bpx#bpx#bpx .tc-pt small{font-size:12px;color:var(--mu);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bpx#bpx#bpx#bpx .tc-back{display:none}
#bpx#bpx#bpx#bpx .tc-msgs{flex:1;overflow-y:auto;padding:16px 20px 8px;display:flex;flex-direction:column}
#bpx#bpx#bpx#bpx .tc-day{display:flex;justify-content:center;margin:14px 0 8px}
#bpx#bpx#bpx#bpx .tc-day span{font-size:12px;font-weight:500;color:var(--mu);background:var(--card);border:1px solid var(--line-2);border-radius:999px;padding:2px 10px}
#bpx#bpx#bpx#bpx .tc-m{display:flex;flex-direction:column;align-items:flex-start;max-width:min(72%,560px);margin-top:10px}
#bpx#bpx#bpx#bpx .tc-m.gr{margin-top:3px}
#bpx#bpx#bpx#bpx .tc-m.me{align-self:flex-end;align-items:flex-end}
#bpx#bpx#bpx#bpx .tc-who{font-size:12px;font-weight:500;color:var(--grey);margin:0 0 3px 4px}
#bpx#bpx#bpx#bpx .tc-b{background:var(--card);color:var(--ink);border:1px solid var(--line-2);border-radius:14px 14px 14px 4px;padding:8px 12px;
  font-size:14px;line-height:1.45;overflow-wrap:anywhere;box-shadow:var(--hl-sh)}
#bpx#bpx#bpx#bpx .tc-m.me .tc-b{background:var(--blue);color:#fff;border-color:transparent;border-radius:14px 14px 4px 14px}
#bpx#bpx#bpx#bpx .tc-m.pend .tc-b{opacity:.65}
#bpx#bpx#bpx#bpx .tc-img{display:block;margin:-2px -6px 6px;border-radius:10px;overflow:hidden;background:var(--bg-2);min-width:160px;min-height:100px}
#bpx#bpx#bpx#bpx .tc-img:only-child{margin-bottom:-2px}
#bpx#bpx#bpx#bpx .tc-img img{display:block;max-width:280px;max-height:280px;width:100%;object-fit:cover}
#bpx#bpx#bpx#bpx .tc-m time{font-size:11px;color:var(--mu);margin:3px 4px 0}
#bpx#bpx#bpx#bpx .tc-m.gr:not(:last-child) time{display:none}

/* composer */
#bpx#bpx#bpx#bpx .tc-comp{display:flex;align-items:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--line);background:var(--card);margin:0}
#bpx#bpx#bpx#bpx .tc-att{cursor:pointer}
#bpx#bpx#bpx#bpx .tc-in{flex:1;min-width:0;display:flex;flex-direction:column;border:1px solid var(--line-in);border-radius:10px;background:var(--card);box-shadow:var(--hl-sh)}
#bpx#bpx#bpx#bpx .tc-in:focus-within{border-color:var(--blue);box-shadow:var(--hl-ring)}
#bpx#bpx#bpx#bpx .tc-in textarea{display:block;width:100%;box-sizing:border-box;resize:none;border:0 !important;outline:0;background:transparent !important;box-shadow:none !important;
  padding:8px 12px !important;margin:0 !important;min-height:34px;max-height:140px;font:14px/1.45 var(--sans);color:var(--ink)}
#bpx#bpx#bpx#bpx .tc-prev{padding:8px 8px 0}
#bpx#bpx#bpx#bpx .tc-prev[hidden]{display:none}
#bpx#bpx#bpx#bpx .tc-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:4px 4px 4px 8px;border-radius:6px;background:var(--bg-2);font-size:12px;color:var(--ink-2)}
#bpx#bpx#bpx#bpx .tc-chip svg{width:14px;height:14px}
#bpx#bpx#bpx#bpx .tc-chip button{border:0;background:transparent;color:var(--mu);cursor:pointer;font-size:16px;line-height:1;padding:0 4px;min-height:0;margin:0;width:auto}
#bpx#bpx#bpx#bpx .tc-send{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:0;padding:0;margin:0;border:0;border-radius:10px;
  background:var(--blue);color:#fff;cursor:pointer;flex:none}
#bpx#bpx#bpx#bpx .tc-send:hover{background:var(--blue-d)}

/* empty and loading */
#bpx#bpx#bpx#bpx .tc-zero{margin:auto;text-align:center;padding:24px;color:var(--mu)}
#bpx#bpx#bpx#bpx .tc-zero b{display:block;font-size:15px;font-weight:600;color:var(--ink);margin-bottom:4px}
#bpx#bpx#bpx#bpx .tc-zero p{margin:0;font-size:13px}
#bpx#bpx#bpx#bpx .tc-load{padding:24px 12px;text-align:center;color:var(--mu);font-size:13px}
#bpx#bpx#bpx#bpx .tc-load small{display:block;margin-top:6px;color:var(--grey-l)}

/* sidebar / tab count */
#bpx#bpx#bpx#bpx .tc-nb{margin-left:auto;min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:#F04438;color:#fff;
  font:600 11px/18px var(--sans);text-align:center;font-style:normal}
#bpx#bpx#bpx#bpx .hl-tab .tc-nb{margin-left:6px;display:inline-block;vertical-align:1px}
#bpx#bpx#bpx#bpx .hl-min .hl-ni .tc-nb{position:absolute;top:2px;right:2px;min-width:8px;width:8px;height:8px;padding:0;font-size:0}

/* group modal */
#bpx#bpx#bpx#bpx .tc-pick{display:flex;flex-direction:column;gap:2px;max-height:280px;overflow-y:auto;border:1px solid var(--line);border-radius:8px;padding:4px;margin-bottom:6px}
#bpx#bpx#bpx#bpx .tc-pr{display:flex !important;align-items:center;gap:10px;padding:8px;border-radius:6px;cursor:pointer;margin:0 !important;font-weight:400 !important}
#bpx#bpx#bpx#bpx .tc-pr:hover{background:var(--hl-hover)}
#bpx#bpx#bpx#bpx .tc-pr input{width:16px !important;height:16px;margin:0 !important;flex:none;accent-color:var(--blue)}
#bpx#bpx#bpx#bpx .tc-pr span:last-child{display:flex;flex-direction:column;line-height:1.3}
#bpx#bpx#bpx#bpx .tc-pr b{font-weight:500;font-size:14px;color:var(--ink)}
#bpx#bpx#bpx#bpx .tc-pr small{font-size:12px;color:var(--mu)}
#bpx#bpx#bpx#bpx .tc-note{font-size:13px;color:var(--mu);background:var(--soft);border:1px dashed var(--line-in);border-radius:8px;padding:12px}
#bpx#bpx#bpx#bpx .tc-mf{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:18px;flex-wrap:wrap}
#bpx#bpx#bpx#bpx .tc-del{color:var(--err-t) !important}
#bpx#bpx#bpx#bpx .tc-danger{background:var(--err) !important;border-color:var(--err) !important;color:#fff !important}

/* phones: one pane at a time */
@media (max-width:820px){
  #bpx#bpx#bpx#bpx .tc{display:flex;flex-direction:column;height:calc(100dvh - 90px);min-height:420px;border-radius:10px}
  #bpx#bpx#bpx#bpx .tc>.tc-side,#bpx#bpx#bpx#bpx .tc>.tc-pane{flex:1 1 auto;min-height:0;margin:0}
  #bpx#bpx#bpx#bpx .tc-side{border-right:0}
  #bpx#bpx#bpx#bpx .tc-pane{display:none}
  #bpx#bpx#bpx#bpx .tc.tc-open .tc-side{display:none}
  #bpx#bpx#bpx#bpx .tc.tc-open .tc-pane{display:flex}
  #bpx#bpx#bpx#bpx .tc-back{display:inline-flex;border:0;box-shadow:none;width:30px}
  #bpx#bpx#bpx#bpx .tc-ph{padding:10px 10px}
  #bpx#bpx#bpx#bpx .tc-msgs{padding:12px 12px 6px}
  #bpx#bpx#bpx#bpx .tc-m{max-width:84%}
  #bpx#bpx#bpx#bpx .tc-comp{padding:10px}
  #bpx#bpx#bpx#bpx .tc-in textarea{font-size:16px}
}
