.data-panel.is-performance{padding:24px;border-top:1px solid var(--line);border-radius:14px;overflow:hidden}.data-panel.is-performance>.table-wrap{display:none}.data-panel.is-performance>.commercial-performance{width:100%;box-sizing:border-box}.data-panel.is-performance>.data-loading,.data-panel.is-performance>.data-empty{margin:-24px;min-height:300px}
.commercial-performance{display:grid;gap:18px}.commercial-performance>header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.commercial-performance h2,.commercial-performance p{margin:0}.commercial-performance p{margin-top:5px;color:var(--muted)}.performance-period,.objective-toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:8px}.performance-period label,.objective-toolbar label{display:grid;gap:4px;color:var(--muted);font-size:9px;font-weight:800}.performance-period input,.objective-toolbar input{height:38px;padding:0 9px;border:1px solid var(--line);border-radius:9px;background:#fff}.performance-cards{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px}.performance-cards article{display:grid;gap:6px;padding:16px;border:1px solid var(--line);border-radius:13px;background:#fff}.performance-cards small{color:var(--muted);font-size:8px;font-weight:800;text-transform:uppercase}.performance-cards strong{font-size:20px}.performance-cards span{color:var(--role);font-size:10px;font-weight:700}.performance-table{display:grid;gap:10px}.performance-table h3{margin:0}.objective-toolbar{margin-bottom:15px;padding:16px 16px 0}.data-table tr.is-clickable{cursor:pointer}.data-table tr[data-objective-index] td:first-child strong,.data-table tr[data-objective-index] td:first-child small{display:block}.data-table tr[data-objective-index] td:first-child small{margin-top:4px;color:var(--muted)}.objective-progress{width:150px;height:7px;margin-bottom:5px;overflow:hidden;border-radius:999px;background:#eaecf0}.objective-progress span{display:block;height:100%;border-radius:inherit;background:var(--role)}.data-table tr[data-objective-index] td:nth-child(3)>b,.data-table tr[data-objective-index] td:nth-child(3)>small{display:block;font-size:9px}.data-table tr[data-objective-index] td:nth-child(3)>small{color:var(--muted)}.objective-editor .contract-modal{max-width:760px}.objective-form{padding:18px}.objective-editor footer{display:flex;justify-content:flex-end;gap:8px;padding:0 18px 18px}
@media(max-width:900px){.data-panel.is-performance{padding:18px}.data-panel.is-performance>.data-loading,.data-panel.is-performance>.data-empty{margin:-18px}.performance-cards{grid-template-columns:repeat(2,minmax(140px,1fr))}.commercial-performance>header{align-items:stretch;flex-direction:column}}@media(max-width:540px){.data-panel.is-performance{padding:14px}.data-panel.is-performance>.data-loading,.data-panel.is-performance>.data-empty{margin:-14px}.performance-cards{grid-template-columns:1fr}.performance-period,.objective-toolbar{display:grid;grid-template-columns:1fr 1fr}.performance-period button,.objective-toolbar button{grid-column:1/-1}}
.performance-period select{height:38px;min-width:150px;padding:0 9px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink)}
@media(max-width:540px){.performance-period label:first-child,.performance-period label:has([data-performance-commercial]){grid-column:1/-1}.performance-period select{width:100%}}

