/* Internal staff-only conversation; all rules are scoped to its own UI. */
.team-entry { display:flex; align-items:center; gap:10px; color:#d8f4e8; background:#16332d; border:1px solid #285246; border-radius:10px; min-height:44px; padding:10px 12px; cursor:pointer; font:inherit; text-align:left; }
.team-entry:hover { background:#21453a; }
.team-entry[aria-expanded="true"] { border-color:#58ba91; background:#214b3d; }
.team-entry.has-unread { color:#ffe8ed; background:#3c252e; border-color:#f17383; box-shadow:inset 0 0 0 1px #ef667830; }
.team-entry.has-unread:hover { background:#4a2933; }
@media (prefers-reduced-motion: no-preference) {
  .team-entry.has-unread { animation:team-entry-unread 1.5s ease-in-out infinite; }
  @keyframes team-entry-unread {
    0%, 100% { box-shadow:inset 0 0 0 1px #ef667830; }
    50% { box-shadow:inset 0 0 0 2px #ff7487, 0 0 8px #f6677980; }
  }
}
.team-entry:disabled { opacity:.5; cursor:default; }
.team-entry__icon { position:relative; display:grid; place-items:center; width:25px; height:25px; flex-shrink:0; background:#2b7457; color:white; border-radius:7px; font-size:12px; font-weight:700; }
.team-entry.has-unread .team-entry__icon::after { content:""; position:absolute; top:-3px; right:-3px; width:10px; height:10px; border-radius:50%; background:#ff6576; box-shadow:0 0 0 2px #3c252e; }
.team-entry--with-title-dot.has-unread .team-entry__icon::after { content:none; }
.team-entry__content { flex:1; min-width:0; }
.team-entry__heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 8px; }
.team-entry__label { display:inline-flex; align-items:center; gap:7px; }
.team-entry__name { white-space:nowrap; }
.team-entry__unread-dot { display:none; flex:none; width:12px; height:12px; border-radius:50%; background:#ff5769; }
.team-entry.has-unread .team-entry__unread-dot { display:block; }
.team-entry__online-count { display:inline-flex; align-items:center; gap:5px; color:#b7d3c7; font-size:11px; white-space:nowrap; }
.team-entry__online-count::before { content:""; width:6px; height:6px; flex-shrink:0; border-radius:50%; background:#829b91; }
.team-entry.has-online-members .team-entry__online-count { color:#a2ebc7; }
.team-entry.has-online-members .team-entry__online-count::before { background:#72deaa; }
.team-entry__online-names { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; margin-top:3px; color:#c6e3d6; font-size:12px; line-height:1.4; }
.team-entry__online-names[hidden] { display:none; }
.team-entry__badge { flex-shrink:0; background:#e94f5d; color:white; font-size:11px; font-weight:700; min-width:19px; height:19px; padding:0 5px; border-radius:10px; text-align:center; line-height:19px; }
.team-entry__badge[hidden] { display:none; }
.sidebar > .team-entry { margin:8px 10px 2px; flex-shrink:0; }
.admin-nav .team-entry { width:100%; }
.team-chat { --tc-ink:#25352f; --tc-muted:#7b8983; position:fixed; right:16px; bottom:16px; top:16px; width:660px; max-width:calc(100vw - 32px); display:grid; grid-template-columns:minmax(160px, 28%) minmax(0, 1fr); grid-template-rows:minmax(0, 1fr); overflow:hidden; z-index:1200; color:var(--tc-ink); background:#f3f5f3; border:1px solid #cedbd2; border-radius:18px; box-shadow:0 20px 70px #07181155; font:14px/1.5 system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
.team-chat[hidden], .team-chat [hidden] { display:none !important; }
.team-chat *, .team-chat-lightbox * { box-sizing:border-box; }
.team-chat button { font:inherit; cursor:pointer; }
.team-chat button:disabled { cursor:default; opacity:.55; }
.team-chat button:focus-visible, .team-chat textarea:focus-visible, .team-chat__timeline:focus-visible { outline:3px solid #399e7a; outline-offset:2px; }
.team-chat__room { position:relative; display:flex; flex-direction:column; grid-column:2; grid-row:1; min-width:0; min-height:0; }
.team-chat__threads { display:flex; flex-direction:column; gap:4px; padding:13px 8px; min-width:0; min-height:0; overflow:auto; border-inline-end:1px solid #dce6dc; background:#f7faf7; }
.team-chat__threads h2 { margin:0; padding:3px 8px 9px; color:#284435; font-size:14px; }
.team-chat__private-list { display:flex; flex-direction:column; gap:4px; min-width:0; }
.team-chat__thread { display:flex; align-items:center; width:100%; min-width:0; min-height:49px; gap:8px; padding:6px 7px; color:#284435; background:transparent; border:1px solid transparent; border-radius:8px; text-align:start; }
.team-chat__thread:hover { background:#eef5ef; }
.team-chat__thread[aria-pressed="true"] { background:#e2f1e7; border-color:#b9d8c5; }
.team-chat__thread-avatar { display:grid; place-items:center; flex:none; width:29px; height:29px; border-radius:7px; color:#206040; background:#e5f1e7; font-weight:700; }
.team-chat__thread-avatar.is-group { color:white; background:#267553; }
.team-chat__thread-copy { flex:1; min-width:0; }
.team-chat__thread-copy :is(strong, small) { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.team-chat__thread-copy strong { font-size:12px; }
.team-chat__thread-copy small { color:#61756a; font-size:11px; }
.team-chat__thread-unread { flex:none; min-width:18px; padding:0 4px; border-radius:12px; color:#fff; background:#b73951; font-size:10px; line-height:18px; text-align:center; }
.team-chat__header { display:flex; align-items:center; gap:12px; padding:18px 18px 14px; flex-shrink:0; background:#fff; }
.team-chat__brand { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:white; background:#238158; box-shadow:inset 0 0 0 1px #ffffff20; font-weight:700; font-size:20px; }
.team-chat__heading { flex:1; min-width:0; }
.team-chat__heading h2 { margin:0; color:#20382a; font-size:18px; font-weight:650; letter-spacing:.04em; overflow-wrap:anywhere; }
.team-chat__heading p { margin:3px 0 0; color:#7b8983; font-size:11px; }
.team-chat__close { display:grid; place-items:center; width:34px; height:34px; background:#f3f5f3; color:#65756a; border:0; border-radius:10px; font-size:24px !important; }
.team-chat__back { display:grid; place-items:center; flex:none; width:34px; height:34px; color:#2e614a; background:#eff5ef; border:1px solid #d9e7dd; border-radius:8px; font-size:19px !important; }
.team-chat__subhead { display:flex; align-items:center; padding:5px 18px; border-top:1px solid #e6ebe6; background:#fafcf9; flex-shrink:0; }
.team-chat__connection { color:#608172; font-size:11px; }
.team-chat__connection::before { content:""; display:inline-block; width:6px; height:6px; margin-right:6px; background:#4a9b6c; border-radius:50%; vertical-align:middle; }
.team-chat__connection.is-offline { color:#966739; }
.team-chat__connection.is-offline::before { background:#d29a48; }
.team-chat__members { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 8px; margin:0; padding:4px 18px 10px; max-height:150px; overflow:auto; list-style:none; border-bottom:1px solid #dce6dc; background:#fafcf9; flex-shrink:0; }
.team-chat__members:empty { display:none; }
.team-chat__member { display:grid; grid-template-columns:26px minmax(0,1fr); column-gap:7px; align-items:center; width:100%; min-width:0; padding:5px 7px; color:#4f5954; background:#f0f2f1; border:1px solid #e0e4e2; border-radius:8px; text-align:start; font-size:12px !important; }
button.team-chat__member:hover { border-color:#4d9a73; }
.team-chat__member .team-chat__avatar { grid-row:1/3; width:26px; height:26px; background:#e4e8e5; border-color:#d6dcd8; color:#58645d; }
.team-chat__member-name { overflow-wrap:anywhere; font-weight:600; }
.team-chat__member small { font-size:10px; }
.team-chat__member.is-online { color:#155339; background:#e2f4e9; border-color:#b1d9bf; }
.team-chat__member.is-online .team-chat__avatar { color:#155339; background:#ccebd7; border-color:#afd6be; }
.team-chat__timeline { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:14px 16px 20px; scrollbar-width:thin; scrollbar-color:#c8d4ca transparent; }
.team-chat__older { display:block; margin:0 auto 16px; border:1px solid #d8e2d8; border-radius:20px; padding:5px 13px; color:#6b8072; background:#fdfefd; font-size:11px !important; }
.team-chat__empty { display:flex; align-items:center; flex-direction:column; justify-content:center; height:100%; min-height:180px; padding:26px 12px; color:#75897d; text-align:center; }
.team-chat__empty > span { display:grid; place-items:center; width:56px; height:56px; margin-bottom:18px; border-radius:18px; color:#6b967b; background:#e3ece3; font-size:26px; }
.team-chat__empty strong { font-size:15px; color:#577260; font-weight:600; }
.team-chat__empty p { font-size:12px; line-height:1.9; margin:8px 0; }
.team-chat__date { text-align:center; color:#8c9b90; font-size:10px; margin:8px 0 20px; }
.team-chat__message { display:flex; gap:9px; margin:0 0 19px; align-items:flex-start; }
.team-chat__avatar { display:grid; place-items:center; width:32px; height:32px; background:#e0e9e0; border:1px solid #d6e0d6; color:#607b66; border-radius:9px; font-size:13px; font-weight:600; flex-shrink:0; }
.team-chat__message-body { max-width:calc(100% - 50px); min-width:0; }
.team-chat__meta { margin:-2px 0 5px; font-size:10px; color:#839287; }
.team-chat__bubble { display:block; background:white; border:1px solid #e4e9e2; border-radius:3px 12px 12px 12px; padding:10px 12px; color:#304337; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; box-shadow:0 2px 3px #223d2503; }
.team-chat__message.is-mine { flex-direction:row-reverse; }
.team-chat__message.is-mine .team-chat__avatar { background:#c1e8bb; border-color:#b7ddb1; color:#388043; }
.team-chat__message.is-mine .team-chat__meta { text-align:right; }
.team-chat__message.is-mine .team-chat__bubble { background:#ccefc3; border-color:#c1e3b9; border-radius:12px 3px 12px 12px; }
.team-chat__image-view { padding:0; display:block; background:none; border:0; border-radius:6px; overflow:hidden; }
.team-chat__image-view img { display:block; max-width:235px; max-height:240px; width:auto; height:auto; object-fit:contain; min-height:40px; }
.team-chat__delivery { margin-top:4px; font-size:10px; color:#a27863; text-align:right; }
.team-chat__delivery button { font-size:10px; padding:0 3px; border:0; background:none; color:#a75642; text-decoration:underline; }
.team-chat__receipt { margin-top:3px; color:#466558; font-size:12px; text-align:right; overflow-wrap:anywhere; }
.team-chat__new { position:absolute; right:20px; bottom:176px; padding:6px 12px; color:#2d825b; background:#fff; border:1px solid #d1e3d6; border-radius:20px; box-shadow:0 3px 12px #27472b12; font-size:11px !important; }
.team-chat__error { margin:0; padding:8px 16px; background:#fff1eb; border-top:1px solid #efd7cb; color:#a5573a; font-size:11px; flex-shrink:0; }
.team-chat__composer { flex-shrink:0; background:#fff; border-top:1px solid #dce5db; padding:12px 16px 14px; }
.team-chat__tools { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.team-chat__tools span { color:#99a49c; font-size:10px; }
.team-chat__room--direct .team-chat__tools { justify-content:flex-end; }
.team-chat__direct-draft { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px; margin:0 0 8px; padding:6px 8px; color:#365d49; background:#eff6ef; border:1px solid #dae9dd; border-radius:8px; font-size:12px; }
.team-chat__direct-draft img { display:block; width:64px; height:48px; object-fit:contain; background:#fff; border-radius:4px; }
.team-chat__direct-draft-remove { min-height:32px; padding:3px 8px; color:#365d49; background:#fff; border:1px solid #c4ddcb; border-radius:6px; font-size:12px !important; }
.team-chat__image-caption { margin-top:6px; }
.team-chat__image-button { color:#4b7660; background:#eff5ef; border:1px solid #e4ece2; border-radius:6px; padding:3px 9px; font-size:11px !important; }
.team-chat__composer textarea { box-sizing:border-box; display:block; width:100%; min-height:55px; max-height:160px; resize:vertical; color:#304337; background:white; border:0; padding:4px 0; outline:none; font-family:inherit; font-size:13px; line-height:1.6; }
.team-chat__composer textarea::placeholder { color:#a2afa4; }
.team-chat__send-row { display:flex; align-items:center; justify-content:space-between; margin-top:7px; gap:8px; }
.team-chat__send-row > span { color:#9ca99f; font-size:9px; }
.team-chat__send { background:#26905d; border:0; color:white; padding:6px 19px; border-radius:6px; font-weight:600 !important; font-size:12px !important; }
.team-chat__send:hover:not(:disabled) { background:#1d7d50; }
.team-chat__send:disabled { background:#c4d9ca; color:#fafffa; }
.team-chat__sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.team-chat-lightbox { position:fixed; inset:0; z-index:1400; display:flex; align-items:center; justify-content:center; background:#07120bea; padding:60px 24px 30px; }
.team-chat-lightbox img { max-width:100%; max-height:100%; object-fit:contain; }
.team-chat-lightbox button { position:absolute; right:20px; top:16px; color:#fff; border:1px solid #ffffff66; border-radius:6px; background:#ffffff12; padding:8px 14px; cursor:pointer; }
@media(max-width:600px) {
  .team-chat { inset:0; width:100%; max-width:100%; height:100dvh; grid-template-columns:minmax(0, 1fr); grid-template-rows:auto minmax(0, 1fr); border-radius:0; border:0; }
  .team-chat__room { grid-column:1; grid-row:2; }
  .team-chat__threads { flex-direction:row; align-items:center; padding: max(8px, env(safe-area-inset-top)) 9px 8px; border-inline-end:0; border-bottom:1px solid #dce6dc; }
  .team-chat__threads h2 { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); }
  .team-chat__private-list { display:contents; }
  .team-chat__thread { flex:none; width:auto; max-width:168px; min-height:44px; }
  .team-chat__thread-copy small { display:none; }
  .team-chat__header { padding-top:12px; }
  .team-chat__back, .team-chat__close { min-width:44px; min-height:44px; }
  button.team-chat__member { min-height:44px; }
  .team-chat__composer { padding-bottom:max(14px, env(safe-area-inset-bottom)); }
  .team-chat__composer textarea { font-size:16px; }
  .team-chat__direct-draft-remove { min-width:44px; min-height:44px; }
  .team-chat__image-view img { max-width:min(230px, 58vw); }
}
@media(prefers-reduced-motion:no-preference) { .team-chat { animation:team-chat-arrive .16s ease-out; } @keyframes team-chat-arrive { from { opacity:0; transform:translateX(12px); } to { opacity:1; transform:translateX(0); } } }
