:root{--er-green:#057e44;--er-gold:#d2b62b;--er-bg:#f5f7f8;--er-text:#17221c;--er-muted:#718078;--er-border:#e1e7e3;--er-white:#fff;--er-dark:#0b3e28}
*{box-sizing:border-box}.er-login-body,.er-app-body{margin:0!important;background:var(--er-bg)!important;color:var(--er-text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}.er-login-body header,.er-login-body footer,.er-app-body>header,.er-app-body>footer{display:none!important}
.er-login-shell{min-height:100vh;display:grid;place-items:center;padding:28px;background:radial-gradient(circle at 20% 15%,rgba(210,182,43,.13),transparent 32%),linear-gradient(135deg,#f7faf8,#eef4f0)}.er-login-card{width:min(440px,100%);background:#fff;border:1px solid var(--er-border);border-radius:22px;padding:34px;box-shadow:0 25px 70px rgba(18,60,39,.12)}.er-brand{display:flex;align-items:center;gap:12px}.er-brand-mark{width:44px;height:44px;border-radius:12px;background:linear-gradient(145deg,var(--er-green),#046536);color:#fff;display:grid;place-items:center;font-weight:800;font-size:23px;box-shadow:inset 0 -3px 0 rgba(210,182,43,.9)}.er-brand strong{display:block;font-size:19px;letter-spacing:.04em}.er-brand span{display:block;color:var(--er-muted);font-size:11px;letter-spacing:.12em;margin-top:2px}.er-login-card h1{font-size:27px;margin:32px 0 8px}.er-login-card p{color:var(--er-muted);line-height:1.5;margin:0 0 24px}.er-form label,.er-login-card label{display:block;font-size:13px;font-weight:650;margin:14px 0}.er-form input,.er-form select,.er-form textarea,.er-login-card input[type=text],.er-login-card input[type=password]{width:100%;padding:12px 13px;border:1px solid #d4ddd7;border-radius:10px;background:#fff;margin-top:7px;font:inherit;outline:none}.er-form input:focus,.er-form select:focus,.er-form textarea:focus,.er-login-card input:focus{border-color:var(--er-green);box-shadow:0 0 0 3px rgba(5,126,68,.09)}.er-check{display:flex!important;align-items:center;gap:8px;font-weight:500!important}.er-check input{width:auto!important;margin:0!important}.er-login-footer{font-size:11px;text-align:center;color:#97a29c;margin-top:24px}.er-alert{padding:11px 13px;border-radius:9px;font-size:13px}.er-alert-error{background:#fff0f0;color:#a62b2b;border:1px solid #f2cdcd}
.er-btn{border:0;border-radius:9px;padding:11px 15px;font-weight:750;font-size:12px;letter-spacing:.02em;text-decoration:none!important;display:inline-flex;justify-content:center;align-items:center;cursor:pointer}.er-btn-primary{background:var(--er-green);color:#fff!important}.er-btn-primary:hover{background:#046c3a}.er-btn-light{background:#eef4f0;color:var(--er-green)!important}.er-btn-wide{width:100%;margin-top:12px;padding:13px}
.er-app{min-height:100vh;display:grid;grid-template-columns:250px 1fr}.er-sidebar{background:#103f2c;color:#fff;padding:23px 18px;position:fixed;inset:0 auto 0 0;width:250px;display:flex;flex-direction:column}.er-brand-sidebar{padding:5px 7px 25px;border-bottom:1px solid rgba(255,255,255,.1)}.er-brand-sidebar strong{color:#fff}.er-brand-sidebar span{color:rgba(255,255,255,.58)}.er-sidebar nav{display:grid;gap:4px;margin-top:22px}.er-sidebar nav a{color:rgba(255,255,255,.76);text-decoration:none;padding:10px 12px;border-radius:8px;font-size:14px}.er-sidebar nav a:hover,.er-sidebar nav a.active{background:rgba(255,255,255,.1);color:#fff}.er-sidebar nav a.active{box-shadow:inset 3px 0 0 var(--er-gold)}.er-sidebar-bottom{margin-top:auto;border-top:1px solid rgba(255,255,255,.1);padding-top:16px}.er-link-button{background:none;border:0;color:rgba(255,255,255,.75);cursor:pointer;padding:9px 11px}.er-main{grid-column:2;padding:0 34px 50px;min-width:0}.er-topbar{height:82px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--er-border)}.er-topbar h1{margin:0;font-size:20px}.er-topbar>div>span{font-size:12px;color:var(--er-muted)}.er-user{display:flex;align-items:center;gap:10px}.er-user strong,.er-user span{display:block}.er-user span{font-size:11px;color:var(--er-muted);margin-top:2px}.er-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#e6f1eb;color:var(--er-green);font-weight:800}.er-avatar.large{width:48px;height:48px;border-radius:13px}.er-section-head{display:flex;justify-content:space-between;align-items:end;margin:31px 0 18px}.er-section-head h2{margin:0 0 5px;font-size:25px}.er-section-head p{margin:0;color:var(--er-muted);font-size:13px}.er-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.er-kpi{background:#fff;border:1px solid var(--er-border);border-radius:14px;padding:18px}.er-kpi span{display:block;color:var(--er-muted);font-size:12px;margin-bottom:11px}.er-kpi strong{font-size:30px}.er-kpi strong.er-kpi-small{font-size:18px}.er-panel{background:#fff;border:1px solid var(--er-border);border-radius:14px;padding:20px;margin-bottom:18px}.er-panel h3{margin:0 0 16px}.er-panel h4{margin:22px 0 10px}.er-panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.er-panel-head h3{margin:0 0 4px}.er-panel-head p{margin:0;color:var(--er-muted);font-size:12px}.er-agent-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.er-agent-card{display:flex;align-items:center;gap:12px;border:1px solid var(--er-border);padding:14px;border-radius:12px;text-decoration:none!important;color:inherit!important}.er-agent-card:hover{border-color:#c8d6cd;box-shadow:0 7px 20px rgba(20,60,39,.06)}.er-agent-card>div:nth-child(2){min-width:0;flex:1}.er-agent-card strong,.er-agent-card span,.er-agent-card small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.er-agent-card span{color:var(--er-muted);font-size:12px;margin:3px 0}.er-agent-card small{color:var(--er-green);font-size:11px;font-weight:650}.er-agent-card b{font-size:25px;color:#a8b4ad}.er-two-col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.er-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.er-check-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.er-check-card{margin:0!important;border:1px solid var(--er-border);border-radius:9px;padding:10px!important;display:flex!important;gap:8px;align-items:center;font-weight:500!important}.er-check-card input{width:auto!important;margin:0!important}.er-form-msg{margin-top:10px;font-size:12px}.er-form-msg.ok{color:var(--er-green)}.er-form-msg.error{color:#b12d2d}.er-list{display:grid;gap:8px}.er-list-row{border:1px solid var(--er-border);border-radius:10px;padding:11px 12px;display:flex;justify-content:space-between;gap:12px;align-items:center}.er-list-row strong,.er-list-row span{display:block}.er-list-row span{color:var(--er-muted);font-size:11px;margin-top:3px}.er-chip-list{display:flex;gap:8px;flex-wrap:wrap}.er-chip-list>span{background:#eef5f1;border:1px solid #ddeae2;border-radius:999px;padding:8px 11px;color:#285640;font-size:12px}.er-chip-list.large>span{border-radius:10px;padding:13px 14px}.er-chip-list small{display:block;color:var(--er-green);font-size:9px;margin-top:4px;font-weight:800}.er-table-wrap{overflow:auto}.er-table{width:100%;border-collapse:collapse;font-size:12px}.er-table th{color:var(--er-muted);font-size:10px;text-transform:uppercase;letter-spacing:.05em;text-align:left;padding:10px;border-bottom:1px solid var(--er-border)}.er-table td{padding:12px 10px;border-bottom:1px solid #eef1ef}.er-badge{display:inline-block;padding:5px 7px;border-radius:999px;font-size:9px;font-weight:800}.er-badge.alta{background:#ffe9e7;color:#a22d25}.er-badge.media{background:#fff4d6;color:#856319}.er-badge.bassa{background:#e8f4ec;color:#267244}.er-agent-tabs{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:14px}.er-agent-tabs a{text-decoration:none!important;color:#496058;background:#fff;border:1px solid var(--er-border);border-radius:999px;padding:7px 10px;font-size:11px}.er-agent-tabs a.active{background:var(--er-green);color:#fff;border-color:var(--er-green)}.er-empty{color:#94a098;text-align:center;padding:24px;font-size:12px}.er-placeholder{text-align:center;padding:50px}.er-placeholder strong{font-size:18px}.er-placeholder p{color:var(--er-muted)}.er-status-row{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--er-border)}.er-status-row:last-child{border:0}.er-status-row strong,.er-status-row span{display:block}.er-status-row div span{color:var(--er-muted);font-size:11px;margin-top:4px}.er-status{font-size:10px!important;font-weight:800;border-radius:999px;padding:6px 9px}.er-status.ok{background:#e7f5ec;color:#16713c}.er-status.pending{background:#fff4d8;color:#8a6819}
@media(max-width:1000px){.er-kpis{grid-template-columns:1fr 1fr}.er-agent-grid{grid-template-columns:1fr 1fr}.er-two-col{grid-template-columns:1fr}.er-app{grid-template-columns:210px 1fr}.er-sidebar{width:210px}.er-main{padding:0 22px 40px}}
@media(max-width:760px){.er-app{display:block}.er-sidebar{position:relative;width:auto;min-height:auto}.er-sidebar nav{grid-template-columns:1fr 1fr}.er-main{padding:0 14px 35px}.er-topbar{height:auto;padding:16px 0}.er-kpis,.er-agent-grid,.er-form-grid,.er-check-grid{grid-template-columns:1fr}.er-user>div:last-child{display:none}.er-panel{padding:15px}}
/* Official Electra logo */
.er-brand-login{display:block;text-align:left}.er-logo{display:block;max-width:100%;height:auto}.er-logo-login{width:280px;max-height:120px;object-fit:contain;object-position:left center}.er-brand-login>span{margin-top:12px;color:var(--er-green);font-size:11px;font-weight:800;letter-spacing:.16em}.er-brand-sidebar{display:block}.er-logo-box{background:#fff;border-radius:12px;padding:10px 12px;margin-bottom:12px}.er-logo-sidebar{width:100%;max-height:70px;object-fit:contain;object-position:center}.er-brand-sidebar>span{display:block;text-align:center;color:rgba(255,255,255,.72);font-size:10px;font-weight:750;letter-spacing:.13em}
@media(max-width:760px){.er-logo-box{max-width:240px}.er-brand-sidebar>span{text-align:left;margin-left:4px}}
.er-api-grid{display:grid;grid-template-columns:1.4fr .8fr;gap:18px}.er-secret-wrap{position:relative}.er-secret-note{font-size:11px;color:var(--er-muted);margin-top:6px;line-height:1.45}.er-api-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.er-btn-outline{background:#fff;color:var(--er-green)!important;border:1px solid #b9d2c3}.er-btn:disabled{opacity:.58;cursor:not-allowed}.er-callout{border-left:4px solid var(--er-gold);background:#fffaf0;padding:13px 14px;border-radius:9px;font-size:12px;line-height:1.5;color:#66541b}.er-scan-box{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:end}.er-scan-box .er-form-msg{grid-column:1/-1}.er-scan-history{display:grid;gap:8px}.er-scan-row{display:grid;grid-template-columns:120px 150px 1fr 90px 90px;gap:10px;align-items:center;border:1px solid var(--er-border);border-radius:10px;padding:11px 12px;font-size:12px}.er-scan-row small{color:var(--er-muted)}.er-status.failed{background:#ffe8e8;color:#9b2525}.er-status.running{background:#e8f0ff;color:#285ea8}.er-status.completed{background:#e7f5ec;color:#16713c}.er-source-link{font-size:10px;color:var(--er-green)!important;text-decoration:none}.er-opportunity-detail{max-width:430px}.er-opportunity-detail small{display:block;color:var(--er-muted);margin-top:5px;line-height:1.35}.er-model-help{font-size:11px;color:var(--er-muted);margin-top:7px}
@media(max-width:900px){.er-api-grid{grid-template-columns:1fr}.er-scan-box{grid-template-columns:1fr}.er-scan-row{grid-template-columns:1fr 1fr}.er-scan-row>div:nth-child(3){grid-column:1/-1}}
.er-row-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.er-agent-manage-row{align-items:flex-start}.er-btn-danger{background:#fff0f0;color:#a62b2b!important;border:1px solid #efc9c9}.er-btn-danger:hover{background:#ffe4e4}.er-form-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:18px}.er-form-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}.er-form-title-row h4{margin:0}.er-mini-link{border:0;background:transparent;color:var(--er-green);font-size:11px;font-weight:750;cursor:pointer;padding:4px 0}.er-field-help{font-size:11px;color:var(--er-muted);line-height:1.45;margin:7px 0 10px}.er-active-check{margin-top:25px!important}.er-inline-ok{color:#16713c;font-size:10px}.er-inline-off{color:#9b2525;font-size:10px}
@media(max-width:760px){.er-row-actions{justify-content:flex-start;margin-top:8px}.er-agent-manage-row{display:block}}

/* v0.2.3 - System logs */
.er-log-mini{display:flex;flex-direction:column;gap:8px}.er-log-line{display:grid;grid-template-columns:78px 76px 100px 1fr;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #edf1ee}.er-log-line:last-child{border-bottom:0}.er-log-line small{color:#66756d}.er-log-line strong{font-size:12px;color:#42534a}.er-log-line>span:last-child{font-size:13px;color:#25332c}.er-log-level{display:inline-flex;align-items:center;justify-content:center;min-width:68px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:800;letter-spacing:.04em;background:#eef2ef;color:#4e5b54}.er-log-level.success{background:#e6f5ec;color:#057e44}.er-log-level.info{background:#e9f1f8;color:#27658b}.er-log-level.warning{background:#fff4da;color:#9c6a00}.er-log-level.error{background:#fde8e8;color:#b42318}.er-log-live-badge{display:flex;align-items:center;gap:8px;font-size:12px;color:#526159;background:#f3f7f4;border:1px solid #dfe8e2;border-radius:999px;padding:8px 12px}.er-log-live-badge span{width:8px;height:8px;border-radius:50%;background:#057e44;box-shadow:0 0 0 4px rgba(5,126,68,.12)}.er-log-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.er-log-actions select,.er-log-actions input{height:38px;border:1px solid #d8e0dc;border-radius:8px;padding:0 10px;background:#fff}.er-log-table-wrap{overflow:auto}.er-log-table{width:100%;border-collapse:collapse;min-width:760px}.er-log-table th,.er-log-table td{text-align:left;padding:11px 10px;border-bottom:1px solid #edf1ee;vertical-align:top;font-size:13px}.er-log-table th{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#718078;background:#f8faf9}.er-log-table code{font-size:11px;background:#f2f5f3;padding:3px 6px;border-radius:5px}.er-btn-danger{background:#fff;border:1px solid #e5b6b3;color:#a72b24}.er-btn-danger:hover{background:#fff4f3}.er-log-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:900px){.er-log-line{grid-template-columns:72px 72px 1fr}.er-log-line>span:last-child{grid-column:1/-1}.er-log-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

.er-scan-progress{margin-top:22px;padding:18px;border:1px solid #dce7e1;border-radius:14px;background:#f8fbf9}.er-progress-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.er-progress-head strong{font-size:16px}.er-progress-head span{font-weight:800;color:#057e44}.er-progress-track{height:12px;background:#e7efeb;border-radius:999px;overflow:hidden}.er-progress-track span{display:block;height:100%;background:linear-gradient(90deg,#057e44,#d2b62b);border-radius:999px;transition:width .45s ease}.er-progress-meta{display:flex;gap:18px;flex-wrap:wrap;margin-top:12px;color:#53655c;font-size:13px}.er-scan-progress small{display:block;margin-top:9px;color:#809087}.er-account-diagnostic{grid-column:1/-1;padding:14px;border:1px solid #dce7e1;border-radius:12px;background:#f8fbf9;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.er-account-diagnostic>span{color:#66776e}.er-repair-msg{width:100%;font-size:13px}.er-repair-msg.ok{color:#057e44}.er-repair-msg.error{color:#b42318}
.er-import-master{max-width:760px}.er-import-stats{margin-top:18px;padding:16px;border:1px solid #d8e5dc;background:#f7fbf8;border-radius:12px}.er-import-stats>strong{display:block;margin-bottom:12px}.er-import-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.er-import-grid span{background:#fff;border:1px solid #e2e8e4;border-radius:10px;padding:10px;font-size:12px;color:var(--er-muted)}.er-import-grid b{display:block;font-size:20px;color:var(--er-green);margin-top:4px}.er-account-diagnostic .er-row-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}

/* v0.3.4 - arresto manuale scansioni */
.er-scan-row{grid-template-columns:110px 145px 1fr 95px 105px 105px}.er-status.interrupted{background:#fff1dc;color:#8a4b08}.er-progress-actions{display:flex;align-items:center;gap:12px;margin-top:14px}.er-progress-actions #erStopScanMsg{font-size:12px;color:#7b5a25}.er-btn-danger{background:#b42318!important;color:#fff!important;border:1px solid #b42318!important}.er-btn-danger:hover{background:#8f1c13!important}.er-btn-small{padding:8px 10px!important;font-size:11px!important}@media(max-width:900px){.er-scan-row{grid-template-columns:1fr 1fr}.er-scan-row>div:nth-child(3){grid-column:1/-1}}

/* v0.3.5 - Import MASTER progress */
.er-import-progress{margin-top:16px;padding:16px;border:1px solid #dfe7e2;border-radius:14px;background:#fbfdfc}
.er-import-progress-top{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:10px}
.er-import-progress-top strong{font-size:15px;color:#173c2b}.er-import-progress-top span{font-weight:800;color:#057e44}
.er-progress-track{height:12px;border-radius:999px;background:#e7eeea;overflow:hidden}
.er-progress-bar{height:100%;background:linear-gradient(90deg,#057e44,#d2b62b);transition:width .35s ease;border-radius:999px}
.er-import-progress-meta{display:grid;grid-template-columns:1fr auto auto;gap:14px;margin-top:10px;font-size:13px;color:#5f7168;align-items:center}
.er-import-progress-meta #erImportCounter{font-weight:700;color:#344d41}.er-import-progress-meta #erImportElapsed{font-variant-numeric:tabular-nums;font-weight:700}
.er-import-warning{margin-top:10px;padding:10px 12px;border-radius:10px;background:#fff7dd;color:#765c00;font-size:13px;border:1px solid #eadc9a}
.er-btn-danger{background:#a82727!important;color:#fff!important;border-color:#a82727!important;margin-left:8px}
@media(max-width:760px){.er-import-progress-meta{grid-template-columns:1fr}.er-btn-danger{margin:8px 0 0 0}}
.er-source-families{margin:12px 0 4px;padding:14px 16px;border:1px solid #dfe8e2;border-radius:12px;background:#f8fbf9}.er-source-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.er-source-chips span{font-size:12px;padding:7px 10px;border-radius:999px;background:#eaf5ef;color:#135c39;border:1px solid #d5e9dd}.er-scan-live-log{margin-top:14px;padding:14px;border-radius:10px;background:#0e3327;color:#eaf8f1;max-height:210px;overflow:auto}.er-scan-live-log>strong{display:block;margin-bottom:8px;color:#fff}.er-scan-live-log #erScanLiveRows div{font-size:12px;line-height:1.55;padding:4px 0;border-bottom:1px solid rgba(255,255,255,.08)}

/* v0.6 Collector + AI Validator */
.er-collector-metrics{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:8px;margin:12px 0 4px}.er-collector-metrics span{background:#f7f8f8;border:1px solid #e7e9e8;border-radius:10px;padding:9px 11px;font-size:12px;color:#58615d}.er-collector-metrics b{display:block;color:#057e44;font-size:17px;margin-top:2px}.er-source-list{display:flex;flex-direction:column;gap:10px}.er-source-row{display:flex;justify-content:space-between;gap:14px;align-items:center;border:1px solid #e7e9e8;border-radius:12px;padding:12px}.er-source-row>div:first-child{min-width:0;display:flex;flex-direction:column;gap:3px}.er-source-row small{color:#6f7773}.er-source-row a{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:520px}.er-source-row>div:last-child{display:flex;gap:8px;align-items:center}.er-check{display:flex!important;align-items:center;gap:8px}.er-check input{width:auto!important}@media(max-width:900px){.er-collector-metrics{grid-template-columns:repeat(2,minmax(120px,1fr))}.er-source-row{align-items:flex-start;flex-direction:column}.er-source-row>div:last-child{width:100%;justify-content:flex-end}}

/* v0.6.1 - layout scansione Source-First */
.er-scan-box{
  display:grid;
  grid-template-columns:minmax(240px,.65fr) minmax(420px,2fr);
  gap:16px 18px;
  align-items:start;
}
.er-scan-box>label{margin:0!important;min-width:0}
.er-scan-box>label select{width:100%;min-width:0}
.er-scan-box>.er-callout,
.er-scan-box>.er-source-families,
.er-scan-box>.er-form-msg{
  grid-column:1/-1;
}
.er-scan-box>.er-callout{margin-top:2px}
.er-scan-box>.er-source-families{margin:0}
.er-scan-box>button[type="submit"]{
  grid-column:1/-1;
  width:auto;
  min-width:230px;
  justify-self:start;
  margin-top:2px;
}
@media(max-width:1050px){
  .er-scan-box{grid-template-columns:1fr 1.5fr}
}
@media(max-width:820px){
  .er-scan-box{grid-template-columns:1fr}
  .er-scan-box>.er-callout,
  .er-scan-box>.er-source-families,
  .er-scan-box>.er-form-msg,
  .er-scan-box>button[type="submit"]{grid-column:1}
  .er-scan-box>button[type="submit"]{width:100%}
}

/* v0.6.3 - progresso scansione live sempre visibile */
.er-scan-progress{border:2px solid #cfe2d7!important;background:#fff!important;box-shadow:0 10px 28px rgba(5,126,68,.08);scroll-margin-top:90px}
.er-progress-head-right{display:flex;align-items:center;gap:18px}.er-progress-head-right .er-elapsed{font-size:12px;color:#66776e;font-weight:600}.er-progress-head-right .er-elapsed b{color:#173c2b;font-variant-numeric:tabular-nums}
.er-progress-meta .er-current-step{flex:1 1 100%;padding:10px 12px;background:#f0f7f3;border-radius:10px;color:#173c2b}.er-progress-meta .er-current-step b{color:#057e44;font-size:11px;letter-spacing:.04em}
.er-collector-metrics{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin-top:14px}.er-collector-metrics span{padding:9px 10px;border:1px solid #e0e9e4;border-radius:10px;background:#fbfdfc;font-size:12px;color:#607168}.er-collector-metrics b{display:block;margin-top:2px;color:#173c2b;font-size:16px}
.er-scan-live-log{margin-top:14px;padding:12px 14px;border:1px solid #e1e9e5;border-radius:12px;background:#0f2f22;color:#e9f6ef;max-height:180px;overflow:auto}.er-scan-live-log>strong{display:block;margin-bottom:8px;color:#d2b62b}.er-scan-live-log #erScanLiveRows>div{padding:5px 0;border-bottom:1px solid rgba(255,255,255,.08);font-size:12px}.er-scan-live-log #erScanLiveRows>div:last-child{border-bottom:0}
@media(max-width:900px){.er-collector-metrics{grid-template-columns:repeat(2,minmax(120px,1fr))}.er-progress-head-right{gap:10px}}

/* v0.6.6 - HUD scansione sempre visibile */
.er-scan-hud{position:fixed;right:24px;bottom:24px;width:min(440px,calc(100vw - 32px));z-index:99999;background:#fff;border:2px solid #057e44;border-radius:18px;padding:16px 18px;box-shadow:0 18px 55px rgba(0,0,0,.22)}
.er-hud-head{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#173c2b}.er-hud-head strong{font-size:14px;letter-spacing:.02em}.er-hud-head span{font-weight:900;color:#057e44;font-size:18px}
.er-hud-track{height:10px;background:#e6eee9;border-radius:999px;overflow:hidden;margin:10px 0}.er-hud-track span{display:block;height:100%;background:linear-gradient(90deg,#057e44,#d2b62b);transition:width .35s ease}
.er-hud-area{font-weight:700;color:#243e31;background:#f3f8f5;border-radius:10px;padding:10px 12px;margin-bottom:10px;min-height:20px}
.er-hud-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;font-size:12px;color:#6a776f;margin-bottom:10px}.er-hud-grid span{background:#fafcfa;border:1px solid #e5ece7;border-radius:9px;padding:8px}.er-hud-grid b{display:block;color:#173c2b;font-size:14px;margin-top:2px}
.er-hud-heartbeat{font-size:11px;color:#64736b;margin:4px 0 10px}.er-scan-hud .er-btn{width:100%}
@media(max-width:700px){.er-scan-hud{right:16px;bottom:16px}.er-hud-grid{grid-template-columns:repeat(2,1fr)}}

.er-callout-error{border-left-color:#b42318!important;background:#fff4f2!important;color:#7a271a!important}.er-panel .er-kpis{margin-top:16px;margin-bottom:8px}.er-list-row span{display:block;color:#6b7a72;font-size:12px;margin-top:4px}


/* v0.8.5 - UI opportunità, nessuna modifica al motore di scansione */
.er-opportunity-summary{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:10px;margin:0 0 14px}
.er-opportunity-summary>div{background:#fff;border:1px solid #e0e8e3;border-radius:12px;padding:12px 14px;box-shadow:0 3px 10px rgba(5,126,68,.03)}
.er-opportunity-summary span{display:block;font-size:10px;letter-spacing:.06em;font-weight:800;color:#708078}
.er-opportunity-summary strong{display:block;margin-top:4px;font-size:24px;color:#173c2b}
.er-opportunity-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 14px!important;margin-bottom:12px}
.er-opportunity-toolbar strong{margin-right:4px}.er-opportunity-toolbar select,.er-opportunity-toolbar input{width:auto!important;min-width:160px;max-width:270px;padding:9px 10px!important}
.er-opportunity-toolbar input{min-width:250px;flex:1}.er-opportunity-toolbar #erOppVisibleCount{margin-left:auto;color:#66776e;font-size:12px;font-weight:700}
.er-novelty{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;letter-spacing:.04em}.er-novelty-nuova{background:#e2f4e9;color:#057e44}.er-novelty-storico{background:#f1f3f2;color:#66736d}
.er-opportunity-detail small,.er-table td small{display:block;margin-top:4px;color:#6b7a72;line-height:1.35}.er-source-link{font-weight:700}
@media(max-width:1100px){.er-opportunity-summary{grid-template-columns:repeat(3,minmax(110px,1fr))}}
@media(max-width:700px){.er-opportunity-summary{grid-template-columns:repeat(2,minmax(110px,1fr))}.er-opportunity-toolbar select,.er-opportunity-toolbar input{width:100%!important;max-width:none}.er-opportunity-toolbar #erOppVisibleCount{width:100%;margin-left:0}}


/* v0.8.7 — Direzione Commerciale */
.er-feedback-kpis{grid-template-columns:repeat(6,minmax(120px,1fr));}
.er-feedback-list{display:grid;gap:14px}.er-feedback-card{border:1px solid #dfe9e3;border-radius:14px;padding:16px;background:#fff}.er-feedback-card.has-note{border-left:5px solid #057e44}.er-feedback-card.no-note{border-left:5px solid #d2b62b}.er-feedback-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.er-feedback-head h3{margin:4px 0}.er-feedback-agent{font-weight:800;color:#057e44}.er-feedback-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:12px}.er-agent-note-box,.er-direction-note-box{padding:14px;border-radius:12px;background:#f7faf8}.er-agent-note-box{background:#edf7f1}.er-agent-note-box strong,.er-direction-note-box strong{display:block;margin-bottom:8px}.er-agent-note-box p{font-size:15px;line-height:1.5;margin:6px 0}.er-muted{color:#8a958f;font-style:italic}.er-direction-note-box textarea,.er-director-opportunity textarea{width:100%;box-sizing:border-box}.er-feedback-mini{display:grid;gap:10px}.er-feedback-mini-row{padding:12px 14px;border:1px solid #e2ebe6;border-radius:12px}.er-feedback-mini-row strong{color:#057e44;margin-right:8px}.er-feedback-mini-row p{margin:6px 0 0;color:#4d5e55}.er-agent-note-inline{margin:8px 0;padding:10px;border-radius:9px;background:#edf7f1}.er-agent-note-inline strong{font-size:11px;color:#057e44}.er-agent-note-inline p{margin:4px 0;white-space:normal}.er-director-opportunity .er-status{display:inline-block;margin-bottom:6px}
@media(max-width:1100px){.er-feedback-kpis{grid-template-columns:repeat(3,1fr)}.er-feedback-grid{grid-template-columns:1fr}}@media(max-width:700px){.er-feedback-kpis{grid-template-columns:1fr 1fr}}

/* v0.8.9 - opportunità manuali Direzione */
.er-direction-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#fff7d6;border:1px solid #d2b62b;color:#6b5900;font-weight:800;font-size:10px;letter-spacing:.08em;margin:0 0 6px}
.er-agent-direction-note{border-left:4px solid #d2b62b;background:#fffaf0;padding:10px 12px;border-radius:8px;margin:0 0 10px;max-width:360px}
.er-agent-direction-note strong{font-size:10px;letter-spacing:.08em;color:#695700}.er-agent-direction-note p{margin:5px 0 0;white-space:normal;line-height:1.35}
.er-flow-copy p{padding:10px 0;margin:0;border-bottom:1px solid #edf1ee}.er-flow-copy p:last-child{border-bottom:0}

/* v0.8.12m — MOBILE SAFE: solo presentazione responsive della tabella Opportunità.
   Nessuna modifica a scanner, AJAX, DB, filtri o salvataggi. Desktop invariato. */
@media (max-width: 760px) {
  /* Il contenitore non deve più creare scroll orizzontale per le opportunità */
  .er-panel:has(#erOpportunitiesTable) {
    padding: 10px !important;
    overflow: visible;
  }
  .er-panel:has(#erOpportunitiesTable) .er-table-wrap {
    overflow: visible;
    width: 100%;
  }

  #erOpportunitiesTable,
  #erOpportunitiesTable tbody {
    display: block;
    width: 100%;
  }
  #erOpportunitiesTable thead {
    display: none;
  }
  #erOpportunitiesTable tr[data-novelty] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
    margin: 0 0 14px;
    border: 1px solid #dfe8e2;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(5,126,68,.04);
  }
  #erOpportunitiesTable tr[data-novelty][style*="display: none"] {
    display: none !important;
  }
  #erOpportunitiesTable td {
    display: block;
    min-width: 0;
    width: auto;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid #edf2ef;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
  #erOpportunitiesTable td::before {
    display: block;
    margin-bottom: 5px;
    color: #718078;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  /* Layout standard: 9 colonne (agente già selezionato / login agente) */
  #erOpportunitiesTable td:nth-child(1)::before { content: "Data"; }
  #erOpportunitiesTable td:nth-child(2)::before { content: "Novità"; }
  #erOpportunitiesTable td:nth-child(3)::before { content: "Tipo"; }
  #erOpportunitiesTable td:nth-child(4)::before { content: "Opportunità / Prospect"; }
  #erOpportunitiesTable td:nth-child(5)::before { content: "Comune"; }
  #erOpportunitiesTable td:nth-child(6)::before { content: "Categoria"; }
  #erOpportunitiesTable td:nth-child(7)::before { content: "Priorità"; }
  #erOpportunitiesTable td:nth-child(8)::before { content: "Fonte"; }
  #erOpportunitiesTable td:nth-child(9)::before { content: "Stato e riscontro"; }

  /* Vista Direzione/Tutti: 10 colonne, con Agente in seconda posizione */
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(1)::before { content: "Data"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(2)::before { content: "Agente"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(3)::before { content: "Novità"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(4)::before { content: "Tipo"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(5)::before { content: "Opportunità / Prospect"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(6)::before { content: "Comune"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(7)::before { content: "Categoria"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(8)::before { content: "Priorità"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(9)::before { content: "Fonte"; }
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(10)::before { content: "Stato e riscontro"; }

  /* Data + Novità/Agente rimangono compatti in alto */
  #erOpportunitiesTable td:nth-child(1),
  #erOpportunitiesTable td:nth-child(2) {
    background: #fbfdfc;
  }

  /* La descrizione e lo stato usano tutta la larghezza della card */
  #erOpportunitiesTable:not(:has(thead th:nth-child(10))) td:nth-child(4),
  #erOpportunitiesTable:not(:has(thead th:nth-child(10))) td:nth-child(8),
  #erOpportunitiesTable:not(:has(thead th:nth-child(10))) td:nth-child(9),
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(5),
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(9),
  #erOpportunitiesTable:has(thead th:nth-child(10)) td:nth-child(10) {
    grid-column: 1 / -1;
  }

  #erOpportunitiesTable .er-opportunity-detail strong {
    display: block;
    font-size: 16px;
    line-height: 1.3;
    color: #173c2b;
    margin-bottom: 7px;
  }
  #erOpportunitiesTable .er-opportunity-detail small,
  #erOpportunitiesTable td small {
    font-size: 12px;
    line-height: 1.45;
  }
  #erOpportunitiesTable .er-source-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 10px;
    margin: 2px 0 4px;
    border: 1px solid #d7e6dd;
    border-radius: 9px;
    text-decoration: none;
  }
  #erOpportunitiesTable select,
  #erOpportunitiesTable textarea,
  #erOpportunitiesTable button {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }
  #erOpportunitiesTable select {
    min-height: 44px;
    font-size: 16px;
  }
  #erOpportunitiesTable textarea {
    min-height: 86px;
    font-size: 16px;
    margin-top: 8px;
  }
  #erOpportunitiesTable details {
    margin-top: 10px;
  }
  #erOpportunitiesTable details summary {
    min-height: 38px;
    display: flex;
    align-items: center;
    font-weight: 800;
    color: #173c2b;
  }
  #erOpportunitiesTable .er-agent-direction-note,
  #erOpportunitiesTable .er-agent-note-inline {
    max-width: none;
  }

  /* Filtri più compatti ma facilmente utilizzabili con touch */
  .er-opportunity-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .er-opportunity-toolbar > strong,
  .er-opportunity-toolbar #erOppSearch,
  .er-opportunity-toolbar #erOppVisibleCount {
    grid-column: 1 / -1;
  }
  .er-opportunity-toolbar select,
  .er-opportunity-toolbar input {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 44px;
    font-size: 16px;
  }
  .er-opportunity-toolbar #erOppVisibleCount {
    margin: 0;
    padding-top: 2px;
  }
}

@media (max-width: 430px) {
  .er-opportunity-toolbar {
    grid-template-columns: 1fr;
  }
  .er-opportunity-toolbar > strong,
  .er-opportunity-toolbar #erOppSearch,
  .er-opportunity-toolbar #erOppVisibleCount {
    grid-column: 1;
  }
}
\n\n/* v0.8.13 - Notifiche Direzione: solo UI, nessuna modifica al motore Radar */\n.er-nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;margin-left:8px;border-radius:999px;background:#d2b62b;color:#123b2a;font-size:11px;font-weight:900}\n.er-direction-notice-alert{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;margin:0 0 18px;border:1px solid #d7e5dc;border-left:4px solid #d2b62b;border-radius:14px;background:#fffdf5}\n.er-direction-notice-alert>div{display:flex;flex-direction:column;gap:4px}.er-direction-notice-alert strong{color:#164a35}.er-direction-notice-alert span{color:#6f7f76;font-size:13px}\n.er-notification-list{display:grid;gap:14px}.er-notification-card{border:1px solid #dce6e0;border-radius:14px;padding:18px;background:#fff}.er-notification-card.is-unread{border-left:5px solid #d2b62b;background:#fffdf6}.er-notification-card.is-read{opacity:.86}.er-notification-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.er-notification-head h3{margin:8px 0 3px;font-size:18px}.er-notification-head small{color:#718077}.er-notification-new{display:inline-flex;margin-left:7px;padding:4px 8px;border-radius:999px;background:#e8f7ee;color:#087a43;font-size:10px;font-weight:900}.er-notification-card>p{line-height:1.55}.er-notification-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.er-opportunity-highlight{outline:3px solid rgba(210,182,43,.55);outline-offset:-3px;background:#fffdf1!important}\n@media(max-width:760px){.er-direction-notice-alert{align-items:stretch;flex-direction:column}.er-direction-notice-alert .er-btn{width:100%;text-align:center}.er-notification-card{padding:15px}.er-notification-actions{display:grid;grid-template-columns:1fr}.er-notification-actions .er-btn{width:100%;min-height:44px;text-align:center}.er-notification-head h3{font-size:17px}}\n
/* v0.8.13e — pannello invio manuale email, solo admin */
.er-admin-email-panel{border-left:4px solid #d2b62b}
.er-admin-email-form .er-form-grid{align-items:end}
.er-admin-email-summary{display:flex;flex-direction:column;justify-content:center;min-height:74px;padding:12px 16px;border:1px solid #e3e9e5;border-radius:10px;background:#f7faf8}
.er-admin-email-summary span,.er-admin-email-summary small{font-size:12px;color:#66756c}
.er-admin-email-summary strong{font-size:26px;line-height:1.05;color:#057e44;margin:3px 0}
.er-admin-email-last{margin-top:10px;font-size:12px;color:#66756c}
@media(max-width:760px){.er-admin-email-form .er-form-grid{grid-template-columns:1fr}.er-admin-email-form .er-form-actions .er-btn{width:100%}}
/* v0.8.14 - Potenziali Clienti */
@media (max-width:760px){
 #erProspectsTable thead{display:none} #erProspectsTable,#erProspectsTable tbody,#erProspectsTable tr,#erProspectsTable td{display:block;width:100%}
 #erProspectsTable tr{margin:0 0 14px;border:1px solid #e4e8e5;border-radius:14px;padding:10px;background:#fff}
 #erProspectsTable td{border:0!important;padding:6px 4px!important;white-space:normal!important} #erProspectsTable td:first-child{font-size:12px;opacity:.7}
}

/* v0.8.15 - progresso Potenziali Clienti */
.er-prospect-actions{display:flex;gap:10px;flex-wrap:wrap}.er-prospect-progress{margin-top:18px;padding:16px;border:1px solid #dfe8e2;border-radius:12px;background:#f8fbf9}.er-prospect-progress-head{display:flex;justify-content:space-between;gap:15px;color:#174c37}.er-prospect-progress-track{height:10px;margin:10px 0;border-radius:999px;background:#e4ebe7;overflow:hidden}.er-prospect-progress-track span{display:block;height:100%;width:0;background:#057e44;transition:width .25s ease}.er-prospect-progress-zone{font-weight:700;margin-bottom:10px}.er-prospect-stats{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;color:#66756c}.er-prospect-stats b{color:#163f2f}@media(max-width:760px){.er-prospect-actions{display:grid;grid-template-columns:1fr}.er-prospect-actions .er-btn{width:100%}.er-prospect-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}}

/* v0.8.34 — Sidebar compatta e sempre navigabile a zoom 100% */
@media (min-width:761px){
  .er-sidebar{
    padding:14px 14px 12px;
    height:100vh;
    max-height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:rgba(255,255,255,.22) transparent;
  }
  .er-sidebar::-webkit-scrollbar{width:6px}
  .er-sidebar::-webkit-scrollbar-track{background:transparent}
  .er-sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.20);border-radius:10px}
  .er-brand-sidebar{padding:2px 5px 12px;flex:0 0 auto}
  .er-logo-box{padding:6px 9px;margin-bottom:7px;border-radius:10px}
  .er-logo-sidebar{max-height:52px}
  .er-brand-sidebar>span{font-size:9px;letter-spacing:.11em}
  .er-sidebar nav{gap:1px;margin-top:10px;flex:0 0 auto}
  .er-sidebar nav a{padding:7px 10px;border-radius:7px;font-size:13px;line-height:1.25}
  .er-sidebar-bottom{margin-top:10px;padding-top:8px;flex:0 0 auto}
  .er-link-button{padding:7px 10px;font-size:13px}
}
@media (min-width:761px) and (max-height:800px){
  .er-sidebar{padding-top:9px;padding-bottom:8px}
  .er-brand-sidebar{padding-bottom:8px}
  .er-logo-box{padding:4px 7px;margin-bottom:5px}
  .er-logo-sidebar{max-height:43px}
  .er-brand-sidebar>span{font-size:8px}
  .er-sidebar nav{margin-top:7px;gap:0}
  .er-sidebar nav a{padding:5px 9px;font-size:12px;line-height:1.18}
  .er-sidebar-bottom{margin-top:6px;padding-top:6px}
  .er-link-button{padding:5px 9px;font-size:12px}
}
/* v0.8.35 - Campanella notifiche, isolata dal layout esistente */
.er-top-actions{display:flex;align-items:center;gap:14px}.er-bell-wrap{position:relative}.er-bell-btn{position:relative;border:1px solid var(--er-border);background:#fff;border-radius:50%;width:42px;height:42px;cursor:pointer;font-size:19px}.er-bell-btn b{position:absolute;right:-4px;top:-5px;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#c9342f;color:#fff;font-size:10px;line-height:19px}.er-bell-panel{display:none;position:absolute;right:0;top:50px;width:390px;max-height:480px;background:#fff;border:1px solid var(--er-border);border-radius:14px;box-shadow:0 18px 50px rgba(20,60,39,.18);z-index:999;overflow:hidden}.er-bell-panel.open{display:block}.er-bell-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--er-border)}.er-bell-head button{border:0;background:none;color:var(--er-green);font-size:11px;cursor:pointer}.er-bell-list{max-height:420px;overflow:auto}.er-bell-item{display:block;padding:13px 16px;border-bottom:1px solid #eef1ef;text-decoration:none!important;color:inherit!important}.er-bell-item.unread{background:#f0f8f3;border-left:3px solid var(--er-gold)}.er-bell-item strong,.er-bell-item span,.er-bell-item small{display:block}.er-bell-item span{font-size:12px;color:#52665c;margin:4px 0}.er-bell-item small{font-size:10px;color:var(--er-muted)}
@media(max-width:760px){.er-bell-panel{position:fixed;left:12px;right:12px;top:72px;width:auto}.er-top-actions{gap:7px}}

/* v0.8.38 - Push mobile */
.er-push-btn{border:1px solid #dce6e0;background:#fff;border-radius:999px;min-height:42px;padding:0 13px;font-weight:800;color:#164a35;cursor:pointer}.er-push-btn.is-active{background:#e8f7ee;border-color:#9bd5b5;color:#057e44}.er-push-btn span{font-size:11px}@media(max-width:760px){.er-push-btn{padding:0 10px}.er-push-btn span{display:none}}

/* v0.8.39 - Stato push sempre visibile nella pagina Notifiche agente */
.er-agent-push-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;border-left:4px solid var(--er-gold)}.er-agent-push-copy{display:flex;align-items:flex-start;gap:14px}.er-agent-push-icon{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f4f8f5;font-size:21px;flex:0 0 44px}.er-agent-push-copy h3{margin:0 0 5px}.er-agent-push-copy p{margin:0;color:var(--er-muted);max-width:760px}.er-push-waiting{display:inline-block;padding:10px 13px;border-radius:999px;background:#f1f3f2;color:#66756c;font-size:11px;font-weight:800;white-space:nowrap}.er-push-help{font-size:11px;color:var(--er-muted);margin-top:7px;text-align:center}@media(max-width:760px){.er-agent-push-panel{display:block}.er-agent-push-panel>div:last-child{margin-top:16px}.er-agent-push-action{width:100%}.er-push-waiting{white-space:normal;text-align:center;width:100%}}


/* v0.8.42 - contatti azionabili Potenziali Clienti */
.er-prospect-contacts{display:flex;flex-wrap:wrap;gap:6px 8px;margin-top:8px;align-items:center}
.er-contact-link{display:inline-flex;align-items:center;max-width:100%;padding:5px 8px;border:1px solid #dfe7e2;border-radius:8px;background:#f8fbf9;color:#145b3b!important;text-decoration:none!important;font-size:12px;font-weight:600;line-height:1.25;word-break:break-word}
.er-contact-link:hover{border-color:#057e44;background:#eef8f2}
@media(max-width:700px){.er-prospect-contacts{display:grid;grid-template-columns:1fr}.er-contact-link{width:100%;box-sizing:border-box}}


/* v0.9.0 - Sales workspace */
.er-agenda-list{display:grid;gap:10px}.er-agenda-item{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:13px;border:1px solid var(--er-border);border-radius:11px;background:#fff}.er-agenda-item strong,.er-agenda-item span,.er-agenda-item small{display:block}.er-agenda-item span{margin-top:4px;color:var(--er-green);font-weight:700;font-size:12px}.er-agenda-item small{margin-top:5px;color:var(--er-muted)}.er-agenda-item.is-overdue{border-left:4px solid #b42318;background:#fff9f8}.er-sales-ai{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.er-sales-ai-result{display:none;width:100%;white-space:pre-wrap;padding:11px;border:1px solid #dce7e1;border-radius:9px;background:#f8fbf9;font-size:12px;line-height:1.5;color:#25332c}.er-sales-ai-result.error{background:#fff5f4;color:#9b2525}.er-brand-colors{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.er-brand-colors input[type=color]{height:48px;padding:4px}.er-notice-success{padding:12px 14px;margin-bottom:14px;border-radius:10px;background:#e9f7ef;color:#126a39;border:1px solid #cde9d8}@media(max-width:760px){.er-agenda-item{display:block}.er-agenda-item form{margin-top:10px}.er-brand-colors{grid-template-columns:1fr}.er-sales-ai .er-btn{width:100%}}

/* v0.9.12 — Credenziali agenti */
.er-credentials-panel{margin-top:22px}
.er-credentials-table code{font-size:13px;word-break:break-all}
.er-credentials-table td small{display:block;margin-top:5px;color:#6b746f}
.er-credential-password-wrap{display:flex;gap:8px;align-items:center;min-width:280px}
.er-credential-password-wrap input{min-width:170px;flex:1}
.erCredentialMsg{margin-top:8px;max-width:330px}
@media(max-width:900px){.er-credential-password-wrap{min-width:220px;flex-wrap:wrap}.er-credentials-table{min-width:920px}}

/* v0.9.17 — Diagnostica candidati pre-AI e scansioni incomplete */
.er-status.incomplete{background:#fff1dc;color:#8a4b08}
.er-scan-row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.er-candidate-panel{border-left:4px solid var(--er-gold)}
.er-candidate-summary{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 14px}
.er-candidate-summary span{padding:9px 11px;border:1px solid var(--er-border);border-radius:9px;background:#f8fbf9;font-size:11px;color:var(--er-muted)}
.er-candidate-summary b{color:var(--er-green);font-size:14px;margin-left:4px}
.er-candidate-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;gap:8px;align-items:center;margin-bottom:12px}
.er-candidate-toolbar input{width:100%;min-height:42px}
.er-candidate-table td{vertical-align:top;min-width:90px}.er-candidate-table td:nth-child(2){min-width:340px}.er-candidate-table td:nth-child(4){min-width:230px}.er-candidate-table strong,.er-candidate-table small{display:block}.er-candidate-table small{margin-top:5px;color:var(--er-muted);line-height:1.35;white-space:normal}
.er-candidate-badge{display:inline-block;margin:2px 3px 2px 0;padding:4px 6px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap}.er-candidate-badge.selected{background:#e8f0ff;color:#285ea8}.er-candidate-badge.validated{background:#e7f5ec;color:#16713c}.er-candidate-badge.seen{background:#f2f2f2;color:#657068}
.er-candidate-pagination{display:flex;justify-content:center;align-items:center;gap:10px;margin-top:14px;font-size:12px;color:var(--er-muted)}
@media(max-width:900px){.er-candidate-toolbar{grid-template-columns:1fr}.er-candidate-toolbar .er-btn{width:100%}.er-scan-row-actions{justify-content:flex-start}}


/* v0.9.20 - azioni commerciali prospect + email modal */
.er-commercial-actions{margin-top:12px;padding-top:10px;border-top:1px solid #e2e9e4}.er-commercial-actions>small{display:block;margin-bottom:7px;font-size:10px;font-weight:800;letter-spacing:.08em;color:#66756c}.er-commercial-actions-row{display:flex;flex-wrap:wrap;gap:7px}.er-commercial-actions .er-sales-ai-result{margin-top:8px;white-space:pre-wrap}
.er-email-modal{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:24px}.er-email-modal-backdrop{position:absolute;inset:0;background:rgba(14,38,25,.52);backdrop-filter:blur(2px)}.er-email-modal-dialog{position:relative;width:min(760px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.25);border:1px solid #dfe8e2}.er-email-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px 14px;border-bottom:1px solid #e7ece9}.er-email-modal-head small{font-size:10px;font-weight:800;letter-spacing:.1em;color:#057e44}.er-email-modal-head h3{margin:4px 0 0}.er-email-modal-x{border:0;background:transparent;font-size:30px;line-height:1;cursor:pointer;color:#5d6b63}.er-email-modal-body{padding:20px 24px}.er-email-modal-body label{display:block;font-weight:700;margin-bottom:14px}.er-email-modal-body input,.er-email-modal-body textarea{display:block;width:100%;margin-top:6px}.er-email-modal-foot{display:flex;justify-content:flex-end;gap:10px;padding:14px 24px 22px;border-top:1px solid #e7ece9}
@media(max-width:700px){.er-email-modal{padding:10px}.er-email-modal-dialog{width:100%;border-radius:14px}.er-commercial-actions-row .er-btn{width:100%}}

/* v0.9.31 — Fase 1: workspace quotidiano agente, scheda commerciale, feedback e agenda rapida */
.er-today-hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(420px,.8fr);gap:22px;align-items:stretch;margin:0 0 18px;padding:24px;border-radius:18px;background:linear-gradient(135deg,#0b5d3c 0%,#057e44 72%,#0a6c42 100%);color:#fff;box-shadow:0 14px 34px rgba(5,126,68,.14)}
.er-today-hero-copy{display:flex;flex-direction:column;justify-content:center}.er-today-hero-copy>span{font-size:10px;font-weight:900;letter-spacing:.14em;color:#f0d969}.er-today-hero-copy h2{margin:5px 0 7px;font-size:30px;line-height:1.05;color:#fff}.er-today-hero-copy p{max-width:700px;margin:0;color:rgba(255,255,255,.82);line-height:1.55}
.er-today-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.er-today-metrics>div{display:flex;flex-direction:column;justify-content:center;min-height:92px;padding:14px;border:1px solid rgba(255,255,255,.18);border-radius:13px;background:rgba(255,255,255,.10);text-align:center}.er-today-metrics strong{font-size:27px;line-height:1}.er-today-metrics span{margin-top:7px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:rgba(255,255,255,.78)}.er-today-metrics .is-alert{background:rgba(148,35,25,.35);border-color:rgba(255,190,180,.35)}
.er-today-opps{display:grid;gap:10px}.er-today-opp{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:18px;padding:16px 17px;border:1px solid var(--er-border);border-left:4px solid #7d8c84;border-radius:13px;background:#fff}.er-today-opp.p-a{border-left-color:#b42318}.er-today-opp.p-b{border-left-color:#d2b62b}.er-today-opp.p-c{border-left-color:#5f7568}.er-today-opp-badges{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:7px}.er-today-opp h4{margin:0 0 6px;font-size:16px;color:#193c2d}.er-today-opp p{margin:0 0 7px;color:#405249;line-height:1.45}.er-today-opp small{color:var(--er-muted)}.er-today-opp-side{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding-left:16px;border-left:1px solid #e8eeea}.er-today-opp-side>strong{font-size:10px;letter-spacing:.08em;color:#66756c}.er-today-opp-side>span{font-weight:800;color:#164a35}.er-today-opp-side>small{line-height:1.35}.er-today-opp-side .er-btn{margin-top:auto}
.er-commercial-brief{margin-top:10px;border-top:1px dashed #dce6e0;padding-top:8px}.er-commercial-brief summary{cursor:pointer;list-style:none;font-size:10px;font-weight:900;letter-spacing:.08em;color:#057e44}.er-commercial-brief summary::-webkit-details-marker{display:none}.er-commercial-brief summary:before{content:'＋';margin-right:6px}.er-commercial-brief[open] summary:before{content:'−'}.er-commercial-brief-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.er-commercial-brief-grid>div{padding:9px 10px;border:1px solid #e2e9e4;border-radius:9px;background:#f8fbf9}.er-commercial-brief-grid b{display:block;margin-bottom:5px;font-size:9px;letter-spacing:.08em;color:#66756c}.er-commercial-brief-grid p,.er-commercial-brief-grid ul{margin:0;font-size:11px;line-height:1.45;color:#2f4037}.er-commercial-brief-grid ul{padding-left:17px}.er-commercial-brief-grid li+li{margin-top:3px}
.er-feedback-box{margin-top:10px;padding:10px;border:1px solid #dde7e1;border-radius:10px;background:#fafcfb}.er-feedback-box>small,.erQuickFollowup>small{display:block;margin-bottom:7px;font-size:9px;font-weight:900;letter-spacing:.08em;color:#66756c}.er-feedback-actions{display:flex;gap:6px;margin-bottom:7px}.er-feedback-btn{flex:1;border:1px solid #d9e3dd;background:#fff;border-radius:8px;padding:7px 8px;font-size:10px;font-weight:900;cursor:pointer}.er-feedback-btn.is-useful.active{background:#e8f7ee;border-color:#9bd5b5;color:#057e44}.er-feedback-btn.is-no.active{background:#fff0ee;border-color:#efb1ab;color:#a22a20}.er-feedback-reason{width:100%;font-size:11px}.er-feedback-readonly{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:7px;padding:7px 8px;border-radius:8px;font-size:10px}.er-feedback-readonly.utile{background:#e8f7ee;color:#057e44}.er-feedback-readonly.non_pertinente{background:#fff0ee;color:#a22a20}.er-feedback-readonly span{opacity:.85}.er-row-not-relevant{opacity:.7;background:#fff9f8!important}
.erQuickFollowup{display:grid;gap:6px;margin-top:10px;padding:10px;border:1px solid #dde7e1;border-radius:10px;background:#fff}.erQuickFollowup select,.erQuickFollowup input{width:100%;font-size:11px}.erQuickFollowup .er-form-msg,.er-feedback-box .er-form-msg{font-size:10px;margin-top:2px}
@media(max-width:1100px){.er-today-hero{grid-template-columns:1fr}.er-today-opp{grid-template-columns:1fr}.er-today-opp-side{padding-left:0;padding-top:10px;border-left:0;border-top:1px solid #e8eeea}}
@media(max-width:700px){.er-today-hero{padding:18px}.er-today-metrics{grid-template-columns:1fr 1fr}.er-today-hero-copy h2{font-size:25px}.er-commercial-brief-grid{grid-template-columns:1fr}.er-feedback-actions{display:grid;grid-template-columns:1fr 1fr}}

/* v0.9.32 — FASE 2 / TERRITORIO */
.er-territory-head .er-eyebrow{display:block;margin-bottom:6px;font-size:10px;font-weight:900;letter-spacing:.12em;color:var(--er-green)}
.er-territory-head{align-items:center}.er-territory-agent-tabs{margin-bottom:14px}
.er-territory-kpis{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:10px;margin:0 0 14px}.er-territory-kpis>div{background:#fff;border:1px solid #dfe9e3;border-radius:14px;padding:14px 15px;box-shadow:0 4px 14px rgba(5,126,68,.04)}.er-territory-kpis span{display:block;font-size:10px;font-weight:900;letter-spacing:.06em;color:#738078;text-transform:uppercase}.er-territory-kpis strong{display:block;margin-top:5px;font-size:26px;color:#173c2b}.er-territory-kpis .is-alert{border-color:#e7c956;background:#fffdf3}
.er-territory-subnav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.er-territory-subnav a{display:inline-flex;padding:9px 12px;border:1px solid #dce8e1;border-radius:999px;background:#fff;color:#214534;font-size:12px;font-weight:800;text-decoration:none}.er-territory-subnav a:hover{border-color:var(--er-green);color:var(--er-green)}
.er-map-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:14px}.er-territory-map{height:520px;border:1px solid #d9e6de;border-radius:15px;overflow:hidden;background:#eef5f0}.er-map-loading{height:100%;display:flex;align-items:center;justify-content:center;padding:30px;color:#607168;font-weight:700;text-align:center}.er-map-status{font-size:11px;color:#6f7d75;margin-top:7px}.er-map-side{display:grid;align-content:start;gap:12px}.er-map-legend,.er-nearest-zones{border:1px solid #e0e9e3;background:#f9fcfa;border-radius:13px;padding:14px}.er-map-legend strong,.er-nearest-zones>strong{display:block;margin-bottom:10px}.er-map-legend span{display:flex;align-items:center;gap:8px;font-size:12px;color:#53665b;margin:7px 0}.er-map-legend i{width:13px;height:13px;border-radius:50%;display:inline-block;background:#7c9488}.er-map-legend i.hot{background:#c78b00}.er-map-legend i.active{background:#057e44}.er-map-legend i.base{background:#7c9488}.er-nearest-zones p{font-size:12px;line-height:1.5;color:#617169;margin:0}.er-nearest-list{display:grid;gap:7px}.er-nearest-list button{display:block;width:100%;border:1px solid #dce8e1;border-radius:9px;background:#fff;padding:9px;text-align:left;cursor:pointer}.er-nearest-list b,.er-nearest-list span{display:block}.er-nearest-list span{font-size:10px;color:#718078;margin-top:2px}
.er-map-divicon{background:transparent!important;border:0!important}.er-map-pin{width:34px;height:34px;border-radius:50% 50% 50% 8px;transform:rotate(-45deg);display:flex;align-items:center;justify-content:center;border:3px solid #fff;box-shadow:0 3px 10px rgba(0,0,0,.22);font-weight:900;color:#fff;background:#7c9488}.er-map-pin.hot{background:#c78b00}.er-map-pin.active{background:#057e44}.er-map-pin.base{background:#748b7f}.er-map-pin b{display:block;transform:rotate(45deg);font-size:11px;line-height:1;color:#fff}.er-map-popup{min-width:170px;display:grid;gap:5px}.er-map-popup>strong{font-size:14px;color:#173c2b;margin-bottom:3px}.er-map-popup span{display:flex;justify-content:space-between;gap:15px;font-size:11px}.er-map-popup small{margin-top:5px;color:#6c7b73}
.er-plan-badge{display:inline-flex;padding:7px 10px;border-radius:999px;background:#edf7f1;color:#057e44;font-weight:900;font-size:10px;letter-spacing:.06em}.er-plan-list{display:grid;gap:9px}.er-plan-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid #e0e9e3;border-radius:13px;padding:12px;background:#fff}.er-plan-item.kind-agenda{border-left:5px solid #d2b62b}.er-plan-item.kind-opportunity{border-left:5px solid #057e44}.er-plan-item.kind-prospect{border-left:5px solid #739181}.er-plan-number{width:34px;height:34px;border-radius:50%;background:#eef6f1;display:flex;align-items:center;justify-content:center;color:#173c2b;font-weight:900}.er-plan-copy>div{display:flex;align-items:center;gap:8px}.er-plan-copy h4{margin:5px 0 4px;color:#173c2b}.er-plan-copy p{margin:0;color:#5f6f66;font-size:12px;line-height:1.45}.er-plan-copy small{color:#7a8881}.er-plan-tag{display:inline-flex;padding:4px 7px;border-radius:999px;background:#f1f5f2;font-size:9px;font-weight:900;letter-spacing:.05em;color:#456153}
.er-route-controls{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:14px}.er-route-controls label{min-width:260px;font-weight:800}.er-route-controls select{display:block;margin-top:5px;width:100%}.er-route-controls>span{font-size:11px;color:#6b7a72;max-width:520px}.er-route-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 14px;background:#f4f9f6;border:1px solid #deebe3;border-radius:12px;margin-bottom:10px}.er-route-summary strong{font-size:18px;color:#173c2b}.er-route-summary span{color:#65756c;font-size:12px}.er-route-summary .er-btn{margin-left:auto}.er-route-stops{list-style:none;padding:0;margin:0;display:grid;gap:8px}.er-route-stops li{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid #e4ebe7;border-radius:10px}.er-route-dot{width:12px;height:12px;border-radius:50%;background:var(--er-green);box-shadow:0 0 0 4px #e6f3eb}.er-route-stops strong,.er-route-stops small{display:block}.er-route-stops small{margin-top:3px;color:#6e7d75}.er-route-stops a{font-weight:800;color:var(--er-green);text-decoration:none}
.er-hot-list{display:grid;gap:8px}.er-hot-list article{display:grid;grid-template-columns:44px minmax(0,1fr) 60px;gap:10px;align-items:center;padding:11px 12px;border:1px solid #e1e9e4;border-radius:11px}.er-hot-rank{font-weight:900;color:#65756c}.er-hot-main>div:first-child{display:flex;align-items:center;gap:8px}.er-hot-main strong{color:#173c2b}.er-heat{display:inline-flex;padding:3px 6px;border-radius:999px;font-size:8px;font-weight:900;letter-spacing:.07em}.er-heat-calda{background:#fff0ce;color:#8a5b00}.er-heat-attiva{background:#e5f4eb;color:#057e44}.er-heat-presidio{background:#edf1ef;color:#68766f}.er-hot-bar{height:7px;background:#edf2ef;border-radius:999px;overflow:hidden;margin:7px 0}.er-hot-bar i{display:block;height:100%;background:linear-gradient(90deg,#057e44,#d2b62b);border-radius:999px}.er-hot-main small{color:#6f7d75}.er-hot-list article>b{text-align:right;font-size:18px;color:#173c2b}
@media(max-width:1100px){.er-territory-kpis{grid-template-columns:repeat(3,1fr)}.er-map-layout{grid-template-columns:1fr}.er-map-side{grid-template-columns:1fr 1fr}.er-territory-map{height:450px}}
@media(max-width:700px){.er-territory-kpis{grid-template-columns:1fr 1fr}.er-map-side{grid-template-columns:1fr}.er-territory-map{height:390px}.er-plan-item{grid-template-columns:36px minmax(0,1fr)}.er-plan-item>.er-btn{grid-column:2}.er-route-summary .er-btn{width:100%;margin-left:0}.er-hot-list article{grid-template-columns:36px minmax(0,1fr) 48px}.er-territory-subnav{overflow:auto;flex-wrap:nowrap;padding-bottom:4px}.er-territory-subnav a{white-space:nowrap}}


/* v0.9.33 — TERRITORIO PERFORMANCE / caricamento mappa on-demand */
.er-map-lazy{min-height:220px;border:1px dashed #cdded4;border-radius:15px;background:linear-gradient(135deg,#f7fbf8,#eef6f1);display:flex;align-items:center;justify-content:center;padding:26px;text-align:center}
.er-map-lazy>div{max-width:600px}.er-map-lazy-icon{display:flex;width:50px;height:50px;margin:0 auto 12px;border-radius:50%;align-items:center;justify-content:center;background:#e3f2e9;color:var(--er-green);font-size:28px;font-weight:900}.er-map-lazy strong{display:block;color:#173c2b;font-size:19px;margin-bottom:7px}.er-map-lazy p{margin:0 auto 15px;color:#617169;line-height:1.55;font-size:12px}.er-map-lazy .er-btn{min-width:220px}
@media(max-width:700px){.er-map-lazy{min-height:190px;padding:20px}.er-map-lazy .er-btn{width:100%;min-width:0}}
