#team-chat { --tc-ink:#24211f; --tc-muted:#756f6a; --tc-line:#e7e2dd; --tc-surface:#f7f5f2; --tc-accent:#2563eb; --tc-accent-dark:#1d4ed8; --tc-accent-soft:#eef4ff; position:relative; width:100%; padding:38px 0 80px; color:var(--tc-ink); }
#team-chat button, #team-chat input, #team-chat textarea { font:inherit; }
.tc-sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.tc-shell { position:relative; display:grid; grid-template-columns:286px minmax(0, 1fr) 260px; grid-template-rows:minmax(0, 1fr); height:720px; margin-top:34px; overflow:hidden; border:1px solid var(--tc-line); border-radius:14px; background:#fff; }
.tc-sidebar { display:flex; min-width:0; min-height:0; flex-direction:column; border-right:1px solid var(--tc-line); background:var(--tc-surface); }
.tc-workspace { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; min-height:76px; padding:14px 16px; border-bottom:1px solid var(--tc-line); }
.tc-workspace-mark { display:flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; background:var(--tc-accent); color:#fff; font-size:11px; font-weight:800; letter-spacing:.04em; }
.tc-workspace strong, .tc-workspace span { display:block; }
.tc-workspace strong { font-size:12px; }
.tc-workspace span { margin-top:4px; color:#97918b; font-size:9px; }
.tc-workspace > button { display:none; color:#8f8983; font-size:22px; }
.tc-search { position:relative; display:flex; align-items:center; margin:16px 14px 11px; }
.tc-search svg { position:absolute; left:11px; width:15px; height:15px; fill:none; stroke:#9a948e; stroke-linecap:round; stroke-width:1.7; }
.tc-search input { width:100%; height:38px; padding:0 12px 0 35px; border:1px solid #e1ddd8; border-radius:8px; background:#fff; font-size:11px; }
.tc-search input:focus { border-color:var(--tc-accent); box-shadow:0 0 0 3px rgba(24,66,173,.09); }
.tc-room-heading { display:flex; align-items:center; justify-content:space-between; padding:9px 17px; color:#8a847e; font-size:10px; }
.tc-room-heading strong { font-size:10px; letter-spacing:.06em; }
.tc-room-heading span { font-variant-numeric:tabular-nums; }
.tc-room-list { display:flex; min-height:0; flex:1; flex-direction:column; gap:3px; overflow-y:auto; padding:0 8px; }
.tc-room { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:10px; align-items:center; width:100%; min-height:66px; padding:9px; border-radius:9px; text-align:left; transition:background .15s ease; }
.tc-room:hover { background:#eeece8; }
.tc-room.is-active { background:#fff; box-shadow:0 1px 4px rgba(54,46,39,.055); }
.tc-avatar { display:flex; align-items:center; justify-content:center; width:38px; height:38px; flex:none; border-radius:11px; color:#fff; font-size:11px; font-weight:800; }
.tc-avatar.is-sage { background:var(--tc-accent); }
.tc-avatar.is-charcoal { background:#484b49; }
.tc-avatar.is-sand { background:#af8c66; }
.tc-avatar.is-stone { background:#7e7770; }
.tc-avatar.is-me { background:var(--jw-blue-500); }
.tc-room-copy { min-width:0; }
.tc-room-copy strong, .tc-room-copy small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tc-room-copy strong { font-size:12px; font-weight:650; }
.tc-room-copy small { margin-top:5px; color:#908a84; font-size:9px; }
.tc-room-meta { display:flex; align-self:stretch; align-items:flex-end; flex-direction:column; justify-content:center; gap:7px; }
.tc-room-meta time { color:#aaa49f; font-size:8px; font-variant-numeric:tabular-nums; }
.tc-room-meta b { display:flex; align-items:center; justify-content:center; min-width:17px; height:17px; padding:0 4px; border-radius:5px; background:var(--tc-accent); color:#fff; font-size:8px; font-variant-numeric:tabular-nums; }
.tc-sidebar-foot { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; min-height:68px; padding:12px 15px; border-top:1px solid var(--tc-line); }
.tc-sidebar-foot .tc-avatar { width:34px; height:34px; border-radius:10px; }
.tc-sidebar-foot strong { display:block; font-size:11px; }
.tc-sidebar-foot div > span { display:flex; align-items:center; gap:5px; margin-top:4px; color:#929792; font-size:9px; }
.tc-sidebar-foot div > span i { width:6px; height:6px; border-radius:50%; background:var(--jw-blue-500); }
.tc-sidebar-foot > button { color:#918b86; letter-spacing:.12em; }
.tc-conversation { display:flex; min-width:0; min-height:0; flex-direction:column; background:#fff; }
.tc-conversation-head { display:flex; align-items:center; gap:12px; min-height:76px; padding:14px 20px; border-bottom:1px solid var(--tc-line); }
.tc-mobile-menu { display:none; width:34px; height:34px; border:1px solid var(--tc-line); border-radius:8px; color:#6e6964; }
.tc-conversation-head > div:nth-child(2) { min-width:0; flex:1; }
.tc-conversation-head h3 { overflow:hidden; font-size:15px; letter-spacing:-.02em; text-overflow:ellipsis; white-space:nowrap; }
.tc-conversation-head p { display:flex; align-items:center; gap:6px; margin-top:5px; color:#94908b; font-size:9px; }
.tc-online-dot { width:6px; height:6px; border-radius:50%; background:var(--jw-blue-500); }
.tc-head-actions { display:flex; gap:6px; }
.tc-head-actions button { display:flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid var(--tc-line); border-radius:9px; color:#746e69; transition:border-color .15s ease, background .15s ease; }
.tc-head-actions button:hover { border-color:#c9c2bc; background:var(--tc-surface); }
.tc-head-actions svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.6; }
.tc-messages { display:flex; min-height:0; flex:1; flex-direction:column; gap:5px; overflow-y:auto; padding:22px 24px; scroll-behavior:smooth; }
.tc-date-divider { display:flex; align-items:center; gap:10px; margin:2px 0 17px; color:#aaa49f; font-size:9px; }
.tc-date-divider::before, .tc-date-divider::after { height:1px; flex:1; background:#f0ece8; content:""; }
.tc-message { display:grid; grid-template-columns:34px minmax(0, 1fr); gap:9px; max-width:74%; margin-top:10px; }
.tc-message .tc-avatar { width:34px; height:34px; border-radius:10px; }
.tc-message-body { min-width:0; }
.tc-message-meta { display:flex; align-items:baseline; gap:7px; margin-bottom:5px; }
.tc-message-meta strong { font-size:10px; }
.tc-message-meta time { color:#aaa49f; font-size:8px; font-variant-numeric:tabular-nums; }
.tc-bubble { display:inline-block; padding:10px 12px; border-radius:4px 11px 11px 11px; background:var(--tc-surface); color:#4f4a46; font-size:11px; line-height:1.65; white-space:pre-wrap; word-break:break-word; }
.tc-message.is-mine { display:flex; max-width:72%; align-self:flex-end; justify-content:flex-end; margin-top:12px; }
.tc-message.is-mine .tc-message-body { text-align:right; }
.tc-message.is-mine .tc-message-meta { justify-content:flex-end; }
.tc-message.is-mine .tc-bubble { border-radius:11px 4px 11px 11px; background:var(--tc-accent); color:#fff; text-align:left; }
.tc-message-file { display:flex; align-items:center; gap:10px; min-width:220px; margin-top:6px; padding:10px; border:1px solid #e2ded9; border-radius:8px; background:#fff; }
.tc-message-file > span { display:flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:7px; background:var(--jw-blue-100); color:var(--jw-blue-700); font-size:8px; font-weight:800; }
.tc-message-file strong, .tc-message-file small { display:block; }
.tc-message-file strong { font-size:9px; }
.tc-message-file small { margin-top:4px; color:#9b9691; font-size:8px; }
.tc-read { display:block; margin-top:5px; color:var(--jw-blue-500); font-size:8px; }
.tc-typing { display:flex; align-items:center; gap:3px; height:24px; padding:0 24px; color:#9c9690; font-size:8px; }
.tc-typing[hidden] { display:none; }
.tc-typing span { width:4px; height:4px; border-radius:50%; background:var(--jw-blue-300); animation:tcTyping .9s infinite alternate; }
.tc-typing span:nth-child(2) { animation-delay:.18s; }
.tc-typing span:nth-child(3) { animation-delay:.36s; }
.tc-typing b { margin-left:5px; font-weight:400; }
.tc-action-message { min-height:20px; padding:3px 24px; color:var(--jw-blue-700); font-size:9px; }
.tc-composer { position:relative; margin:0 20px 18px; padding:10px 11px 9px; border:1px solid #ddd8d3; border-radius:11px; background:#fff; transition:border-color .15s ease, box-shadow .15s ease; }
.tc-composer:focus-within { border-color:var(--tc-accent); box-shadow:0 0 0 3px rgba(24,66,173,.08); }
.tc-composer textarea { display:block; width:100%; min-height:36px; max-height:100px; padding:5px 3px 8px; border:0; background:transparent; font-size:11px; line-height:1.5; resize:none; }
.tc-compose-actions { position:relative; display:flex; align-items:center; justify-content:space-between; }
.tc-compose-actions > div:first-child { display:flex; gap:3px; }
.tc-compose-actions button:not(.tc-send) { display:flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:7px; color:#8a847f; font-size:17px; }
.tc-compose-actions button:not(.tc-send):hover { background:var(--tc-surface); }
.tc-compose-actions svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.7; }
.tc-send { display:flex; align-items:center; gap:7px; min-height:32px; padding:0 10px 0 13px; border-radius:7px; background:var(--tc-accent); color:#fff; font-size:10px; font-weight:700; transition:background .15s ease, transform .15s ease; }
.tc-send:hover { background:var(--tc-accent-dark); }
.tc-send:active { transform:translateY(1px); }
.tc-send svg { width:13px; height:13px; }
.tc-emojis { position:absolute; bottom:38px; left:0; display:flex !important; gap:3px; padding:7px; border:1px solid var(--tc-line); border-radius:9px; background:#fff; box-shadow:0 12px 30px rgba(53,45,38,.12); }
.tc-emojis[hidden] { display:none !important; }
.tc-emojis button { font-size:16px !important; }
.tc-details { min-width:0; min-height:0; overflow-y:auto; border-left:1px solid var(--tc-line); background:#fff; }
.tc-details > header { display:flex; align-items:center; justify-content:space-between; min-height:76px; padding:0 18px; border-bottom:1px solid var(--tc-line); font-size:12px; }
.tc-details > header button { display:none; color:#8e8882; font-size:22px; }
.tc-detail-room { padding:24px 18px 21px; border-bottom:1px solid var(--tc-line); text-align:center; }
.tc-detail-room .tc-avatar { width:48px; height:48px; margin:0 auto; border-radius:13px; font-size:13px; }
.tc-detail-room h3 { margin-top:11px; font-size:13px; }
.tc-detail-room p { margin-top:7px; color:#918b85; font-size:9px; line-height:1.6; }
.tc-detail-section { padding:20px 18px; border-bottom:1px solid var(--tc-line); }
.tc-detail-title { display:flex; align-items:center; justify-content:space-between; margin-bottom:13px; font-size:10px; }
.tc-detail-title span { color:#aaa49e; font-size:9px; }
.tc-members { display:flex; flex-direction:column; gap:11px; }
.tc-members li { display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; }
.tc-members .tc-avatar { width:29px; height:29px; border-radius:8px; font-size:9px; }
.tc-members strong { display:block; font-size:9px; }
.tc-members small { display:block; margin-top:3px; color:#aaa49e; font-size:8px; }
.tc-member-state { width:6px; height:6px; border-radius:50%; background:var(--jw-blue-500); }
.tc-member-state.is-away { background:#c3b38b; }
.tc-pinned { display:flex; flex-direction:column; gap:8px; }
.tc-pinned article { display:grid; grid-template-columns:auto 1fr; gap:9px; align-items:center; padding:10px; border-radius:8px; background:var(--tc-surface); }
.tc-pinned article > span { display:flex; align-items:center; justify-content:center; width:34px; height:31px; border-radius:6px; background:#fff; color:var(--tc-accent); font-size:7px; font-weight:800; }
.tc-pinned strong, .tc-pinned small { display:block; }
.tc-pinned strong { font-size:9px; }
.tc-pinned small { margin-top:4px; color:#aaa49e; font-size:7px; }
.tc-socket-note { margin:18px; padding:13px; border-radius:8px; background:var(--tc-accent-soft); color:var(--jw-blue-700); font-size:8px; line-height:1.6; }
.tc-socket-note b { display:block; margin-bottom:3px; color:var(--tc-accent); font-size:8px; letter-spacing:.08em; }
.tc-overlay { display:none; }

@keyframes tcTyping {
	from { transform:translateY(0); opacity:.45; }
	to { transform:translateY(-3px); opacity:1; }
}

@media screen and (max-width:1100px) {
	.tc-shell { grid-template-columns:270px minmax(0, 1fr); }
	.tc-details { position:absolute; top:0; right:0; z-index:20; width:280px; height:100%; box-shadow:-18px 0 44px rgba(48,40,34,.12); transform:translateX(105%); transition:transform .2s ease; }
	.tc-details.is-open { transform:translateX(0); }
	.tc-details > header button { display:block; }
}

@media screen and (max-width:768px) {
	#team-chat { padding:28px 0 50px; }
	.tc-shell { grid-template-columns:1fr; height:680px; border-radius:12px; }
	.tc-sidebar { position:absolute; top:0; bottom:0; left:0; z-index:30; width:min(300px, 86vw); box-shadow:18px 0 44px rgba(48,40,34,.16); transform:translateX(-105%); transition:transform .2s ease; }
	.tc-sidebar.is-open { transform:translateX(0); }
	.tc-workspace > button { display:block; }
	.tc-mobile-menu { display:block; }
	.tc-details { width:min(300px, 86vw); }
	.tc-overlay { position:absolute; inset:0; z-index:25; background:rgba(35,31,28,.38); }
	.tc-overlay.is-on { display:block; }
	.tc-message { max-width:88%; }
	.tc-message.is-mine { max-width:86%; }
}

@media screen and (max-width:480px) {
	.tc-conversation-head { padding:12px; }
	.tc-head-actions button:first-child { display:none; }
	.tc-messages { padding:18px 14px; }
	.tc-composer { margin:0 12px 12px; }
	.tc-send span { display:none; }
}

@media (prefers-reduced-motion:reduce) {
	.tc-room, .tc-head-actions button, .tc-send, .tc-sidebar, .tc-details { transition:none; }
	.tc-typing span { animation:none; }
}