/* Dettaglio obiettivo: stessa gerarchia delle configurazioni commerciali. */
.objective-editor .objective-editor-modal{display:flex;flex-direction:column;width:min(980px,calc(100vw - 32px));height:min(90vh,820px);max-width:980px;overflow:hidden}.objective-editor-modal>header{flex:0 0 auto}.objective-editor-modal>footer{display:flex;flex:0 0 auto;justify-content:flex-end;gap:8px;padding:14px 18px;border-top:1px solid var(--line);background:#fff}.objective-form{display:grid;flex:1;min-height:0;gap:14px;padding:16px 18px 22px;overflow:auto;background:#f5f7fa}.objective-summary{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;padding:13px 15px;border:1px solid #b9d7ca;border-radius:13px;background:#effaf4}.objective-summary>span{min-width:76px;padding:7px 10px;border-radius:999px;background:#d8f2e3;color:#197044;font-size:9px;font-weight:900;text-align:center;text-transform:uppercase}.objective-summary small,.objective-summary strong,.objective-summary p{display:block;margin:0}.objective-summary small{color:#527160;font-size:8px;font-weight:900;text-transform:uppercase}.objective-summary strong{margin-top:2px;font-size:14px}.objective-summary p{margin-top:3px;color:#52635a;font-size:10px;line-height:1.4}.objective-summary-progress{grid-column:1/-1;height:6px;overflow:hidden;border-radius:999px;background:#d9e8df}.objective-summary-progress span{display:block;height:100%;border-radius:inherit;background:#24945a}.objective-editor-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.objective-card{display:grid;gap:13px;padding:15px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 4px 14px rgb(16 24 40 / 4%)}.objective-card>header{display:flex;align-items:center;gap:10px}.objective-card>header>span{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:9px;background:#eef4ff;color:var(--role);font-size:9px;font-weight:900}.objective-card>header>div{min-width:0;flex:1}.objective-card>header strong,.objective-card>header small{display:block}.objective-card>header strong{font-size:13px}.objective-card>header small{margin-top:2px;color:var(--muted);font-size:9px;font-weight:500}.objective-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:11px}.objective-card-grid .field-wide{grid-column:1/-1}.objective-card label{display:grid;gap:5px;color:#667085;font-size:9px;font-weight:800}.objective-card input,.objective-card select,.objective-card textarea{width:100%;box-sizing:border-box;border:1px solid #d5dae2;border-radius:9px;background:#fff;color:var(--ink);font:inherit;font-size:11px}.objective-card input,.objective-card select{height:40px;padding:0 10px}.objective-card textarea{min-height:88px;padding:10px;resize:vertical;line-height:1.45}.objective-card input:focus,.objective-card select:focus,.objective-card textarea:focus{border-color:var(--role);outline:3px solid color-mix(in srgb,var(--role) 12%,transparent)}.objective-card select:disabled{background:#f4f6f8;color:#667085}.objective-input-suffix{display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:center;border:1px solid #d5dae2;border-radius:9px;overflow:hidden}.objective-input-suffix:focus-within{border-color:var(--role);outline:3px solid color-mix(in srgb,var(--role) 12%,transparent)}.objective-input-suffix input{border:0!important;border-radius:0!important;outline:0!important}.objective-input-suffix b{display:grid;place-items:center;height:100%;border-left:1px solid #e1e5eb;background:#f6f7f9;color:#667085}.objective-merchandise{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.objective-help{margin:0;color:var(--muted);font-size:9px;line-height:1.45}.objective-notes{display:grid}.objective-card .is-hidden{display:none!important}
@media(max-width:800px){.objective-editor .objective-editor-modal{width:min(720px,calc(100vw - 22px));height:min(94vh,900px)}.objective-editor-columns{grid-template-columns:1fr}}
@media(max-width:560px){.objective-editor .objective-editor-modal{width:calc(100vw - 12px);height:calc(100vh - 12px)}.objective-form{padding:12px;gap:10px}.objective-summary{grid-template-columns:1fr}.objective-summary>span{width:max-content}.objective-card{padding:12px}.objective-card-grid,.objective-merchandise{grid-template-columns:1fr}.objective-card-grid .field-wide{grid-column:auto}.objective-editor-modal>footer{padding:12px}}

.objective-toolbar select{height:38px;min-width:190px;padding:0 9px;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink)}
@media(max-width:540px){.objective-toolbar label:has([data-objective-agent]){grid-column:1/-1}.objective-toolbar select{width:100%}}
