/* Agent bindings for the canonical CRM workspace component. */
/* Keep one practice per row, as in the CRM production work list. */
#app-view.app-shell #contract-agent-panel.agent-archive-active #contract-agent-list{display:block}
#app-view.app-shell .has-workspace-navigation{--gt-border:var(--crm-border,#e1e4dd);--gt-ink:var(--selection-text,#173f31);--gt-radius:12px;--gt-shadow:0 5px 16px #2538290a}
#app-view.app-shell #contratti-view.has-workspace-navigation .contracts-hero{min-height:0;padding:0;margin:0;background:none;border:0;box-shadow:none}
#app-view.app-shell #contratti-view.has-workspace-navigation .contracts-hero-copy{padding:0}
#app-view.app-shell #contratti-view.has-workspace-navigation .contracts-hero :is(h1,p),#app-view.app-shell #contratti-view.has-workspace-navigation .contracts-hero-image{display:none}
#app-view.app-shell #contract-agent-navigation{display:flex;justify-content:flex-end;gap:8px;padding:0;margin:0 0 14px;background:none;border:0;box-shadow:none}
#app-view.app-shell #contratti-view[data-contract-section=archive] #contract-agent-navigation [data-contract-agent-section=archive],#app-view.app-shell #contratti-view[data-contract-section=send] #contract-agent-navigation [data-contract-agent-section=send]{display:none}
#app-view.app-shell #contratti-view[data-contract-section=send]>.crm-product-navigation,#app-view.app-shell #contratti-view[data-contract-section=send]>.crm-context .crm-context-tools{display:none}
#app-view.app-shell #contract-agent-panel.agent-archive-active{display:block}
#app-view.app-shell #contract-agent-archive{padding:0;background:none;border:0;box-shadow:none}
#app-view.app-shell #contratti-view .contract-agent-filters>label{flex:1 1 145px;max-width:240px;min-width:130px}
#app-view.app-shell #contratti-view .contract-agent-filters>label>span{display:block;font-size:.72rem;font-weight:500;color:#717a6c}
#app-view.app-shell .agent-contract-row{display:block;background:var(--crm-surface,#fff);border:1px solid var(--crm-border,#e1e4dd);border-radius:10px;padding:13px 16px;margin-bottom:12px;min-width:0;scroll-margin-top:var(--crm-context-bottom,170px)}
#app-view.app-shell .agent-contract-row.is-selected{border-color:var(--selection-border,#cfe3b2);box-shadow:inset 3px 0 0 var(--selection-accent,#a0cc43)}
#app-view.app-shell .agent-contract-row .production-summary-head{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
#app-view.app-shell .contract-row-select{display:flex;align-items:center;gap:12px;flex:1;min-width:0;text-align:left;background:transparent;border:0;padding:7px;border-radius:8px;color:var(--selection-text,#173f31);box-shadow:none;font-weight:500}
.contract-row-select>span:last-child{display:grid;gap:5px;min-width:0}.contract-row-select strong{font-size:.9rem;overflow-wrap:anywhere}.contract-row-select small{display:block;overflow-wrap:anywhere;font-size:.75rem}.contract-row-check{flex:none;font-size:1rem}
#app-view.app-shell .contract-row-actions{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0}
#app-view.app-shell .contract-row-actions :is(button,.contract-status){font-size:.75rem;padding:6px 9px;min-height:32px}
#app-view.app-shell .agent-contract-detail{padding-top:16px;margin-top:14px;border-top:1px solid var(--crm-border,#e1e4dd)}
#app-view.app-shell .agent-contract-detail[hidden]{display:none}
#app-view.app-shell .agent-contract-detail .contract-card{padding:12px;border:0;box-shadow:none;margin:0 0 12px}
#app-view.app-shell .agent-contract-detail .contract-product-tag{margin-bottom:10px}
#app-view.app-shell .agent-contract-detail .contract-metadata{font-size:.8rem;gap:12px}
#app-view.app-shell .agent-contract-pagination{font-size:.76rem;margin:10px 0 14px}
#app-view.app-shell .has-workspace-navigation .archive-tools>label[hidden]{display:none}
#app-view.app-shell #archivio-view.has-workspace-navigation .archive-tools{display:flex;margin:0 0 18px;padding:0}
#app-view.app-shell #archivio-view.has-workspace-navigation :is(.archive-summary,.archive-list){margin-left:0;margin-right:0}
@media(hover:hover) and (pointer:fine){#app-view.app-shell .contract-row-select:not([aria-pressed=true]):hover{background:#f6f8f1;box-shadow:inset 0 0 0 1px #9bdc55}}
@media(max-width:760px){
 #app-view.app-shell .agent-contract-row .production-summary-head{align-items:stretch;flex-direction:column;gap:8px}
 #app-view.app-shell .contract-row-actions{justify-content:space-between}
 #app-view.app-shell #contratti-view .contract-agent-filters>label{max-width:none;flex:1 1 140px}
 #app-view.app-shell .agent-contract-row{padding:12px}
}

/* Same persistent product navigation as CRM production. */
#app-view.app-shell #contratti-view .crm-product-navigation{position:sticky;top:var(--crm-context-bottom);z-index:20;background:var(--crm-workspace,#f5f5f2);padding:7px 0 9px}
@media(max-width:760px){#app-view.app-shell #contratti-view .crm-product-navigation{scroll-padding-inline:4px}#app-view.app-shell #contratti-view .crm-product-navigation button{min-height:42px}}
@media(max-height:620px) and (max-width:760px){#app-view.app-shell #contratti-view .crm-product-navigation{position:static}}

/* Keep pending integrations visible in mixed-status archives and when selected. */
#app-view.app-shell .agent-contract-row.needs-integration{background:#fff8e8;border-color:#d9a33a;box-shadow:inset 5px 0 0 #b86c00}
#app-view.app-shell .agent-contract-row.needs-integration.is-selected{border-color:#9b5b00;box-shadow:inset 5px 0 0 #b86c00,0 0 0 2px #f5d58c}
#app-view.app-shell .agent-contract-row.needs-integration .contract-row-actions .contract-status{background:#ffdf91;color:#663600;border:1px solid #c88a21;font-weight:850}

#app-view.app-shell .production-integration-block{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;text-align:left;margin:20px 0;padding:22px 26px;background:#fff8e8;border:1px solid #d9a33a;border-left:5px solid #b86c00;border-radius:16px;color:#663600}
.production-integration-block>span{display:grid;gap:7px}.production-integration-block strong{font-size:1.2rem}.production-integration-block small{font-size:.85rem}.production-integration-block>b{font-size:2.6rem;line-height:1}.production-integration-block:focus-visible{outline:3px solid #894400;outline-offset:3px}
