.leads-page{min-width:0}.leads-page .page-header,.leads-page .page-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}.leads-page .page-header{margin-bottom:20px}.leads-page .page-header p{color:#64748b}.leads-page .lead-toolbar{display:flex;flex-wrap:wrap;gap:10px;padding:14px;background:#fff;border:1px solid #e2e8f0;border-radius:14px}.leads-page .lead-toolbar input{flex:2 1 280px;min-width:180px}.leads-page .lead-toolbar select{flex:1 1 180px;min-width:180px}.leads-page input,.leads-page select,.lead-sheet input,.lead-sheet select,.lead-import select{height:38px;padding:0 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#1e293b;font:inherit;min-width:0;box-sizing:border-box}
.leads-page .lead-counters{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:10px;margin:14px 0}.lead-counter{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border:1px solid;border-radius:15px;text-align:left;cursor:pointer;font:inherit;font-size:12px;font-weight:700;min-height:52px}.lead-counter span{line-height:1.3}.lead-counter strong{font-size:23px;font-variant-numeric:tabular-nums}.lead-counter.active{box-shadow:0 0 0 2px currentColor}.lead-counter:focus-visible{outline:3px solid #38bdf8;outline-offset:3px}.lead-counter:disabled{opacity:.65;cursor:wait}.lead-counter.slate,.lead-status.slate{background:#e2e8f0;color:#475569;border-color:#cbd5e1}.lead-counter.blue,.lead-status.blue{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}.lead-counter.amber,.lead-status.amber{background:#fef3c7;color:#92400e;border-color:#fde68a}.lead-counter.red,.lead-status.red{background:#fee2e2;color:#b91c1c;border-color:#fecaca}.lead-counter.purple,.lead-status.purple{background:#f3e8ff;color:#7e22ce;border-color:#e9d5ff}.lead-counter.green,.lead-status.green{background:#dcfce7;color:#15803d;border-color:#bbf7d0}.lead-counter.all{background:#f1f5f9;color:#334155;border-color:#cbd5e1}
.leads-page .lead-bulkbar{display:flex;align-items:center;flex-wrap:wrap;gap:9px;padding:13px;margin:14px 0;border:1px solid #dbe7f2;background:#f8fbff;border-radius:12px}.leads-page .lead-bulkbar select{width:230px}.lead-export-label{font-size:12px;color:#64748b;margin-left:auto}.leads-page .lead-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;font-size:13px;color:#64748b}.leads-page .btn,.lead-sheet .btn,.lead-import .btn{white-space:nowrap}.lead-table-wrap{overflow-x:auto;border:1px solid #e2e8f0;border-radius:14px;background:#fff}.lead-table{width:100%;min-width:1280px;border-collapse:collapse;font-size:13px;text-align:left}.lead-table th{background:#f1f5f9;color:#64748b;text-transform:uppercase;font-size:10px;letter-spacing:.04em;padding:12px;border-bottom:1px solid #dbe3ee;white-space:nowrap}.lead-table td{padding:12px;border-bottom:1px solid #edf2f7;color:#334155;vertical-align:middle;max-width:240px;overflow-wrap:anywhere}.lead-table tbody tr.selected{background:#eff6ff}.lead-table tbody tr:hover{background:#f8fbff}.lead-table .lead-check{width:32px;min-width:32px;text-align:center}.lead-table .lead-check input{width:17px;height:17px;margin:0;padding:0;accent-color:#2563eb}.lead-table .lead-company{min-width:220px}.lead-table .lead-company small{display:block;color:#94a3b8;font-size:11px;margin-top:4px}.lead-name{background:none;border:0;padding:0;color:#1e293b;font:inherit;font-weight:700;cursor:pointer;text-align:left;white-space:normal}.lead-name:hover{text-decoration:underline}.lead-table .lead-phone{min-width:140px;white-space:nowrap}.lead-table .lead-status{width:275px;font-size:12px;font-weight:600;cursor:pointer;max-width:none}.lead-table .lead-empty{padding:34px;text-align:center}.lead-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:14px}.lead-pagination>div{display:flex;align-items:center;gap:10px}.lead-pagination label{color:#64748b;font-size:12px}.lead-pagination select{width:80px}.lead-message{padding:12px 15px;margin:10px 0;border-radius:10px;font-size:13px;display:flex;justify-content:space-between;align-items:center;gap:12px}.lead-message.error{background:#fee2e2;color:#991b1b}.lead-message.success{background:#dcfce7;color:#166534}
.modal.lead-sheet,.modal.lead-import{position:fixed;inset:0;transform:none;width:100%;height:100dvh;max-height:100dvh;box-sizing:border-box;padding:0;margin:0;border-radius:0;border:0;overflow:hidden;display:flex;flex-direction:column;animation:none;background:#fff}.lead-modal-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;border-bottom:1px solid #e2e8f0;background:#fff}.lead-modal-header h2{margin:0;font-size:22px}.lead-modal-header p{margin:4px 0 0;color:#64748b;font-size:13px}.lead-modal-body{flex:1 1 0%;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;box-sizing:border-box;width:100%;max-width:1440px;margin:0 auto;padding:24px 24px 48px;display:block}.lead-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px}.lead-form-grid label{display:flex;flex-direction:column;gap:7px;color:#64748b;font-size:13px}.lead-form-grid input,.lead-form-grid select{width:100%}.lead-form-actions{display:flex;justify-content:flex-end;border-top:1px solid #e2e8f0;padding:15px 0}.lead-hint{font-size:13px;line-height:1.6;color:#64748b}.lead-import input[type=file]{display:block;margin:18px 0;max-width:100%}.lead-import-summary{padding:14px;background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;border-radius:10px;margin-bottom:12px;font-weight:700}.lead-import-preview{margin-top:24px;padding-top:16px;border-top:1px solid #e2e8f0}.lead-preview-wrap{overflow:auto;max-height:420px;border:1px solid #e2e8f0;border-radius:12px}.lead-preview-wrap thead th{position:sticky;top:0;z-index:1}.lead-import-error{background:#fff1f2}.lead-import-duplicate{background:#fffbeb}.lead-sheet .company-timeline-notes .cl-table{min-width:1100px}
@media(max-width:760px){.lead-form-grid{grid-template-columns:1fr}.lead-modal-body{padding:18px 16px 40px}.lead-modal-header{padding:16px}.lead-pagination>div{flex-wrap:wrap}.lead-export-label{width:100%;margin-left:0}.lead-counters{grid-template-columns:repeat(2,minmax(130px,1fr))!important}.leads-page .lead-toolbar input{min-width:100%}}
.lead-activity-editor{margin-top:14px;padding:14px;border:1px solid #bfdbfe;border-radius:12px;background:#f8fbff}.lead-activity-toggle{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:12px}.lead-activity-toggle input{width:18px;height:18px;margin:0;accent-color:#2563eb}.lead-note-activity{display:flex;flex-direction:column;gap:5px;margin-top:10px;padding:10px;border:1px solid #bfdbfe;border-radius:10px;background:#eff6ff;font-size:12px;white-space:normal}.lead-note-activity a{color:#1d4ed8;font-weight:700}.lead-note-activity small{color:#64748b}.lead-agenda-page{min-width:0}.lead-agenda-page .page-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.lead-agenda-page .page-header p{color:#64748b}.lead-agenda-filters{display:flex;flex-wrap:wrap;gap:10px;padding:14px;border:1px solid #dbe7f2;background:#fff;border-radius:14px}.lead-agenda-filters input,.lead-agenda-filters select,.lead-agenda-monthbar input{height:38px;border:1px solid #cbd5e1;border-radius:8px;padding:0 10px;background:#fff;color:#334155;font:inherit;min-width:0}.lead-agenda-filters input{flex:2 1 240px}.lead-agenda-filters select{flex:1 1 180px}.lead-agenda-monthbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:16px 0}.lead-agenda-monthbar>div{display:flex;align-items:center;gap:9px}.lead-agenda-monthbar strong{text-transform:capitalize;min-width:150px;text-align:center}.lead-calendar-scroll{overflow-x:auto;border:1px solid #dbe7f2;border-radius:14px;background:#fff}.lead-calendar{display:grid;grid-template-columns:repeat(7,minmax(140px,1fr));min-width:980px;gap:1px;background:#dbe7f2}.lead-calendar-weekday{padding:12px;background:#edf6ff;color:#64748b;text-align:center;font-size:12px;font-weight:800;text-transform:uppercase}.lead-calendar-day{border:0;background:#fff;color:#334155;padding:10px;min-height:125px;text-align:left;display:flex;flex-direction:column;gap:6px;font:inherit;cursor:pointer;min-width:0}.lead-calendar-day.empty{background:#f8fafc;cursor:default}.lead-calendar-day.selected{background:#eff6ff;box-shadow:inset 0 0 0 2px #2563eb}.lead-calendar-day.today .lead-calendar-day-head strong{background:#2563eb;color:#fff;border-radius:50%;width:27px;height:27px;display:grid;place-items:center}.lead-calendar-day-head{display:flex;align-items:center;justify-content:space-between;min-height:27px}.lead-calendar-day-head small{color:#64748b}.lead-calendar-event{display:block;padding:5px 6px;border-radius:6px;font-size:11px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.lead-calendar-event.blue{background:#dbeafe;color:#1d4ed8}.lead-calendar-event.green{background:#dcfce7;color:#15803d}.lead-calendar-event.purple{background:#f3e8ff;color:#7e22ce}.lead-agenda-listhead{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:22px;margin-bottom:12px}.lead-agenda-listhead h2{margin:0;font-size:20px}.lead-agenda-listhead span{color:#64748b;font-size:13px}.lead-agenda-table{min-width:1320px}.lead-agenda-table td{vertical-align:top}.lead-agenda-table .lead-agenda-time{white-space:nowrap;min-width:135px}.lead-agenda-table small{display:block;margin-top:6px;color:#64748b}.lead-agenda-note{white-space:pre-wrap;max-height:90px;overflow:auto;font-size:11px}.lead-agenda-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:190px}.lead-agenda-actions .btn{padding:6px 8px;font-size:11px;white-space:nowrap}.lead-activity-status{display:inline-block;padding:5px 8px;border-radius:8px;font-size:11px;font-weight:700;white-space:nowrap}.lead-activity-status.planned{background:#dbeafe;color:#1d4ed8}.lead-activity-status.done{background:#dcfce7;color:#15803d}.lead-activity-status.cancelled{background:#e2e8f0;color:#64748b}@media(max-width:760px){.lead-agenda-monthbar>div{flex-wrap:wrap}.lead-agenda-filters input{min-width:100%}}

/* Agenda affiancata: calendario e dettaglio con la stessa larghezza. */
.lead-agenda-workspace.split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}.lead-agenda-detail{min-width:0}.lead-agenda-workspace.split .lead-calendar{min-width:0;grid-template-columns:repeat(7,minmax(0,1fr))}.lead-agenda-workspace.split .lead-calendar-day{min-height:110px;padding:7px}.lead-agenda-workspace.split .lead-calendar-weekday{padding:10px 2px;font-size:10px}.lead-agenda-workspace.split .lead-agenda-listhead{margin-top:0}.lead-agenda-workspace.split .lead-agenda-table{min-width:0;display:block}.lead-agenda-workspace.split .lead-agenda-table thead{display:none}.lead-agenda-workspace.split .lead-agenda-table tbody{display:block;padding:12px}.lead-agenda-workspace.split .lead-agenda-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:16px;border:1px solid #dbe7f2;border-radius:12px;margin-bottom:12px}.lead-agenda-workspace.split .lead-agenda-table td{display:block;min-width:0;max-width:none;padding:0;border:0;white-space:normal}.lead-agenda-workspace.split .lead-agenda-table td:before{display:block;font-size:10px;text-transform:uppercase;font-weight:700;color:#64748b;margin-bottom:5px}.lead-agenda-workspace.split .lead-agenda-table td:nth-child(1):before{content:'Data e ora'}.lead-agenda-workspace.split .lead-agenda-table td:nth-child(2):before{content:'Tipologia'}.lead-agenda-workspace.split .lead-agenda-table td:nth-child(3):before{content:'Lead e nota'}.lead-agenda-workspace.split .lead-agenda-table td:nth-child(4):before{content:'Referente da contattare'}.lead-agenda-workspace.split .lead-agenda-table td:nth-child(5):before{content:'Commerciale / buyer'}.lead-agenda-workspace.split .lead-agenda-table td:nth-child(6):before{content:'Stato'}.lead-agenda-workspace.split .lead-agenda-table td:last-child{grid-column:1/-1}.lead-agenda-workspace.split .lead-agenda-table .lead-empty{grid-column:1/-1;padding:18px}.lead-agenda-workspace.split .lead-agenda-table .lead-empty:before{content:none}.leads-page .lead-assignee{min-width:180px}.leads-page .lead-table{min-width:1480px}
@media(max-width:1050px){.lead-agenda-workspace.split{grid-template-columns:minmax(0,1fr)}}

.lead-clickable-row{cursor:pointer}.leads-page .lead-name{color:#1d4ed8;text-decoration:underline;text-underline-offset:3px}.leads-page .lead-name:focus-visible{outline:2px solid #2563eb;outline-offset:4px}.lead-activity-title{display:inline-flex;align-items:center;gap:7px;max-width:100%}.lead-activity-title svg,.lead-calendar-event-content svg{flex-shrink:0;vertical-align:middle}.lead-calendar-event-content{display:flex;align-items:center;gap:4px;min-width:0}.lead-calendar-event-label{min-width:0;overflow:hidden;text-overflow:ellipsis}.lead-calendar-event-company{min-width:0;overflow:hidden;text-overflow:ellipsis}

.lead-row-activity-icon{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;margin-left:7px;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;padding:4px}.lead-row-activity-icon svg{display:block;width:15px;height:15px}

.lead-agenda-header-actions{display:flex;gap:10px;flex-wrap:wrap}.lead-activity-status.deleted{background:#fee2e2;color:#991b1b}.agenda-customer-picker{margin:0 0 24px;padding:18px;border:1px solid #bfdbfe;background:#f8fbff;border-radius:12px}.agenda-customer-picker label{display:flex;flex-direction:column;gap:8px;margin-bottom:14px;color:#475569}.agenda-customer-picker input{width:100%}.agenda-customer-picker select{height:auto;min-height:180px;width:100%;padding:8px}.agenda-customer-picker option{padding:7px}.agenda-customer-pagination{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.lead-agenda-workspace.split .lead-agenda-table td:nth-child(3):before{content:'Lead / Cliente e nota'}

.lead-agenda-page .btn.reminder,.lead-sheet .btn.reminder{background:#fef3c7;color:#92400e;border:1px solid #f59e0b}.lead-agenda-page .btn.reminder:hover,.lead-sheet .btn.reminder:hover{background:#fde68a}.lead-calendar-event.reminder{background:#fef3c7;color:#92400e;border-left:3px solid #f59e0b}.lead-agenda-table .agenda-reminder-row{background:#fffbeb;border-color:#fcd34d!important}.agenda-reminder-label{color:#92400e}.agenda-activity-notes{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:9px;padding:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;max-height:180px;overflow:auto}.agenda-reminder-row .agenda-activity-notes{background:#fef3c7;border-color:#fde68a}.agenda-notes-editor{display:flex;flex-direction:column;gap:8px;margin:8px 0 20px;color:#475569}.agenda-notes-editor textarea{width:100%;box-sizing:border-box;padding:12px;border:1px solid #cbd5e1;border-radius:10px;font:inherit;resize:vertical;min-height:120px}.agenda-notes-editor small{color:#64748b}
