/* Fabronex Hub — Collaboration contextuelle */
.settings-team-access-section{margin-top:18px;padding:18px;border:1px solid #d9e4ec;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(16,54,84,.045)}
.settings-team-access-section>.bureau-panel-heading{margin-bottom:14px}
.settings-team-access-section .team-security-note{margin-bottom:12px}
.entity-collab-btn{
  border:1px solid #dbe5ec;background:#f7fafc;color:#173b57;border-radius:10px;
  min-height:34px;padding:7px 9px;display:inline-flex;align-items:center;justify-content:center;gap:5px;
  font-size:8px;font-weight:850;cursor:pointer;white-space:nowrap
}
.entity-collab-btn:hover{border-color:#c69a3b;background:#fffaf0}
.entity-collab-btn.small{min-width:34px;padding:6px}
.entity-collab-btn.small span{display:none}
.collab-task-row.has-collab{grid-template-columns:minmax(0,1fr) auto auto}
.shared-invoice-row.has-collab{grid-template-columns:minmax(0,1.4fr) 145px 145px 34px 34px}
.managed-company-card.has-collab{position:relative}
.managed-company-card.has-collab>.entity-collab-btn{position:absolute;right:47px;top:12px;z-index:2}
.drive-folder-card.has-collab{position:relative}
.entity-collab-inline{
  position:absolute;right:8px;top:8px;width:28px;height:28px;border-radius:9px;background:#fff;border:1px solid #d8e4ec;
  display:grid!important;place-items:center;z-index:3;font-size:12px;box-shadow:0 3px 10px rgba(16,54,84,.08)
}
.tracking-collab-open{width:100%;margin:0 0 10px;background:#f6fafc}

.collaboration-panel{
  position:fixed;z-index:360;top:0;right:0;width:min(520px,100vw);height:100dvh;background:#fff;
  border-left:1px solid #d7e2e9;box-shadow:-20px 0 60px rgba(14,45,69,.18);transform:translateX(104%);
  transition:transform .22s ease;display:flex;flex-direction:column
}
.collaboration-panel.open{transform:translateX(0)}
.collaboration-backdrop{position:fixed;z-index:359;inset:0;background:rgba(12,37,57,.28);backdrop-filter:blur(5px)}
.collaboration-panel>header{
  display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:17px 18px;border-bottom:1px solid #e4ebf0;
  background:linear-gradient(180deg,#f9fbfd,#fff)
}
.collaboration-panel>header h2{margin:3px 0 4px;color:#173b57;font-size:20px}
.collaboration-panel>header small{color:#7b909f;font-size:8px}
.collaboration-panel>header>button{border:1px solid #c69a3b;background:#103654;color:#e7c777;width:38px;height:38px;border-radius:11px;font-size:20px}
.collab-workflow-card{margin:13px 14px 0;padding:12px;border:1px solid #dde7ee;border-radius:14px;background:#f8fbfc}
.collab-workflow-status{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center}
.collab-workflow-status span{font-size:7px;color:#7b8e9c;text-transform:uppercase;font-weight:800}
.collab-workflow-status strong{font-size:9px;color:#173b57}
.collab-workflow-status em{font-style:normal;border-radius:999px;padding:5px 8px;background:#e8f2f7;color:#173b57;font-size:7px;font-weight:900}
.collab-workflow-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:10px}
.collab-workflow-actions label{display:flex;flex-direction:column;gap:4px}
.collab-workflow-actions label span{font-size:7px;color:#778b9a;font-weight:800}
.collab-workflow-actions select{height:34px;border:1px solid #d6e1e8;border-radius:9px;background:#fff;color:#425b6d;padding:0 8px;font-size:8px}
.collab-workflow-actions>button{align-self:end;height:34px;border:0;border-radius:9px;background:#103654;color:#fff;padding:0 11px;font-size:7.5px;font-weight:850}
.collab-validation-box{margin-top:10px;padding:10px;border:1px solid #ead5a5;background:#fffaf0;border-radius:10px;display:flex;justify-content:space-between;gap:9px;align-items:center}
.collab-validation-box strong{display:block;color:#624d1d;font-size:8.5px}
.collab-validation-box small{display:block;color:#876f39;font-size:7px;margin-top:3px}
#collabValidationDecision{display:flex;gap:6px}
#collabValidationDecision button{border:0;border-radius:8px;padding:7px 9px;font-size:7px;font-weight:900}
#collabValidationDecision .approve{background:#eaf7ef;color:#28754d}
#collabValidationDecision .reject{background:#fdeeed;color:#a23f39}
.collab-tabs{display:flex;gap:6px;padding:12px 14px 0}
.collab-tabs button{border:1px solid #d9e4eb;background:#fff;color:#667e8f;border-radius:10px;padding:8px 12px;font-size:8px;font-weight:850}
.collab-tabs button.active{background:#103654;color:#fff;border-color:#103654}
.collab-tab-panel{display:none;min-height:0;flex:1;padding:12px 14px 14px;overflow:auto}
.collab-tab-panel.active{display:flex;flex-direction:column}
.collab-comments{display:flex;flex-direction:column;gap:10px;flex:1;min-height:160px}
.collab-comment{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px;align-items:flex-start}
.collab-comment>span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e8f1f6;color:#173b57;font-size:8px;font-weight:900}
.collab-comment.mine>span{background:#fff1d5;color:#775715}
.collab-comment>div{border:1px solid #e0e8ee;border-radius:12px;padding:9px 10px;background:#fbfcfd}
.collab-comment.mine>div{background:#fffaf1;border-color:#ead7ad}
.collab-comment header{display:flex;justify-content:space-between;gap:8px}
.collab-comment header strong{font-size:8px;color:#294356}
.collab-comment header time{font-size:7px;color:#8b9aa4}
.collab-comment p{margin:5px 0 0;font-size:8.5px;line-height:1.45;color:#4f6474;white-space:pre-wrap}
.collab-comments-empty,.collab-feed-empty{padding:25px 10px;text-align:center;color:#82939f}
.collab-comments-empty span,.collab-feed-empty span{display:block;font-size:24px}
.collab-comments-empty strong,.collab-feed-empty strong{display:block;color:#173b57;margin-top:5px}
.collab-comments-empty small,.collab-feed-empty small{display:block;font-size:7.5px;margin-top:4px}
.collab-mention-bar{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}
.collab-mention-bar button{border:1px solid #d7e3ea;background:#f7fafc;color:#35566e;border-radius:999px;padding:5px 8px;font-size:7px;font-weight:800}
.collab-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:8px}
.collab-composer textarea{min-height:70px;resize:vertical;border:1px solid #d5e1e8;border-radius:11px;padding:10px;font:inherit;font-size:8.5px;color:#314a5c}
.collab-composer button{align-self:stretch;border:0;border-radius:11px;background:#103654;color:#fff;padding:0 13px;font-size:8px;font-weight:900}
.collab-entity-activity{display:flex;flex-direction:column;gap:7px}
.collab-entity-activity article{display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;padding:9px;border:1px solid #e5ebef;border-radius:11px;background:#fbfcfd}
.collab-entity-activity article>span{width:30px;height:30px;border-radius:9px;background:#eaf2f7;display:grid;place-items:center}
.collab-entity-activity strong{display:block;color:#294356;font-size:8.5px}
.collab-entity-activity small{display:block;color:#8395a1;font-size:7px;margin-top:3px}
.collab-activity-card{min-height:210px}
.collab-feed{display:flex;flex-direction:column;gap:5px}
.collab-feed-row{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;align-items:center;text-align:left;border:0;background:transparent;padding:7px;border-radius:9px}
.collab-feed-row:hover{background:#f6f9fb}
.collab-feed-row>span{width:30px;height:30px;border-radius:9px;background:#edf4f8;display:grid;place-items:center}
.collab-feed-row strong{display:block;color:#2b4354;font-size:8px;line-height:1.35}
.collab-feed-row small{display:block;color:#8696a1;font-size:7px;margin-top:2px}

@media(max-width:760px){
  .settings-team-access-section{padding:12px;margin-top:12px}
  .collaboration-panel{width:100vw}
  .collaboration-panel>header{padding-top:max(16px,env(safe-area-inset-top))}
  .collab-workflow-actions{grid-template-columns:1fr}
  .collab-workflow-actions>button{width:100%}
  .collab-workflow-status{grid-template-columns:1fr auto}
  .collab-workflow-status>span{grid-column:1/-1}
  .collab-task-row.has-collab{grid-template-columns:1fr}
  .collab-task-row.has-collab>.entity-collab-btn{margin:0 10px 10px;justify-self:stretch}
  .shared-invoice-row.has-collab{grid-template-columns:1fr}
  .shared-invoice-row.has-collab>.entity-collab-btn{width:100%}
  .managed-company-card.has-collab>.entity-collab-btn{right:44px;top:9px}
  .collab-composer{grid-template-columns:1fr}
  .collab-composer button{min-height:42px}
}