.client-agent-text{white-space:pre-wrap;overflow-wrap:anywhere}
.client-agent-note{padding:10px 12px;border-radius:10px;background:#fff7e6;color:#6d521a;font-size:12px;line-height:1.6}
.client-agent-source,.client-agent-proposal{display:flex;flex-direction:column;gap:7px;padding:12px;margin-top:10px;border:1px solid #dbe7eb;border-radius:10px;background:#fff;color:#183346;overflow-wrap:anywhere}
.client-agent-source strong{font-size:12px}.client-agent-source span,.client-agent-source small,.client-agent-proposal small,.client-agent-reference{font-size:11px;line-height:1.6}
.client-agent-source .btn{align-self:flex-start}.client-agent-proposal{border-color:#91c8c1;background:#f5fbf9}
.client-agent-article-name{font-weight:700;font-size:15px!important}
.client-agent-article-match{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid #dbe7eb;border-radius:9px;background:#fff}
.client-agent-article-match strong{font-size:12px}.client-agent-article-match .btn{align-self:flex-start}
.client-agent-proposal p{font-size:12px;margin:0;line-height:1.6}.client-agent-reference{display:block;margin-top:9px;color:#718294}
.client-agent-actions{display:grid;gap:5px;font-size:12px;color:#183346;margin:10px 0}
.client-agent-actions select{width:100%;min-width:0}
.client-agent-proposal summary{cursor:pointer;font-weight:700;color:#0d6257}
.client-agent-proposal details small{display:block;margin:8px 0}
.client-agent-buttons{display:flex;flex-wrap:wrap;gap:8px}
.client-agent-operation-lines{display:grid;gap:6px;margin:0;padding-inline-start:22px;font-size:12px}
.client-agent-inline{overflow:auto;flex:0 1 auto;max-height:75%;padding:10px 14px;border-top:1px solid #dbe7eb;background:#fff}
.client-agent-inline .client-payment-declare-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.client-agent-inline .client-payment-declare-form label{display:grid;gap:3px;font-size:12px;min-width:0}
.client-agent-inline .client-payment-declare-form .control{width:100%;min-width:0}
.client-agent-inline .client-payment-declare-help,.client-agent-inline .client-payment-cash-fields,.client-agent-inline .client-payment-check-fields{grid-column:1/-1}
@media(max-width:480px){.client-agent-inline .client-payment-declare-form{grid-template-columns:1fr}}
.client-agent-business{max-width:100%;box-sizing:border-box}
.client-agent-business .client-agent-business-question{font-size:14px;font-weight:650;color:#163d48}
.client-agent-business-detail ul{padding-inline-start:20px;font-size:12px;margin:6px 0;max-height:16rem;overflow:auto}
.client-agent-business-picker{display:grid;gap:5px;min-width:0}
.client-agent-business-picker>div{display:grid;gap:4px;max-height:11rem;overflow:auto}
.client-agent-business .btn{white-space:normal;text-align:left;overflow-wrap:anywhere}
.client-agent-business-picker .control{width:100%;min-width:0}
.client-agent-business-file{display:grid;gap:4px;font-size:12px}
.client-agent-business-file input{width:100%;max-width:100%;font-size:12px}
#ai-floating-chat .ai-welcome-card .btn{display:block;width:100%;margin-top:8px;white-space:normal;text-align:left}
#ai-floating-panel.client-agent-panel .ai-floating-quick{display:none!important}
#ai-floating-panel.client-agent-panel{height:min(620px,calc(100vh - 110px))!important;height:min(620px,calc(100dvh - 110px))!important}
#ai-floating-panel.client-agent-panel .ai-floating-head,#ai-floating-panel.client-agent-panel .ai-floating-context,#ai-floating-panel.client-agent-panel .ai-floating-compose{flex-shrink:0!important}
#ai-floating-panel.client-agent-panel .ai-floating-chat{flex:1 1 0!important;min-height:0!important;overflow:auto!important}

/* The client robot opens the existing assistant, alongside its topbar shortcut. */
.ai-robot-caption{display:none}
body.az-erp-shell.role-client-dossier #ai-robot-btn{
  display:grid!important;width:72px!important;min-width:72px!important;height:64px!important;
  border-radius:24px!important;cursor:pointer;animation:none!important;
}
body.role-client-dossier #ai-floating:not(.is-user-positioned){
  right:max(20px,env(safe-area-inset-right))!important;
  bottom:max(36px,calc(env(safe-area-inset-bottom) + 28px))!important;
}
body.role-client-dossier #ai-robot-btn .ai-robot-caption{
  display:block;position:absolute;top:calc(100% + 5px);left:50%;transform:translateX(-50%);
  padding:3px 8px;border:1px solid #dbe7eb;border-radius:8px;background:#fff;color:#183346;
  font-size:11px;font-weight:700;line-height:1.3;white-space:nowrap;pointer-events:none;
}
body.role-client-dossier #ai-robot-btn:focus-visible{outline:3px solid #0f766e;outline-offset:5px}
body.az-erp-shell.role-client-dossier #ai-floating-panel.client-agent-panel{
  right:0!important;bottom:88px!important;
  width:min(400px,calc(100vw - 32px))!important;
  height:min(620px,calc(100vh - 136px))!important;
  height:min(620px,calc(100dvh - 136px))!important;
}
@media(max-width:720px){
  body.az-erp-shell.role-client-dossier #ai-floating-panel.client-agent-panel{
    position:fixed!important;left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;top:max(8px,env(safe-area-inset-top))!important;
    bottom:max(112px,calc(env(safe-area-inset-bottom) + 104px))!important;
    width:auto!important;height:auto!important;max-height:none!important;
  }
  body.role-client-dossier #ai-floating-panel .ai-floating-head{padding:12px}
  body.role-client-dossier #ai-floating-panel .ai-floating-compose{padding:10px}
}
@media(prefers-reduced-motion:reduce){
  body.role-client-dossier #ai-robot-btn .ai-robot-glow,
  body.role-client-dossier #ai-robot-btn .ai-robot-face{animation:none!important}
}
