/* Shared collaboration panels: scoped so unrelated forms retain their layout. */
html.tc-app.has-team-presence body { padding-top:calc(var(--app-topbar-height) + 60px); }
.team-navbar-presence { position:absolute; top:100%; left:0; right:0; height:60px; display:flex; align-items:center; padding:4px 20px; border-bottom:1px solid var(--tc-panel-border); background:var(--tc-panel-bg-solid); }
.team-navbar-presence[hidden] { display:none!important; }
.team-navbar-avatars { display:flex; gap:6px; min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; padding:4px; }
.team-navbar-avatars > span { flex:0 0 auto; }
.team-navbar-avatar { position:relative; display:grid; place-items:center; width:44px; height:44px; padding:4px; border:2px solid transparent; border-radius:50%; background:var(--tc-panel-bg-soft); color:var(--tc-text-main); font:inherit; font-size:.75rem; }
.team-navbar-avatar img { position:absolute; inset:4px; border-radius:50%; object-fit:cover; width:32px; height:32px; }
.team-navbar-avatar.is-online { border-color:#198754; }
.team-navbar-avatar:focus-visible { outline:2px solid var(--tc-interactive-ink); outline-offset:2px; }
@media(max-width:767.98px) { .team-navbar-presence { padding-inline:12px; } }
.team-panel .modal-body { padding: clamp(1rem, 3vw, 1.75rem); }
.team-panel .modal-title { font-size:1.3rem; }
.team-panel [hidden], .team-bar [hidden] { display:none!important; }
.team-panel .team-intro { margin:0 0 1.5rem; line-height:1.6; color:var(--tc-text-muted); }
.team-section { margin-block:0 1.5rem; padding:1.25rem; border:1px solid var(--tc-panel-border); border-radius:1rem; background:var(--tc-panel-bg-solid); min-width:0; }
.team-section:last-child { margin-bottom:0; }
.team-section .team-section-title { margin:0; font-size:1.08rem; line-height:1.4; }
.team-section-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; margin-bottom:1rem; }
.team-panel .team-section p, .team-shared-projects p { margin:0; line-height:1.6; }
.team-stack { display:grid; gap:.85rem; }
.team-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; padding:1rem; border:1px solid var(--tc-panel-border); border-radius:.75rem; min-width:0; }
.team-card-info { flex:1 1 12rem; min-width:0; display:grid; gap:.35rem; overflow-wrap:anywhere; }
.team-meta { color:var(--tc-text-muted); font-size:.875rem; line-height:1.5; }
.team-actions { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; }
.team-panel .team-actions .btn, .team-shared-projects .btn { margin:0; min-height:2.6rem; white-space:normal; }
.team-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin-bottom:1rem; align-items:end; }
.team-field { display:grid; gap:.5rem; min-width:0; width:100%; }
.team-field > span { font-size:.9rem; font-weight:500; }
.team-field .form-control, .team-field .form-select { width:100%; min-width:0; margin:0; }
.team-member-controls { flex:1 1 100%; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:1rem; padding-top:.75rem; border-top:1px solid var(--tc-panel-border); }
.team-check { display:flex; align-items:flex-start; gap:.65rem; line-height:1.5; margin-block:1rem; }
.team-check input { flex:0 0 auto; margin-top:.3rem; }
.team-panel .team-section .team-hint { margin-block:0 1rem; font-size:.875rem; color:var(--tc-text-muted); }
.team-empty { color:var(--tc-text-muted); font-size:.9rem; padding:.25rem 0; }
.team-events { list-style:none; display:grid; gap:.75rem; padding:0; margin:0 0 1rem; }
.team-event { display:grid; grid-template-columns:2.25rem minmax(0,1fr); gap:.85rem; padding:1rem; border:1px solid var(--tc-panel-border); border-radius:.75rem; }
.team-event-icon { display:grid; place-items:center; width:2.25rem; height:2.25rem; border-radius:50%; background:var(--tc-panel-bg-soft); border:1px solid var(--tc-panel-border); }
.team-event-content { display:grid; gap:.4rem; min-width:0; overflow-wrap:anywhere; }
.team-event-head { display:flex; justify-content:space-between; gap:.5rem 1rem; flex-wrap:wrap; }
.team-event time { font-size:.8rem; color:var(--tc-text-muted); }
.team-event-changes { margin:0; padding-left:1.15rem; font-size:.9rem; line-height:1.6; }
.team-panel details > summary { cursor:pointer; font-weight:500; line-height:1.5; }
.team-panel details[open] > summary { margin-bottom:1rem; }
.team-panel .team-technical { font-size:.8rem; color:var(--tc-text-muted); }
.team-technical pre { white-space:pre-wrap; overflow-wrap:anywhere; margin:.6rem 0 0; max-height:12rem; overflow:auto; }
.team-bar { display:flex; align-items:center; gap:.75rem 1.25rem; flex-wrap:wrap; padding:1rem; }
.team-bar > .alert { flex-basis:100%; }
.team-shared-projects { margin-block:1.5rem; }
@media (max-width:575.98px) {
 .team-panel .modal-body { padding:1rem; }
 .team-section { padding:1rem; }
 .team-fields,.team-member-controls { grid-template-columns:minmax(0,1fr); }
 .team-actions { width:100%; }
 .team-actions > .btn { flex:1 1 auto; }
 .team-event { padding:.85rem; gap:.65rem; }
}

.team-section-activity { border-inline-start:3px solid var(--bs-primary);background:var(--tc-panel-bg-soft);color:var(--tc-text-main);padding:8px 12px;margin-bottom:12px;border-radius:6px;font-size:.78rem;overflow-wrap:anywhere; }
/* Stable cursor nodes interpolate between presence updates without intercepting input. */
.team-live-cursor { pointer-events:none; transition:left .25s ease-out,top .25s ease-out; display:flex; align-items:flex-start; gap:3px; max-width:180px; filter:drop-shadow(0 2px 3px rgb(0 0 0 / 18%)); }
.team-live-cursor-arrow { font-size:22px; line-height:1; transform:rotate(-25deg); }
.team-live-cursor-label { background:var(--cursor-color); color:white; border:1px solid rgb(255 255 255 / 65%); border-radius:5px 12px 12px; padding:4px 9px; font-size:12px; line-height:1.4; max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(prefers-reduced-motion:reduce) { .team-live-cursor { transition:none!important; } }
